/* ==========================================================================
   SIKKHALAY ENTERPRISE DIGITAL SCHOOL OS — TEACHER WORKSPACE & ACADEMIC HUB
   Comprehensive Ultra-Responsive Master Stylesheet (Advanced Edition)
   Supports: 320px Ultra-Compact Mobile, 375px-480px Phones, 768px-1024px Tablets,
             1025px-1440px Laptops/Desktops, 1440px+ Ultra-Wide & High-DPI Prints
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS DESIGN TOKENS & 5-LAYER THEME ENGINE
   -------------------------------------------------------------------------- */
:root {
    --brand-primary: #059669;
    --brand-hover: #047857;
    --brand-active: #065f46;
    --brand-light: rgba(5, 150, 105, 0.12);
    --brand-glow: rgba(5, 150, 105, 0.35);

    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-card-hover: #e2e8f0;
    --bg-glass: rgba(255, 255, 255, 0.88);
    
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-subtle: #cbd5e1;
    --border-focus: #059669;

    --status-success: #10b981;
    --status-info: #0284c7;
    --status-warning: #f59e0b;
    --status-danger: #ef4444;
    --status-purple: #8b5cf6;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    --navbar-height: 64px;
    --bottom-nav-height: 62px;
    --container-max-width: 1320px;
}

[data-theme="dark"] {
    --bg-base: #090d16;
    --bg-surface: #0f172a;
    --bg-elevated: #1e293b;
    --bg-card-hover: #27354a;
    --bg-glass: rgba(15, 23, 42, 0.88);

    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    --border-color: #1e293b;
    --border-subtle: #334155;
    --border-focus: #10b981;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.6);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE RESETS & MODERN TYPOGRAPHY
   -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    user-select: none;
    transition: all var(--transition-fast);
}

button:active {
    transform: scale(0.97);
}

input, select, textarea {
    font-family: inherit;
}

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

/* Custom Smooth Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   3. TOP GLOBAL NAVIGATION APP BAR
   -------------------------------------------------------------------------- */
.fb-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--navbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(12px, 3vw, 28px);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.fb-nav-left {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 14px);
    min-width: 0;
}

.fb-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 15px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.fb-back-btn:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
    transform: translateX(-2px);
}

.fb-nav-page-title {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Search Wrap / Spotlight Trigger Button */
.fb-spotlight-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.fb-spotlight-btn:hover {
    border-color: var(--brand-primary);
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.spotlight-kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-family: inherit;
    font-weight: 700;
    color: var(--text-muted);
}

.fb-search-wrap {
    position: relative;
    width: clamp(180px, 25vw, 280px);
    cursor: pointer;
}

.fb-search-input {
    width: 100%;
    height: 36px;
    padding: 0 12px 0 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 12px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.fb-search-input:hover,
.fb-search-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-light);
}

.fb-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}

.fb-nav-right {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 10px);
    flex-shrink: 0;
}

.fb-theme-toggle,
.fb-mobile-icon-btn,
.fb-mobile-menu-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.fb-theme-toggle:hover,
.fb-mobile-icon-btn:hover,
.fb-mobile-menu-btn:hover {
    background: var(--bg-card-hover);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.fb-btn-portal {
    background: var(--brand-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px var(--brand-glow);
    white-space: nowrap;
}

.fb-btn-portal:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--brand-glow);
}

/* --------------------------------------------------------------------------
   4. OFF-CANVAS SLIDE DRAWER MENU
   -------------------------------------------------------------------------- */
.fb-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.fb-drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fb-drawer-card {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 320px;
    max-width: 86vw;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    padding: 20px;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
}

.fb-drawer-overlay.active .fb-drawer-card {
    transform: translateX(0);
}

.fb-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.fb-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.fb-drawer-inst-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    margin: 14px 0;
    border: 1px solid var(--border-color);
}

.fb-drawer-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.fb-drawer-section-title {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.fb-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.fb-drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    transition: background-color var(--transition-fast);
}

