/* ═══════════════════════════════════════════════════════════════════
   HCMUTE Thesis Portal — Premium Design System v4.0
   "Academic Futuristic 3D" — JSP + Spring Boot compatible
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Brand Colors — HCMUTE Academic Blue */
    --color-brand: #006da8;
    --color-brand-dark: #003865;
    --color-brand-mid: #0088cc;
    --color-brand-soft: #e8f4fa;
    --color-brand-glow: rgba(0, 136, 204, 0.22);
    --color-brand-gradient: linear-gradient(135deg, #003865 0%, #006da8 50%, #00a8e8 100%);

    /* Accent Palette */
    --color-accent-cyan: #06b6d4;
    --color-accent-purple: #7c3aed;
    --color-accent-indigo: #4f46e5;
    --color-accent-gold: #f59e0b;

    /* Surfaces & Background */
    --color-bg: #f1f5f9;
    --color-bg-mesh: radial-gradient(circle at 12% 8%, rgba(0, 109, 168, .08) 0%, transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(6, 182, 212, .06) 0%, transparent 28%),
        radial-gradient(circle at 50% 95%, rgba(124, 58, 237, .04) 0%, transparent 35%);
    --color-surface: #ffffff;
    --color-surface-muted: #f8fafc;
    --color-surface-glass: rgba(255, 255, 255, 0.82);
    --color-surface-card: #ffffff;

    /* Text & Ink */
    --color-text: #0f233a;
    --color-text-secondary: #3e526a;
    --color-text-muted: #7b8fa3;
    --color-text-inverse: #ffffff;

    /* Borders */
    --color-border: #e2eaf1;
    --color-border-strong: #cbd8e5;
    --color-border-focus: #0088cc;

    /* Semantic Status Badges */
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-success-border: #a7f3d0;

    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;

    --color-danger: #dc2626;
    --color-danger-bg: #fff1f2;
    --color-danger-border: #fecdd3;

    --color-info: #0284c7;
    --color-info-bg: #f0f9ff;
    --color-info-border: #bae6fd;

    --color-neutral-bg: #f8fafc;
    --color-neutral-border: #e2e8f0;
    --color-neutral-text: #64748b;

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;

    /* Radius */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 18px;
    --r-2xl: 24px;
    --r-full: 9999px;

    /* Depth / Shadows */
    --sh-xs: 0 1px 3px rgba(15, 35, 58, 0.05);
    --sh-sm: 0 4px 14px rgba(15, 35, 58, 0.07);
    --sh-md: 0 10px 28px rgba(15, 35, 58, 0.09);
    --sh-lg: 0 20px 48px rgba(15, 35, 58, 0.12);
    --sh-xl: 0 30px 60px rgba(15, 35, 58, 0.16);
    --sh-brand: 0 10px 26px rgba(0, 109, 168, 0.24);
    --sh-glass: 0 8px 32px rgba(15, 35, 58, 0.08), inset 0 1px 0 rgba(255, 255, 255, .8);

    /* Focus ring */
    --focus-ring: 0 0 0 3px rgba(0, 136, 204, 0.25);

    /* Motion */
    --tr-fast: 160ms cubic-bezier(0.4, 0, 0.2, 1);
    --tr-normal: 260ms cubic-bezier(0.4, 0, 0.2, 1);
    --tr-smooth: 380ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout dimensions */
    --sidebar-w: 264px;
    --sidebar-collapsed: 72px;
    --topbar-h: 60px;
    --content-max: 1600px;
    --content-pad: clamp(0.9rem, 1.8vw, 1.5rem);
}

/* ──────────────────────────────────────────────────────────────────
   RESET & FOUNDATIONS
   ────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image: var(--color-bg-mesh);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Bootstrap reset conflict prevention */
.app-wrapper h1,
.app-wrapper h2,
.app-wrapper h3,
.app-wrapper h4,
.app-wrapper h5,
.app-wrapper h6,
.app-wrapper p,
.app-wrapper ul,
.app-wrapper ol,
.app-wrapper figure {
    margin-top: 0;
    margin-bottom: 0;
}

.app-wrapper a {
    text-decoration: none;
    color: inherit;
}

.app-wrapper table {
    border-collapse: collapse;
}

.app-wrapper button,
.app-wrapper input,
.app-wrapper select,
.app-wrapper textarea {
    font-family: inherit;
}

.app-wrapper .btn:focus,
.app-wrapper .form-control:focus,
.app-wrapper .form-select:focus {
    box-shadow: none;
}

.app-wrapper .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--r-2xl);
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(15, 35, 58, 0.35);
    animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.app-wrapper .modal-backdrop.show {
    opacity: 0.45;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.app-wrapper .dropdown-menu {
    border-radius: var(--r-xl);
    border: 1px solid var(--color-border);
    box-shadow: 0 16px 36px -4px rgba(15, 35, 58, 0.12), 0 4px 12px -2px rgba(15, 35, 58, 0.08);
    padding: var(--sp-2);
    animation: dropdownFadeIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
}

@keyframes dropdownFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--r-full);
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

