/* ==========================================================================
   OFFICIAL ACADEMIC LIGHT DESIGN SYSTEM & UNIFIED TEMPLATE
   Institution: VNU University of Science (HUS) - Department of Academic Affairs
   Path: /var/www/oauth_login_admin/assets/css/style.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

:root {
    /* Bright Academic Color System */
    --vnu-primary: #0284c7;       /* Bright Academic Blue (Sky 600) */
    --vnu-primary-dark: #0369a1;  /* Deep Academic Blue (Sky 700) */
    --vnu-primary-light: #f0f9ff; /* Soft Blue Tint (Sky 50) */
    --vnu-primary-border: #bae6fd;
    
    --vnu-navy: #0f172a;          /* Slate 900 for high-contrast crisp text */
    --vnu-navy-muted: #1e293b;    /* Slate 800 */
    
    --vnu-gold: #d97706;          /* University Gold Seal (Amber 600) */
    --vnu-gold-dark: #92400e;     /* Deep Gold */
    --vnu-gold-light: #fffbeb;    /* Soft Gold Background */
    --vnu-gold-border: #fde68a;
    
    /* Clean Light Canvas & Surfaces */
    --bg-canvas: #f8fafc;         /* Platinum Slate Canvas */
    --bg-surface: #ffffff;        /* Pure White Card Surfaces */
    --bg-muted: #f1f5f9;          /* Neutral Pill & Input Background */
    --bg-hover: #f8fafc;
    
    /* Borders */
    --border-subtle: #e2e8f0;     /* Crisp Light Slate Border */
    --border-medium: #cbd5e1;
    --border-accent: rgba(2, 132, 199, 0.2);
    
    /* High Legibility Typography */
    --text-main: #0f172a;         /* High Contrast Heading & Body */
    --text-body: #334155;         /* Body Text (Slate 700) */
    --text-muted: #64748b;        /* Muted Text (Slate 500) */
    --text-sub: #94a3b8;          /* Captions (Slate 400) */
    
    /* Semantic Status Accents */
    --emerald: #059669;
    --emerald-bg: #ecfdf5;
    --emerald-border: #a7f3d0;
    
    --purple: #7c3aed;
    --purple-bg: #f5f3ff;
    --purple-border: #ddd6fe;
    
    --rose: #e11d48;
    --rose-bg: #fff1f2;
    --rose-border: #fecdd3;
    
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --amber-border: #fde68a;
    
    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;
    
    /* Elevation Shadows (Soft & Modern, non-blurry) */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 6px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-hover: 0 16px 32px -4px rgba(2, 132, 199, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Canvas */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-canvas);
    color: var(--text-body);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    padding: 0.15em 0.4em;
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--vnu-primary-dark);
}

/* ==========================================================================
   1. TOP INSTITUTIONAL UTILITY BAR (Light Academic Styling)
   ========================================================================== */
.top-utility-bar {
    background-color: #ffffff;
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 0.45rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.utility-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.utility-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-body);
}

.utility-left .util-icon {
    font-size: 16px;
    color: var(--vnu-primary);
}

.utility-left span.gold-tag {
    color: var(--vnu-gold);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.utility-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.util-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.util-item .material-icons-round {
    font-size: 14px;
    color: var(--vnu-primary);
}

.util-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.util-link:hover {
    color: var(--vnu-primary);
}

.util-separator {
    color: var(--border-medium);
}

/* ==========================================================================
   2. MAIN NAVBAR HEADER (Pure White, Crisp, Sticky)
   ========================================================================== */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.95rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.navbar-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-crest-wrapper {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: var(--transition);
}

.brand:hover .brand-logo-img {
    transform: scale(1.02);
}

.brand-info h1 {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--vnu-navy);
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.brand-info p {
    font-size: 0.74rem;
    color: var(--vnu-gold);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* User Profile Badge */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--vnu-primary-light);
    border: 1px solid var(--vnu-primary-border);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--vnu-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--vnu-navy);
    line-height: 1.2;
    white-space: nowrap;
}

.user-role-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

.user-role-tag.admin {
    color: var(--vnu-gold);
}

