/* index.css */
:root {
            --primary-color: #1a56db;
            --primary-dark: #0e3f9e;
            --primary-light: #e1effe;
            --secondary-color: #3f83f8;
            --text-dark: #1f2937;
            --text-light: #6b7280;
            --background: #f9fafb;
            --card-bg: #ffffff;
            --success: #0e9f6e;
            --warning: #f05252;
        }
         
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--background);
            color: var(--text-dark);
            line-height: 1.6;
        }
        
        /* Header Styles */
        .fixed-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 70px;
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            z-index: 100;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
        }
        
        .header-title {
            font-size: 1.4rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: white;
        }
        
        .header-title i {
            font-size: 1.6rem;
            color: white;
        }
        
        .header-nav {
            display: flex;
            gap: 1.5rem;
            color: white;
        }
        
        .header-nav a {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: white;
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 0.8rem;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        .header-nav a:hover {
            background-color: rgba(255, 255, 255, 0.15);
        }
        
        /* Show nav labels on mobile, hide on desktop */
        .header-nav span {
            display: inline;
            color: white;
        }

        @media (min-width: 900px) {
            .header-nav span {
                display: none;
            }
        }
        
        /* Mobile Menu Button */
        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }
        
        /* Main Content */
        .main-content {
            padding-top: 90px;
            padding-bottom: 70px;
            min-height: 100vh;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
        }
        
        /* Three-panel layout */
        .three-panel-container {
            display: flex;
            gap: 1.5rem;
            margin-top: 1rem;
        }
        
        .panel {
            background: var(--card-bg);
            border-radius: 16px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            padding: 1.8rem;
            flex: 1;
            min-width: 260px;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease;
        }
        
        .panel:hover {
            transform: translateY(-5px);
        }
        
        .panel-details {
            background-color: var(--primary-light);
            border: 1px solid rgba(58, 130, 247, 0.2);
        }
        
        .panel-details h2 {
            color: var(--primary-dark);
            font-size: 1.4rem;
            margin-bottom: 1.2rem;
            font-weight: 700;
        }
        
        .panel-details p {
            color: var(--text-dark);
            margin-bottom: 1.5rem;
        }
        
        .system-features {
            list-style: none;
            padding: 0;
            margin: 0 0 1rem 0;
        }
        
        .system-features li {
            display: flex;
            align-items: flex-start;
            gap: 0.8rem;
            font-size: 1rem;
            color: var(--text-dark);
            margin-bottom: 0.8rem;
            line-height: 1.5;
        }
        
        .system-features .material-icons {
            color: var(--primary-color);
            font-size: 1.4rem;
            min-width: 24px;
        }
        
        /* Menu Grid */
        .panel-menu {
            justify-content: center;
        }
        
        .menu-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.2rem;
            width: 100%;
        }
        
        .menu-square {
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            width: 140px;      /* Fixed width */
            height: 100px;     /* Fixed height */
            text-decoration: none;
            color: white;
            font-weight: 600;
            box-sizing: border-box;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(58, 130, 247, 0.15);
            border: none;
            outline: none;
            padding: 0;        /* Remove padding for perfect square */
            position: relative;
            overflow: hidden;
        }
        
        /* Creative pastel gradients for menu squares */