::selection {
    background: var(--color-brand-mid);
    color: #fff;
}

/* ──────────────────────────────────────────────────────────────────
   PAGE LOADER
   ────────────────────────────────────────────────────────────────── */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0a2540 0%, #051322 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s ease, visibility .35s ease;
}

.page-loader.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: pageLoaderFallback 1.6s forwards;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.page-loader-logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
}

.page-loader-logo-wrap::before {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(56, 189, 248, 0.18);
    border-top-color: #38bdf8;
    border-right-color: #fbbf24;
    border-radius: 50%;
    animation: loaderSpin 1.1s linear infinite;
    content: '';
}

.page-loader-logo-wrap::after {
    position: absolute;
    inset: 12px;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    content: '';
    animation: loaderSpin 8s linear infinite reverse;
}

.page-loader-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    animation: loaderPulse 1.6s ease-in-out infinite;
}

.page-loader-text {
    color: #bae6fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
}

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

@keyframes loaderPulse {

    0%,
    100% {
        transform: scale(.93);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes pageLoaderFallback {

    0%,
    75% {
        opacity: 1;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* ──────────────────────────────────────────────────────────────────
   APP SHELL LAYOUT
   ────────────────────────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(8, 26, 46, 0.55);
    backdrop-filter: blur(4px);
    transition: opacity var(--tr-normal);
}

.sidebar-overlay.show {
    display: block;
}

/* ── SIDEBAR ── */
.app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #071c33 0%, #061628 50%, #04101e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 12px 0 36px rgba(3, 14, 28, 0.38);
    transition: width var(--tr-smooth), transform var(--tr-smooth);
    user-select: none;
    overflow: hidden;
}

.sidebar-brand {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    min-width: 0;
    transition: opacity var(--tr-fast);
}

.sidebar-logo-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 136, 204, 0.4));
    transition: transform var(--tr-fast);
}

.sidebar-logo-link:hover .sidebar-logo-img {
    transform: scale(1.06) rotate(-2deg);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-product-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-product-sub {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #38bdf8;
    margin-top: 2px;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--sp-4) var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
}

.app-sidebar .nav-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 var(--sp-2);
    margin-bottom: var(--sp-2);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #7dd3fc !important;
    white-space: nowrap;
    overflow: hidden;
}

.app-sidebar .nav-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    flex-shrink: 0;
}

.app-sidebar .sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: 0.65rem var(--sp-3);
    border-radius: var(--r-lg);
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0 !important;
    border: 1px solid transparent;
    transition: all var(--tr-fast);
    white-space: nowrap;
    text-decoration: none;
}

.app-sidebar .sidebar-link .nav-label {
    color: inherit;
}

.app-sidebar .sidebar-link svg,
.app-sidebar .sidebar-link i[data-lucide] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #94a3b8;
    transition: color var(--tr-fast), transform var(--tr-fast);
}

.app-sidebar .sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(56, 189, 248, 0.25);
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.app-sidebar .sidebar-link:hover svg,
.app-sidebar .sidebar-link:hover i[data-lucide] {
    color: #38bdf8;
    transform: scale(1.08);
}

.app-sidebar .sidebar-link.is-active,
.app-sidebar .sidebar-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    border-color: rgba(125, 211, 252, 0.45);
    box-shadow: 0 6px 22px rgba(2, 132, 199, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    transform: translateX(2px);
}

.app-sidebar .sidebar-link.is-active svg,
.app-sidebar .sidebar-link.is-active i[data-lucide],
.app-sidebar .sidebar-link.active svg,
.app-sidebar .sidebar-link.active i[data-lucide] {
    color: #ffffff !important;
}

.app-sidebar .sidebar-link.is-active::before,
.app-sidebar .sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16%;
    bottom: 16%;
    width: 4px;
    border-radius: 0 var(--r-full) var(--r-full) 0;
    background: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
}

/* Sidebar Notification Count Badge */
.app-sidebar .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff !important;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.6);
    animation: navBadgePulse 2.4s ease-in-out infinite;
}

@keyframes navBadgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 10px rgba(239, 68, 68, 0.6);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 3px 14px rgba(239, 68, 68, 0.85);
    }
}

.sidebar-footer {
    padding: var(--sp-3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 13, 25, 0.82);
    backdrop-filter: blur(16px);
    flex-shrink: 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-xl);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--tr-fast);
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(56, 189, 248, 0.3);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #0077b8, #6366f1);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35), 0 4px 14px rgba(0, 109, 168, 0.4);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    border-radius: var(--r-sm);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.3;
}