.user-role-tag.user {
    color: var(--vnu-primary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--vnu-primary) 0%, var(--vnu-primary-dark) 100%);
    color: #ffffff;
    border: 1px solid var(--vnu-primary-dark);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0274ae 0%, #025584 100%);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-admin-manage {
    background: var(--vnu-gold-light);
    border: 1px solid var(--vnu-gold-border);
    color: var(--vnu-gold-dark);
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-admin-manage:hover {
    background: var(--vnu-gold);
    color: #ffffff;
    border-color: var(--vnu-gold);
    transform: translateY(-1px);
}

.btn-logout {
    background: var(--rose-bg);
    border: 1px solid var(--rose-border);
    color: var(--rose);
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-logout:hover {
    background: var(--rose);
    color: #ffffff;
    border-color: var(--rose);
    transform: translateY(-1px);
}

/* ==========================================================================
   3. MAIN CONTENT CONTAINER
   ========================================================================== */
.portal-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    width: 100%;
}

/* ==========================================================================
   4. OFFICIAL WELCOME HERO BANNER (Light Academic Theme)
   ========================================================================== */
.welcome-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 1px solid var(--vnu-primary-border);
    border-left: 5px solid var(--vnu-primary);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.welcome-hero::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner-wrapper {
    position: relative;
    z-index: 2;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    border: 1px solid var(--vnu-primary-border);
    color: var(--vnu-primary-dark);
    padding: 0.35rem 0.95rem;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-xs);
}

.hero-header-block {
    margin-bottom: 1rem;
}

.hero-title-intro {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.2rem;
}

.hero-title-dept {
    font-size: 2rem;
    font-weight: 800;
    color: var(--vnu-navy);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.hero-title-school {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vnu-primary-dark);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.35;
    border-left: 3px solid var(--vnu-gold);
    padding-left: 0.75rem;
    margin-top: 0.4rem;
}

.hero-description {
    font-size: 0.92rem;
    color: var(--text-body);
    line-height: 1.6;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

/* ==========================================================================
   5. QUICK STATS CARDS (Bright & Clean)
   ========================================================================== */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--vnu-primary-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.navy { background: var(--vnu-primary-light); color: var(--vnu-primary); }
.stat-icon.emerald { background: var(--emerald-bg); color: var(--emerald); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-icon.gold { background: var(--amber-bg); color: var(--amber); }

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--vnu-navy);
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* ==========================================================================
   6. TOOLBAR (Search & Tabs)
   ========================================================================== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.section-header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--vnu-navy);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.count-badge {
    background: var(--vnu-primary-light);
    color: var(--vnu-primary-dark);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--vnu-primary-border);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filter Tabs */
.filter-tabs {
    display: inline-flex;
    background: var(--bg-muted);
    padding: 0.3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    gap: 0.25rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--vnu-primary-dark);
    font-weight: 700;
    box-shadow: var(--shadow-xs);
}

/* Search Box */
.search-box {
    position: relative;
    min-width: 280px;
}

.search-box .material-icons-round {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-sub);
    font-size: 1.15rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.4rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--vnu-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ==========================================================================
   7. TOOLS GRID (Light, Bright & High-Touch Cards)
   ========================================================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    position: relative;
}

.tool-card:hover {
    border-color: var(--vnu-primary-border);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.tool-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--vnu-primary-light);
    color: var(--vnu-primary);
    border: 1px solid var(--vnu-primary-border);
    flex-shrink: 0;
}

.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-public {
    background: var(--emerald-bg);
    border: 1px solid var(--emerald-border);
    color: var(--emerald);
}

.badge-private {
    background: var(--rose-bg);
    border: 1px solid var(--rose-border);
    color: var(--rose);
}

.badge-allowed {
    background: var(--vnu-primary-light);
    border: 1px solid var(--vnu-primary-border);
    color: var(--vnu-primary-dark);
}

.tool-card-body {
    flex: 1;
}

