/* ==================== General Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --surface-color: #ffffff;
    --surface-muted: #f8fbff;
    --border-color: #dbe4f1;
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
    --shadow-medium: 0 18px 40px rgba(15, 23, 42, 0.12);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #34495e;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==================== Login Page ==================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #eef4fb;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-medium);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 5px;
}

.login-header p {
    color: #7f8c8d;
    font-size: 0.95em;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1em;
    transition: var(--transition);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.96);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.12);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.form-check input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-check label {
    margin-bottom: 0;
    cursor: pointer;
}

/* ==================== Buttons ==================== */
.btn {
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: inline-block;
    text-align: center;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(52, 152, 219, 0.22);
}

.btn-block {
    width: 100%;
}

.btn-logout {
    background-color: var(--danger-color);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    display: block;
    text-align: center;
}

.btn-logout:hover {
    background-color: #c0392b;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.04);
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.login-demo-credentials {
    text-align: left;
}

.login-demo-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-demo-credentials p {
    margin-bottom: 12px;
    color: inherit;
    font-size: 0.9rem;
}

.login-demo-grid {
    display: grid;
    gap: 10px;
}

.login-demo-row {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #dbeafe;
    border-radius: 12px;
}

.login-demo-row span {
    font-weight: 700;
    color: #1e3a8a;
}

.login-demo-row code {
    display: inline-block;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 0.85rem;
}

/* ==================== Login Footer ==================== */
.login-footer {
    text-align: center;
    margin-top: 25px;
    border-top: 1px solid #ecf0f1;
    padding-top: 20px;
}

.login-footer p {
    margin-bottom: 10px;
    color: #7f8c8d;
    font-size: 0.9em;
}

.login-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ==================== Dashboard Layout ==================== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 320px;
    background-color: var(--theme-sidebar-shell-bg, var(--theme-page-bg-color, #f5f6fa));
    color: var(--theme-sidebar-text, #2c3e50);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #dbe4f1;
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.08);
}

.sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 0 0 999px 999px;
    opacity: 0.85;
}

.sidebar-header {
    padding: 18px 16px 14px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--theme-border-soft, #e2e8f0);
    flex-shrink: 0;
}

.sidebar-terminal-frame {
    border: 1px solid #dbe4f1;
    border-radius: 18px;
    background: var(--theme-sidebar-card-bg, var(--theme-surface-color, #ffffff));
    box-shadow: var(--theme-shadow-soft, 0 14px 24px rgba(15, 23, 42, 0.06));
    padding: 14px 14px 12px;
}

.sidebar-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.28;
}

.terminal-dot:first-child {
    opacity: 0.9;
}

.terminal-dot:nth-child(2) {
    opacity: 0.62;
}

.terminal-status {
    margin-left: auto;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    color: #64748b;
    font-weight: 700;
}

.sidebar-shell-line,
.sidebar-footer-prompt {
    font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

.sidebar-shell-line {
    padding: 0.62rem 0.8rem;
    border-radius: 12px;
    border: 1px solid #dbe4f1;
    background: var(--theme-primary-soft);
    color: var(--primary-color);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo {
    font-size: 1.3em;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.logo i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-color);
    background: var(--theme-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.school-name-short {
    display: inline;
}

.school-name-full {
    display: none;
    max-width: 180px;
    word-wrap: break-word;
    font-size: 0.9em;
}

.sidebar-tagline {
    color: #64748b;
    font-size: 0.84rem;
    margin: 0;
}

@media (min-width: 900px) {
    .school-name-short {
        display: none;
    }

    .school-name-full {
        display: inline;
    }
}

/* School Logo Section on Login Page */
.school-logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.school-logo-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.school-logo-badge i {
    font-size: 2.5rem;
    color: white;
}

.school-logo-section h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.school-motto {
    color: #667eea;
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
}

.search-box {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0.75rem 0.85rem;
    border: 1px solid #dbe4f1;
    border-radius: 14px;
    background: var(--theme-sidebar-card-bg, var(--theme-surface-color, #ffffff));
    box-shadow: var(--theme-shadow-soft, 0 10px 20px rgba(15, 23, 42, 0.04));
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--theme-primary-soft);
}

.search-prefix {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
}

.search-input {
    width: 100%;
    padding: 0;
    border: none;
    font-size: 0.9em;
    background-color: transparent;
    color: #495057;
    transition: var(--transition);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-input:focus {
    outline: none;
    box-shadow: none;
}

.search-icon {
    position: static;
    color: var(--primary-color);
    font-size: 0.95em;
    opacity: 0.78;
    pointer-events: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 18px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #c7d5ea;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: #9cb5d8;
}

.sidebar-nav ul,
.submenu,
.submenu-level-2 {
    list-style: none;
}

.nav-list {
    max-height: none;
    overflow-y: visible;
    padding: 0;
    padding-bottom: 36px;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0;
}

.nav-section {
    margin-bottom: 18px;
    padding: 0;
    background: var(--theme-sidebar-card-bg, var(--theme-surface-color, #ffffff));
    border: 1px solid var(--theme-border-soft, #dbe4f1);
    border-radius: 18px;
    box-shadow: var(--theme-shadow-soft, 0 12px 28px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

.nav-section-title {
    padding: 14px 14px 10px;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #64748b;
    margin-bottom: 2px;
    font-family: "Cascadia Mono", "Consolas", "Courier New", monospace;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.nav-section-title::before {
    content: "PS";
    color: var(--primary-color);
}

.nav-section-title::after {
    content: ">";
    color: #94a3b8;
}

.section-items {
    margin: 0;
    padding: 0 10px 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-list > .nav-item:first-child {
    margin-bottom: 18px;
}

.nav-list > .nav-item > .nav-link {
    background: var(--theme-sidebar-card-bg, var(--theme-surface-color, #ffffff));
    border: 1px solid var(--theme-border-soft, #dbe4f1);
    border-radius: 18px;
    box-shadow: var(--theme-shadow-soft, 0 12px 28px rgba(15, 23, 42, 0.06));
}

.nav-link,
.nav-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    color: #495057;
    transition: var(--transition);
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 0.92em;
    font-weight: 500;
    position: relative;
}

.nav-link:hover,
.nav-toggle:hover {
    color: #0f172a;
    border-color: #dbe4f1;
    transform: translateX(2px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
}

.nav-link.active:not(.nav-toggle) {
    color: var(--primary-color);
    border-color: #c9daf5;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.nav-link.active:not(.nav-toggle)::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--primary-color);
}

.nav-icon {
    font-size: 1em;
    min-width: 34px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px #dbe4f1;
}

.nav-icon-sub {
    font-size: 0.9em;
    min-width: 28px;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px #dbe4f1;
}

.nav-label {
    flex: 1;
    min-width: 0;
}

.nav-toggle-icon {
    font-size: 0.72em;
    margin-left: 8px;
    transition: transform 0.3s ease;
    color: #94a3b8;
    width: 16px;
    text-align: center;
}

/* Submenu Styles */
.submenu {
    display: none;
    background-color: transparent;
    border-left: 1px solid #dbe4f1;
    margin: 4px 0 8px 18px;
    padding-left: 12px;
}

.submenu.active {
    display: block;
}

.submenu li {
    margin-bottom: 3px;
}

.submenu .nav-link,
.submenu .nav-toggle {
    padding: 8px 10px;
    padding-left: 14px;
    font-size: 0.88em;
    color: #5b6877;
}

.submenu .nav-link:hover,
.submenu .nav-toggle:hover {
    color: #0f172a;
}

.submenu .nav-link.active {
    color: var(--primary-color);
}

.submenu .nav-link > i:first-child,
.submenu .nav-toggle > i:first-child,
.submenu-level-2 .nav-link > i:first-child,
.submenu-level-2 .nav-toggle > i:first-child,
.submenu-level-3 .nav-link > i:first-child,
.submenu-level-3 .nav-toggle > i:first-child {
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

/* Level 2 Submenus */
.submenu-level-2 {
    display: none;
    background-color: transparent;
    border-left: 1px solid #dbe4f1;
    padding-left: 10px;
    margin: 5px 0 8px 14px;
}

.submenu-level-2.active {
    display: block;
}

.submenu-level-2 li {
    margin-bottom: 3px;
}

.submenu-level-2 .nav-link,
.submenu-level-2 .nav-toggle {
    padding: 7px 10px;
    padding-left: 14px;
    font-size: 0.85em;
    color: #6b7280;
}

.submenu-level-2 .nav-link:hover,
.submenu-level-2 .nav-toggle:hover {
    color: #0f172a;
}

.submenu-level-2 .nav-link.active {
    color: var(--primary-color);
}

/* Level 3 Submenus */
.submenu-level-3 {
    display: none;
    background-color: transparent;
    border-left: 1px solid #dbe4f1;
    padding-left: 10px;
    margin: 5px 0 8px 12px;
}

.submenu-level-3.active {
    display: block;
}

.submenu-level-3 li {
    margin-bottom: 3px;
}

.submenu-level-3 .nav-link,
.submenu-level-3 .nav-toggle {
    padding: 7px 10px;
    padding-left: 14px;
    font-size: 0.8em;
    color: #64748b;
}

.submenu-level-3 .nav-link:hover,
.submenu-level-3 .nav-toggle:hover {
    color: #0f172a;
}

.submenu-level-3 .nav-link.active {
    color: var(--primary-color);
}

/* Sidebar Footer */
.sidebar-footer {
    position: static;
    width: 100%;
    background-color: var(--theme-sidebar-card-bg, var(--theme-surface-color, #ffffff));
    border-top: 1px solid var(--theme-border-soft, #e2e8f0);
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 6px;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.04);
}

.sidebar-footer-prompt {
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    padding: 0 4px 4px;
}

.divider {
    display: none;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: #495057;
    transition: var(--transition);
    font-size: 0.92em;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid transparent;
}

.footer-link:hover {
    color: #0f172a;
    border-color: #dbe4f1;
}

.footer-link.logout {
    color: #e74c3c;
}

.footer-link.logout:hover {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.footer-icon {
    font-size: 0.95em;
    min-width: 32px;
    width: 32px;
    height: 32px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 0 0 1px #dbe4f1;
}

.footer-link.logout .footer-icon {
    color: #e74c3c;
}

/* ==================== Main Content ==================== */
.main-content {
    flex: 1;
    margin-left: 320px;
    background-color: #f5f6fa;
}

.top-bar {
    background-color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.top-bar h1 {
    color: var(--secondary-color);
    font-size: 1.8em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info span {
    color: var(--dark-color);
}

.profile-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
}

.profile-link:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ==================== Dashboard Content ==================== */
.dashboard-content {
    padding: 30px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    margin-right: 20px;
}

.stat-icon.students {
    background-color: rgba(52, 211, 153, 0.1);
}

.stat-icon.teachers {
    background-color: rgba(59, 130, 246, 0.1);
}

.stat-icon.classes {
    background-color: rgba(251, 146, 60, 0.1);
}

.stat-icon.courses {
    background-color: rgba(168, 85, 247, 0.1);
}

.stat-info h3 {
    color: #7f8c8d;
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: var(--secondary-color);
}

/* ==================== Quick Actions ==================== */
.quick-actions,
.recent-activities {
    background: white;
    padding: 30px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    margin-bottom: 30px;
}

.quick-actions h2,
.recent-activities h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.3em;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.action-btn {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    padding: 25px 15px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(52, 152, 219, 0.24);
}

.action-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.action-label {
    font-size: 0.85em;
    font-weight: 500;
}

/* ==================== Activity List ==================== */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

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

.text-muted {
    color: #95a5a6;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 0;
        max-height: none;
        box-shadow: none;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .sidebar::before {
        left: 12px;
        right: 12px;
    }

    .sidebar-header {
        padding: 14px 12px 12px;
    }

    .sidebar-terminal-frame {
        border-radius: 16px;
        padding: 12px;
    }

    .sidebar-footer {
        position: relative;
        width: 100%;
        bottom: auto;
        left: auto;
        right: auto;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
        margin-top: 6px;
        padding: 10px 12px 12px;
        flex-direction: column;
    }

    .main-content {
        margin-left: 0;
    }

    .wrapper {
        flex-direction: column;
    }

    .nav-list {
        max-height: none;
        padding-bottom: 10px;
    }

    .nav-link,
    .nav-toggle {
        padding: 10px 11px;
        font-size: 0.9em;
    }

    .submenu .nav-link,
    .submenu .nav-toggle {
        padding: 8px 10px;
        padding-left: 12px;
    }

    .submenu-level-2 .nav-link,
    .submenu-level-2 .nav-toggle {
        padding: 7px 10px;
        padding-left: 12px;
    }

    .submenu-level-3 .nav-link,
    .submenu-level-3 .nav-toggle {
        padding: 7px 10px;
        padding-left: 12px;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .top-bar {
        flex-direction: column;
        gap: 15px;
    }

    .dashboard-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px;
    }

    .sidebar {
        padding: 0;
    }

    .sidebar-header {
        padding: 12px 10px 10px;
        margin-bottom: 0;
    }

    .logo {
        font-size: 1.12em;
        margin-bottom: 4px;
    }

    .logo i {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .sidebar-shell-line,
    .sidebar-footer-prompt,
    .nav-section-title {
        font-size: 0.68rem;
    }

    .search-box {
        padding: 0.7rem 0.75rem;
        gap: 8px;
    }

    .search-input {
        font-size: 0.85em;
        padding: 0;
    }

    .nav-section-title {
        padding: 0 8px 8px;
        font-size: 0.68rem;
    }

    .nav-link,
    .nav-toggle {
        padding: 9px 10px;
        font-size: 0.84em;
    }

    .nav-icon {
        font-size: 0.9em;
        margin-right: 0;
        min-width: 30px;
        width: 30px;
        height: 30px;
    }

    .submenu .nav-link,
    .submenu .nav-toggle {
        padding: 6px 10px;
        padding-left: 12px;
        font-size: 0.8em;
    }

    .submenu-level-2 .nav-link,
    .submenu-level-2 .nav-toggle {
        padding: 5px 10px;
        padding-left: 12px;
        font-size: 0.75em;
    }

    .submenu-level-3 .nav-link,
    .submenu-level-3 .nav-toggle {
        padding: 5px 10px;
        padding-left: 12px;
        font-size: 0.7em;
    }

    .sidebar-footer {
        flex-direction: column;
        padding: 8px 10px 12px;
    }

    .footer-link {
        padding: 9px 10px;
        font-size: 0.84em;
        flex: none;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 2fr;
    }

    .login-header h1 {
        font-size: 1.8em;
    }
}