.sidebar-user-role.role-student {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.sidebar-user-role.role-lecturer {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.sidebar-user-role.role-dean {
    background: rgba(56, 189, 248, 0.2) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.sidebar-user-role.role-admin {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r-md);
    color: #94a3b8 !important;
    transition: all var(--tr-fast);
}

.sidebar-logout-btn:hover {
    color: #f43f5e !important;
    background: rgba(244, 63, 94, 0.18);
    transform: scale(1.08);
}

/* Sidebar Collapsed */
.app-wrapper.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-collapsed);
}

.app-wrapper.sidebar-collapsed .sidebar-brand-text,
.app-wrapper.sidebar-collapsed .nav-section-title,
.app-wrapper.sidebar-collapsed .nav-label,
.app-wrapper.sidebar-collapsed .nav-badge,
.app-wrapper.sidebar-collapsed .sidebar-user-info,
.app-wrapper.sidebar-collapsed .sidebar-logout-btn {
    display: none !important;
}

.app-wrapper.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding: 0 var(--sp-2);
}

.app-wrapper.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 0.65rem var(--sp-2);
    gap: 0;
}

.app-wrapper.sidebar-collapsed .sidebar-link.is-active::before,
.app-wrapper.sidebar-collapsed .sidebar-link.active::before {
    display: none;
}

.app-wrapper.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    padding: var(--sp-2);
}

.app-wrapper.sidebar-collapsed .app-main {
    margin-left: var(--sidebar-collapsed);
}

/* ── APP MAIN ── */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    transition: margin-left var(--tr-smooth);
}

/* ──────────────────────────────────────────────────────────────────
   TOPBAR & DEMO ROLE SWITCHER
   ────────────────────────────────────────────────────────────────── */
.demo-role-bar {
    background: linear-gradient(90deg, #07192f 0%, #0d284a 50%, #081d38 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px var(--sp-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    font-size: 0.72rem;
    color: #94a3b8;
}

.demo-role-bar .demo-title {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: #fbbf24;
    font-weight: 700;
    white-space: nowrap;
}

.demo-role-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.demo-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all var(--tr-fast);
    text-decoration: none;
    white-space: nowrap;
}

.demo-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.demo-pill.is-active {
    background: #ffffff;
    color: #003865;
    border-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-6);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--sh-xs);
    gap: var(--sp-4);
}

.topbar-title-wrap {
    min-width: 0;
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-brand-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

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

/* Topbar Buttons */
.topbar-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-secondary);
    transition: all var(--tr-fast);
    cursor: pointer;
}

.topbar-icon-btn:hover {
    background: var(--color-surface-muted);
    color: var(--color-brand);
}

.topbar-notif-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Topbar User Profile */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--r-full);
    border: 1px solid transparent;
    background: transparent;
    transition: all var(--tr-fast);
    cursor: pointer;
}

.topbar-user-btn:hover {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
}

.topbar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0077b8, #6366f1);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-user-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.topbar-user-role {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* Dropdown Menus */
.notif-dropdown {
    width: 320px;
    padding: 0;
    overflow: hidden;
}

.notif-dropdown-header {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-dropdown-header h6 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.notif-count-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
}

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    transition: background var(--tr-fast);
}

.notif-item:hover {
    background: var(--color-brand-soft);
}

.notif-item-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.3;
    margin-bottom: 4px;
}

.notif-item-body {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-dropdown-footer {
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.user-dropdown {
    width: 220px;
    padding: 8px 0;
}

.user-dropdown-profile {
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--tr-fast);
}

.user-dropdown-item:hover {
    background: var(--color-surface-muted);
    color: var(--color-brand);
}

.user-dropdown-item.danger:hover {
    color: #ef4444;
    background: #fef2f2;
}



/* ──────────────────────────────────────────────────────────────────
   HERO SECTION & 3D ELEMENTS
   ────────────────────────────────────────────────────────────────── */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.4rem, 2.8vw, 2.2rem);
    border-radius: var(--r-2xl);
    color: #fff;
    background: linear-gradient(135deg, #001f3d 0%, #003e73 40%, #00609c 75%, #0284c7 100%);
    box-shadow: 0 20px 50px rgba(0, 31, 61, 0.32);
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, 0.18);
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Ambient radial lighting */
.dashboard-hero::before {
    position: absolute;
    inset: 0;
    content: '';
    background: radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.28) 0%, transparent 55%),
        radial-gradient(circle at 15% 90%, rgba(99, 102, 241, 0.22) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* 3D perspective grid overlay */
.dashboard-hero::after {
    position: absolute;
    inset: 0;
    content: '';
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 0.85) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 0.85) 0%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

/* 3D Hero Orbit Graphic */
.hero-orbit {
    position: absolute;
    right: clamp(2rem, 8vw, 8rem);
    top: 50%;
    width: 9.5rem;
    height: 9.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transform: translateY(-50%) rotate(-20deg) translateZ(20px);
    pointer-events: none;
    animation: heroOrbitSpin 24s linear infinite;
    z-index: 2;
    transform-style: preserve-3d;
}

