/* ==========================================================================
   PRESENT CALL - Enterprise AI Attendance Management System
   Fluid Responsive Design System & Adaptive UI Stylesheet
   ========================================================================== */

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

:root {
    /* Brand Primary Palette (Deep Navy / Midnight) */
    --pc-navy-950: #070d1e;
    --pc-navy-900: #0b132b;
    --pc-navy-850: #0f1c3f;
    --pc-navy-800: #14234d;
    --pc-navy-700: #1e293b;
    --pc-navy-600: #334155;

    /* Modern Electric Blue Accent */
    --pc-blue-600: #1d4ed8;
    --pc-blue-500: #2563eb;
    --pc-blue-400: #3b82f6;
    --pc-blue-300: #60a5fa;
    --pc-blue-100: #dbeafe;
    --pc-blue-50:  #eff6ff;

    /* Cyan AI Glow */
    --pc-cyan-500: #06b6d4;
    --pc-cyan-400: #22d3ee;
    --pc-cyan-100: #cffafe;

    /* Neutrals & Surfaces */
    --pc-bg-body: #f8fafc;
    --pc-bg-card: #ffffff;
    --pc-bg-subtle: #f1f5f9;
    --pc-border: #e2e8f0;
    --pc-border-subtle: #edf2f7;
    --pc-border-dark: rgba(255, 255, 255, 0.1);

    /* Typography Colors */
    --pc-text-heading: #0f172a;
    --pc-text-body: #334155;
    --pc-text-muted: #64748b;
    --pc-text-subtle: #94a3b8;
    --pc-text-inverse: #ffffff;

    /* Status Colors */
    --pc-status-present: #059669;
    --pc-status-present-bg: #ecfdf5;
    --pc-status-present-border: #a7f3d0;

    --pc-status-absent: #dc2626;
    --pc-status-absent-bg: #fef2f2;
    --pc-status-absent-border: #fecaca;

    --pc-status-late: #d97706;
    --pc-status-late-bg: #fffbeb;
    --pc-status-late-border: #fde68a;

    --pc-status-pending: #2563eb;
    --pc-status-pending-bg: #eff6ff;
    --pc-status-pending-border: #bfdbfe;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Fluid Typography Sizing */
    --text-hero-h1: clamp(2.1rem, 5.2vw + 0.3rem, 3.8rem);
    --text-section-h2: clamp(1.75rem, 3.8vw + 0.2rem, 2.8rem);
    --text-card-h3: clamp(1.2rem, 2.2vw + 0.2rem, 1.8rem);

    /* Fluid Spacing */
    --space-section-y: clamp(50px, 8vw, 100px);
    --space-container-x: clamp(16px, 4vw, 48px);

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 24px 48px -8px rgba(15, 23, 42, 0.16);
    --shadow-glow: 0 0 35px rgba(37, 99, 235, 0.25);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Transition */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & FLUID BASE
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--pc-bg-body);
    color: var(--pc-text-body);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body.dashboard-menu-open,
body.nav-menu-open {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--pc-text-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-break: break-word;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   UTILITIES & ICONS
   ========================================================================== */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--pc-blue-600);
    background: var(--pc-blue-50);
    border: 1px solid var(--pc-blue-100);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    max-width: 100%;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    padding: 0 clamp(20px, 3.5vw, 56px);
    background-color: rgba(11, 19, 43, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
    width: 100%;
}

/* Zone 1: Left Brand Group */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
    z-index: 2;
}

.logo-img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.30rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1;
    white-space: nowrap;
}

.logo-badge {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(6, 182, 212, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    margin-left: 8px;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

/* Zone 2: Center Primary Navigation (Visually Balanced) */
.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.nav-links-menu {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.2vw, 36px);
}

.nav-links a {
    color: #cbd5e1;
    font-size: 0.90rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
    padding: 8px 4px;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #ffffff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--pc-blue-400), var(--pc-cyan-400));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
    width: 100%;
}

.nav-mobile-header,
.nav-mobile-actions {
    display: none;
}

.nav-backdrop {
    display: none;
}

/* Zone 3: Primary CTA (Right) */
.nav-cta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.btn-pill {
    background: linear-gradient(135deg, var(--pc-blue-500), var(--pc-blue-600));
    color: #ffffff !important;
    padding: 9px 22px;
    min-height: 42px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.18);
    white-space: nowrap;
    touch-action: manipulation;
}

