/**
 * DEST SaaS Design System (CSS Tokens & Components)
 * RTL First - Modern, Minimal, SaaS-grade
 */

:root {
    /* Color Tokens (Light Mode) */
    --brand-primary: #0f172a;      /* Slate 900 */
    --brand-primary-hover: #1e293b;
    --brand-blue: #2563eb;         /* Digital Blue */
    --brand-blue-hover: #1d4ed8;
    --brand-accent: #0ea5e9;       /* Sky 500 */
    --brand-accent-bg: #f0f9ff;
    --brand-success: #10b981;
    --brand-success-bg: #ecfdf5;
    --brand-warning: #f59e0b;
    --brand-warning-bg: #fffbeb;
    --brand-danger: #ef4444;
    --brand-danger-bg: #fef2f2;
    --brand-purple: #8b5cf6;
    --brand-purple-bg: #f5f3ff;

    /* Surfaces */
    --bg-app: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-subtle: #f1f5f9;
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Typography */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-inverse: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Dimensions */
    --sidebar-width: 270px;
    --sidebar-collapsed-width: 80px;
    --navbar-height: 68px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Tokens */
[data-theme="dark"] {
    --brand-primary: #0f172a;
    --brand-blue: #3b82f6;
    --brand-blue-hover: #60a5fa;
    --brand-accent: #38bdf8;
    --brand-accent-bg: rgba(56, 189, 248, 0.1);
    --brand-success: #34d399;
    --brand-success-bg: rgba(52, 211, 153, 0.1);
    --brand-warning: #fbbf24;
    --brand-warning-bg: rgba(251, 191, 36, 0.1);
    --brand-danger: #f87171;
    --brand-danger-bg: rgba(248, 113, 113, 0.1);

    --bg-app: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-elevated: #1f2937;
    --bg-subtle: #1e293b;
    --border-subtle: #1f2937;
    --border-strong: #374151;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --text-inverse: #ffffff;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color var(--transition), color var(--transition);
}

/* Impersonation Floating Sticky Bar */
.impersonation-bar {
    background: linear-gradient(90deg, #b45309, #d97706);
    color: #ffffff;
    padding: 8px 24px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.impersonation-bar .btn-leave {
    background: #ffffff;
    color: #92400e;
    padding: 4px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    transition: var(--transition);
    border: none;
}
.impersonation-bar .btn-leave:hover {
    background: #fef3c7;
    transform: translateY(-1px);
}

/* App Shell Structure */
.saas-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.saas-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 1000;
    transition: width var(--transition);
}

.saas-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.saas-sidebar .sidebar-brand {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand .brand-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-accent));
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    flex-shrink: 0;
}

.sidebar-brand .brand-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--transition);
}

.saas-sidebar.collapsed .brand-title {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 12px 14px 6px;
    letter-spacing: 0.5px;
}
.saas-sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 3px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-item:hover {
    background: var(--bg-subtle);
    color: var(--brand-blue);
}

.nav-item.active {
    background: var(--brand-accent-bg);
    color: var(--brand-blue);
    font-weight: 700;
}

