/* style.css - Omega Group Coaching Portal Essential Styles (Login, Sidebar & Header) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #f1f4f9;
    --bg-left: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --card-radius: 8px;


    /* Brand Logo Colors & Theme Variables */
    --primary-orange: #f27a1a;
    --primary-orange-hover: #e0690b;
    --primary-orange-light: #fff7ed;
    --primary-orange-border: #ffedd5;
    --orange-gradient: linear-gradient(135deg, #ff8000 0%, #e65c00 100%);
    --orange-shadow: 0 4px 12px rgba(242, 122, 26, 0.25);

    /* System Status Variables */
    --status-success: #16a34a;
    --status-success-bg: #dcfce7;
    --status-warning: #ca8a04;
    --status-warning-bg: #fef9c3;
    --status-danger: #dc2626;
    --status-danger-bg: #fee2e2;
    --status-info: #0284c7;
    --status-info-bg: #e0f2fe;

    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ==========================================================================
   1. LOGIN SPLIT SCREEN LAYOUT
   ========================================================================== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 0 0 45%;
    max-width: 45%;
    min-width: 45%;
    background: linear-gradient(135deg, rgba(10,10,20,0.82) 0%, rgba(10,10,20,0.70) 60%, rgba(10,10,20,0.60) 100%), url('../images/login_hero_books.png') no-repeat center center;
    background-color: #0a0a14;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(242, 122, 26, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* Brand Logo Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.brand-logo {
    width: 44px;
    height: 44px;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1.1;
}

.brand-text span {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-orange);
}

/* Hero Content */
.hero-content {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.hero-title span {
    color: var(--primary-orange);
}

.hero-description {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.70);
    line-height: 1.6;
    max-width: 90%;
    margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    background: rgba(255,255,255,0.16);
    box-shadow: 0 6px 24px rgba(242, 122, 26, 0.25);
}

.feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card.student .feature-icon { background: rgba(242, 122, 26, 0.25); color: #ffaa55; }
.feature-card.attendance .feature-icon { background: rgba(59, 130, 246, 0.25); color: #7eb8ff; }
.feature-card.fee .feature-icon { background: rgba(16, 185, 129, 0.25); color: #5ce0a8; }
.feature-card.reports .feature-icon { background: rgba(139, 92, 246, 0.25); color: #c4a0ff; }

.feature-card p {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.90);
    line-height: 1.3;
}

.login-left-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 2.5rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.50);
    z-index: 2;
}

/* Right Form Column */
.login-right {
    flex: 0 0 55%;
    max-width: 55%;
    min-width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    position: relative;
    background-color: #ffffff;
}

/* Top Navigation (Theme & Lang) */
.top-nav {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 10;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px;
    cursor: pointer;
}

.toggle-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background-color: var(--border-color);
    color: var(--primary-orange);
}

.theme-separator {
    width: 1px;
    height: 16px;
    background-color: var(--border-color);
    margin: 0 4px;
}

/* Language Selector */
.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-selector:hover {
    border-color: var(--border-hover);
}

/* Login Card Container */
.login-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 35px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-header h2 span {
    color: var(--primary-orange);
}