.hero-orbit::before {
    position: absolute;
    inset: 16px;
    border: 1.5px dashed rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    content: '';
    transform: rotate(45deg) scaleX(0.55);
}

.hero-orbit::after {
    position: absolute;
    inset: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, #38bdf8 0%, rgba(56, 189, 248, 0.25) 60%, transparent 100%);
    box-shadow: 0 0 36px rgba(56, 189, 248, 0.65);
    content: '';
    animation: heroCorePulse 3.5s ease-in-out infinite;
}

@keyframes heroOrbitSpin {
    to {
        transform: translateY(-50%) rotate(340deg) translateZ(20px);
    }
}

@keyframes heroCorePulse {

    0%,
    100% {
        opacity: .75;
        transform: scale(.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Floating 3D Academic Cube Card */
.hero-3d-cube {
    position: absolute;
    right: clamp(8rem, 16vw, 16rem);
    bottom: -1.2rem;
    width: 5.5rem;
    height: 5.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.15), 0 20px 40px rgba(0, 0, 0, 0.28);
    transform: rotate(26deg) perspective(600px) rotateX(16deg) translateZ(40px);
    animation: heroCubeFloat 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 3;
}

.hero-3d-cube::before {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--r-md);
    content: '';
}

.hero-3d-cube::after {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 14px #38bdf8;
    content: '';
}

@keyframes heroCubeFloat {

    0%,
    100% {
        transform: rotate(26deg) perspective(600px) rotateX(16deg) translateY(0) translateZ(40px);
    }

    50% {
        transform: rotate(32deg) perspective(600px) rotateX(20deg) translateY(-10px) translateZ(50px);
    }
}

/* ──────────────────────────────────────────────────────────────────
   3D ACADEMIC TECH VISUALS (LOGIN, HERO, REGISTER)
   ────────────────────────────────────────────────────────────────── */
.login-visual-container {
    position: relative;
    background: linear-gradient(145deg, #001f3d 0%, #003666 45%, #004d80 75%, #0284c7 100%);
    perspective: 1000px;
    transform-style: preserve-3d;
    isolation: isolate;
    overflow: hidden;
}

.login-visual-container::before {
    position: absolute;
    inset: 0;
    content: '';
    background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.28) 0%, transparent 55%),
        radial-gradient(circle at 20% 85%, rgba(99, 102, 241, 0.22) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.login-visual-container::after {
    position: absolute;
    inset: 0;
    content: '';
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, transparent 85%);
    pointer-events: none;
    z-index: 1;
}

/* 3D Glowing Academic Sphere */
.login-3d-sphere {
    position: absolute;
    right: -2rem;
    top: 25%;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.55) 0%, rgba(0, 109, 168, 0.3) 45%, rgba(0, 31, 61, 0.15) 80%);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.25), inset -10px -10px 30px rgba(0, 0, 0, 0.4), inset 10px 10px 30px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
    transform-style: preserve-3d;
    transform: perspective(600px) rotateX(15deg) translateZ(15px);
    animation: sphereFloat 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 2;
}

@keyframes sphereFloat {
    0% {
        transform: perspective(600px) rotateX(15deg) translateY(0) translateZ(15px);
    }

    100% {
        transform: perspective(600px) rotateX(20deg) translateY(-14px) translateZ(25px);
    }
}

/* 3D Floor Perspective Grid (Landing Hero & Register) */
.landing-grid-floor {
    position: absolute;
    bottom: -60px;
    left: -20%;
    width: 140%;
    height: 240px;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.12) 1px, transparent 1px);
    background-size: 36px 36px;
    transform: perspective(500px) rotateX(68deg);
    transform-origin: bottom center;
    mask-image: radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.9) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Floating Layered Glass Badges & Geometric Shapes */
.academic-badge-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--r-xl);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #e0f2fe;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    pointer-events: none;
    transform-style: preserve-3d;
    z-index: 3;
    animation: badgeFloat 6s ease-in-out infinite alternate;
}

@keyframes badgeFloat {
    0% {
        transform: perspective(600px) translateY(0) translateZ(30px) rotate(-3deg);
    }

    100% {
        transform: perspective(600px) translateY(-8px) translateZ(42px) rotate(2deg);
    }
}

/* Subtle Floating Particles */
.floating-particle {
    position: absolute;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    pointer-events: none;
    opacity: 0.6;
    animation: particleDrift 10s ease-in-out infinite alternate;
}

@keyframes particleDrift {
    0% {
        transform: translate(0, 0) scale(0.8);
        opacity: 0.3;
    }

    50% {
        transform: translate(12px, -20px) scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: translate(-10px, -36px) scale(0.9);
        opacity: 0.4;
    }
}