.btn-pill:hover {
    background: linear-gradient(135deg, var(--pc-blue-600), #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.nav-mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    transition: all var(--transition-fast);
}

.nav-mobile-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    padding: clamp(60px, 9vw, 90px) var(--space-container-x) clamp(70px, 10vw, 110px);
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b132b 60%, #070d1e 100%);
    color: #ffffff;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 90vw);
    height: 350px;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.22) 0%, rgba(6, 182, 212, 0.08) 50%, transparent 80%);
    filter: blur(50px);
    pointer-events: none;
}

.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    font-size: clamp(0.75rem, 1.8vw, 0.82rem);
    font-weight: 600;
    color: #93c5fd;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    max-width: 100%;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--pc-status-present);
    box-shadow: 0 0 8px var(--pc-status-present);
    animation: pulseGlow 2s infinite ease-in-out;
    flex-shrink: 0;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
    position: relative;
    font-size: var(--text-hero-h1);
    font-weight: 800;
    color: #ffffff;
    max-width: 920px;
    margin-bottom: 20px;
    line-height: 1.12;
    letter-spacing: -0.035em;
    width: 100%;
}

.hero h1 span {
    background: linear-gradient(135deg, #60a5fa 20%, #38bdf8 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero p {
    position: relative;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #94a3b8;
    max-width: 680px;
    margin-bottom: 36px;
    line-height: 1.65;
    font-weight: 400;
    width: 100%;
}

.hero-actions {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-cta {
    background: linear-gradient(135deg, var(--pc-blue-500), #1d4ed8);
    color: #ffffff !important;
    padding: 14px 34px;
    min-height: 48px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
}

.btn-cta:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

.link-action {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px 26px;
    min-height: 48px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.link-action:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Hero Metrics Grid */
.hero-metrics {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: clamp(10px, 2vw, 20px);
    max-width: 980px;
    width: 100%;
    margin-top: 10px;
}

.metric-card {
    background: rgba(15, 28, 63, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 18px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.metric-value span {
    color: var(--pc-blue-400);
}

.metric-label {
    font-size: 0.78rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ==========================================================================
   INTERACTIVE PORTAL & DASHBOARD PREVIEW
   ========================================================================== */
.portal-section {
    padding: var(--space-section-y) var(--space-container-x);
    background-color: #f1f5f9;
    border-top: 1px solid var(--pc-border);
    border-bottom: 1px solid var(--pc-border);
    width: 100%;
}

.portal-container {
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.portal-header-area {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px;
    width: 100%;
}

.portal-header-area h2 {
    font-size: var(--text-section-h2);
    margin-bottom: 12px;
}

.portal-header-area p {
    color: var(--pc-text-muted);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

/* The Enterprise App Mockup Wrapper */
.saas-window {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--pc-border);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

/* Mac-style Window Topbar */
.window-topbar {
    background: #0f172a;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px;
}

.window-dots {
    display: flex;
    gap: 7px;
    flex-shrink: 0;
}

.window-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.window-title {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

/* The Workspace Layout: Sidebar + Main */
.saas-layout {
    display: flex;
    min-height: 720px;
    background: #ffffff;
    position: relative;
    width: 100%;
}

/* Mobile Sidebar Backdrop */
.saas-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7, 13, 30, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.saas-sidebar-backdrop.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* SaaS Sidebar */
.saas-sidebar {
    width: 250px;
    background: #0b132b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-brand {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-brand-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand img {
    height: 28px;
    width: auto;
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.saas-sidebar-close {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 12px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    touch-action: manipulation;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar-link.active {
    background: var(--pc-blue-600);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.sidebar-link-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    padding: 2px 7px;
    border-radius: var(--radius-pill);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pc-blue-400), #818cf8);
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* SaaS Main Content Area */
.saas-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fafc;
    min-width: 0;
}

/* Dashboard Top Navigation */
.dashboard-topbar {
    background: #ffffff;
    padding: 14px clamp(14px, 2.5vw, 28px);
    border-bottom: 1px solid var(--pc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    min-height: 60px;
}

.topbar-left-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.saas-sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--pc-border);
    color: var(--pc-text-heading);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--pc-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-breadcrumb strong {
    color: var(--pc-text-heading);
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.date-indicator {
    font-size: 0.82rem;
    color: var(--pc-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--pc-bg-subtle);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--pc-border);
    white-space: nowrap;
}

.btn-icon-topbar {
    background: transparent;
    border: 1px solid var(--pc-border);
    color: var(--pc-text-body);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    touch-action: manipulation;
}

.btn-icon-topbar:hover {
    background: var(--pc-bg-subtle);
    color: var(--pc-blue-600);
}

.notification-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--pc-status-absent);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Dashboard Content Views Container */
.dashboard-view {
    display: none;
    padding: clamp(14px, 2.5vw, 28px);
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.dashboard-view.active {
    display: block;
    animation: fadeInView 0.25s ease-out;
}

@keyframes fadeInView {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Summary Cards Grid */
.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(12px, 2vw, 20px);
    margin-bottom: 28px;
    width: 100%;
}

.summary-card {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-md);
    padding: clamp(16px, 2.2vw, 22px);
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.summary-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--pc-blue-500));
}

.card-total { --card-accent: var(--pc-blue-500); }
.card-present { --card-accent: var(--pc-status-present); }
.card-absent { --card-accent: var(--pc-status-absent); }
.card-late { --card-accent: var(--pc-status-late); }

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

.summary-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pc-text-muted);
}

.summary-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-total .summary-card-icon { background: var(--pc-blue-50); color: var(--pc-blue-600); }
.card-present .summary-card-icon { background: var(--pc-status-present-bg); color: var(--pc-status-present); }
.card-absent .summary-card-icon { background: var(--pc-status-absent-bg); color: var(--pc-status-absent); }
.card-late .summary-card-icon { background: var(--pc-status-late-bg); color: var(--pc-status-late); }

.summary-card-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.summary-card-number {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2rem);
    font-weight: 800;
    color: var(--pc-text-heading);
    line-height: 1;
}

.summary-card-trend {
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.trend-up {
    color: var(--pc-status-present);
    background: var(--pc-status-present-bg);
}

.trend-down {
    color: var(--pc-status-absent);
    background: var(--pc-status-absent-bg);
}

.summary-card-footer {
    font-size: 0.75rem;
    color: var(--pc-text-muted);
}

/* Dashboard Charts / Dual Columns */
.dashboard-grid-dual {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(14px, 2vw, 20px);
    margin-bottom: 28px;
    width: 100%;
}

.panel-card {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: clamp(16px, 2.5vw, 24px);
    width: 100%;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pc-text-heading);
}

.panel-subtitle {
    font-size: 0.8rem;
    color: var(--pc-text-muted);
    font-weight: 400;
}

/* Chart Canvas / SVG Graphics */
.attendance-chart-wrap {
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: clamp(10px, 2vw, 24px);
    padding: 10px 0;
    border-bottom: 1px solid var(--pc-border);
    width: 100%;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    gap: 8px;
}

.chart-bar-track {
    width: clamp(16px, 3.5vw, 28px);
    height: 180px;
    background: #f1f5f9;
    border-radius: var(--radius-pill);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-bar-fill {
    width: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--pc-blue-400), var(--pc-blue-600));
    transition: height 0.6s ease-out;
}

.chart-bar-fill.bar-today {
    background: linear-gradient(180deg, #38bdf8, var(--pc-blue-500));
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.chart-bar-label {
    font-size: 0.75rem;
    color: var(--pc-text-muted);
    font-weight: 600;
}

.chart-bar-pct {
    font-size: 0.72rem;
    color: var(--pc-text-heading);
    font-weight: 700;
}

/* Live Activity Stream (Real-Time Verification Feed) */
.activity-stream {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--pc-border);
    transition: all var(--transition-fast);
}

.activity-item:hover {
    border-color: var(--pc-blue-200);
    box-shadow: 0 4px 12px rgba(11, 19, 43, 0.05);
    transform: translateY(-1px);
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.activity-details {
    flex: 1 1 auto;
    min-width: 0; /* Prevents overflow and enables responsive truncation */
}

.activity-name,
.verification-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--pc-text-heading);
    letter-spacing: -0.015em;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.activity-meta {
    font-size: 0.76rem;
    color: var(--pc-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 3px;
}

.activity-subtag {
    color: var(--pc-blue-600);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.activity-badge {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--pc-status-present-bg);
    color: var(--pc-status-present);
    flex-shrink: 0;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.activity-badge.badge-late {
    background: var(--pc-status-late-bg);
    color: var(--pc-status-late);
}

/* ==========================================================================
   ATTENDANCE MANAGEMENT TABLE UI (Section 5)
   ========================================================================== */
.table-controls-bar {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.search-input-wrap {
    position: relative;
    min-width: min(100%, 240px);
    flex: 1;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pc-text-subtle);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    min-height: 44px;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--pc-text-heading);
    background: var(--pc-bg-subtle);
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--pc-blue-500);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.select-filter {
    padding: 10px 14px;
    min-height: 44px;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--pc-text-body);
    background: #ffffff;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    touch-action: manipulation;
}

.select-filter:focus {
    outline: none;
    border-color: var(--pc-blue-500);
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    color: var(--pc-text-heading);
    padding: 10px 16px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.btn-secondary:hover {
    background: var(--pc-bg-subtle);
    border-color: #cbd5e1;
}

.btn-primary {
    background: var(--pc-blue-600);
    border: 1px solid var(--pc-blue-600);
    color: #ffffff;
    padding: 10px 18px;
    min-height: 44px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.btn-primary:hover {
    background: var(--pc-blue-500);
    transform: translateY(-1px);
}

/* The Data Table Container */
.table-card {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    width: 100%;
}

.table-scroll-hint {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--pc-text-muted);
    background: var(--pc-bg-subtle);
    padding: 10px 16px;
    border-bottom: 1px solid var(--pc-border);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.data-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table thead th {
    background: #f8fafc;
    color: var(--pc-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 18px;
    border-bottom: 1px solid var(--pc-border);
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--pc-border-subtle);
    transition: background-color var(--transition-fast);
}

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

.data-table tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    color: var(--pc-text-body);
    white-space: nowrap;
}

.student-col {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pc-blue-100);
    color: var(--pc-blue-600);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.student-name-block {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: 600;
    color: var(--pc-text-heading);
}

.student-email {
    font-size: 0.75rem;
    color: var(--pc-text-muted);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.badge-present {
    background: var(--pc-status-present-bg);
    color: var(--pc-status-present);
    border: 1px solid var(--pc-status-present-border);
}

.badge-absent {
    background: var(--pc-status-absent-bg);
    color: var(--pc-status-absent);
    border: 1px solid var(--pc-status-absent-border);
}

.badge-late {
    background: var(--pc-status-late-bg);
    color: var(--pc-status-late);
    border: 1px solid var(--pc-status-late-border);
}

.badge-pending {
    background: var(--pc-status-pending-bg);
    color: var(--pc-status-pending);
    border: 1px solid var(--pc-status-pending-border);
}

.confidence-meter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
}

.confidence-bar-bg {
    width: 48px;
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.confidence-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: var(--pc-blue-500);
}

.table-row-actions {
    display: flex;
    gap: 6px;
}

.btn-table-action {
    background: transparent;
    border: 1px solid var(--pc-border);
    color: var(--pc-text-muted);
    padding: 6px 12px;
    min-height: 36px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.btn-table-action:hover {
    background: var(--pc-bg-subtle);
    color: var(--pc-blue-600);
    border-color: var(--pc-blue-300);
}

/* Empty State */
.table-empty-state {
    padding: 60px 20px;
    text-align: center;
    display: none;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--pc-bg-subtle);
    color: var(--pc-text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pc-text-heading);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 0.88rem;
    color: var(--pc-text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================================================
   AI ATTENDANCE & CAMERA HUD (Section 7)
   ========================================================================== */
.ai-studio-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(16px, 2.5vw, 24px);
    width: 100%;
}

.ai-viewport-card {
    background: #070d1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.ai-viewport-header {
    background: #0b132b;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

.ai-viewport-title {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-live-tag {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.ai-live-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* The Camera Screen Area */
.ai-screen-container {
    position: relative;
    height: clamp(260px, 45vw, 420px);
    background: radial-gradient(circle at center, #14234d 0%, #070d1e 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.video-stream-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    display: none;
}

.simulated-feed-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

/* HUD Overlay Layer */
.ai-hud-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Target Face Bounding Box */
.hud-face-target {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(160px, 42vw, 210px);
    height: clamp(190px, 50vw, 250px);
    border: 2px dashed rgba(56, 189, 248, 0.6);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
}

.hud-face-target.target-verified {
    border-color: #10b981;
    border-style: solid;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* Corner Reticle Brackets */
.corner-bracket {
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: #38bdf8;
    border-style: solid;
}
.corner-tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.corner-tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.corner-bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.corner-br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

/* Dynamic Laser Scanning Beam */
.hud-scan-beam {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #38bdf8, transparent);
    box-shadow: 0 0 12px #38bdf8;
    animation: scanVertical 2.6s infinite ease-in-out;
}

@keyframes scanVertical {
    0% { top: 0%; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Face Recognition Tag */
.hud-id-tag {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 19, 43, 0.9);
    border: 1px solid #38bdf8;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
}

.hud-id-tag.tag-verified {
    border-color: #10b981;
    background: rgba(5, 150, 105, 0.9);
}

/* AI Camera Controls Footer */
.ai-viewport-controls {
    background: #0b132b;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.ai-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.85rem;
}

.status-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pc-status-present);
    box-shadow: 0 0 10px var(--pc-status-present);
    flex-shrink: 0;
}

.ai-controls-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-mark-attendance {
    background: linear-gradient(135deg, var(--pc-blue-500), #1d4ed8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 24px;
    min-height: 44px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.btn-mark-attendance:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
}

/* AI Telemetry Side Panel */
.ai-telemetry-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.telemetry-card {
    background: #ffffff;
    border: 1px solid var(--pc-border);
    border-radius: var(--radius-md);
    padding: clamp(16px, 2.5vw, 20px);
    box-shadow: var(--shadow-xs);
    width: 100%;
}

.telemetry-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pc-text-heading);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.telemetry-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.telemetry-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pc-border-subtle);
    gap: 10px;
}

.telemetry-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.telemetry-key {
    color: var(--pc-text-muted);
}

.telemetry-val {
    font-weight: 600;
    color: var(--pc-text-heading);
    font-family: monospace;
    text-align: right;
}

/* Voice Biometric Waveform Box */
.voice-waveform-box {
    background: #0b132b;
    border-radius: var(--radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
}

.waveform-canvas {
    width: 100%;
    height: 48px;
}

.voice-status-text {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.voice-controls-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Student Directory Grid */
.student-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
}

/* Settings Controls */
.settings-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    gap: 14px;
    flex-wrap: wrap;
    padding: 6px 0;
}

/* ==========================================================================
   FEATURES SECTION
   ========================================================================== */
.features {
    padding: var(--space-section-y) var(--space-container-x);
    background-color: #ffffff;
    text-align: center;
    width: 100%;
}

.features-header {
    max-width: 720px;
    margin: 0 auto clamp(36px, 6vw, 60px);
    width: 100%;
}

.features h2 {
    font-size: var(--text-section-h2);
    margin-bottom: 14px;
}

.features-header p {
    color: var(--pc-text-muted);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(18px, 3vw, 32px);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.feature-card {
    padding: clamp(24px, 4vw, 38px) clamp(18px, 3vw, 30px);
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    border: 1px solid var(--pc-border);
    box-shadow: var(--shadow-xs);
    text-align: left;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.f-icon-box {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--pc-blue-50), #ede9fe);
    color: var(--pc-blue-600);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 1px solid var(--pc-blue-100);
    transition: all var(--transition-fast);
}

.f-icon-box .icon {
    width: 28px;
    height: 28px;
}

.feature-card:hover .f-icon-box {
    background: linear-gradient(135deg, var(--pc-blue-500), var(--pc-blue-600));
    color: #ffffff;
    transform: scale(1.05);
}

.feature-card h3 {
    font-size: var(--text-card-h3);
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    color: var(--pc-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==========================================================================
   WORKFLOW JOURNEYS (Teacher & Student)
   ========================================================================== */
.teacher-flow {
    padding: var(--space-section-y) var(--space-container-x);
    background-color: var(--pc-bg-body);
    width: 100%;
}

.flow-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.flow-header-center {
    text-align: center;
    max-width: 720px;
    margin: 0 auto clamp(40px, 6vw, 70px);
    width: 100%;
}

.flow-header-center h2 {
    font-size: var(--text-section-h2);
    margin-bottom: 12px;
}

.flow-header-center p {
    color: var(--pc-text-muted);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
}

.flow-step {
    display: flex;
    align-items: center;
    gap: clamp(24px, 5vw, 60px);
    margin-bottom: clamp(48px, 8vw, 90px);
    width: 100%;
}

.flow-step:nth-child(even) {
    flex-direction: row-reverse;
}

.flow-step:last-child {
    margin-bottom: 0;
}

.flow-content {
    flex: 1;
    min-width: 0;
}

.step-badge {
    color: var(--pc-blue-600);
    background: var(--pc-blue-50);
    border: 1px solid var(--pc-blue-100);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    display: inline-block;
}

.flow-content h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-bottom: 16px;
    color: var(--pc-text-heading);
}

.flow-content p {
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    color: var(--pc-text-muted);
    line-height: 1.65;
    margin-bottom: 24px;
}

.flow-feature-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.flow-feature-bullets li {
    font-size: 0.9rem;
    color: var(--pc-text-body);
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-feature-bullets li::before {
    content: '✓';
    color: var(--pc-status-present);
    font-weight: 800;
}

.flow-image {
    flex: 1.2;
    border-radius: var(--radius-lg);
    background-color: #ffffff;
    border: 1px solid var(--pc-border);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    width: 100%;
}

.flow-image:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.flow-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.flow-image:hover img {
    transform: scale(1.02);
}

.image-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.flow-image:hover .image-zoom-hint {
    opacity: 1;
}

/* ==========================================================================
   TECH ARCHITECTURE SECTION
   ========================================================================== */
.tech-stack {
    padding: clamp(50px, 8vw, 90px) var(--space-container-x);
    background: radial-gradient(circle at 50% 0%, #0f1c3f 0%, #0b132b 80%, #070d1e 100%);
    border-radius: var(--radius-xl);
    margin: 40px auto;
    max-width: 1300px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2 * clamp(12px, 3vw, 36px));
}

.tech-stack h2 {
    font-size: var(--text-section-h2);
    margin-bottom: 14px;
    color: #ffffff;
}

.tech-stack p.tech-lead {
    color: #94a3b8;
    max-width: 680px;
    margin: 0 auto clamp(30px, 5vw, 50px);
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: clamp(14px, 2.5vw, 20px);
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
}

.tech-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: clamp(20px, 3vw, 32px) clamp(16px, 2.5vw, 22px);
    border-radius: var(--radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.tech-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
}

.t-icon {
    width: 54px;
    height: 54px;
    background: rgba(37, 99, 235, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.t-icon .icon {
    width: 26px;
    height: 26px;
}

.tech-card h4 {
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
}

.tech-card p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

.tech-tag {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   CONVERSION / CTA SECTION
   ========================================================================== */
.purple-section {
    background: linear-gradient(135deg, #0b132b 0%, #1e293b 50%, #0f172a 100%);
    color: #ffffff;
    padding: clamp(50px, 8vw, 80px) var(--space-container-x);
    text-align: center;
    border-radius: var(--radius-xl);
    margin: 40px auto clamp(50px, 8vw, 80px);
    max-width: 1300px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    width: calc(100% - 2 * clamp(12px, 3vw, 36px));
}

.purple-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, 85vw);
    height: 250px;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.purple-section h2 {
    font-size: var(--text-section-h2);
    margin-bottom: 18px;
    color: #ffffff;
}

.purple-section p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #94a3b8;
    max-width: 720px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.btn-white {
    background: linear-gradient(135deg, var(--pc-blue-500), var(--pc-blue-600));
    color: #ffffff !important;
    padding: 16px 38px;
    min-height: 48px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
    touch-action: manipulation;
}

.btn-white:hover {
    background: linear-gradient(135deg, var(--pc-blue-600), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

/* ==========================================================================
   MAIN FOOTER
   ========================================================================== */
.main-footer {
    padding: clamp(52px, 7vw, 84px) var(--space-container-x) 36px;
    background-color: #070d1e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    width: 100%;
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: clamp(28px, 4vw, 64px);
    max-width: 1200px;
    margin: 0 auto 56px;
    width: 100%;
}

/* Footer Brand Block */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 12px;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 12px;
    line-height: 0;
    transition: transform var(--transition-fast);
}

.footer-logo-link:hover {
    transform: translateY(-2px);
}

.footer-logo-img {
    height: 34px; /* Intentionally smaller than navbar logo (36px) while perfectly preserving original aspect ratio */
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 4px;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 0.90rem;
    font-weight: 600;
    color: var(--pc-blue-400);
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin-bottom: 12px;
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.86rem;
    max-width: 320px;
    line-height: 1.6;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.88rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.84rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-copyright {
    color: #64748b;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-email-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all var(--transition-fast);
}

.footer-email-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.footer-email-link:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
    color: #ffffff;
}

.footer-legal a:hover {
    color: #ffffff;
}

.footer-dot {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.footer-back-to-top {
    color: var(--pc-blue-400);
    font-weight: 500;
}

.footer-back-to-top:hover {
    color: #38bdf8;
}

/* ==========================================================================
   IMAGE LIGHTBOX MODAL (Section 8)
   ========================================================================== */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(7, 13, 30, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 3vw, 30px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: min(94vw, 1100px);
    max-height: min(90vh, 850px);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(85vh - 70px);
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-caption {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
    word-break: break-word;
}

.lightbox-close {
    position: absolute;
    top: -46px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   TOAST NOTIFICATION (With Collision Prevention, Section 14)
   ========================================================================== */
.toast-container {
    position: fixed;
    /* Elevated cleanly above the Back to Top button so they NEVER collide */
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
    width: auto;
}

.toast {
    background: #0b132b;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: min(320px, calc(100vw - 40px));
    max-width: 440px;
    pointer-events: auto;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.toast-info .toast-icon {
    background: rgba(37, 99, 235, 0.2);
    color: #3b82f6;
}

.toast-body {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
    word-break: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    touch-action: manipulation;
}

.toast-close:hover {
    color: #ffffff;
}

/* ==========================================================================
   DEVICE-AWARE ADAPTIVE BACK TO TOP BUTTON (Sections 11 - 16)
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #0b132b;
    color: #ffffff;
    border: 1.5px solid rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 12px rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.92);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    touch-action: manipulation;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--pc-blue-600);
    border-color: #60a5fa;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
    transform: translateY(-2px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(0) scale(0.98);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--pc-blue-400);
    outline-offset: 3px;
}

.back-to-top-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.back-to-top:hover .back-to-top-icon {
    transform: translateY(-2px);
}

/* Tooltip for desktop pointers */
.back-to-top-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #070d1e;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.back-to-top-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #070d1e transparent transparent transparent;
}

@media (hover: hover) {
    .back-to-top:hover .back-to-top-tooltip {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (hover: none) {
    .back-to-top-tooltip {
        display: none;
    }
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & ADAPTIVE STYLES
   ========================================================================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .portal-container,
    .tech-stack,
    .purple-section,
    .features-header,
    .flow-container {
        max-width: 1360px;
    }

    .saas-layout {
        min-height: 760px;
    }

    .summary-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Laptop & Medium Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    .dashboard-grid-dual {
        grid-template-columns: 1fr;
    }

    .ai-studio-grid {
        grid-template-columns: 1fr;
    }

    .main-footer .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .navbar {
        padding: 0 clamp(16px, 2.5vw, 32px);
    }

    .nav-links-menu {
        gap: clamp(16px, 1.8vw, 26px);
    }

    .nav-links a {
        font-size: 0.88rem;
    }

    .btn-pill {
        padding: 8px 18px;
        font-size: 0.84rem;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .saas-layout {
        flex-direction: column;
        min-height: auto;
    }

    .saas-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sidebar-brand {
        padding: 14px 20px;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px 14px;
        gap: 8px;
    }

    .sidebar-section-title {
        display: none;
    }

    .sidebar-link {
        width: auto;
        white-space: nowrap;
        padding: 8px 14px;
    }

    .sidebar-footer {
        display: none;
    }

    .flow-step,
    .flow-step:nth-child(even) {
        flex-direction: column !important;
        gap: 32px;
        margin-bottom: 60px;
    }

    .flow-image {
        width: 100%;
    }

    .main-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* Mobile & Tablet Portrait Navigation (below 920px) */
@media (max-width: 920px) {
    .navbar {
        height: 66px;
        padding: 0 20px;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        bottom: auto;
        height: 100vh;
        height: 100dvh;
        width: 320px;
        max-width: 86vw;
        background: #0b132b;
        padding: 24px 20px;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;
        z-index: 2200;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.3s;
    }

    .nav-links.mobile-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
    }

    .nav-links-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .nav-links a {
        padding: 12px 14px;
        border-radius: var(--radius-sm);
        font-size: 0.95rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        color: #cbd5e1;
        background: rgba(255, 255, 255, 0.02);
    }

    .nav-links a:hover,
    .nav-links a:focus {
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: var(--font-heading);
        font-size: 1.1rem;
        font-weight: 700;
        color: #ffffff;
    }

    .nav-mobile-logo {
        height: 28px;
        width: auto;
    }

    .nav-mobile-close {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #ffffff;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 1.5rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        transition: background var(--transition-fast);
    }

    .nav-mobile-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .nav-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .btn-mobile-primary {
        background: linear-gradient(135deg, var(--pc-blue-500), var(--pc-blue-600));
        color: #ffffff !important;
        padding: 12px 18px;
        min-height: 48px;
        border-radius: var(--radius-md);
        font-family: var(--font-heading);
        font-size: 0.92rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
        width: 100%;
    }

    .nav-backdrop {
        position: fixed;
        inset: 0 0 auto;
        height: 100vh;
        height: 100dvh;
        background: rgba(7, 13, 30, 0.72);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 2150;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .nav-backdrop.active {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    /* In topbar, show [Logo + Present Call] on left, [☰] on right */
    .nav-cta .btn-pill {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-mobile-toggle svg line {
        transform-box: fill-box;
        transform-origin: center;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-mobile-toggle.is-open svg line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-mobile-toggle.is-open svg line:nth-child(2) {
        opacity: 0;
    }

    .nav-mobile-toggle.is-open svg line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Footer Tablet Refinements */
    .main-footer .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 560px;
    }

    .footer-logo-img {
        height: 32px;
    }
}

/* Mobile Devices (below 768px) */
@media (max-width: 767px) {
    .navbar {
        padding: 0 16px;
    }

    /* Off-Canvas SaaS Dashboard Sidebar */
    .saas-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 290px;
        max-width: 85vw;
        z-index: 2200;
        overflow-y: auto;
        transform: translateX(-100%);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: var(--shadow-xl);
    }

    .saas-sidebar.mobile-open {
        transform: translateX(0);
    }

    .saas-sidebar-close {
        display: flex;
    }

    .sidebar-nav {
        flex-direction: column;
        overflow-x: visible;
        padding: 16px 12px;
        gap: 6px;
    }

    .sidebar-section-title {
        display: block;
    }

    .sidebar-link {
        width: 100%;
    }

    .sidebar-footer {
        display: block;
    }

    .saas-sidebar-toggle {
        display: flex;
    }

    .topbar-breadcrumb {
        font-size: 0.82rem;
    }

    .date-indicator {
        display: none; /* Hide date indicator on mobile to give room to breadcrumb and bell */
    }

    /* Dashboard & Cards */
    .summary-cards-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn-cta,
    .hero-actions .link-action {
        width: 100%;
        max-width: 360px;
    }

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

    /* Attendance Table Mobile Experience */
    .table-scroll-hint {
        display: flex;
    }

    .table-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .search-input-wrap,
    .select-filter {
        width: 100%;
    }

    .table-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .table-actions button {
        width: 100%;
    }

    /* AI Attendance Mobile Viewport */
    .ai-viewport-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .ai-controls-btn-group {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .ai-controls-btn-group button {
        width: 100%;
    }

    .voice-controls-row {
        flex-direction: column;
        width: 100%;
    }

    .voice-controls-row button {
        width: 100%;
    }

    /* Back To Top Mobile Positioning */
    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: calc(18px + env(safe-area-inset-bottom, 0px));
        right: calc(18px + env(safe-area-inset-right, 0px));
    }

    .toast-container {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        right: calc(14px + env(safe-area-inset-right, 0px));
        left: calc(14px + env(safe-area-inset-left, 0px));
        max-width: 100%;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    .main-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1;
        max-width: 100%;
    }

    .footer-desc {
        max-width: 100%;
    }

    .footer-logo-img {
        height: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* Small Mobile Devices (below 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0 14px;
        height: 62px;
    }

    .logo {
        margin-right: 8px;
        gap: 8px;
    }

    .logo-img {
        height: 30px;
    }

    .logo-text {
        font-size: 1.15rem;
    }

    .logo-badge {
        display: none; /* Hide on mobile header to guarantee no collision, badge displays inside open drawer */
    }

    .nav-mobile-toggle {
        width: 40px;
        height: 40px;
    }

    /* Verification Feed card responsive wrapping */
    .activity-item {
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 8px 10px;
    }

    .activity-details {
        flex: 1 1 calc(100% - 54px);
    }

    .activity-badge {
        margin-left: auto;
    }

    .activity-name,
    .verification-name {
        white-space: normal;
        word-break: normal;
        overflow: visible;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .topbar-breadcrumb .breadcrumb-root,
    .topbar-breadcrumb .breadcrumb-separator {
        display: none;
    }

    .table-actions {
        grid-template-columns: 1fr;
    }

    .ai-controls-btn-group {
        grid-template-columns: 1fr;
    }

    .tech-stack,
    .purple-section {
        width: calc(100% - 16px);
        margin-left: 8px;
        margin-right: 8px;
        border-radius: var(--radius-lg);
    }

    /* Footer Small Mobile Refinements */
    .footer-logo-img {
        height: 28px;
    }

    .footer-brand-name {
        font-size: 1.15rem;
    }

    .footer-tagline {
        font-size: 0.84rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }

    .footer-legal .footer-dot {
        display: none;
    }
}

/* Mobile Landscape Mode Support (Section 15) */
@media (orientation: landscape) and (max-height: 520px) {
    .hero {
        padding: 40px var(--space-container-x) 50px;
    }

    .ai-screen-container {
        height: 240px;
    }

    .hud-face-target {
        width: 150px;
        height: 180px;
    }

    .lightbox-content img {
        max-height: 70vh;
    }
}

/* Reduced Motion Support (Section 13) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .back-to-top {
        transition: none !important;
    }

    .back-to-top-icon {
        transform: none !important;
    }

    .hud-scan-beam {
        animation: none !important;
        opacity: 0.5 !important;
    }
}