@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap');
body { font-family: 'Inter', sans-serif; background-color: #f8fafc; overflow: hidden; }

/* Header Gradient exactly as screenshot */
.header-gradient { background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 30%, #ec4899 70%, #f43f5e 100%); }
.sidebar { background-color: #0f172a; width: 220px; flex-shrink: 0; position: relative; z-index: 100; }

/* Nav Button Styles */
.nav-link { color: #94a3b8; padding: 12px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 12px; transition: 0.2s; cursor: pointer; margin: 4px 0; }
.nav-active { background: #2563eb !important; color: white !important; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }

/* Dashboard Tiles Gradients */
.tile-purple { background: linear-gradient(135deg, #c084fc, #9333ea); }
.tile-green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.tile-orange { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.tile-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.tile-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.tile-cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.tile-indigo { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.tile-red { background: linear-gradient(135deg, #f87171, #dc2626); }

/* Gauges/Chart card styles */
.glass-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.gauge-card { border: 2px solid transparent; transition: all 0.3s ease; }
.border-green { border-color: #22c55e; }
.border-orange { border-color: #f59e0b; }
.border-red { border-color: #ef4444; }

.digital-readout { background: #0f172a; color: #fbbf24; padding: 4px 12px; border-radius: 4px; font-family: 'Courier New', monospace; font-size: 15px; font-weight: bold; border: 1px solid #334155; }
.digital-warning { color: #f87171 !important; border-color: #7f1d1d !important; }
.digital-green { color: #4ade80 !important; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.animate-pulse-red { animation: pulse-red 2s infinite; border-color: #ef4444 !important; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.5s ease-out forwards; }

.gauge-card { border: 2px solid transparent; transition: all 0.3s ease; animation: fadeInUp 0.6s ease-out forwards; }
.gauge-card:nth-child(1) { animation-delay: 0.1s; }
.gauge-card:nth-child(2) { animation-delay: 0.2s; }
.gauge-card:nth-child(3) { animation-delay: 0.3s; }
.gauge-card:nth-child(4) { animation-delay: 0.4s; }
.gauge-card:nth-child(5) { animation-delay: 0.5s; }

.tile-animate { animation: fadeInUp 0.5s ease-out forwards; opacity: 0; }
.tile-animate:nth-child(1) { animation-delay: 0.05s; }
.tile-animate:nth-child(2) { animation-delay: 0.1s; }
.tile-animate:nth-child(3) { animation-delay: 0.15s; }
.tile-animate:nth-child(4) { animation-delay: 0.2s; }
.tile-animate:nth-child(5) { animation-delay: 0.25s; }
.tile-animate:nth-child(6) { animation-delay: 0.3s; }
.tile-animate:nth-child(7) { animation-delay: 0.35s; }

.trend-card { animation: fadeInUp 0.5s ease-out forwards; opacity: 0; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

/* Index Page Styles */
.index-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.index-card { background: white; padding: 2.5rem; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); width: 100%; max-width: 400px; }
.index-logo { width: 80px; height: 80px; margin: 0 auto 1.5rem; background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 1rem; display: flex; align-items: center; justify-content: center; padding: 8px; }
.index-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 0.5rem; }
.form-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid #e2e8f0; border-radius: 0.5rem; font-size: 0.875rem; transition: all 0.2s; }
.form-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.btn-primary { width: 100%; padding: 0.75rem; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: white; border: none; border-radius: 0.5rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5); }
.error-message { color: #ef4444; font-size: 0.875rem; margin-top: 0.5rem; display: none; }
.link-text { color: #4f46e5; text-decoration: none; font-size: 0.875rem; }
.link-text:hover { text-decoration: underline; }

#profile-dropdown { animation: fadeInUp 0.2s ease-out; }

/* Mobile Responsive */
.mobile-menu-btn { display: none; }

@media (max-width: 1024px) {
    .sidebar { position: fixed; left: -280px; top: 0; height: 100vh; z-index: 100; transition: left 0.3s ease; }
    .sidebar.open { left: 0; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
    .sidebar.open + .sidebar-overlay { display: block; }
    .mobile-menu-btn { display: flex; }
    .header-title { font-size: 1.25rem !important; }
    .header-logo-right { display: none; }
}

@media (max-width: 768px) {
    body { overflow: auto; }
    .header-gradient { height: auto; padding: 12px; flex-wrap: wrap; gap: 10px; }
    .header-title { font-size: 1rem !important; text-align: center; order: 1; width: 100%; }
    .header-left-menu { order: 0; }
    .header-right { order: 2; display: flex; align-items: center; gap: 8px; }
    .header-right > div:not(.mobile-menu-btn) { display: none; }
    #admin-profile { display: none !important; }
    #clock { font-size: 12px; padding: 4px 8px; }
    
    .glass-card { padding: 12px !important; }
    .glass-card .flex.items-center.gap-4 { flex-direction: column; align-items: flex-start !important; }
    .glass-card .ml-auto { margin-left: 0 !important; margin-top: 12px; width: 100%; }
    
    #summary-tiles { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    #summary-tiles > div { padding: 12px !important; }
    #summary-tiles .text-2xl { font-size: 1.25rem; }
    #summary-tiles .text-\[10px\] { font-size: 8px; }
    
    .glass-card .flex.flex-wrap.gap-6 { flex-direction: column; gap: 12px !important; }
    .glass-card .flex.flex-col.gap-1\.5 { width: 100%; }
    .glass-card .flex.flex-col.gap-1\.5 input, 
    .glass-card .flex.flex-col.gap-1\.5 select { width: 100% !important; }
    .glass-card .flex.items-center.gap-2.mb-2 { flex-wrap: wrap; width: 100%; }
    .glass-card .flex.items-center.gap-2.mb-2 button { flex: 1; min-width: 120px; }
    .glass-card .flex.items-center.gap-2.ml-auto { margin-left: 0 !important; width: 100%; flex-direction: column; }
    
    table { font-size: 9px !important; }
    th, td { padding: 6px 3px !important; }
    
    #view-gauges, #trend-grid { grid-template-columns: 1fr !important; }
    
    .glass-card .grid { grid-template-columns: 1fr !important; }
    
    .profile-dropdown-mobile { display: block; }
}

@media (max-width: 480px) {
    .header-title { font-size: 0.875rem !important; }
    #summary-tiles { grid-template-columns: 1fr 1fr !important; }
    .tile-animate { padding: 10px; }
    .index-card { padding: 1.5rem; margin: 1rem; }
    .index-logo { width: 60px; height: 60px; }
}

@media (max-width: 360px) {
    .header-title { font-size: 0.75rem !important; letter-spacing: 0; }
    #summary-tiles { grid-template-columns: 1fr !important; }
}