.card-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.header-bar {
    width: 60px;
    height: 3px;
    background-color: var(--primary-orange);
    margin: 0.75rem auto 0 auto;
    border-radius: 2px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-field {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(242, 122, 26, 0.15);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.remember-me input {
    accent-color: var(--primary-orange);
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.forgot-link {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-orange-hover);
}

.submit-btn {
    width: 100%;
    background: var(--orange-gradient);
    border: none;
    border-radius: 10px;
    padding: 0.9rem;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(242, 122, 26, 0.3);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(242, 122, 26, 0.4);
}

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-left {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 2.5rem 1.5rem;
    }
    .login-right {
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 100%;
        padding: 4rem 1.5rem 2.5rem 1.5rem;
    }
}

/* ==========================================================================
   2. DASHBOARD SIDEBAR & HEADER STYLING
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
}

/* Sidebar Styling */
.app-sidebar {
    width: 230px;
    min-width: 230px;
    background: #0f172a;
    border-right: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
    z-index: 150;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed Sidebar Styles */
.app-sidebar.collapsed {
    width: 68px;
    min-width: 68px;
}

.app-sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 1.1rem 0;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .menu-label,
.app-sidebar.collapsed .user-info,
.app-sidebar.collapsed .user-chevron {
    display: none !important;
}

.app-sidebar.collapsed .sidebar-nav li a {
    justify-content: center;
    padding: 0.75rem 0;
    gap: 0;
}

.app-sidebar.collapsed .sidebar-nav li a .nav-icon {
    width: 20px;
    height: 20px;
}

.app-sidebar.collapsed .sidebar-user-card {
    justify-content: center;
    padding: 0.85rem 0;
}

.sidebar-brand {
    padding: 1.1rem 1.1rem 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-brand h1 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.sidebar-brand span {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.sidebar-menu-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

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

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

.sidebar-menu-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-menu-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.85rem;
    color: rgba(255,255,255,0.60);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.18s ease;
}

.sidebar-nav li > a:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.90);
}

.sidebar-nav > ul > li.active > a,
.sidebar-nav > ul > li.active > a:hover {
    background: #ffffff !important;
    color: #0f172a !important;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.sidebar-nav li > a .nav-icon {
    stroke: rgba(255,255,255,0.65);
    transition: stroke 0.18s ease;
}

.sidebar-nav li > a:hover .nav-icon {
    stroke: #ffffff;
}

.sidebar-nav > ul > li.active > a .nav-icon,
.sidebar-nav > ul > li.active > a:hover .nav-icon {
    stroke: #0f172a !important;
}

/* Sidebar Sub-Menu Navigation Styling */
.sidebar-submenu {
    list-style: none;
    padding-left: 0.75rem !important;
    margin: 0.35rem 0 0.5rem 0.75rem !important;
    border-left: 2px solid rgba(255,255,255,0.12) !important;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.sidebar-submenu a {
    display: flex !important;
    align-items: center !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.65) !important;
    background: transparent !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
}
.sidebar-submenu a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}
.sidebar-submenu a.active {
    color: #ffffff !important;
    background: var(--primary-orange) !important;
    font-weight: 700 !important;
    box-shadow: 0 3px 10px rgba(242, 122, 26, 0.35) !important;
}


/* Header & Top Bar Styling */
.top-bar {
    height: 64px;
    min-height: 64px;
    border-bottom: 1px solid var(--border-color);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    width: 280px;
    max-width: 280px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.top-search-wrap input {
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 100%;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.top-header-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1.25rem;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

/* ==========================================================================
   3. MAIN LAYOUT & NAVIGATION ICON UTILITIES
   ========================================================================== */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.nav-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.menu-toggle-btn:hover {
    background: var(--border-color);
}

/* Dashboard scrollable content area */
.main-layout > main {
    flex: 1;
    overflow-y: auto;
}

/* ==========================================================================
   4. OMEGA ERP GLOBAL SYSTEM STYLES (Modals, Tables, Forms, Badges, Buttons)
   ========================================================================== */

/* --- Global Breadcrumbs --- */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}
.breadcrumb a:hover {
    color: var(--primary-orange);
}

/* --- Global Action Buttons & Color Theme (#f27a1a) --- */
.btn-add-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f27a1a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(242, 122, 26, 0.25);
    transition: all 0.2s ease;
}
.btn-add-primary:hover {
    background: #e0690b;
    color: #ffffff;
}

.btn-export, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-export:hover, .btn-secondary:hover {
    border-color: var(--text-primary);
    background: #f8fafc;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-back:hover {
    border-color: #f27a1a;
    color: #f27a1a;
}

.btn-action-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #64748b;
    text-decoration: none;
}
.btn-action-icon:hover {
    border-color: #f27a1a;
    color: #f27a1a;
    background: #fff7ed;
}

.action-icon-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.35rem !important;
    justify-content: flex-end !important;
}