.fb-drawer-link:hover,
.fb-drawer-link:active {
    background: var(--bg-elevated);
    color: var(--brand-primary);
}

.fb-drawer-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 14px;
}

/* --------------------------------------------------------------------------
   5. INSTITUTIONAL HERO / COVER / PROFILE SHOWCASE
   -------------------------------------------------------------------------- */
.fb-main-container,
.fb-hero-wrapper {
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
}

.fb-hero-card,
.fb-hero-wrapper {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.fb-cover-wrap,
.fb-cover-container {
    position: relative;
    width: 100%;
    height: clamp(160px, 30vw, 320px);
    background: #0f172a;
    overflow: hidden;
}

.fb-cover-photo,
.fb-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: transform var(--transition-smooth);
}

.fb-hero-card:hover .fb-cover-photo,
.fb-hero-wrapper:hover .fb-cover-img {
    transform: scale(1.02);
}

.fb-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.1) 0%, rgba(15,23,42,0.85) 100%);
}

.fb-profile-bar {
    padding: 0 clamp(14px, 3vw, 32px) clamp(14px, 2vw, 22px) clamp(14px, 3vw, 32px);
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.fb-avatar-container,
.fb-avatar-holder {
    position: relative;
    width: clamp(84px, 16vw, 130px);
    height: clamp(84px, 16vw, 130px);
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    padding: 4px;
    box-shadow: var(--shadow-xl);
    border: 4px solid var(--bg-surface);
    margin-top: clamp(-42px, -8vw, -65px);
    flex-shrink: 0;
    z-index: 10;
}

.fb-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-xl) - 6px);
}

.fb-verified-badge,
.fb-verified-tick {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: clamp(26px, 5vw, 32px);
    height: clamp(26px, 5vw, 32px);
    border-radius: 50%;
    background: #0284c7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-surface);
    font-size: clamp(11px, 2.5vw, 13px);
    box-shadow: var(--shadow-md);
}

.fb-profile-details,
.fb-identity-details {
    flex: 1;
    min-width: 240px;
}

