/* Import Modern Premium Typography */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap");

:root {
    /* Color Palette */
    --bg-primary: #060913;
    --bg-secondary: #0c1122;
    --bg-tertiary: #131b31;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* HSL Accents (Dynamic Styling) */
    --primary-h: 224;
    --primary-s: 86%;
    --primary-l: 58%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-glow: hsla(
        var(--primary-h),
        var(--primary-s),
        var(--primary-l),
        0.35
    );

    --success-h: 142;
    --success-s: 76%;
    --success-l: 45%;
    --success: hsl(var(--success-h), var(--success-s), var(--success-l));
    --success-glow: hsla(
        var(--success-h),
        var(--success-s),
        var(--success-l),
        0.25
    );

    --danger-h: 346;
    --danger-s: 87%;
    --danger-l: 57%;
    --danger: hsl(var(--danger-h), var(--danger-s), var(--danger-l));
    --danger-glow: hsla(
        var(--danger-h),
        var(--danger-s),
        var(--danger-l),
        0.25
    );

    --warning-h: 37;
    --warning-s: 90%;
    --warning-l: 51%;
    --warning: hsl(var(--warning-h), var(--warning-s), var(--warning-l));
    --warning-glow: hsla(
        var(--warning-h),
        var(--warning-s),
        var(--warning-l),
        0.25
    );

    /* Glassmorphism Specs */
    --glass-bg: rgba(12, 17, 34, 0.65);
    --glass-bg-hover: rgba(19, 27, 49, 0.75);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-border-focus: rgba(255, 255, 255, 0.15);

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 80px;
    --border-radius-lg: 18px;
    --border-radius-md: 10px;
    --border-radius-sm: 7px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Base resets & scrollbars */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(
            at 0% 0%,
            hsla(224, 86%, 58%, 0.08) 0px,
            transparent 50%
        ),
        radial-gradient(
            at 100% 100%,
            hsla(280, 80%, 60%, 0.08) 0px,
            transparent 50%
        );
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: "Plus Jakarta Sans", sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Glassmorphism Box Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--glass-border-focus);
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Core Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(8, 11, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: "Outfit", sans-serif;
    color: var(--text-primary);
}

.brand span {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: var(--transition-smooth);
}

.menu-item a:hover,
.menu-item.active a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active a {
    background: linear-gradient(
        90deg,
        rgba(37, 99, 235, 0.15) 0%,
        rgba(168, 85, 247, 0.05) 100%
    );
    border-left: 3px solid var(--primary);
}

.menu-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--glass-border);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content Workspace */
.main-workspace {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: rgba(8, 11, 23, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle,
.notification-bell {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.theme-toggle:hover,
.notification-bell:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--danger-glow);
}

/* Main Page Content Body */
.content-body {
    padding: 28px;
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    animation: fadeIn 0.4s ease-out;
}

/* Grid & Metrics Card System */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.metric-card {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(37, 99, 235, 0.05);
}

.metric-details h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.metric-details .metric-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: "Outfit", sans-serif;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition-smooth);
}

.metric-card:hover .metric-icon {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
    border-color: transparent;
}

/* Color codes for metrics */
.metric-card.success .metric-icon {
    color: var(--success);
}

.metric-card.success:hover .metric-icon {
    background: var(--success);
    box-shadow: 0 0 20px var(--success-glow);
}

.metric-card.danger .metric-icon {
    color: var(--danger);
}

.metric-card.danger:hover .metric-icon {
    background: var(--danger);
    box-shadow: 0 0 20px var(--danger-glow);
}

.metric-card.warning .metric-icon {
    color: var(--warning);
}

.metric-card.warning:hover .metric-icon {
    background: var(--warning);
    box-shadow: 0 0 20px var(--warning-glow);
}

/* Main Forms, Inputs & Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

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

.form-control {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Compact layout utilities */
.panel-pad {
    padding: 20px;
}

.panel-fit {
    height: fit-content;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-head-tight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.12rem;
    margin: 0;
}