.nav-item i {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.saas-sidebar.collapsed .nav-item span {
    display: none;
}
.saas-sidebar.collapsed .nav-item .badge-pill {
    display: none;
}

.badge-pill {
    margin-right: auto;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-weight: 700;
}
.badge-pill.danger { background: var(--brand-danger-bg); color: var(--brand-danger); }
.badge-pill.blue { background: var(--brand-accent-bg); color: var(--brand-blue); }

/* Main Wrapper */
.saas-main {
    flex: 1;
    margin-right: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-right var(--transition);
}

.saas-sidebar.collapsed ~ .saas-main {
    margin-right: var(--sidebar-collapsed-width);
}

/* Top Navbar */
.saas-navbar {
    height: var(--navbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 900;
    backdrop-filter: blur(8px);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: var(--transition);
}
.btn-icon:hover {
    background: var(--bg-subtle);
    color: var(--brand-blue);
    border-color: var(--border-strong);
}

.saas-search {
    position: relative;
    width: 260px;
}
.saas-search input {
    width: 100%;
    padding: 8px 36px 8px 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.saas-search input:focus {
    border-color: var(--brand-blue);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.saas-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 13px;
}

/* Content Area */
.saas-content {
    flex: 1;
    padding: 28px;
}

/* Cards */
.card-saas {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition);
}
.card-saas:hover {
    box-shadow: var(--shadow-md);
}

.card-header-saas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title-saas {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* SaaS Buttons */
.btn-saas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}
.btn-saas.primary {
    background: var(--brand-blue);
    color: #ffffff;
}
.btn-saas.primary:hover {
    background: var(--brand-blue-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-saas.accent {
    background: var(--brand-accent);
    color: #ffffff;
}
.btn-saas.accent:hover {
    background: #0284c7;
}

.btn-saas.success {
    background: var(--brand-success);
    color: #ffffff;
}

.btn-saas.outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-main);
}
.btn-saas.outline:hover {
    background: var(--bg-subtle);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.btn-saas.sm {
    padding: 6px 12px;
    font-size: 12.5px;
    border-radius: var(--radius-sm);
}

/* Badges */
.badge-saas {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}
.badge-saas.blue { background: var(--brand-accent-bg); color: var(--brand-blue); }
.badge-saas.green { background: var(--brand-success-bg); color: var(--brand-success); }
.badge-saas.yellow { background: var(--brand-warning-bg); color: #d97706; }
.badge-saas.red { background: var(--brand-danger-bg); color: var(--brand-danger); }
.badge-saas.purple { background: var(--brand-purple-bg); color: var(--brand-purple); }

/* Tables */
.table-responsive-saas {
    width: 100%;
    overflow-x: auto;
}

.table-saas {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: right;
}

.table-saas th {
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 0.3px;
}

.table-saas td {
    padding: 14px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.table-saas tr:hover td {
    background: var(--bg-subtle);
}

/* Tabs */
.tabs-saas {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab-btn-saas {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tab-btn-saas:hover {
    color: var(--brand-blue);
}
.tab-btn-saas.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* Messenger & Telegram Inbox Layout */
.inbox-container {
    display: flex;
    height: calc(100vh - 160px);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.inbox-conversations {
    width: 340px;
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
}

.conv-search {
    padding: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.conv-list {
    flex: 1;
    overflow-y: auto;
}

.conv-item {
    padding: 14px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}
.conv-item:hover, .conv-item.active {
    background: var(--bg-subtle);
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}

.inbox-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

.chat-header {
    height: 64px;
    padding: 0 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chat-bubble {
    max-width: 65%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    position: relative;
    box-shadow: var(--shadow-sm);
    line-height: 1.5;
}

.chat-bubble.incoming {
    align-self: flex-start;
    background: var(--bg-surface);
    color: var(--text-main);
    border-bottom-right-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.chat-bubble.outgoing {
    align-self: flex-end;
    background: var(--brand-blue);
    color: #ffffff;
    border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble .msg-time {
    font-size: 10.5px;
    margin-top: 4px;
    display: block;
    text-align: left;
    opacity: 0.7;
}

.chat-input-bar {
    padding: 14px 20px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Audio Recording Widget */
.voice-recorder-widget {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.rec-pulsing-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brand-danger);
    animation: recPulse 1.2s infinite;
}
@keyframes recPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Mobile Drawer Backdrop */
.saas-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 19, 43, 0.65);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.saas-mobile-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Confirmation Dialog */
.dest-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 19, 43, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.dest-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.dest-confirm-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    padding: 24px;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
}
.dest-confirm-overlay.active .dest-confirm-card {
    transform: scale(1);
}
.dest-confirm-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: var(--brand-danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.dest-confirm-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}
.dest-confirm-msg {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}
.dest-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    #mobile-menu-btn {
        display: flex !important;
    }
    #sidebar-toggle-btn {
        display: none !important;
    }
    .saas-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 24px rgba(11, 19, 43, 0.25);
    }
    .saas-sidebar.mobile-open {
        transform: translateX(0);
    }
    .saas-main {
        margin-right: 0 !important;
    }
    .saas-navbar {
        padding: 0 16px;
    }
    .saas-content {
        padding: 16px;
    }
}
@media (max-width: 768px) {
    #student-menu-btn {
        display: flex !important;
    }
    .dashboard-wrapper {
        flex-direction: column;
    }
    .dashboard-wrapper .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        right: 0;
        width: 280px;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 24px rgba(11, 19, 43, 0.25);
        overflow-y: auto;
        background: var(--bg-surface);
    }
    .dashboard-wrapper .sidebar.mobile-open {
        transform: translateX(0);
    }
}
@media (max-width: 640px) {
    .saas-navbar .saas-search {
        display: none;
    }
}

/* Branded DEST Initial & Route Page Loader */
.dest-loader-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-surface);
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.dest-loader-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.dest-loader-brand {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dest-loader-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-accent));
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    z-index: 2;
}
.dest-loader-pulse {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    border: 2px solid var(--brand-accent);
    animation: loaderPulse 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    z-index: 1;
}
@keyframes loaderPulse {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}
.dest-loader-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

/* Skeleton Loading Shimmer */
.skeleton-box {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--border-subtle) 50%, var(--bg-subtle) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

/* ==========================================================================
   Universal Navigation, Breadcrumbs, Page Headers & Wizards System
   ========================================================================== */
.saas-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.saas-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.saas-breadcrumbs a:hover {
    color: var(--brand-blue);
}
.saas-breadcrumbs .separator {
    font-size: 9px;
    color: var(--text-muted);
    opacity: 0.6;
}
.saas-breadcrumbs .current {
    color: var(--text-main);
    font-weight: 700;
}

.page-header-saas {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 18px;
}
.page-header-saas .header-info h2 {
    font-size: 23px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.page-header-saas .header-info p {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
}
.page-header-saas .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-return {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: var(--transition);
}
.btn-return:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
    color: var(--brand-blue);
}

/* Card Filter Bar */
.card-filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

/* Wizard Steps Progress */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    padding: 10px 0;
}
.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-subtle);
    transform: translateY(-50%);
    z-index: 1;
}
.wizard-step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 700;
    background: var(--bg-app);
    padding: 0 10px;
}
.wizard-step .step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    transition: var(--transition);
}
.wizard-step.active .step-circle {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
.wizard-step.active {
    color: var(--brand-blue);
}
.wizard-step.completed .step-circle {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}
.wizard-step.completed {
    color: #10b981;
}

/* Empty State */
.empty-state-saas {
    text-align: center;
    padding: 50px 20px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    margin: 20px 0;
}
.empty-state-saas .empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--bg-subtle);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}
.empty-state-saas h4 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 8px 0;
}
.empty-state-saas p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Sidebar Nav Subheaders and Collapsible sections */
.sidebar-category-header {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--brand-blue);
    padding: 16px 16px 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-category-num {
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-blue);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
}

