 :root {
     --primary: #6C63FF;
     --primary-light: rgba(108, 99, 255, 0.15);
     --primary-lighter: rgba(108, 99, 255, 0.05);
     --primary-dark: #5a53e0;
     --secondary: #4CC9F0;
     --accent: #F72585;
     --success: #4CBB17;
     --warning: #F8961E;
     --danger: #F94144;
     --background: #1E1E1E;
     --card-bg: #2C2C2C;
     --card-bg-hover: #333333;
     --border: #3A3A3A;
     --text: #E9E9E9;
     --text-muted: #9E9E9E;
     --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.12);
     --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.18);
     --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.24);
     --transition-fast: 0.15s;
     --transition-medium: 0.25s;
     --transition-slow: 0.4s;
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     -webkit-font-smoothing: antialiased;
     -moz-osx-font-smoothing: grayscale;
 }

 body {
     background-color: black;
     color: var(--text);
     min-height: 100vh;
     display: flex;
     flex-direction: column;
     line-height: 1.6;
 }

 /* Header styles */
 header {
     background-color: rgba(0, 0, 0, 0.7);
     border-bottom: 1px solid rgba(255, 255, 255, 0.08);
     padding: 1rem 2rem;
     position: sticky;
     top: 0;
     z-index: 100;
     backdrop-filter: blur(16px);
     box-shadow: 0 1px 12px rgba(0, 0, 0, 0.2);
 }

 .header-content {
     display: flex;
     justify-content: space-between;
     align-items: center;
     max-width: 1400px;
     margin: 0 auto;
 }

 .logo {
     display: flex;
     align-items: center;
     gap: 0.75rem;
 }

 .logo i {
     font-size: 1.75rem;
     color: var(--primary);
     filter: drop-shadow(0 0 8px rgba(108, 99, 255, 0.4));
 }

 .logo h1 {
     font-size: 1.6rem;
     font-weight: 600;
     color: var(--text);
     letter-spacing: -0.02em;
 }

 nav {
     display: flex;
     gap: 0.5rem;
 }

 nav a {
     color: var(--text-muted);
     text-decoration: none;
     display: flex;
     align-items: center;
     gap: 0.5rem;
     font-size: 0.9rem;
     font-weight: 500;
     transition: all var(--transition-fast) ease;
     padding: 0.6rem 1.1rem;
     border-radius: 0.5rem;
     position: relative;
 }

 nav a::after {
     content: '';
     position: absolute;
     bottom: -1px;
     left: 50%;
     width: 0;
     height: 2px;
     background-color: var(--primary);
     transition: all var(--transition-medium) ease;
     transform: translateX(-50%);
     opacity: 0;
 }

 nav a.active {
     color: var(--text);
     background-color: var(--primary-light);
 }

 nav a.active::after {
     width: 50%;
     opacity: 1;
 }

 nav a:hover {
     color: var(--text);
     background-color: var(--primary-lighter);
     transform: translateY(-1px);
 }

 /* Main content styles */
 main {
     flex: 1;
     padding: 2rem;
     display: flex;
     flex-direction: column;
     gap: 2rem;
     max-width: 1400px;
     margin: 0 auto;
     width: 100%;
 }

 .dashboard-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.5rem;
     flex-wrap: wrap;
     gap: 1.5rem;
 }

 .dashboard-title {
     font-size: 1.75rem;
     font-weight: 700;
     color: var(--text);
     letter-spacing: -0.03em;
     position: relative;
     padding-left: 0.5rem;
 }

 .dashboard-title::before {
     content: '';
     position: absolute;
     left: 0;
     top: 15%;
     height: 70%;
     width: 3px;
     background: linear-gradient(to bottom, var(--primary), var(--secondary));
     border-radius: 4px;
 }

 /* Filter section styles */
 .filters-container {
     display: flex;
     gap: 1rem;
     align-items: center;
     flex-wrap: wrap;
 }

 .filter-item {
     display: flex;
     align-items: center;
     gap: 0.5rem;
     background-color: var(--card-bg);
     padding: 0.75rem 1rem;
     border-radius: 12px;
     border: 1px solid var(--border);
     box-shadow: var(--shadow-sm);
     transition: all var(--transition-medium) ease;
 }

 .filter-item:hover {
     border-color: var(--primary-light);
     box-shadow: var(--shadow-md);
 }

 .filter-item label {
     font-weight: 600;
     color: var(--text);
     font-size: 0.9rem;
     white-space: nowrap;
 }

 .select-wrapper {
     position: relative;
 }

 .select-wrapper::after {
     content: '↓';
     position: absolute;
     right: 0.75rem;
     top: 50%;
     transform: translateY(-50%);
     color: var(--text-muted);
     pointer-events: none;
     font-size: 0.8rem;
 }

 .filter-item select,
 .filter-item input[type="date"] {
     background-color: rgba(0, 0, 0, 0.2);
     color: var(--text);
     border: 1px solid var(--border);
     padding: 0.7rem 0.75rem;
     border-radius: 8px;
     cursor: pointer;
     transition: all var(--transition-fast) ease;
     font-size: 0.9rem;
     font-weight: 500;
     min-width: 140px;
     appearance: none;
 }

 .filter-item select {
     padding-right: 2rem;
 }

 .filter-item select:hover,
 .filter-item select:focus,
 .filter-item input[type="date"]:hover,
 .filter-item input[type="date"]:focus {
     border-color: var(--primary);
     box-shadow: 0 0 0 2px var(--primary-light);
     background-color: rgba(0, 0, 0, 0.3);
     outline: none;
 }

 .date-filter {
     display: flex;
     gap: 0.5rem;
     align-items: center;
 }

 .apply-btn {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     color: white;
     border: none;
     padding: 0.7rem 1.4rem;
     border-radius: 8px;
     cursor: pointer;
     transition: all var(--transition-medium) ease;
     font-size: 0.9rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     gap: 0.5rem;
     box-shadow: 0 2px 8px rgba(108, 99, 255, 0.4);
 }

 .apply-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(108, 99, 255, 0.5);
     background: linear-gradient(135deg, var(--primary), var(--primary));
 }

 /* Card styles */
 .grid-container {
     display: grid;
     grid-template-columns: repeat(12, 1fr);
     gap: 1.5rem;
 }

 .card {
     background: linear-gradient(145deg, var(--card-bg), rgba(50, 50, 52, 0.5));
     border-radius: 16px;
     border: 1px solid var(--border);
     overflow: hidden;
     display: flex;
     flex-direction: column;
     box-shadow: var(--shadow-sm);
     transition: all var(--transition-medium) ease-in-out;
     position: relative;
 }

 .card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
     background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
     opacity: 0;
     transition: opacity var(--transition-medium) ease;
 }

 .card:hover {
     transform: translateY(-4px);
     box-shadow: var(--shadow-md);
     border-color: rgba(255, 255, 255, 0.15);
 }

 .card:hover::before {
     opacity: 1;
 }

 .span-12 {
     grid-column: span 12;
 }

 .span-6 {
     grid-column: span 6;
 }

 .h-large {
     min-height: 420px;
 }

 .h-medium {
     min-height: 340px;
 }

 .card-header {
     padding: 1.25rem 1.5rem;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-bottom: 1px solid rgba(255, 255, 255, 0.06);
     background-color: rgba(0, 0, 0, 0.15);
 }

 .card-title {
     font-size: 1.1rem;
     font-weight: 600;
     color: var(--text);
     display: flex;
     align-items: center;
     gap: 0.75rem;
 }

 .card-title i {
     color: var(--primary);
     font-size: 1.1rem;
 }

 .card-body {
     padding: 1.5rem;
     flex: 1;
     display: flex;
     flex-direction: column;
     position: relative;
 }

 /* Iframe container */
 .iframe-container {
     position: relative;
     width: 100%;
     height: 100%;
     min-height: 300px;
     overflow: hidden;
     border-radius: 12px;
     background-color: rgba(0, 0, 0, 0.1);
     box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.15);
 }

 iframe {
     border: none;
     width: 100%;
     height: 100%;
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     border-radius: 12px;
 }

 /* Footer styles */
 footer {
     background-color: rgba(0, 0, 0, 0.7);
     border-top: 1px solid rgba(255, 255, 255, 0.08);
     padding: 1.5rem 2rem;
     text-align: center;
     color: var(--text-muted);
     font-size: 0.9rem;
     backdrop-filter: blur(16px);
 }

 .footer-content {
     max-width: 1400px;
     margin: 0 auto;
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 0.5rem;
 }

 .footer-logo {
     color: var(--primary);
     font-weight: 600;
 }

 /* Responsive styles */
 @media (max-width: 1200px) {
     .grid-container {
         grid-template-columns: repeat(6, 1fr);
     }

     .span-12,
     .span-6 {
         grid-column: span 6;
     }

     main {
         padding: 1.5rem;
     }
 }

 @media (max-width: 768px) {
     .grid-container {
         grid-template-columns: 1fr;
         gap: 1.25rem;
     }

     .span-12,
     .span-6 {
         grid-column: span 1;
     }

     main {
         padding: 1rem;
     }

     .dashboard-header {
         flex-direction: column;
         align-items: flex-start;
         gap: 1rem;
     }

     .filters-container {
         width: 100%;
         flex-direction: column;
         align-items: stretch;
     }

     .filter-item,
     .date-filter {
         width: 100%;
     }

     .date-filter {
         flex-direction: column;
     }

     header,
     footer {
         padding: 0.75rem 1rem;
     }
 }

 .login-container {
     display: flex;
     justify-content: center;
     align-items: center;
     min-height: 100vh;
     padding: 2rem;
     background: radial-gradient(circle at center, rgba(50, 50, 60, 0.3), rgba(20, 20, 25, 0.8)),
         url('https://via.placeholder.com/1920x1080') center/cover no-repeat;
 }

 .login-card {
     background: linear-gradient(145deg, var(--card-bg), rgba(50, 50, 52, 0.5));
     border-radius: 20px;
     border: 1px solid var(--border);
     overflow: hidden;
     width: 100%;
     max-width: 450px;
     box-shadow: var(--shadow-md);
     backdrop-filter: blur(10px);
     position: relative;
 }

 .login-card::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
     background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
 }

 .login-header {
     padding: 2rem 2rem 1.5rem;
     text-align: center;
 }

 .login-title {
     font-size: 1.75rem;
     font-weight: 700;
     color: var(--text);
     margin-bottom: 0.5rem;
     letter-spacing: -0.03em;
 }

 .login-subtitle {
     color: var(--text-muted);
     font-size: 0.95rem;
     font-weight: 500;
 }

 .login-body {
     padding: 0 2rem 2rem;
 }

 .form-group {
     margin-bottom: 1.5rem;
 }

 .form-label {
     display: block;
     margin-bottom: 0.5rem;
     font-weight: 600;
     font-size: 0.9rem;
     color: var(--text);
 }

 .input-group {
     position: relative;
 }

 .input-icon {
     position: absolute;
     left: 1rem;
     top: 50%;
     transform: translateY(-50%);
     color: var(--text-muted);
 }

 .form-input {
     width: 100%;
     background-color: rgba(0, 0, 0, 0.2);
     color: var(--text);
     border: 1px solid var(--border);
     padding: 1rem 1rem 1rem 2.5rem;
     border-radius: 12px;
     font-size: 1rem;
     transition: all var(--transition-fast) ease;
 }

 .form-input:focus {
     border-color: var(--primary);
     box-shadow: 0 0 0 2px var(--primary-light);
     outline: none;
 }

 .form-input::placeholder {
     color: var(--text-muted);
     opacity: 0.6;
 }

 .remember-forgot {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 1.75rem;
     font-size: 0.85rem;
 }

 .checkbox-container {
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .remember-checkbox {
     accent-color: var(--primary);
     width: 16px;
     height: 16px;
 }

 .checkbox-label {
     color: var(--text-muted);
     font-weight: 500;
 }

 .forgot-link {
     color: var(--primary);
     text-decoration: none;
     font-weight: 600;
     transition: all var(--transition-fast) ease;
 }

 .forgot-link:hover {
     color: var(--secondary);
     text-decoration: underline;
 }

 .login-btn {
     width: 100%;
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     color: white;
     border: none;
     padding: 1rem;
     border-radius: 12px;
     cursor: pointer;
     transition: all var(--transition-medium) ease;
     font-size: 1rem;
     font-weight: 600;
     display: flex;
     justify-content: center;
     align-items: center;
     gap: 0.75rem;
     box-shadow: 0 2px 8px rgba(108, 99, 255, 0.4);
 }

 .login-btn:hover {
     transform: translateY(-2px);
     box-shadow: 0 4px 12px rgba(108, 99, 255, 0.5);
     background: linear-gradient(135deg, var(--primary), var(--primary));
 }

 .error-message {
     color: var(--danger);
     font-size: 0.85rem;
     margin-top: 0.5rem;
     padding-left: 0.5rem;
     font-weight: 500;
     display: none;
 }

 .loader {
     display: none;
     width: 20px;
     height: 20px;
     border: 2px solid rgba(255, 255, 255, 0.3);
     border-radius: 50%;
     border-top-color: white;
     animation: spin 0.8s linear infinite;
 }

 @keyframes spin {
     to {
         transform: rotate(360deg);
     }
 }

 .shake {
     animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
 }

 @keyframes shake {

     10%,
     90% {
         transform: translate3d(-1px, 0, 0);
     }

     20%,
     80% {
         transform: translate3d(2px, 0, 0);
     }

     30%,
     50%,
     70% {
         transform: translate3d(-3px, 0, 0);
     }

     40%,
     60% {
         transform: translate3d(3px, 0, 0);
     }
 }

 .logout-btn {
     background-color: rgba(255, 255, 255, 0.1);
     color: var(--text);
     border: 1px solid var(--border);
     padding: 0.6rem 1.2rem;
     border-radius: 8px;
     cursor: pointer;
     transition: all var(--transition-medium) ease;
     font-size: 0.9rem;
     font-weight: 500;
     display: flex;
     align-items: center;
     gap: 0.5rem;
 }

 .logout-btn:hover {
     background-color: var(--danger);
     border-color: var(--danger);
     color: white;
 }

 /* If using as nav link */
 nav .logout-btn {
     color: var(--text-muted);
     background: transparent;
     border: none;
     margin-left: auto;
 }

 nav .logout-btn:hover {
     color: var(--danger);
     background-color: rgba(249, 65, 68, 0.1);
 }


 .chatbot-container {
     position: fixed;
     bottom: 20px;
     right: 20px;
     z-index: 1000;
     font-family: 'Roboto', sans-serif;
 }

 .chatbot-toggle-button {
     width: 60px;
     height: 60px;
     border-radius: 50%;
     background: linear-gradient(135deg, #5c39ba 0%, #2b579f 100%);
     color: white;
     border: none;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 24px;
     transition: all 0.3s ease;
 }

 .chatbot-toggle-button:hover {
     transform: scale(1.05);
     box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
 }

 .chatbot-panel {
     position: absolute;
     bottom: 70px;
     right: 0;
     width: 350px;
     height: 500px;
     background-color: #1d1e22;
     border-radius: 12px;
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
     display: flex;
     flex-direction: column;
     overflow: hidden;
     transform-origin: bottom right;
     transform: scale(0);
     opacity: 0;
     transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
 }

 .chatbot-panel.active {
     transform: scale(1);
     opacity: 1;
 }

 .chatbot-header {
     background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
     color: white;
     padding: 15px;
 }

 .header-content {
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .logo-container {
     display: flex;
     align-items: center;
 }

 .chatbot-logo {
     height: 24px;
     margin-right: 10px;
 }

 .close-button {
     background: transparent;
     color: white;
     border: none;
     font-size: 18px;
     cursor: pointer;
     padding: 5px;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s ease;
 }

 .close-button:hover {
     transform: scale(1.2);
 }

 .chatbot-messages {
     flex: 1;
     overflow-y: auto;
     padding: 15px;
     display: flex;
     flex-direction: column;
     background-color: #1d1e22;
     scrollbar-width: thin;
     scrollbar-color: #6a11cb #1d1e22;
 }

 .chatbot-messages::-webkit-scrollbar {
     width: 6px;
 }

 .chatbot-messages::-webkit-scrollbar-track {
     background: #1d1e22;
 }

 .chatbot-messages::-webkit-scrollbar-thumb {
     background-color: #6a11cb;
     border-radius: 20px;
 }

 .user-message,
 .bot-message {
     max-width: 80%;
     margin-bottom: 15px;
     padding: 12px 15px;
     border-radius: 18px;
     position: relative;
     font-size: 14px;
     line-height: 1.5;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
 }

 .user-message {
     background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
     color: white;
     align-self: flex-end;
     border-bottom-right-radius: 4px;
 }

 .bot-message {
     background-color: #2d2e36;
     color: #f0f0f0;
     align-self: flex-start;
     border-bottom-left-radius: 4px;
 }

 .message-content {
     margin-bottom: 5px;
 }

 .message-time {
     font-size: 10px;
     color: rgba(255, 255, 255, 0.7);
     text-align: right;
 }

 .chatbot-input {
     display: flex;
     padding: 12px;
     background-color: #2d2e36;
     border-top: 1px solid #3a3b45;
 }

 .chatbot-input input {
     flex: 1;
     padding: 12px 15px;
     border: 1px solid #3a3b45;
     border-radius: 24px;
     margin-right: 10px;
     background-color: #1d1e22;
     color: #f0f0f0;
     font-size: 14px;
     transition: all 0.3s ease;
 }

 .chatbot-input input:focus {
     outline: none;
     border-color: #6a11cb;
     box-shadow: 0 0 0 2px rgba(106, 17, 203, 0.3);
 }

 .chatbot-input button {
     width: 40px;
     height: 40px;
     background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
     color: white;
     border: none;
     border-radius: 50%;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
 }

 .chatbot-input button:hover {
     transform: scale(1.1);
 }

 .chatbot-input button:disabled {
     background: #3a3b45;
     cursor: not-allowed;
     transform: scale(1);
 }

 /* Responsive styles */
 @media (max-width: 768px) {
     .chatbot-panel {
         width: 90vw;
         height: 70vh;
         bottom: 80px;
         right: 5vw;
     }

     .chatbot-toggle-button {
         width: 50px;
         height: 50px;
         font-size: 20px;
     }

     .chatbot-container {
         bottom: 15px;
         right: 15px;
     }
 }

 @media (max-width: 480px) {
     .chatbot-panel {
         width: 100vw;
         height: 80vh;
         bottom: 70px;
         right: 0;
         border-radius: 12px 12px 0 0;
     }
 }

 .dashboard-open-link {
     position: absolute;
     top: 10px;
     /* Moved higher to avoid overlapping graph content */
     right: 10px;
     /* Moved closer to edge to save space */
     z-index: 10;
     transform: translateZ(0);
     -webkit-font-smoothing: antialiased;
 }

 .dashboard-open-button {
     background: linear-gradient(135deg, #4d28bc 0%, #535392 100%);
     color: white;
     border: none;
     padding: 6px 12px;
     border-radius: 4px;
     font-size: 12px;
     font-weight: 500;
     cursor: pointer;
     display: inline-block;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
     transition: all 0.2s ease;
     text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
 }

 .dashboard-open-button:hover {
     background: rgb(74, 62, 204);
     /* Full opacity on hover */
     box-shadow: 0 3px 7px rgba(0, 0, 0, 0.25);
     transform: translateY(-1px);
     /* Slight lift effect on hover */
 }

 .dashboard-open-button::after {
     content: "↗";
     margin-left: 6px;
     font-size: 14px;
 }

 .hourly-prediction-tabs {
     display: flex;
     margin-bottom: 15px;
     gap: 10px;
 }

 .hourly-tab {
     background-color: #34495e;
     color: white;
     border: none;
     padding: 0.5rem 1rem;
     border-radius: 8px;
     cursor: pointer;
     transition: all 0.3s ease;
     font-size: 0.85rem;
     font-weight: 600;
     display: flex;
     align-items: center;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
 }

 .hourly-tab.active {
     background: linear-gradient(135deg, var(--primary), var(--primary-dark));
     color: white;
     box-shadow: 0 2px 8px rgba(108, 99, 255, 0.4);
 }

 .hourly-tab:hover:not(.active) {
     opacity: 0.85;
     transform: translateY(-1px);
 }

 /* Make iframe container responsive */
 .iframe-container {
     position: relative;
     width: 100%;
     height: 100%;
     overflow: hidden;
 }