/* ──────────────────────────────────────────────────────────────────
   BENTO GRID & KPI CARDS
   ────────────────────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--sp-5);
}

.dashboard-stat {
    position: relative;
    overflow: hidden;
    padding: var(--sp-5);
    border-radius: var(--r-xl);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: var(--sh-sm);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    transition: transform var(--tr-fast), box-shadow var(--tr-fast), border-color var(--tr-fast);
}

.dashboard-stat:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
    border-color: rgba(0, 109, 168, 0.25);
}

.dashboard-stat::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    border-radius: 0 var(--r-full) var(--r-full) 0;
    background: var(--stat-accent, #006da8);
    content: '';
}

.card-custom,
.surface,
.data-surface {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    transition: transform var(--tr-fast), box-shadow var(--tr-fast), border-color var(--tr-fast);
}

.card-custom:hover,
.surface:hover,
.data-surface:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 109, 168, 0.2);
    box-shadow: var(--sh-md);
}

/* ──────────────────────────────────────────────────────────────────
   TABLE SHELL & DATA TABLES
   ────────────────────────────────────────────────────────────────── */
.table-shell {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--color-border);
    border-radius: var(--r-xl);
    background: #ffffff;
    box-shadow: var(--sh-sm);
}

.table-shell table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.table-shell table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background var(--tr-fast);
}

.table-shell table tbody tr:hover {
    background: #f8fafc;
}

.table-shell table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.8rem;
}

/* ──────────────────────────────────────────────────────────────────
   ADMIN WORKSPACE SURFACES
   ────────────────────────────────────────────────────────────────── */
.admin-page {
    padding: clamp(1.15rem, 2.2vw, 2rem) var(--content-pad) clamp(2rem, 4vw, 3.5rem);
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
}