/* --- Premium Stat Cards System --- */
.students-stats-grid, .inquiry-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.15rem;
}
.student-stat-card, .inquiry-stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}
.student-stat-card:hover, .inquiry-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    border-color: #cbd5e1;
}
.student-stat-icon, .inquiry-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}
.student-stat-icon.purple, .inquiry-stat-icon.purple { background: #f3e8ff; color: #7e22ce; }
.student-stat-icon.green,  .inquiry-stat-icon.green  { background: #dcfce7; color: #15803d; }
.student-stat-icon.yellow, .inquiry-stat-icon.yellow { background: #fef9c3; color: #a16207; }
.student-stat-icon.blue,   .inquiry-stat-icon.blue   { background: #e0f2fe; color: #0369a1; }
.student-stat-icon.pink,   .inquiry-stat-icon.pink   { background: #fce7f3; color: #be185d; }
.student-stat-icon.red,    .inquiry-stat-icon.red    { background: #fee2e2; color: #b91c1c; }

.stat-num-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin: 0.15rem 0;
}
.stat-sub-text {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
}
.btn-action-icon:hover {
    border-color: #f27a1a;
    color: #f27a1a;
    background: #fff7ed;
}

.btn-action-view {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-action-view:hover { border-color: var(--text-primary); }
.btn-action-view.primary { background: #f27a1a; color: #ffffff; border: none; box-shadow: 0 4px 12px rgba(242,122,26,0.25); }
.btn-action-view.primary:hover { background: #e0690b; }
.btn-action-view.convert { background: #16a34a; color: #ffffff; border: none; }
.btn-action-view.convert:hover { background: #15803d; }

/* --- Global Data Tables System --- */
.table-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: visible;
    position: relative;
}
.table-primary, .inquiry-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.83rem;
}
.table-primary th, .inquiry-table th {
    background: #f8fafc;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
.table-primary td, .inquiry-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
    position: relative;
}
.table-primary tr, .inquiry-table tr {
    position: relative;
}
.table-primary tr:hover td, .inquiry-table tr:hover td {
    background: #f8fafc;
}
.table-primary tr.dropdown-open, .inquiry-table tr.dropdown-open {
    z-index: 100;
}

/* --- Global Table Pagination --- */
.pagination-row {
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.pagination-btns {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.page-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
}
.page-btn.active {
    background: #f27a1a;
    color: #ffffff;
    border-color: #f27a1a;
}

/* --- Global Action Dropdowns --- */
.action-dropdown-wrap {
    position: relative;
}
.action-dropdown-menu {
    display: none;
    position: absolute;
    top: 34px;
    right: 0;
    width: 210px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    z-index: 9999;
    padding: 0.4rem 0;
}
.action-dropdown-menu.show {
    display: block;
}
.action-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.action-dropdown-item:hover {
    background: #fff7ed;
    color: #f27a1a;
}
.action-dropdown-item.danger {
    color: #ef4444;
}
.action-dropdown-item.danger:hover {
    background: #fef2f2;
}
.action-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.3rem 0;
}

/* --- Global Status Badges --- */
.badge-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 700;
    text-align: center;
}
.badge-status.new        { background: #f1f5f9; color: #475569; }
.badge-status.interested { background: #fef9c3; color: #854d0e; }
.badge-status.followup   { background: #e0f2fe; color: #0369a1; }
.badge-status.confirmed  { background: #dcfce7; color: #15803d; }
.badge-status.rejected   { background: #fee2e2; color: #b91c1c; }

.badge-source {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.73rem;
    font-weight: 600;
}
.badge-source.walkin   { background: #fff7ed; color: #ea580c; }
.badge-source.facebook { background: #dbeafe; color: #1d4ed8; }
.badge-source.whatsapp { background: #dcfce7; color: #15803d; }
.badge-source.referral { background: #ffedd5; color: #c2410c; }
.badge-source.instagram{ background: #fce7f3; color: #be185d; }
.badge-source.website  { background: #e0f2fe; color: #0369a1; }

/* --- Global Modal System --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}
.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8fafc;
}

/* --- Global Cards & Form Controls --- */
.detail-card, .form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    margin-bottom: 1.25rem;
}
.detail-card-title, .form-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.15rem;
}
.detail-card-title svg, .form-card-title svg {
    stroke: var(--primary-orange) !important;
}

/* ==========================================================================
   5. FULL PORTAL RESPONSIVE SYSTEM
   ========================================================================== */

/* --- Sidebar Mobile Overlay Backdrop --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 149;
    transition: opacity 0.25s ease;
}
.sidebar-overlay.active { display: block; }

.students-stats-grid,
.inquiry-stats-grid,
.dashboard-stats-grid,
.fees-stats-grid,
.attendance-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ---- BREAKPOINT: 1400px (Large Desktops) ---- */
@media (max-width: 1400px) {
    .students-stats-grid,
    .inquiry-stats-grid,
    .dashboard-stats-grid,
    .fees-stats-grid,
    .attendance-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ---- BREAKPOINT: 1200px (Laptops) ---- */
@media (max-width: 1200px) {
    .students-stats-grid,
    .inquiry-stats-grid,
    .dashboard-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }

    .sp-hero { grid-template-columns: auto 1fr; }
    .sp-quick-info { display: none; }

    .sp-hero-details { grid-template-columns: repeat(2, 1fr); }
    .sp-overview-grid { grid-template-columns: 1fr 1fr; }
    .sp-overview-bottom { grid-template-columns: 1fr 1fr; }
    
    .form-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile Sidebar Toggle hook */
body.sidebar-mobile-open { overflow: hidden; }

/* ==========================================================================
   GLOBAL PORTAL LAYOUT, BUTTONS, INPUTS & TABLES (MATCHING SCREENSHOTS)
   ========================================================================== */
.students-container, 
.inquiry-container, 
.parents-container, 
.family-view-container, 
.family-form-container { 
    padding: 1.75rem 2rem; 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
}

.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; }
.page-header-titles h2 { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.header-action-btns { display: flex; align-items: center; gap: 0.75rem; }

/* 1. Form Control & Filter Input Sizing */
.form-control,
.filter-select,
.search-input-wrap input {
    font-family: var(--font-family, 'Outfit', sans-serif);
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    outline: none;
    transition: all 0.15s ease;
}

.form-control:focus,
.filter-select:focus,
.search-input-wrap input:focus {
    border-color: var(--primary-orange);
}

/* 2. Global Primary Orange Buttons (Edit Family, Filter, Add Child, Save) */
.btn-add-primary,
.btn-primary-orange,
.btn-filter-apply,
.sp-btn-edit {
    font-family: var(--font-family, 'Outfit', sans-serif) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: var(--primary-orange) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.35rem !important;
    height: 44px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(242, 122, 26, 0.3) !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}

.btn-add-primary:hover,
.btn-primary-orange:hover,
.btn-filter-apply:hover,
.sp-btn-edit:hover {
    background: var(--primary-orange-hover) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(242, 122, 26, 0.4) !important;
}

/* 3. Global Secondary White Buttons (Back to List, Export, Print, Cancel, Reset) */
.btn-export,
.btn-secondary-btn,
.btn-secondary,
.sp-btn-back,
.sp-btn-more {
    font-family: var(--font-family, 'Outfit', sans-serif) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.25rem !important;
    height: 44px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.45rem !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important;
    white-space: nowrap !important;
}

.btn-export:hover,
.btn-secondary-btn:hover,
.btn-secondary:hover,
.sp-btn-back:hover,
.sp-btn-more:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: var(--primary-orange) !important;
}

/* Search Input Wrap Special Alignment */
.search-input-wrap {
    position: relative;
    flex: 1.5;
    min-width: 250px;
}
.search-input-wrap input {
    padding-left: 2.5rem !important;
    width: 100% !important;
}
.search-input-wrap svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    stroke: var(--text-muted);
}

/* Card Titles & SVG Icons */
.form-card-title,
.detail-card-title,
.sp-card-title {
    font-size: 0.92rem !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 1.1rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid var(--border-color) !important;
    justify-content: space-between !important;
}

.form-card-title > svg,
.form-card-title-left > svg,
.detail-card-title > svg,
.sp-card-title > svg,
.sp-card-title-left > svg {
    stroke: var(--primary-orange) !important;
    flex-shrink: 0 !important;
}

.btn-primary-orange svg,
.btn-add-primary svg,
.btn-filter-apply svg,
.sp-btn-edit svg {
    stroke: #ffffff !important;
    flex-shrink: 0 !important;
}

/* Tabs Bar Styling */
.family-tabs-bar,
.sp-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    border-bottom: 1.5px solid var(--border-color) !important;
    background: #ffffff !important;
    padding: 0 1.25rem !important;
    border-radius: 8px 12px 0 0 !important;
}

.fam-tab-btn,
.sp-tab-btn {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    padding: 0.9rem 0.85rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    background: none !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.fam-tab-btn:hover,
.sp-tab-btn:hover {
    color: var(--primary-orange) !important;
}

.fam-tab-btn.active,
.sp-tab-btn.active {
    color: var(--primary-orange) !important;
    border-bottom-color: var(--primary-orange) !important;
    font-weight: 700 !important;
}

.fam-tab-btn svg,
.sp-tab-btn svg {
    stroke: currentColor !important;
}

/* Global Stat Cards */
.students-stats-grid, 
.inquiry-stats-grid, 
.parents-stats-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 1rem; 
}
.student-stat-card, .inquiry-stat-card { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 1.1rem 1.25rem; 
    display: flex; 
    align-items: center; 
    gap: 0.85rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.03); 
}
.student-stat-icon, .inquiry-stat-icon { 
    width: 44px; 
    height: 44px; 
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.1rem; 
    flex-shrink: 0; 
}
.student-stat-icon.purple { background: #f3e8ff; color: #7e22ce; }
.student-stat-icon.green  { background: #dcfce7; color: #16a34a; }
.student-stat-icon.red    { background: #fee2e2; color: #dc2626; }
.student-stat-icon.blue   { background: #e0f2fe; color: #0284c7; }
.student-stat-icon.yellow { background: #fef9c3; color: #ca8a04; }

.stat-num-val { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.stat-sub-text { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Global Filter Card & Form Controls */
.filter-card, .inquiry-filter-card, .students-filter-card { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    padding: 1.1rem 1.25rem; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); 
    display: flex; 
    align-items: center; 
    gap: 0.85rem; 
    flex-wrap: wrap; 
}
.filter-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* View Switcher Pill Component (List View / Kanban View) */
.view-switcher-pill {
    display: inline-flex;
    align-items: center;
    background: #eef2f6;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.view-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}
.view-switcher-btn.active, .view-switcher-btn:hover {
    background: #ffffff;
    color: #4338ca;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.btn-reset { 
    background: #ffffff !important; 
    border: 1px solid var(--border-color) !important; 
    color: var(--text-primary) !important; 
    border-radius: 8px !important; 
    padding: 0.65rem 1.1rem !important; 
    height: 44px !important; 
    font-size: 0.85rem !important; 
    font-weight: 700 !important; 
    cursor: pointer !important; 
    display: inline-flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    gap: 0.4rem !important; 
    text-decoration: none !important; 
    transition: all 0.15s ease !important; 
    white-space: nowrap !important; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.02) !important; 
}
.btn-reset:hover { 
    background: #f8fafc !important; 
    border-color: #cbd5e1 !important; 
    color: #dc2626 !important; 
}
.btn-reset svg {
    stroke: currentColor !important;
    flex-shrink: 0 !important;
}

/* Global Data Table Styling */
.table-card { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.02); 
    overflow: visible !important; 
}

.table-primary, .inquiry-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-family: inherit; 
}
.table-primary th, .inquiry-table th { 
    padding: 0.95rem 1.1rem; 
    font-size: 0.78rem; 
    font-weight: 700; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    border-bottom: 1px solid var(--border-color); 
    text-align: left; 
    background: #fafafa; 
}
.table-primary td, .inquiry-table td { 
    padding: 0.95rem 1.1rem; 
    font-size: 0.85rem; 
    color: var(--text-primary); 
    border-bottom: 1px solid var(--border-color); 
    vertical-align: middle; 
}

/* Global Action Icons & Dropdowns */
.action-icon-group { display: flex; align-items: center; gap: 0.35rem; justify-content: flex-end; }
.btn-action-icon { 
    width: 34px; 
    height: 34px; 
    border-radius: 8px; 
    border: 1px solid var(--border-color); 
    background: #ffffff; 
    color: var(--text-muted); 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: all 0.15s ease; 
    text-decoration: none; 
}
.btn-action-icon:hover { background: #f8fafc; color: var(--primary-orange); border-color: #cbd5e1; }

.action-dropdown-wrap { position: relative; display: inline-block; }
.action-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 9999;
    padding: 0.4rem 0;
    text-align: left;
}
.action-dropdown-menu.show { display: block !important; }
.action-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.action-dropdown-item:hover { background: #f8fafc; color: var(--primary-orange); }
.action-dropdown-item.danger { color: #dc2626; }
.action-dropdown-item.danger:hover { background: #fef2f2; color: #b91c1c; }
.action-divider { height: 1px; background: var(--border-color); margin: 0.35rem 0; }

/* Global Pagination Footer */
.pagination-row { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0.85rem 1.25rem; 
    background: #ffffff; 
    border-top: 1px solid var(--border-color); 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    border-radius: 0 0 12px 12px; 
}
.pagination-btns { display: flex; align-items: center; gap: 0.35rem; }
.page-btn { 
    width: 32px; 
    height: 32px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 8px; 
    border: 1px solid var(--border-color); 
    background: #ffffff; 
    color: var(--text-primary); 
    font-weight: 600; 
    font-size: 0.8rem; 
    cursor: pointer; 
    text-decoration: none; 
    transition: all 0.15s ease; 
}
.page-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.page-btn.active { background: var(--primary-orange); color: #ffffff; border-color: var(--primary-orange); }

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE BREAKPOINTS (MUST BE AT THE VERY BOTTOM OF CSS)
   ========================================================================== */

/* ---- BREAKPOINT: 1200px (Laptops & Small Desktops) ---- */
@media (max-width: 1200px) {
    .students-stats-grid,
    .inquiry-stats-grid,
    .parents-stats-grid,
    .dashboard-stats-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
    }
}

/* ---- BREAKPOINT: 992px (Tablets & Mobile Off-canvas Sidebar) ---- */
@media (max-width: 992px) {
    .app-sidebar { 
        position: fixed !important; 
        left: -260px !important; 
        top: 0 !important;
        height: 100vh !important;
        transition: left 0.3s ease !important; 
        z-index: 9999 !important; 
    }
    .app-sidebar.mobile-open { 
        left: 0 !important; 
    }
    .main-layout { 
        width: 100% !important; 
        min-width: 0 !important; 
    }

    .top-bar { 
        padding: 0 1rem !important; 
        gap: 0.5rem !important; 
    }
    .top-search-wrap { 
        width: 180px !important; 
        max-width: 180px !important; 
        padding: 0.4rem 0.65rem !important; 
    }
    .top-bar-right { 
        gap: 0.75rem !important; 
    }

    .students-container, 
    .inquiry-container, 
    .parents-container, 
    .family-view-container, 
    .family-form-container,
    .sp-container { 
        padding: 1.25rem 1rem !important; 
    }

    /* Form Grids: 4 & 3 columns -> 2 columns */
    .form-grid-4, 
    .form-grid-3 { 
        grid-template-columns: repeat(2, 1fr) !important; 
    }

    .sp-overview-grid, 
    .sp-overview-bottom,
    .detail-grid-2,
    .detail-grid-3,
    .detail-grid-4 { 
        grid-template-columns: 1fr !important; 
        gap: 1.25rem !important;
    }

    .table-card { 
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch !important; 
    }
    .table-primary, 
    .inquiry-table { 
        min-width: 650px !important; 
    }

    .sp-header,
    .sp-header-row,
    .page-header-row,
    .page-header-bar,
    .students-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.85rem !important;
    }

    .sp-header-actions,
    .sp-action-btns,
    .header-action-btns,
    .page-header-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .sp-header-actions a,
    .sp-header-actions button,
    .sp-action-btns a,
    .sp-action-btns button,
    .header-action-btns a,
    .header-action-btns button,
    .sp-btn-back,
    .sp-btn-edit,
    .sp-btn-more {
        flex: 1 1 auto !important;
    }
}

/* ---- BREAKPOINT: 768px (Mobile Landscape & Large Phones) ---- */
@media (max-width: 768px) {
    .top-search-wrap {
        display: none !important;
    }

    /* Header Dropdowns on Mobile: Centered / Screen Bounded */
    #notifDropdown {
        position: fixed !important;
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 90vw !important;
        max-width: 320px !important;
        z-index: 99999 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    }

    #headerUserDropdown {
        position: fixed !important;
        top: 60px !important;
        right: 12px !important;
        left: auto !important;
        width: 240px !important;
        max-width: 88vw !important;
        z-index: 99999 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    }

    .students-stats-grid,
    .inquiry-stats-grid,
    .parents-stats-grid,
    .dashboard-stats-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 0.75rem !important;
    }

    /* All Form Grids -> Single Column Stack */
    .form-grid-4, 
    .form-grid-3, 
    .form-grid-2 { 
        grid-template-columns: 1fr !important; 
    }

    .detail-grid-2,
    .detail-grid-3,
    .detail-grid-4,
    .sp-overview-grid,
    .sp-overview-bottom,
    .sp-hero { 
        grid-template-columns: 1fr !important; 
    }

    .sp-hero-details {
        grid-template-columns: 1fr !important;
        gap: 0.5rem 1rem !important;
    }

    .filter-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

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

    .filter-actions-group {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .filter-actions-group .btn-reset,
    .filter-actions-group .btn-filter-apply {
        flex: 1 !important;
        width: 50% !important;
        min-width: 0 !important;
    }

    .sp-tabs,
    .family-tabs-bar {
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .pagination-row { 
        flex-direction: column !important; 
        gap: 0.75rem !important; 
        align-items: flex-start !important; 
    }
}

/* ==========================================================================
   MASTER GLOBAL BORDER-RADIUS UNIFICATION RULE (ENFORCE EXACT 8PX EVERYWHERE)
   ========================================================================== */
.card,
.stat-card,
.table-card,
.filter-card,
.inquiry-filter-card,
.students-filter-card,
.parents-filter-card,
.detail-card,
.form-card,
.student-stat-card,
.inquiry-stat-card,
.welcome-row,
.chart-card,
.bottom-card,
.subv-hero-card,
.tv-hero-card,
.bv-hero-card,
.sp-hero,
.hero-card,
.session-card,
.modal-box,
.event-item,
.notice-card,
.filter-box,
.bottom-card,
.sp-card,
.view-switcher-pill,
.form-control,
.filter-select {
    border-radius: 8px !important;
}

/* ---- BREAKPOINT: 576px (Small Mobile Phones) ---- */
@media (max-width: 576px) {
    .top-search-wrap { 
        display: none !important; 
    }
    .top-header-date .top-date-text { 
        display: none !important; 
    }
    .top-bar-right { 
        gap: 0.5rem !important; 
    }

    .students-stats-grid,
    .inquiry-stats-grid,
    .parents-stats-grid,
    .dashboard-stats-grid { 
        grid-template-columns: 1fr !important; 
    }

    .table-primary, 
    .inquiry-table { 
        min-width: 550px !important; 
        font-size: 0.78rem !important; 
    }
}