.tool-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--vnu-navy);
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.tool-folder-path {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-muted);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.tool-card-footer {
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

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

.btn-open-tool {
    flex: 1;
    background: var(--vnu-primary-light);
    border: 1px solid var(--vnu-primary-border);
    color: var(--vnu-primary-dark);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: var(--transition);
}

.btn-open-tool:hover {
    background: var(--vnu-primary);
    color: #ffffff;
    border-color: var(--vnu-primary);
}

.btn-open-tool.disabled {
    background: var(--bg-muted);
    border-color: var(--border-subtle);
    color: var(--text-sub);
    cursor: not-allowed;
}

.admin-quick-toggle {
    display: flex;
}

.btn-toggle-access {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-toggle-access:hover {
    background: var(--bg-muted);
    border-color: var(--border-medium);
}

.btn-make-public { color: var(--emerald); }
.btn-make-private { color: var(--rose); }

/* ==========================================================================
   8. UNIFIED LOGIN GATEWAY CARD & 403 CARD (Light Theme)
   ========================================================================== */
.login-gateway-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 3rem 1.25rem;
    min-height: calc(100vh - 140px);
    background: radial-gradient(circle at top, rgba(2, 132, 199, 0.04) 0%, rgba(248, 250, 252, 1) 70%);
}

.login-card-container, .security-card-container {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(12px) scale(0.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card-header, .security-card-header {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-bottom: 2px solid var(--vnu-primary);
    padding: 2rem 1.75rem 1.5rem;
    text-align: center;
    position: relative;
}

.login-crest-icon, .security-crest-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 0.85rem;
    background: #ffffff;
    border: 1px solid var(--vnu-primary-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.login-crest-icon img {
    width: 46px;
    height: auto;
}

.security-crest-icon {
    border-color: var(--rose-border);
    background: var(--rose-bg);
    color: var(--rose);
}

.login-badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--vnu-primary-dark);
    background: var(--vnu-primary-light);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.6rem;
    border: 1px solid var(--vnu-primary-border);
}

.login-card-header h2, .security-card-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--vnu-navy);
    margin-bottom: 0.25rem;
}

.login-card-header p, .security-card-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.login-card-body, .security-card-body {
    padding: 2rem 1.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--text-sub);
    font-size: 1.15rem;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem 0.65rem 2.4rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--vnu-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.btn-submit {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Alerts */
.alert-error {
    background: var(--rose-bg);
    border: 1px solid var(--rose-border);
    color: var(--rose);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.alert-warning {
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    color: var(--amber);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* ==========================================================================
   9. MODALS (Light Theme, Responsive)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    position: relative;
    animation: fadeInScale 0.25s ease-out;
}

.modal-card.wide {
    max-width: 960px;
}

.btn-close-modal {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background: var(--rose-bg);
    color: var(--rose);
    border-color: var(--rose-border);
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--vnu-navy);
}

.modal-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* User Management Table */
.users-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.users-table th {
    background: var(--bg-muted);
    color: var(--text-main);
    padding: 0.85rem 1rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-medium);
}

.users-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-body);
    vertical-align: middle;
}

.users-table tr:hover {
    background: var(--vnu-primary-light);
}

/* Permission Grid */
.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.85rem;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    cursor: pointer;
}

/* Empty State */
.empty-state, .no-tools-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: #ffffff;
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-xl);
    color: var(--text-muted);
}

/* ==========================================================================
   10. INSTITUTIONAL FOOTER (Refined Academic Light Styling)
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 1.6rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    margin-top: auto;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--vnu-primary-border) 25%, var(--vnu-primary) 50%, var(--vnu-gold-border) 75%, transparent 100%);
    opacity: 0.85;
}

.footer-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-brand-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    color: var(--text-body);
}

.footer-copy {
    color: var(--text-sub);
    font-size: 0.8rem;
    font-weight: 500;
}

.dept-title {
    color: var(--vnu-navy);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.footer-dept-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-icon {
    font-size: 14px;
    color: var(--vnu-primary);
}

.meta-separator {
    color: var(--border-medium);
}

.meta-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-credit {
    display: flex;
    align-items: center;
}

.author-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-body);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
    cursor: default;
}

.author-chip:hover {
    border-color: var(--vnu-primary-border);
    background: var(--vnu-primary-light);
    color: var(--vnu-primary-dark);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.author-chip-icon {
    font-size: 16px;
    color: var(--vnu-primary);
    transition: var(--transition);
}

.author-chip:hover .author-chip-icon {
    color: var(--vnu-gold);
    transform: scale(1.1);
}

.author-names {
    font-weight: 700;
    color: var(--vnu-navy);
    letter-spacing: 0.01em;
}

.author-chip:hover .author-names {
    color: var(--vnu-primary-dark);
}

/* ==========================================================================
   11. SUPERIOR RESPONSIVE SYSTEM (Mobile-first, Clean Fluid Breakpoints)
   ========================================================================== */