.menu-square:nth-child(1) {
  background: linear-gradient(135deg, #ffb347 0%, #b8aa8f 100%);
}
.menu-square:nth-child(2) {
  background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
}
.menu-square:nth-child(3) {
  background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}
.menu-square:nth-child(4) {
  background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
}
.menu-square:nth-child(5) {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}
.menu-square:nth-child(6) {
  background: linear-gradient(135deg, #17615e 0%, #9b8189 100%);
}
.menu-square:nth-child(7) {
  background: linear-gradient(135deg, #8e54e9 0%, #4776e6 100%);
}
.menu-square:nth-child(8) {
  background: linear-gradient(135deg, #577a9d 0%, #34495e 100%);
}

/* Hover effect: brighten and add subtle overlay */
.menu-square:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 16px rgba(58, 130, 247, 0.18);
}
.menu-square::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
  transition: opacity 0.3s;
  opacity: 0;
}
.menu-square:hover::after {
  opacity: 1;
}

/* Icon and label styles */
.menu-square .material-icons {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.menu-square span {
  font-size: 1rem;
  text-align: center;
  word-break: break-word;
  margin-top: 0.5rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
        
        .menu-square:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
            box-shadow: 0 6px 12px rgba(58, 130, 247, 0.4);
        }
        
        /* Login Panel */
        .panel-login {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start; /* <-- This aligns content to the top */
            min-width: 260px;
            max-width: 320px;
            width: 100%;
            margin: 0 auto;
            height: 100%; /* Optional: ensures panel fills available space */
        }
        
        .login-card {
            background: #f3f6fa;
            border-radius: 14px;
            box-shadow: 0 2px 12px #0001;
            padding: 2em 1.5em;
            width: 100%;
            min-width: 260px;
            max-width: 320px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: stretch;    /* Make children fill width */
            justify-content: flex-start; /* Align content to top */
        }
        
        .login-card-header {
            font-size: 1.4em;
            font-weight: 600;
            color: #1a237e;
            margin-bottom: 1em;
            text-align: right;
            display: flex;
            align-items: center;
            gap: 0.6em;
            justify-content: center;
        }
        
        .login-card-body {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            margin-bottom: 1em;
            text-align: center;
            display: flex;
            gap: 0.6em;
            justify-content: flex-start;

        }
        
        .form-group {
            margin-bottom: 1em;
            width: 100%;
        }
        
        .form-control {
            width: 100%;
            padding: 0.6em 1em;
            border-radius: 6px;
            border: 1px solid #cfd8dc;
            font-size: 1em;
            margin-bottom: 0.5em;
            box-sizing: border-box;
        }
        
        .btn,
.btn-primary,
.btn-danger {
  font-size: 1.08em;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  margin-top: 0.7em;
  cursor: pointer;
  box-shadow: 0 2px 8px #0002;
  border: none;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
  outline: none;
  display: inline-block;
}

.btn-primary {
  background: #1b751f;   /* Green */
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.8em 1.5em;
  margin-top: 0.7em;
  cursor: pointer;
  box-shadow: 0 2px 8px #0002;
  border: none;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
  outline: none;
  display: inline-block;
}

.btn-primary:hover, .btn-primary:focus {
  background: #388e3c;
  box-shadow: 0 4px 12px #43a04744;
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}

.btn-danger {
  background: #d32f2f;
  color: #fff;
}
.btn-danger:hover, .btn-danger:focus {
  background: #b71c1c;
  box-shadow: 0 4px 12px #d32f2f44;
  color: #fff;
  transform: translateY(-2px) scale(1.04);
}
        
        .error-message {
            color: #d32f2f;
            margin-top: 0.5em;
            font-size: 0.97em;
            min-height: 1.2em;
            text-align: center;
        }
        
        /* Footer */
        footer {
            background: var(--text-dark);
            color: white;
            padding: 3rem 2rem;
            margin-top: 4rem;
        }
        
        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2.5rem;
        }
        
        .footer-logo {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }
        
        .footer-about p {
            color: #cbd5e0;
            margin: 1rem 0;
        }
        
        .footer-links h3 {
            font-size: 1.3rem;
            margin-bottom: 1.5rem;
            position: relative;
            padding-bottom: 0.5rem;
        }
        
        .footer-links h3::after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 50px;
            height: 3px;
            background: var(--primary);
        }
        
        .footer-links ul {
            list-style: none;
        }
        
        .footer-links li {
            margin-bottom: 0.8rem;
        }
        
        .footer-links a {
            color: #cbd5e0;
            text-decoration: none;
            transition: color 0.3s;
        }
        
        .footer-links a:hover {
            color: white;
        }
        
        /* Center align copyright text in footer */
        footer p {
            text-align: center;
        }

        /* Responsive Styles */
        @media (max-width: 900px) {
            .three-panel-container {
                flex-direction: column;
            }
            
            .panel {
                max-width: 100%;
            }
            
            .header-nav {
                display: none;
                position: absolute;
                top: 70px;
                left: 0;
                right: 0;
                background: var(--primary-color);
                flex-direction: column;
                padding: 1rem;
                gap: 0.5rem;
                box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            }
            
            .header-nav.active {
                display: flex;
            }
            
            .header-nav a {
                padding: 0.8rem;
                border-radius: 6px;
                background: rgba(255, 255, 255, 0.1);
            }
            
            .mobile-menu-btn {
                display: block;
            }
        }
        
        @media (max-width: 600px) {
            .menu-grid {
                grid-template-columns: 1fr;
            }
            
            .header-title {
                font-size: 1.2rem;
            }
            
            .panel-details h2 {
                font-size: 1.3rem;
            }
            
            .menu-square {
                width: 100px;
                height: 100px;
                font-size: 0.95rem;
            }
            
            .menu-square .material-icons {
                font-size: 2rem;
            }
            
            .main-content {
                padding-top: 80px;
            }
            .panel-login, .login-card {
    min-width: 90vw;
    max-width: 98vw;
    padding: 1.2em 0.5em;
  }
  .btn, .btn-primary, .btn-danger {
    font-size: 1em;
    padding: 0.7em 1em;
  }
  
        }
        
        /* Accessibility improvements */
        a:focus, button:focus {
            outline: 3px solid var(--primary-color);
            outline-offset: 2px;
        }
        
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        
        /* Animation for features */
        .system-features li {
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.5s forwards;
        }
        
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .system-features li:nth-child(1) { animation-delay: 0.1s; }
        .system-features li:nth-child(2) { animation-delay: 0.2s; }
        .system-features li:nth-child(3) { animation-delay: 0.3s; }
        .system-features li:nth-child(4) { animation-delay: 0.4s; }
        .system-features li:nth-child(5) { animation-delay: 0.5s; }
        
        /* Hover effects for menu items */
        .menu-square {
            position: relative;
            overflow: hidden;
        }
        
        .menu-square::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(-100%);
            transition: transform 0.3s ease;
        }
        
        .menu-square:hover::after {
            transform: translateX(0);
        }

        /* Add at the end of your file */
        .menu-backdrop {
            display: none;
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(30,41,59,0.4);
            z-index: 99;
            transition: opacity 0.3s;
        }
        .menu-backdrop.active {
            display: block;
            opacity: 1;
        }
        .header-nav {
            transition: transform 0.3s;
            transform: translateY(-20px);
            opacity: 0;
        }
        .header-nav.active {
            transform: translateY(0);
            opacity: 1;
        }

        .panel-disabled {
          pointer-events: none;
          opacity: 0.5;
          filter: grayscale(0.7);
        }
        #logs-table { display: table !important; }