.fb-inst-title-en,
.fb-inst-title {
    font-size: clamp(18px, 3.5vw, 26px);
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.fb-inst-title-bn {
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 600;
    color: var(--brand-primary);
    margin-top: 2px;
}

.fb-meta-row,
.fb-inst-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.fb-meta-pill {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Profile & Hero Quick Action Buttons */
.fb-profile-actions,
.fb-hero-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.fb-btn-action-primary {
    background: var(--brand-primary, #4f46e5);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 8px 16px;
    border-radius: var(--radius-md, 10px);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all var(--transition-fast, 0.15s ease);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.fb-btn-action-primary:hover {
    background: var(--brand-hover, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.fb-btn-action-primary:active {
    transform: translateY(0);
}

.fb-btn-action-secondary {
    background: var(--bg-elevated, #f1f5f9);
    color: var(--text-main, #0f172a) !important;
    border: 1px solid var(--border-color, #e2e8f0);
    font-weight: 700;
    font-size: 12.5px;
    padding: 8px 14px;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all var(--transition-fast, 0.15s ease);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.fb-btn-action-secondary:hover {
    background: var(--bg-card-hover, #e2e8f0);
    border-color: var(--border-subtle, #cbd5e1);
    color: var(--brand-primary, #4f46e5) !important;
}

.fb-btn-action-secondary:active {
    transform: translateY(0);
}

.radar-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fb-motto-strip {
    padding: 10px clamp(14px, 3vw, 32px) 14px clamp(14px, 3vw, 32px);
    font-size: clamp(11px, 2vw, 13px);
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px dashed var(--border-color);
}

.fb-motto-icon {
    color: var(--brand-primary);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   6. TEACHER DUTY & REAL-TIME SHIFT STATUS STRIP
   -------------------------------------------------------------------------- */
.teacher-duty-strip {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: clamp(14px, 2.5vw, 20px) clamp(14px, 3vw, 24px);
    color: #ffffff;
    margin: 0 clamp(10px, 2vw, 20px) 16px clamp(10px, 2vw, 20px);
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.3);
    position: relative;
    overflow: hidden;
}

.teacher-duty-strip::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.teacher-duty-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.teacher-duty-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.teacher-avatar-ring {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

.teacher-avatar-thumb {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-md);
}

.teacher-active-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #064e3b;
}

.teacher-identity-name {
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.teacher-dept-role {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.teacher-shift-pill {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

/* Radar Active Period Box */
.teacher-duty-radar-box {
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 0;
}

.radar-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0;
}

.radar-active-class {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radar-ping-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.btn-radar-action {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-radar-action:hover {
    background: rgba(255, 255, 255, 0.28);
}

.btn-radar-action.is-primary {
    background: #10b981;
    border-color: #10b981;
}

.shift-progress-wrap {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shift-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.9;
    font-weight: 600;
    margin-bottom: 4px;
}

.shift-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.shift-progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.pulse-emerald-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.5s infinite;
}

.teacher-duty-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    align-items: center;
}

.live-clock-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(52, 211, 153, 0.4);
    color: #34d399;
    font-family: 'Inter', monospace;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.2);
}

.teacher-stat-card {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    text-align: center;
}

.stat-number {
    font-size: 18px;
    font-weight: 800;
    display: block;
    line-height: 1.2;
}

.stat-label {
    font-size: 10px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   7. QUICK ACTIONS RIBBON
   -------------------------------------------------------------------------- */
.teacher-quick-ribbon {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 10px clamp(10px, 2vw, 20px);
    margin: 0 clamp(10px, 2vw, 20px) 16px clamp(10px, 2vw, 20px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.teacher-quick-ribbon::-webkit-scrollbar {
    display: none;
}

.quick-ribbon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.quick-ribbon-btn:hover {
    background: var(--brand-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   8. STICKY 8/9-TAB NAVIGATION BAR
   -------------------------------------------------------------------------- */
.fb-tab-nav,
.fb-tab-bar {
    position: sticky;
    top: var(--navbar-height);
    z-index: 900;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 clamp(8px, 2vw, 20px);
    margin-bottom: 16px;
    display: flex;
}

.fb-tab-scroll-container {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.fb-tab-scroll-container::-webkit-scrollbar {
    display: none;
}

.fb-tab-btn {
    padding: 14px 14px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.fb-tab-btn:hover {
    color: var(--text-main);
    background: var(--bg-elevated);
}

.fb-tab-btn.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
    background: var(--brand-light);
}

/* --------------------------------------------------------------------------
   9. MAIN 2-COLUMN GRID LAYOUT
   -------------------------------------------------------------------------- */
.fb-content-grid,
.fb-page-container {
    max-width: var(--container-max-width);
    margin: 0 auto 40px auto;
    padding: 0 clamp(10px, 2vw, 20px);
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
}

.fb-left-col,
.fb-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fb-feed-col {
    min-width: 0;
}

.fb-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: clamp(14px, 2vw, 20px);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.fb-card:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.fb-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.fb-card-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.badge-live {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.badge-info {
    background: rgba(2, 132, 199, 0.15);
    color: #0284c7;
}

/* Left Column Widgets */
.fb-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.fb-info-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.fb-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fb-stat-box {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.fb-stat-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-primary);
    display: block;
}

.fb-stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   10. TAB PANELS & COMPONENTS
   -------------------------------------------------------------------------- */
.fb-tab-panel {
    display: none;
    animation: fadeIn var(--transition-normal);
}

.fb-tab-panel.active {
    display: block;
}

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

/* TODAY'S ASSIGNED CLASSES CARDS */
.teacher-classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.teacher-class-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

.teacher-class-card.is-live {
    border: 2px solid #10b981;
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.05) 100%);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

.teacher-class-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.class-period-chip {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chip-p1 { background: rgba(5, 150, 105, 0.15); color: #059669; }
.chip-p2 { background: rgba(2, 132, 199, 0.15); color: #0284c7; }
.chip-p3 { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.chip-p4 { background: rgba(217, 119, 6, 0.15); color: #d97706; }
.chip-p5 { background: rgba(225, 29, 72, 0.15); color: #e11d48; }
.chip-p6 { background: rgba(13, 148, 136, 0.15); color: #0d9488; }
.chip-p7 { background: rgba(79, 70, 229, 0.15); color: #4f46e5; }
.chip-p8 { background: rgba(234, 88, 12, 0.15); color: #ea580c; }

.status-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.status-live-pulse .live-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.status-upcoming-badge {
    padding: 3px 8px;
    background: rgba(2, 132, 199, 0.12);
    color: #0284c7;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
}

.status-done-badge {
    padding: 3px 8px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

/* BUTTONS */
.btn-primary {
    background: var(--brand-primary);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px var(--brand-glow);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px var(--brand-glow);
}

.btn-sm-outline {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-sm-outline:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* ROUTINE MATRIX TABLE */
.routine-mode-selector {
    display: inline-flex;
    background: var(--bg-elevated);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    gap: 4px;
}

.btn-mode {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.btn-mode.active {
    background: var(--bg-surface);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.routine-matrix-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    margin-top: 14px;
    -webkit-overflow-scrolling: touch;
}

.routine-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 740px;
}

.routine-matrix-table th {
    background: var(--bg-elevated);
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    font-weight: 700;
    color: var(--text-main);
}

.routine-matrix-table th.routine-day-col {
    width: 100px;
    text-align: left;
    background: var(--bg-surface);
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.routine-matrix-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: top;
    height: 85px;
}

.routine-matrix-table td.routine-day-header {
    font-weight: 800;
    background: var(--bg-elevated);
    color: var(--text-main);
    position: sticky;
    left: 0;
    z-index: 1;
    vertical-align: middle;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.routine-teacher-slot {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.routine-teacher-slot:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.routine-teacher-slot.is-my-class {
    background: rgba(5, 150, 105, 0.09);
    border-color: rgba(5, 150, 105, 0.35);
}

.routine-teacher-slot.is-other-class {
    opacity: 0.65;
}

/* EXAM INVIGILATION CARDS */
.exam-duty-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    transition: all var(--transition-fast);
}

.exam-duty-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

/* SYLLABUS TRACKER */
.syllabus-tracker-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.class-syllabus-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.syllabus-bar-track {
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.syllabus-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), #10b981);
    border-radius: var(--radius-full);
    transition: width 0.8s ease;
}

/* FILTER PILLS */
.fb-filter-pills-row,
.fb-faculty-dept-nav,
.fb-gallery-filters-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.fb-filter-pills-row::-webkit-scrollbar,
.fb-faculty-dept-nav::-webkit-scrollbar,
.fb-gallery-filters-row::-webkit-scrollbar {
    display: none;
}

.fb-notice-filter-pill,
.fb-faculty-dept-btn,
.fb-gallery-filter-pill {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.fb-notice-filter-pill:hover,
.fb-faculty-dept-btn:hover,
.fb-gallery-filter-pill:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
}

.fb-notice-filter-pill.active,
.fb-faculty-dept-btn.active,
.fb-gallery-filter-pill.active {
    background: var(--brand-primary);
    color: #ffffff;
    border-color: var(--brand-primary);
}

/* FACULTY DIRECTORATE GRID */
.fb-faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.fb-faculty-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-fast);
}

.fb-faculty-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.fb-faculty-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.fb-faculty-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-primary);
    flex-shrink: 0;
}

.fb-faculty-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.fb-faculty-designation {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.fb-faculty-dept-badge {
    font-size: 10px;
    background: var(--brand-light);
    color: var(--brand-primary);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-top: 4px;
}

.fb-faculty-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.fb-faculty-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fb-meta-icon {
    color: var(--brand-primary);
    font-size: 12px;
}

.fb-faculty-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.fb-faculty-actions a,
.fb-faculty-actions button {
    text-align: center;
    justify-content: center;
    font-size: 11px;
    padding: 6px 4px;
}

/* SUBSTITUTION CARD */
.substitute-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.wa-snippet-box {
    background: var(--bg-elevated);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    margin-top: 10px;
}

.wa-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    color: var(--brand-primary);
    font-weight: 600;
}

/* GALLERY GRID */
.fb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.fb-gallery-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-elevated);
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.fb-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.fb-gallery-card:hover .fb-gallery-thumb {
    transform: scale(1.05);
}

.fb-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
    color: #ffffff;
    padding: 12px;
}

.fb-gallery-title {
    font-size: 13px;
    font-weight: 700;
}

.fb-gallery-sub {
    font-size: 11px;
    opacity: 0.8;
}

/* --------------------------------------------------------------------------
   11. SMART ATTENDANCE ROSTER STYLES
   -------------------------------------------------------------------------- */
.attendance-roster-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.roster-student-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.roster-student-row:hover {
    border-color: var(--border-subtle);
    background: var(--bg-card-hover);
}

.att-toggle-group {
    display: flex;
    gap: 4px;
    background: var(--bg-surface);
    padding: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.att-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 800;
    background: transparent;
    color: var(--text-muted);
}

.att-btn.is-p.active {
    background: #10b981;
    color: #ffffff;
}

.att-btn.is-l.active {
    background: #f59e0b;
    color: #ffffff;
}

.att-btn.is-a.active {
    background: #ef4444;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   12. SPOTLIGHT COMMAND PALETTE MODAL
   -------------------------------------------------------------------------- */
.spotlight-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.spotlight-search-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.spotlight-input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
}

.spotlight-results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.spotlight-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.spotlight-item:hover {
    background: var(--bg-elevated);
}

.spotlight-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    background: var(--brand-light);
    color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   13. FLOATING ACTION SPEED DIAL (FAB)
   -------------------------------------------------------------------------- */
.fb-fab-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 14px);
    right: 14px;
    z-index: 1400;
}

.fb-fab-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 6px 16px var(--brand-glow);
    border: none;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.fb-fab-btn:active {
    transform: scale(0.92);
}

.fb-mobile-only {
    display: none;
}

/* --------------------------------------------------------------------------
   14. MOBILE BOTTOM APP BAR
   -------------------------------------------------------------------------- */
.fb-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: none;
    align-items: center;
    justify-content: space-around;
    z-index: 1500;
    padding: 0 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.fb-bottom-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    height: 100%;
    position: relative;
    transition: color var(--transition-fast);
}

.fb-bottom-nav-item i {
    font-size: 18px;
    transition: transform var(--transition-fast);
}

.fb-bottom-nav-item.active {
    color: var(--brand-primary);
}

.fb-bottom-nav-item.active i {
    transform: translateY(-2px);
}

.fb-bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   15. MODALS & BOTTOM SHEETS
   -------------------------------------------------------------------------- */
.fb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.fb-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fb-modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.fb-modal-overlay.active .fb-modal-card {
    transform: scale(1);
}

.fb-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.fb-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fb-btn-close {
    background: var(--bg-elevated);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.fb-btn-close:hover {
    color: var(--status-danger);
    background: rgba(239, 68, 68, 0.15);
}

.fb-form-group {
    margin-bottom: 14px;
}

.fb-form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.fb-form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 16px; /* Prevents auto-zoom on iOS */
    outline: none;
    transition: border-color var(--transition-fast);
}

.fb-form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px var(--brand-light);
}

/* Toast Notifications */
.fb-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fb-toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    animation: fbToastSlide 0.3s ease;
}

@keyframes fbToastSlide {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   16. COMPREHENSIVE RESPONSIVE BREAKPOINTS (MOBILE, TABLET, DESKTOP)
   -------------------------------------------------------------------------- */

/* TABLET LANDSCAPE & MEDIUM DESKTOPS (992px to 1200px) */
@media (max-width: 1200px) {
    .fb-content-grid,
    .fb-page-container {
        grid-template-columns: 290px 1fr;
        gap: 16px;
    }
}

/* TABLET PORTRAIT & COMPACT TABLETS (768px to 991px) */
@media (max-width: 991px) {
    .fb-content-grid,
    .fb-page-container {
        grid-template-columns: 1fr;
    }

    .fb-left-col,
    .fb-sidebar-col {
        order: 2;
    }

    .fb-feed-col {
        order: 1;
    }

    .teacher-classes-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* SMARTPHONES & PHABLETS (< 768px) */
@media (max-width: 768px) {
    :root {
        --navbar-height: 56px;
    }

    .fb-search-wrap {
        display: none;
    }

    .fb-bottom-nav {
        display: flex;
    }

    .fb-desktop-only {
        display: none !important;
    }

    .fb-mobile-only {
        display: block !important;
    }

    .fb-main-container {
        padding-bottom: calc(var(--bottom-nav-height) + 24px);
    }

    .fb-navbar {
        padding: 0 12px;
    }

    /* 1. Mobile Profile Bar & Avatar Container */
    .fb-profile-bar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 16px 16px 16px;
        gap: 12px;
        position: relative;
    }

    .fb-avatar-container,
    .fb-avatar-holder {
        width: 92px;
        height: 92px;
        margin-top: -46px;
        border-radius: 18px;
        border: 3.5px solid var(--bg-surface);
        box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.18);
        position: relative;
        z-index: 10;
        margin-bottom: 2px;
        flex-shrink: 0;
    }

    .fb-avatar-container .fb-avatar-img,
    .fb-avatar-holder .fb-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
    }

    .fb-verified-badge,
    .fb-verified-tick {
        width: 24px;
        height: 24px;
        font-size: 10.5px;
        bottom: -2px;
        right: -2px;
        border-width: 2px;
    }

    .fb-profile-details,
    .fb-identity-details {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .fb-inst-title-en,
    .fb-inst-title {
        font-size: 18px;
        font-weight: 800;
        line-height: 1.25;
    }

    .fb-inst-title-bn {
        font-size: 14px;
        margin-top: 2px;
        margin-bottom: 6px;
    }

    .fb-meta-row,
    .fb-inst-meta-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
        margin-top: 6px;
    }

    .fb-meta-pill {
        font-size: 11px;
        padding: 3px 8px;
        white-space: normal;
        line-height: 1.3;
    }

    /* 2. Hero 4 Quick Action Buttons */
    .fb-profile-actions,
    .fb-hero-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 4px;
    }

    .fb-profile-actions .fb-btn-action-primary,
    .fb-profile-actions .fb-btn-action-secondary,
    .fb-hero-actions .fb-btn-action-primary,
    .fb-hero-actions .fb-btn-action-secondary {
        width: 100%;
        padding: 9px 8px;
        font-size: 12px;
        font-weight: 700;
        justify-content: center;
        border-radius: var(--radius-md, 10px);
        box-sizing: border-box;
        text-align: center;
    }

    .fb-motto-strip {
        padding: 10px 16px 12px 16px;
        font-size: 11.5px;
        line-height: 1.45;
    }

    /* 3. Teacher Duty & HUD Strip */
    .teacher-duty-strip {
        margin: 0 10px 16px 10px;
        padding: 14px 14px 16px 14px;
        border-radius: var(--radius-lg, 14px);
    }

    .teacher-duty-header {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
    }

    .teacher-duty-profile {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .teacher-avatar-ring {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .teacher-duty-info {
        flex: 1;
        min-width: 0;
    }

    .teacher-identity-name {
        font-size: 15.5px;
        font-weight: 800;
        line-height: 1.25;
    }

    .teacher-dept-role {
        font-size: 11.5px;
        opacity: 0.92;
        line-height: 1.35;
        margin-top: 2px;
        word-break: break-word;
    }

    .teacher-shift-pill {
        font-size: 10.5px;
        padding: 3px 8px;
        margin-top: 4px;
    }

    .live-clock-pill {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px 12px;
        font-size: 12.5px;
        border-radius: var(--radius-md, 10px);
        background: rgba(0, 0, 0, 0.45);
        box-sizing: border-box;
    }

    .teacher-duty-radar-box {
        padding: 12px;
        margin-bottom: 0;
        border-radius: var(--radius-md, 10px);
    }

    .radar-top-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 0;
    }

    .radar-active-class {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }

    .radar-active-details {
        flex: 1;
        min-width: 0;
    }

    .radar-class-title {
        font-size: 12.5px !important;
        line-height: 1.35;
        display: block;
        word-break: break-word;
    }

    .radar-class-meta {
        font-size: 11px !important;
        margin-top: 2px;
    }

    .radar-actions-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        margin-top: 4px;
    }

    .radar-actions-group .btn-radar-action {
        width: 100%;
        justify-content: center;
        padding: 8px 6px;
        font-size: 11.5px;
        border-radius: var(--radius-sm, 6px);
        box-sizing: border-box;
    }

    .teacher-quick-ribbon {
        margin: 0 10px 14px 10px;
        padding: 8px 12px;
        border-radius: var(--radius-md);
    }

    .fb-tab-nav,
    .fb-tab-bar {
        top: var(--navbar-height);
        padding: 0 8px;
    }

    .fb-tab-btn {
        padding: 12px 10px;
        font-size: 12px;
        gap: 6px;
    }

    .fb-content-grid,
    .fb-page-container {
        padding: 0 10px;
        gap: 14px;
    }

    .teacher-classes-grid,
    .fb-faculty-grid {
        grid-template-columns: 1fr;
    }

    .fb-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* Mobile Bottom Sheet Modals */
    .fb-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .fb-modal-card {
        border-radius: 20px 20px 0 0;
        max-height: 88vh;
        transform: translateY(100%);
        padding: 20px 16px;
    }

    .fb-modal-overlay.active .fb-modal-card {
        transform: translateY(0);
    }

    .fb-toast-container {
        right: 12px;
        left: 12px;
        bottom: calc(var(--bottom-nav-height) + 14px);
    }
}

/* ULTRA-COMPACT MOBILE (< 420px) */
@media (max-width: 420px) {
    .fb-avatar-container,
    .fb-avatar-holder {
        width: 78px;
        height: 78px;
        margin-top: -39px;
        border-radius: 16px;
    }

    .fb-avatar-container .fb-avatar-img,
    .fb-avatar-holder .fb-avatar-img {
        border-radius: 11px;
    }

    .fb-inst-title-en,
    .fb-inst-title {
        font-size: 16px;
    }

    .fb-inst-title-bn {
        font-size: 12.5px;
    }

    .fb-nav-page-title {
        max-width: 120px;
    }

    .fb-profile-actions,
    .fb-hero-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .fb-profile-actions .fb-btn-action-primary,
    .fb-profile-actions .fb-btn-action-secondary,
    .fb-hero-actions .fb-btn-action-primary,
    .fb-hero-actions .fb-btn-action-secondary {
        font-size: 11px;
        padding: 8px 4px;
        gap: 4px;
    }

    .teacher-avatar-ring {
        width: 42px;
        height: 42px;
    }

    .teacher-identity-name {
        font-size: 14px;
    }

    .teacher-dept-role {
        font-size: 10.5px;
    }

    .radar-actions-group {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .radar-actions-group .btn-radar-action {
        padding: 8px;
    }

    .fb-gallery-grid {
        grid-template-columns: 1fr;
    }

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

/* --------------------------------------------------------------------------
   17. HIGH-RESOLUTION PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
    body * {
        visibility: hidden;
    }
    #printTeacherRoutineModal,
    #printTeacherRoutineModal * {
        visibility: visible;
    }
    #printTeacherRoutineModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        background: #ffffff !important;
        box-shadow: none !important;
    }
    .fb-modal-overlay {
        background: transparent !important;
    }
    .fb-modal-card {
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .no-print {
        display: none !important;
    }
}