.section-title-sm {
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

.section-subtitle {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.inline-form,
.toolbar-actions,
.actions-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form {
    align-items: center;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 18px;
}

.filter-row.filter-row-divider {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.field-wide {
    flex: 2;
    min-width: 200px;
}

.field-medium {
    flex: 1;
    min-width: 150px;
}

.field-narrow {
    flex: 1;
    min-width: 130px;
}

.label-block {
    display: block;
    margin-bottom: 4px;
}

.form-control.compact,
.input-compact {
    padding: 8px 12px;
    font-size: 0.88rem;
}

.form-control.compact-sm,
.input-compact-sm {
    padding: 7px 11px;
    font-size: 0.85rem;
}

.btn-compact {
    padding: 7px 10px;
    font-size: 0.8rem;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 0.72rem;
    gap: 4px;
}

.btn-full {
    width: 100%;
    margin-top: 8px;
}

.btn-full-lg {
    width: 100%;
    margin-top: 10px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.modal-actions .btn {
    flex: 1;
}

.empty-state-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

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

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Button UI Styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: var(--border-radius-md);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    text-decoration: none;
    outline: none;
    line-height: 1.1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--primary-glow);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border-focus);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--danger-glow);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #15803d 100%);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px var(--success-glow);
}

/* Premium Table Layouts */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius-md);
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: rgba(8, 11, 23, 0.2);
}

.custom-table th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.custom-table tbody tr {
    transition: var(--transition-fast);
}

.custom-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

/* Interactive Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Modals & Dialog Boxes */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 17, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    max-width: 500px;
    width: 100%;
    padding: 28px;
    position: relative;
    transform: translateY(20px);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

/* Complete OTP Login Page Layout */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    max-width: 440px;
    width: 100%;
    padding: 48px;
    text-align: center;
    position: relative;
}

.login-logo {
    font-family: "Outfit", sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-logo span {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

/* Multi-stage Login Steps Animations */
.login-stage {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.login-stage.active {
    display: block;
}

/* OTP Digits Input Boxes */
.otp-input-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 30px 0;
}

.otp-box {
    width: 50px;
    height: 56px;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-family: "Outfit", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: var(--transition-fast);
}

.otp-box:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Alerts and Notifications UI */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 18px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.06);
    border-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

/* Developer Console Overlay for OTP Simulation */
.dev-otp-console {
    margin-top: 24px;
    padding: 16px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    border-radius: var(--border-radius-md);
    color: #fde047;
    font-family: monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
}

/* Beautiful Animated Toasts */
#toast-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10000;
}

.toast {
    background: rgba(12, 17, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideInLeft 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.danger {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* CSS Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* File Access Matrix Dashboard styling */
.permission-matrix {
    display: block;
    width: 100%;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Responsive Grid System */
.grid-split-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

.grid-split-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.grid-split-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-split-1-2 > *,
.grid-split-2-1 > *,
.grid-split-1-1 > * {
    min-width: 0;
}

.grid-form-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.grid-form-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

/* Sidebar Toggle Mobile Button styling */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    margin-right: 12px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

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

/* Mobile Sidebar Drawer Overlay background */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 11, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 998;
}

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

/* Responsive Breakpoints & Viewport Rules */
@media (max-width: 1024px) {
    .grid-split-1-2,
    .grid-split-2-1,
    .grid-split-1-1 {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }

    .sidebar-header {
        justify-content: center;
        padding: 0;
    }

    .brand span,
    .sidebar-footer .user-info,
    .menu-item span {
        display: none;
    }

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

    .top-header {
        padding: 0 20px;
    }

    .content-body {
        padding: 14px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: var(--sidebar-width) !important;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0;
        border-right: 1px solid var(--glass-border);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Restore labels inside mobile sidebar drawer */
    .brand span,
    .sidebar-footer .user-info,
    .menu-item span {
        display: inline-block;
    }

    .main-workspace {
        margin-left: 0 !important;
        width: 100%;
    }

    .top-header {
        padding: 0 12px;
    }

    .content-body {
        padding: 10px;
    }

    .table-responsive {
        border-radius: var(--border-radius-md);
        margin: 0 -10px;
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .grid-form-1-1,
    .grid-form-2-1 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .login-card {
        padding: 20px;
    }

    .otp-input-container {
        gap: 4px;
    }

    .otp-box {
        width: 42px;
        height: 48px;
        font-size: 1.25rem;
    }

    .top-header {
        height: 70px;
    }

    .header-actions span {
        display: none;
    }
}


.modal-content {
    max-height: 500px;
    overflow-y: auto;
}

.login-flow-container input{
    width: 100%;
}