#logs-table tbody { display: table-row-group !important; }
/* ===== Login Panel Enhancements ===== */

/* Input with icon */
.input-group {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-light);
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
}

.input-group .form-control {
  padding-left: 2.5rem;  /* space for icon */
  padding-right: 2.5rem; /* space for toggle button */
  margin-bottom: 0;
}

/* Password visibility toggle */
.password-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
}

.password-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.password-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Remember me & Forgot password row */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5rem 0 1rem 0;
  width: 100%;
}

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

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-group label {
  color: var(--text-dark);
  font-size: 0.95rem;
  cursor: pointer;
}

.forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Loading spinner */
.btn-primary .spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

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

/* Error message with icon */
.error-message {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #fee2e2;
  color: #b91c1c;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-top: 0.8rem;
  font-size: 0.95rem;
  border: 1px solid #fecaca;
}

.error-message i {
  font-size: 1.2rem;
}

/* Success message (e.g., logout) */
.success-message {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #e0f2e0;
  color: #0e6245;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  margin-top: 0.8rem;
  font-size: 0.95rem;
  border: 1px solid #b8e0b8;
}

/* Logged-in user info */
.user-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.user-avatar {
  background: var(--primary-light);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.user-avatar i {
  font-size: 3rem;
  color: var(--primary-color);
}

.user-details {
  text-align: center;
}

.user-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.user-email {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Small adjustments for mobile */
@media (max-width: 600px) {
  .input-group .form-control {
    font-size: 16px; /* prevent zoom on iOS */
  }
  .checkbox-group label, .forgot-link {
    font-size: 0.9rem;
  }
}