@media (max-width: 1024px) {
    .portal-container {
        padding: 1.5rem 1.25rem;
    }
    .welcome-hero {
        padding: 2rem;
    }
    .hero-title-dept {
        font-size: 1.75rem;
    }
    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Utility Bar on Mobile */
    .top-utility-bar {
        padding: 0.35rem 1rem;
    }
    .utility-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    .utility-right {
        display: none; /* Hide date/email on mobile to save space */
    }
    .utility-left {
        font-size: 0.72rem;
        gap: 0.5rem;
    }

    /* Navbar on Mobile */
    .navbar {
        padding: 0.75rem 1rem;
    }
    .navbar-container {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    .brand-crest-wrapper {
        height: 40px;
    }
    .brand-logo-img {
        height: 40px;
        max-width: 140px;
    }
    .brand-info h1 {
        font-size: 0.85rem;
    }
    .brand-info p {
        font-size: 0.65rem;
    }

    /* User Badge & Actions on Mobile */
    .user-profile-badge {
        padding: 0.25rem 0.5rem;
    }
    .user-info-text {
        display: none; /* Show only avatar on small screens */
    }
    .btn-admin-manage .btn-text,
    .btn-logout .btn-text {
        display: none; /* Icon-only buttons on mobile */
    }
    .btn-admin-manage, .btn-logout {
        padding: 0.45rem 0.6rem;
    }

    /* Hero Banner */
    .welcome-hero {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    .hero-title-dept {
        font-size: 1.4rem;
    }
    .hero-title-school {
        font-size: 0.95rem;
    }
    .hero-description {
        font-size: 0.85rem;
        padding: 0.75rem 1rem;
    }

    /* Toolbar & Search */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding: 0.35rem;
    }
    .search-box {
        min-width: 100%;
    }

    /* Grid on Mobile */
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Login & Security Cards on Mobile */
    .login-gateway-wrapper {
        padding: 1.5rem 1rem;
    }
    .login-card-container, .security-card-container {
        border-radius: var(--radius-lg);
    }
    .login-card-body, .security-card-body {
        padding: 1.5rem 1.25rem;
    }

    /* Modal on Mobile */
    .modal-overlay {
        padding: 0.75rem;
    }
    .modal-card {
        padding: 1.25rem 1rem;
        max-height: 94vh;
    }
    .modal-card.wide {
        padding: 1.25rem 1rem;
    }
    .btn-close-modal {
        top: 0.75rem;
        right: 0.75rem;
    }
    .users-table th, .users-table td {
        padding: 0.55rem 0.65rem;
        font-size: 0.78rem;
    }
    .permission-grid {
        grid-template-columns: 1fr;
        max-height: 180px;
    }

    /* Footer on Mobile */
    .footer {
        padding: 1.35rem 1rem;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.85rem;
    }
    .footer-brand {
        align-items: center;
    }
    .footer-brand-title {
        flex-direction: column;
        gap: 0.15rem;
        font-size: 0.8rem;
    }
    .footer-dept-meta {
        justify-content: center;
        gap: 0.5rem;
        font-size: 0.72rem;
    }
    .author-chip {
        padding: 0.35rem 0.85rem;
        font-size: 0.76rem;
    }
}

@media (max-width: 480px) {
    .brand-info {
        max-width: 160px;
    }
    .brand-info h1 {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .stats-banner {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 1rem 1.15rem;
    }
}