/* ========================================================
   DEST UNIFIED DESIGN SYSTEM 2.0 & ICON MATRIX
   ======================================================== */

/* Lucide Icon Standardization */
.lucide, svg.lucide {
    stroke-width: 2px;
    stroke: currentColor;
    fill: none;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* Micro-Interactions & Animations */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
}

.animate-float {
    animation: floatSoft 4s ease-in-out infinite;
}

.animate-fade-in {
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modern Card Lift */
.card-hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.card-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(11, 19, 43, 0.12), 0 4px 12px -2px rgba(11, 19, 43, 0.06);
    border-color: rgba(37, 99, 235, 0.3) !important;
}

/* Hero Section 2.0 */
.hero-wrapper-2 {
    background: linear-gradient(135deg, #0B132B 0%, #111D40 45%, #1C2541 100%);
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
    padding: 85px 0 110px 0;
}
.hero-wrapper-2::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, rgba(14, 165, 233, 0.1) 50%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}
.hero-wrapper-2::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Section Header Shared Component */
.section-header-saas {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px auto;
}
.section-header-saas .badge-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-blue);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 14px;
}
.section-header-saas h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.section-header-saas p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

/* Training Programs Grid */
.program-card-saas {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.program-cover-wrap {
    width: 100%;
    height: 190px;
    overflow: hidden;
    position: relative;
    background: #0B132B;
}
.program-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.program-card-saas:hover .program-cover-wrap img {
    transform: scale(1.04);
}
.program-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.program-body h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}
.program-body p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}

/* How It Works - 6-Step Visual Timeline */
.timeline-grid-6 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    position: relative;
}
.timeline-card-step {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    position: relative;
    transition: var(--transition);
}
.timeline-card-step:hover {
    border-color: var(--brand-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.step-number-bubble {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-accent));
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
    margin-bottom: 18px;
}

/* FAQ Accordion Item */
.faq-accordion-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.faq-accordion-item.active {
    border-color: var(--brand-blue);
}
.faq-accordion-btn {
    width: 100%;
    padding: 18px 22px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text-main);
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 16px;
}
.faq-accordion-btn .chevron {
    transition: transform 0.25s ease;
    color: var(--text-muted);
}
.faq-accordion-item.active .faq-accordion-btn .chevron {
    transform: rotate(180deg);
    color: var(--brand-blue);
}
.faq-accordion-content {
    display: none;
    padding: 0 22px 20px 22px;
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.8;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 14px;
}
.faq-accordion-item.active .faq-accordion-content {
    display: block;
}