.admin-page-header {
    position: relative;
    min-height: 104px;
    padding: 1.25rem 1.5rem !important;
    overflow: hidden;
    background: linear-gradient(115deg, #ffffff 0%, #ffffff 58%, #f0f9ff 100%) !important;
    border-color: #d9e7f0 !important;
    box-shadow: 0 10px 28px rgba(15, 35, 58, 0.08) !important;
}

.admin-page-header::after {
    position: absolute;
    right: -34px;
    bottom: -52px;
    width: 170px;
    height: 120px;
    border: 1px solid rgba(0, 136, 204, 0.14);
    border-radius: 50%;
    content: '';
    transform: rotate(-18deg);
    pointer-events: none;
}

.admin-page-header>div:first-child {
    position: relative;
    z-index: 1;
}

.admin-page-header>div:first-child>div:first-child {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: var(--r-lg);
    background: linear-gradient(145deg, #e8f6fd, #f7fbff) !important;
    border-color: #cde7f4 !important;
    box-shadow: 0 5px 14px rgba(0, 109, 168, 0.12);
}

.admin-page-header h2,
.admin-page-header h3 {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.admin-page-header p {
    color: #71869a;
}

.admin-page-header .btn-ui {
    position: relative;
    z-index: 1;
    min-height: 2.75rem;
    padding-inline: 1.1rem;
}

.admin-filter-bar {
    border-color: #dce8ef !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 6px 20px rgba(15, 35, 58, 0.055) !important;
}

.admin-filter-bar input,
.admin-filter-bar select {
    min-height: 2.75rem;
    background: #f8fbfd !important;
    border-color: #dce8ef !important;
}

.admin-filter-bar input:hover,
.admin-filter-bar select:hover {
    border-color: #b7d4e3 !important;
    background: #ffffff !important;
}

.admin-data-surface,
.admin-page .table-shell {
    border-color: #dce8ef;
    box-shadow: 0 8px 24px rgba(15, 35, 58, 0.065);
}

.admin-page .table-shell table thead th {
    background: linear-gradient(180deg, #f8fbfd 0%, #f3f8fb 100%);
    color: #547087;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.admin-page .table-shell table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.admin-page [data-pagination-list]>[data-pagination-item] {
    border-color: #dce8ef !important;
    box-shadow: 0 8px 22px rgba(15, 35, 58, 0.06) !important;
}

.admin-page [data-pagination-list]>[data-pagination-item]:hover {
    border-color: #a9d3e7 !important;
    box-shadow: 0 14px 30px rgba(0, 109, 168, 0.11) !important;
    transform: translateY(-3px);
}

.admin-page .code-tag {
    background: #eef8fc;
    border-color: #cce6f2;
    color: #006da8;
}

.admin-page .status-badge {
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .admin-page {
        padding-inline: 0.85rem;
    }

    .admin-page-header {
        min-height: 0;
        padding: 1rem !important;
    }

    .admin-page-header .btn-ui {
        width: 100%;
    }
}

/* ──────────────────────────────────────────────────────────────────
   STATUS BADGES & ROLE PILLS (SEMANTIC DESIGN SYSTEM)
   ────────────────────────────────────────────────────────────────── */
.status-badge,
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all var(--tr-fast);
}

.status-badge::before,
.badge-status::before {
    display: none;
}

.status-pending,
.status-draft,
.status-warning {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}

.status-approved,
.status-active,
.status-completed,
.status-published,
.status-open,
.status-success {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.status-rejected,
.status-danger,
.status-closed,
.status-error {
    color: #b91c1c;
    background: #fff1f2;
    border-color: #fecdd3;
}

.status-neutral,
.status-inactive,
.status-archived {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.status-info,
.status-in-progress,
.status-processing {
    color: #0284c7;
    background: #f0f9ff;
    border-color: #bae6fd;
}

/* User & Role Badges */
.badge--admin {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #b91c1c;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.badge--dean {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #0284c7;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

.badge--lecturer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.badge--student {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.badge--info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.25rem 0.65rem;
    border-radius: var(--r-full);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    color: #0284c7;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
}

/* ──────────────────────────────────────────────────────────────────
   BUTTONS & FORMS (HIERARCHY & MICRO-INTERACTIONS)
   ────────────────────────────────────────────────────────────────── */
.btn-ui {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: 0.55rem 1rem;
    border-radius: var(--r-xl);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--tr-fast);
    text-decoration: none;
    line-height: 1.25;
    user-select: none;
    outline: none;
}

.btn-ui:active {
    transform: scale(0.98);
}

.btn-ui:focus-visible {
    box-shadow: var(--focus-ring);
}

.btn-ui-primary {
    background: linear-gradient(135deg, #00568c 0%, #006da8 60%, #0284c7 100%);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 109, 168, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ui-primary:hover {
    background: linear-gradient(135deg, #003e66 0%, #00568c 60%, #006da8 100%);
    box-shadow: 0 6px 20px rgba(0, 109, 168, 0.38);
    transform: translateY(-1px);
    color: #ffffff !important;
}

.btn-ui-secondary {
    background: #f1f5f9;
    color: var(--color-text);
    border-color: #e2e8f0;
    box-shadow: var(--sh-xs);
}

.btn-ui-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-ui-outline {
    background: #ffffff;
    color: var(--color-brand);
    border-color: var(--color-border-strong);
    box-shadow: var(--sh-xs);
}

.btn-ui-outline:hover {
    background: var(--color-brand-soft);
    border-color: var(--color-brand);
    color: var(--color-brand-dark);
    transform: translateY(-1px);
}

.btn-ui-danger {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
    box-shadow: var(--sh-xs);
}

.btn-ui-danger:hover {
    background: #e11d48;
    color: #ffffff !important;
    border-color: #e11d48;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.3);
    transform: translateY(-1px);
}

.btn-ui-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: transparent;
}

.btn-ui-ghost:hover {
    background: var(--color-surface-muted);
    color: var(--color-brand);
}

.btn-ui-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    border-radius: var(--r-lg);
}

.btn-ui-lg {
    padding: 0.75rem 1.4rem;
    font-size: 0.85rem;
    border-radius: var(--r-xl);
}

.app-content input:not([type="checkbox"]):not([type="radio"]),
.app-content select,
.app-content textarea {
    border-color: var(--color-border);
    border-radius: var(--r-lg) !important;
    color: var(--color-text);
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast), background var(--tr-fast);
}

.app-content input:focus,
.app-content select:focus,
.app-content textarea:focus {
    border-color: var(--color-border-focus) !important;
    box-shadow: var(--focus-ring) !important;
    background: #fff;
}

/* Modern Form Controls */
.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.form-label-modern {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label-modern .required-star {
    color: #ef4444;
    font-size: 0.85rem;
    line-height: 1;
}

.form-control-modern,
.form-select-modern {
    width: 100%;
    padding: 0.6rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--r-lg);
    transition: all var(--tr-fast);
    outline: none;
}

.form-control-modern:hover,
.form-select-modern:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

.form-control-modern:focus,
.form-select-modern:focus {
    background: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-helper-modern {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.4;
}

.form-error-modern {
    font-size: 0.72rem;
    color: #ef4444;
    font-weight: 600;
}

/* Code & Identifier Tags */
.code-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: var(--r-md);
    background: #f1f5f9;
    color: #0369a1;
    border: 1px solid #e2e8f0;
    letter-spacing: 0.02em;
}

/* Academic Timeline Steps */
.academic-timeline-step {
    border-radius: var(--r-xl);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all var(--tr-fast);
}

.academic-timeline-step.is-current {
    background: #f0f9ff;
    border-color: #7dd3fc;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}

.timeline-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.1);
    }
}

/* Skeleton Loading Shimmer */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ──────────────────────────────────────────────────────────────────
   BREADCRUMB & SAAS TOPBAR SEARCH
   ────────────────────────────────────────────────────────────────── */
.app-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.app-breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--tr-fast);
}

.app-breadcrumb a:hover {
    color: var(--color-brand);
}

.app-breadcrumb .current {
    color: var(--color-text);
    font-weight: 700;
}

.topbar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
    max-width: 100%;
}