/* Testimonials Card */
.testimonial-card-saas {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.testimonial-stars {
    color: #F59E0B;
    display: flex;
    gap: 3px;
    margin-bottom: 14px;
    font-size: 14px;
}
.testimonial-quote {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-main);
    margin-bottom: 22px;
    flex: 1;
    font-style: normal;
}
.testimonial-author-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 16px;
}
.testimonial-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-blue);
}

/* Consolidated Settings Hub (Tabs Sidebar + Main Pane) */
.settings-hub-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    align-items: flex-start;
}
.settings-nav-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
}
.settings-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.settings-nav-btn:hover {
    background: var(--bg-subtle);
    color: var(--brand-blue);
}
.settings-nav-btn.active {
    background: var(--brand-accent-bg);
    color: var(--brand-blue);
    font-weight: 800;
}
.settings-nav-btn .badge-count {
    margin-right: auto;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

/* Responsive adjustments for Settings Hub */
@media (max-width: 992px) {
    .settings-hub-layout {
        grid-template-columns: 1fr;
    }
    .settings-nav-sidebar {
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    .settings-nav-btn {
        white-space: nowrap;
        padding: 8px 14px;
    }
}


/* =========================================================
   DEST SAAS ADVANCED ANIMATIONS, TRANSITIONS & RESPONSIVE ENGINE
========================================================= */

/* Top Viewport Scroll Progress Bar */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, #38bdf8, #2563eb, #7c3aed);
    z-index: 99999;
    width: 0%;
    transition: width 0.1s ease-out;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Floating Back-To-Top Button */
#back-to-top-btn {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--brand-blue);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
#back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#back-to-top-btn:hover {
    background: var(--brand-blue);
    color: #ffffff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.35);
    transform: translateY(-3px);
}

/* Card Interactive Hover Lift & Smooth Transitions */
.card-saas {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s ease;
}
.card-saas:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(11, 19, 43, 0.1), 
                0 4px 12px -2px rgba(11, 19, 43, 0.05);
    border-color: rgba(37, 99, 235, 0.25);
}

/* Image Zoom Transition on Modern Program Cards */
.program-card-modern {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.program-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18);
}
.program-card-modern img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.program-card-modern:hover img {
    transform: scale(1.04);
}

/* Button Active Feedback & Sheen */
.btn-saas {
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.btn-saas:active {
    transform: scale(0.97);
}
.btn-saas.primary:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* Step Card Transitions */
.timeline-card-step {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.timeline-card-step:hover {
    transform: translateY(-5px);
    border-color: var(--brand-blue);
    box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.15);
}
.timeline-card-step .step-number-bubble {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-card-step:hover .step-number-bubble {
    transform: scale(1.08);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.45);
}

/* Testimonial Card Polish */
.testimonial-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -8px rgba(11, 19, 43, 0.1);
    border-color: var(--brand-accent);
}

/* Scroll-Triggered Reveal Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Keyframes for subtle breathing glow */
@keyframes ambientGlow {
    0%, 100% {
        opacity: 0.18;
        transform: scale(1);
    }
    50% {
        opacity: 0.28;
        transform: scale(1.05);
    }
}
.glow-ambient {
    animation: ambientGlow 6s ease-in-out infinite;
}

/* =========================================================
   COMPREHENSIVE RESPONSIVE AUDIT & BREAKPOINTS
========================================================= */

/* Desktop Large (>= 1200px) */
@media (min-width: 1200px) {
    .dest-container {
        max-width: 1240px;
    }
}

/* Tablet & Smaller Laptops (<= 992px) */
@media (max-width: 992px) {
    .dest-hero-section div[style*="grid-template-columns: 1.15fr 0.85fr"] {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }
    
    #about div[style*="grid-template-columns: 1.15fr 0.85fr"] {
        grid-template-columns: 1fr !important;
        gap: 36px !important;
    }

    #contact div[style*="grid-template-columns: 0.9fr 1.1fr"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }

    .hero-wrapper-2 {
        padding: 60px 0 85px 0;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    .dest-hero-section {
        padding: 50px 0 70px 0 !important;
    }

    .dest-hero-section h1 {
        font-size: 27px !important;
        line-height: 1.4 !important;
    }

    .dest-hero-section p {
        font-size: 15px !important;
    }

    .timeline-grid-6 {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .faq-accordion-btn {
        font-size: 14.5px !important;
        padding: 15px 18px !important;
    }

    .faq-accordion-content {
        font-size: 13.5px !important;
        padding: 0 18px 16px 18px !important;
    }

    .btn-saas.lg {
        padding: 12px 22px !important;
        font-size: 14.5px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    #back-to-top-btn {
        bottom: 18px;
        left: 18px;
        width: 40px;
        height: 40px;
    }
}

/* Extra Small Mobile (<= 480px) */
@media (max-width: 480px) {
    .dest-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .card-saas {
        padding: 20px 16px !important;
    }

    .badge-pill {
        font-size: 11px !important;
        padding: 4px 10px !important;
    }
}

/* =========================================================
   PUBLIC MOBILE DRAWER, RESPONSIVE NAVBAR & SIDEBAR ISOLATION
========================================================= */

/* Brand & Logo Mobile Rules */
@media (max-width: 768px) {
    .brand-text {
        display: none !important;
    }
    .brand-logo-img {
        width: 38px !important;
        height: 38px !important;
    }
    .desktop-auth-actions {
        display: none !important;
    }
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: flex !important;
    }
    .mobile-menu-toggle {
        display: flex !important;
    }
    .nav-menu {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .mobile-menu-toggle {
        display: none !important;
    }
    .dest-mobile-drawer,
    .dest-mobile-drawer-backdrop {
        display: none !important;
    }
}

/* Public Mobile Navigation Drawer */
.dest-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 290px;
    max-width: 85vw;
    background: var(--bg-surface);
    z-index: 100000;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.dest-mobile-drawer.open {
    transform: translateX(0);
}
.dest-mobile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.dest-mobile-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}
.dest-mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
}
.dest-mobile-drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}
.dest-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dest-mobile-nav-list li a {
    display: block;
    padding: 12px 14px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 14.5px;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 0.15s ease, color 0.15s ease;
}
.dest-mobile-nav-list li a:hover,
.dest-mobile-nav-list li a:active {
    background: var(--bg-subtle);
    color: var(--brand-blue);
}
.dest-mobile-drawer-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 18px;
}

/* =========================================================
   STRICT SIDEBAR MOBILE ISOLATION (< 992px)
========================================================= */
@media (max-width: 992px) {
    /* Admin Layout Isolation: No Overlap! */
    .saas-layout {
        display: block !important;
        position: relative !important;
    }
    .saas-sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 285px !important;
        max-width: 85vw !important;
        z-index: 100000 !important;
        transform: translateX(110%) !important;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25) !important;
        background: var(--bg-surface) !important;
        overflow-y: auto !important;
    }
    .saas-sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    .saas-main {
        margin-right: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }
    .saas-navbar {
        padding: 10px 14px !important;
    }
    .saas-navbar .saas-search {
        display: none !important;
    }
    .saas-content {
        padding: 16px 14px !important;
    }

    /* Student Layout Isolation: No Overlap! */
    .dashboard-wrapper {
        display: block !important;
        position: relative !important;
    }
    .dashboard-wrapper .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 285px !important;
        max-width: 85vw !important;
        z-index: 100000 !important;
        transform: translateX(110%) !important;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25) !important;
        background: var(--bg-surface) !important;
        overflow-y: auto !important;
        border-left: 1px solid var(--border-subtle) !important;
    }
    .dashboard-wrapper .sidebar.mobile-open {
        transform: translateX(0) !important;
    }
    .dashboard-main,
    .main-content {
        width: 100% !important;
        margin: 0 !important;
        padding: 16px 14px !important;
        min-width: 0 !important;
    }

    /* Mobile Unified Backdrop */
    .saas-mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(4px);
        z-index: 99999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .saas-mobile-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    #mobile-menu-btn,
    #student-menu-btn {
        display: flex !important;
    }
    #admin-sidebar-close-btn,
    #student-sidebar-close-btn,
    .mobile-sidebar-header {
        display: flex !important;
    }
}

@media (min-width: 993px) {
    #admin-sidebar-close-btn,
    #student-sidebar-close-btn,
    .mobile-sidebar-header {
        display: none !important;
    }
}