.topbar-search-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: var(--r-xl);
    background: #f8fafc;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.74rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--tr-fast);
}

.topbar-search-btn:hover {
    background: #ffffff;
    border-color: rgba(0, 109, 168, 0.4);
    box-shadow: 0 2px 10px rgba(0, 109, 168, 0.08);
    color: var(--color-text);
}

.topbar-search-kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 5px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ──────────────────────────────────────────────────────────────────
   QUICK COMMAND PALETTE (CTRL+K)
   ────────────────────────────────────────────────────────────────── */
.command-palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 35, 58, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(60px, 14vh, 120px);
}

.command-palette-backdrop.show {
    display: flex;
}

.command-palette-box {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: var(--r-2xl);
    border: 1px solid var(--color-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    animation: commandScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes commandScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.command-palette-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    outline: none;
    border-bottom: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text);
}

.command-palette-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 14px;
    border-radius: var(--r-lg);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--tr-fast);
}

.command-item:hover,
.command-item.is-selected {
    background: #f1f5f9;
    color: var(--color-brand);
}

/* ──────────────────────────────────────────────────────────────────
   SAAS DROPZONE & FILE UPLOAD
   ────────────────────────────────────────────────────────────────── */
.dropzone-container {
    border: 2px dashed #cbd5e1;
    border-radius: var(--r-2xl);
    padding: 1.8rem 1.4rem;
    text-align: center;
    background: #f8fafc;
    transition: all var(--tr-fast);
    cursor: pointer;
    position: relative;
}

.dropzone-container:hover,
.dropzone-container.is-dragover {
    border-color: #0088cc;
    background: rgba(0, 136, 204, 0.04);
}

.dropzone-container.is-dragover {
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.15);
}

.dropzone-file-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--r-xl);
    background: #ffffff;
    border: 1px solid var(--color-border);
    margin-top: 12px;
    box-shadow: var(--sh-xs);
}

.dropzone-file-preview.has-file {
    display: flex;
}

/* ──────────────────────────────────────────────────────────────────
   ACADEMIC PROCESS TIMELINE
   ────────────────────────────────────────────────────────────────── */
.academic-timeline-step {
    position: relative;
    padding: 14px 16px;
    border-radius: var(--r-xl);
    border: 1px solid var(--color-border);
    background: #ffffff;
    transition: all var(--tr-fast);
}

.academic-timeline-step.is-current {
    border-color: rgba(0, 109, 168, 0.4);
    background: linear-gradient(135deg, rgba(0, 109, 168, 0.04), rgba(56, 189, 248, 0.06));
    box-shadow: 0 4px 16px rgba(0, 109, 168, 0.08);
}

.timeline-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0088cc;
    box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.6);
    animation: timelinePulse 2s infinite;
}

@keyframes timelinePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.6);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(0, 136, 204, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 136, 204, 0);
    }
}

/* ── STAT TRENDS & PROGRESS ── */
.stat-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
}

.stat-trend-badge.trend-up {
    background: #ecfdf5;
    color: #059669;
}

.stat-trend-badge.trend-neutral {
    background: #f1f5f9;
    color: #64748b;
}

.stat-mini-progress {
    height: 4px;
    border-radius: var(--r-full);
    background: #f1f5f9;
    overflow: hidden;
    margin-top: 10px;
}

.stat-mini-progress-bar {
    height: 100%;
    border-radius: var(--r-full);
    background: var(--stat-accent, #006da8);
    transition: width 0.6s ease;
}

/* ──────────────────────────────────────────────────────────────────
   SUBTLE 3D EMPTY STATES & ACADEMIC VISUALS
   ────────────────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    position: relative;
    overflow: hidden;
    perspective: 800px;
}

.empty-state::before {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(2, 132, 199, 0.03) 55%, transparent 75%);
    border-radius: 50%;
    pointer-events: none;
    content: '';
    z-index: 0;
}

.empty-state>* {
    position: relative;
    z-index: 1;
}

.empty-state-icon-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: var(--r-2xl);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px -5px rgba(15, 35, 58, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    margin-bottom: 1rem;
    transform: perspective(400px) rotateX(8deg) rotateY(-6deg);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, color 0.2s ease;
}

.empty-state:hover .empty-state-icon-wrap {
    transform: perspective(400px) rotateX(0deg) rotateY(0deg) translateY(-4px);
    box-shadow: 0 16px 32px -4px rgba(0, 109, 168, 0.16);
    color: var(--color-brand);
}

.empty-state-icon-wrap::before {
    position: absolute;
    inset: -6px;
    border-radius: calc(var(--r-2xl) + 4px);
    border: 1.5px dashed rgba(0, 109, 168, 0.22);
    content: '';
    pointer-events: none;
}

.empty-state-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}

.empty-state-desc {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    max-width: 380px;
    line-height: 1.55;
}

/* ──────────────────────────────────────────────────────────────────
   SHARED ROLE WORKSPACE
   ────────────────────────────────────────────────────────────────── */
.workspace-page {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: clamp(1rem, 2.2vw, 2rem) var(--content-pad) clamp(2rem, 4vw, 3.5rem);
}

.workspace-page>.bg-white.rounded-3xl,
.workspace-page>.glass-card,
.workspace-page>.glass-panel,
.workspace-page>.table-shell,
.workspace-page .table-shell {
    border-color: #dce8ef;
    border-radius: var(--r-xl) !important;
    box-shadow: 0 8px 24px rgba(15, 35, 58, 0.065);
}

.workspace-page>.bg-white.rounded-3xl:hover,
.workspace-page>.glass-card:hover,
.workspace-page>.glass-panel:hover {
    border-color: #b9d9e8;
    box-shadow: 0 12px 28px rgba(0, 109, 168, 0.09);
}

.workspace-page .table-shell {
    overflow-x: auto;
}

.workspace-page .table-shell table thead th {
    background: linear-gradient(180deg, #f8fbfd 0%, #f3f8fb 100%);
    color: #547087;
}

.workspace-page .table-shell table tbody td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.workspace-page input:not([type="checkbox"]):not([type="radio"]),
.workspace-page select,
.workspace-page textarea {
    min-height: 2.75rem;
}

.workspace-page .btn-ui {
    min-height: 2.5rem;
}

.workspace-page .code-tag {
    background: #eef8fc;
    border-color: #cce6f2;
    color: #006da8;
}

.workspace-page .status-badge {
    letter-spacing: 0.02em;
}

.workspace-page .empty-state {
    min-height: 12rem;
}

.workspace-page .dashboard-hero {
    border-radius: var(--r-xl);
}

.workspace-page> :not([hidden])~ :not([hidden]) {
    margin-top: 1rem !important;
}

.workspace-page>.grid {
    gap: 1rem;
}

.workspace-page>.dashboard-hero {
    min-height: 270px;
    padding: clamp(1.25rem, 2.2vw, 1.75rem);
    box-shadow: 0 16px 36px rgba(0, 31, 61, 0.24);
}

.workspace-page>.dashboard-hero .btn-ui {
    min-height: 2.65rem;
    padding-inline: 1rem;
}

.workspace-page>.dashboard-hero .bg-white.btn-ui {
    color: #003865 !important;
}

.workspace-page>.dashboard-hero+.grid>.dashboard-stat {
    min-height: 132px;
    padding: 1.15rem !important;
    border-radius: var(--r-lg);
}

.workspace-page>.bg-white.rounded-3xl,
.workspace-page>.glass-card,
.workspace-page>.glass-panel,
.workspace-page>.table-shell {
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
}

.workspace-page>.table-shell {
    padding-top: 0;
    padding-bottom: 0;
}

.workspace-page .table-shell>.p-5,
.workspace-page .table-shell>.px-6.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.workspace-page .table-shell table thead th {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.workspace-page .table-shell table tbody td {
    padding-top: 0.78rem;
    padding-bottom: 0.78rem;
}

.workspace-page .dashboard-stat:hover,
.workspace-page .academic-timeline-step:hover {
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .workspace-page {
        padding-inline: 0.85rem;
    }

    .workspace-page>.bg-white.rounded-3xl,
    .workspace-page>.glass-card,
    .workspace-page>.glass-panel {
        border-radius: var(--r-lg) !important;
    }

    .workspace-page .btn-ui {
        min-height: 2.65rem;
    }

    .workspace-page>.dashboard-hero {
        min-height: 0;
    }
}

/* Subtle glowing orb helper */
.subtle-glowing-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(32px);
    opacity: 0.6;
    animation: orbFloatPulse 8s ease-in-out infinite alternate;
}

@keyframes orbFloatPulse {
    0% {
        transform: scale(0.92) translate(0, 0);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.08) translate(10px, -8px);
        opacity: 0.75;
    }

    100% {
        transform: scale(0.96) translate(-6px, 10px);
        opacity: 0.55;
    }
}

/* ──────────────────────────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .app-sidebar.show {
        transform: translateX(0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
    }

    .app-main,
    .app-wrapper.sidebar-collapsed .app-main {
        margin-left: 0;
    }

    .demo-role-bar {
        display: none !important;
    }
}

@media (max-width: 640px) {

    .dashboard-hero::before,
    .hero-orbit,
    .hero-3d-cube,
    .login-3d-sphere,
    .academic-badge-float,
    .landing-grid-floor,
    .floating-particle {
        display: none !important;
    }

    .topbar-subtitle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-orbit,
    .hero-3d-cube,
    .login-3d-sphere,
    .hero-cube-3d,
    .academic-badge-float,
    .subtle-glowing-orb,
    .floating-particle,
    .empty-state-icon-wrap {
        animation: none !important;
        transform: none !important;
    }
}