/* =========================================================
   PUBLIC HOMEPAGE SMART MOBILE GRID & WRAPPING (< 768px)
========================================================= */
@media (max-width: 768px) {
    /* Hero Section Stacking */
    .dest-hero-section div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }
    .dest-hero-section h1 {
        font-size: 24px !important;
        line-height: 1.35 !important;
        margin-bottom: 12px !important;
    }
    .dest-hero-section p {
        font-size: 14px !important;
        line-height: 1.7 !important;
        margin-bottom: 22px !important;
    }
    .dest-hero-section div[style*="display: flex; gap: 16px"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    .dest-hero-section .btn-saas {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 14.5px !important;
    }

    /* Stats Section: Clean 2-column or 1-column on mobile */
    #stats div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    #stats .card-saas {
        padding: 14px 12px !important;
        gap: 10px !important;
    }
    #stats .card-saas div[style*="width: 54px"] {
        width: 42px !important;
        height: 42px !important;
        font-size: 18px !important;
    }
    #stats .card-saas div[style*="font-size: 28px"] {
        font-size: 20px !important;
    }

    /* About Section */
    #about div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    #about .card-saas {
        padding: 22px 18px !important;
    }

    /* Levels Showcase */
    #levels div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Features Grid */
    #features div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Testimonials */
    #testimonials div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Contact Section */
    #contact div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    #contact .card-saas {
        padding: 22px 18px !important;
    }
    #contact form div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* CTA Section */
    #cta div[style*="border-radius: var(--radius-xl)"] {
        padding: 36px 20px !important;
    }
    #cta h2 {
        font-size: 24px !important;
    }
    #cta p {
        font-size: 14px !important;
    }
    #cta div[style*="display: flex"] {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }
    #cta .btn-saas {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Footer Mobile Stacking */
    footer div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
}

/* Very Small Mobile (< 400px) */
@media (max-width: 400px) {
    #stats div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Forms & Auth Responsive Rules (< 640px) */
@media (max-width: 640px) {
    .register-form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .register-form-grid .form-group {
        grid-column: span 1 !important;
    }
}

/* =========================================================
   STUDENT & ADMIN COMPREHENSIVE RESPONSIVE SUITE (< 992px & < 768px)
========================================================= */

/* Desktop defaults */
.dest-student-hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    align-items: center;
}
.dest-student-hero-action {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    justify-content: center;
    border-right: 1px solid var(--border-subtle);
    padding-right: 25px;
}
.dest-lesson-media-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Tablet & Mobile Breakpoint (<= 992px) */
@media (max-width: 992px) {
    /* Admin Charts & Tables Grids Stack cleanly */
    .dest-admin-charts-grid,
    .dest-admin-tables-grid,
    .dest-lesson-media-grid,
    .saas-content div[style*="grid-template-columns: 1.2fr 0.8fr"],
    .saas-content div[style*="grid-template-columns: 1.1fr 1fr"],
    .saas-content div[style*="grid-template-columns: 1fr 1fr"],
    .saas-content div[style*="grid-template-columns: 2fr 1fr"],
    .dashboard-main div[style*="grid-template-columns: 1.2fr 0.8fr"],
    .dashboard-main div[style*="grid-template-columns: 1.3fr 0.7fr"],
    .dashboard-main div[style*="grid-template-columns: 1fr 1fr"],
    .main-content div[style*="grid-template-columns: 1.2fr 0.8fr"],
    .main-content div[style*="grid-template-columns: 1.3fr 0.7fr"],
    .main-content div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Admin header flex stack */
    .dest-admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }
    .dest-admin-header-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
}

/* Mobile Breakpoint (<= 768px) */
@media (max-width: 768px) {
    /* Student Hero Card Stacking */
    .dest-student-hero-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .dest-student-hero-action {
        border-right: none !important;
        border-top: 1px solid var(--border-subtle) !important;
        padding-right: 0 !important;
        padding-top: 20px !important;
        width: 100% !important;
    }
    .dest-student-hero-action .btn-saas {
        width: 100% !important;
    }

    /* Lesson view media */
    .dest-lesson-media-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Buttons inside admin header full width on phones */
    .dest-admin-header-actions .btn-saas {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Student & Admin Breadcrumbs horizontal scroll */
    .saas-breadcrumbs {
        display: flex !important;
        white-space: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px !important;
        margin-bottom: 16px !important;
    }

    /* Filter & search forms inside admin tables */
    .saas-content form[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .saas-content form[style*="grid-template-columns"] button,
    .saas-content form[style*="grid-template-columns"] a {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Tables always touch scrollable with indicator */
    .table-responsive,
    .table-responsive-saas {
        border-radius: var(--radius-md) !important;
        box-shadow: inset -5px 0 10px -5px rgba(0,0,0,0.1) !important;
    }
}
