@import url("vendor/astryx/astryx.css");
@import url("vendor/astryx/theme-neutral.css");

/* ============================================
   Khabir SaaS Platform - CSS Framework
   ============================================ */

:root {
    /* Primary Colors */
    --blue: #3852d6;
    --blue-strong: #3148c8;
    --blue-soft: #d7eaff;
    --blue-pale: #eef6ff;
    --blue-dark: #1a2a6c;
    --blue-gradient: linear-gradient(135deg, #3852d6, #5b7cfa);

    /* Neutrals */
    --ink: #263037;
    --muted: #7d8795;
    --line: #e8ebf0;
    --panel: #ffffff;
    --page: #f6f7f9;
    --dark: #273137;
    --dark-hover: #3a4852;

    /* Status Colors */
    --green: #5fc250;
    --green-bg: #eaf9ee;
    --red: #ed514b;
    --red-bg: #fff0ed;
    --amber: #fff8df;
    --amber-text: #7d5b1f;
    --rose: #fff0ed;
    --violet: #f3eaff;
    --orange: #f59e0b;
    --orange-bg: #fffbeb;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(38, 48, 55, 0.06);
    --shadow-md: 0 8px 24px rgba(38, 48, 55, 0.08);
    --shadow-lg: 0 18px 50px rgba(38, 48, 55, 0.10);
    --shadow-xl: 0 24px 70px rgba(45, 63, 90, 0.12);
    --shadow-glow: 0 0 30px rgba(56, 82, 214, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font: 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-arabic: 'Segoe UI', Tahoma, Arial, sans-serif;

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.35s ease;

    /* Layout */
    --sidebar-width: 280px;
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--page);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* ============================================
   LAYOUT
   ============================================ */
.shell {
    width: min(1640px, calc(100% - 72px));
    margin-inline: auto;
}

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

body:has(.app-layout) {
    overflow: hidden;
    height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-left: 1px solid var(--line);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-slow);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 900;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.sidebar-logo-text {
    font-size: 24px;
    font-weight: 900;
    color: var(--blue);
}

.sidebar-user {
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 16px;
}

.sidebar-user-info strong {
    display: block;
    font-size: 14px;
}

.sidebar-user-info span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.sidebar-nav {
    padding: 12px;
    flex: 1;
}

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

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    position: relative;
}

.sidebar-link:hover {
    background: var(--blue-pale);
    color: var(--blue);
}

.sidebar-link.active {
    background: var(--blue);
    color: #fff;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.consultant-sidebar-link {
    padding: 14px 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
}

.consultant-sidebar-link .sidebar-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.consultant-sidebar-link svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.consultant-sidebar-link .sidebar-link-label {
    flex: 1;
}

.sidebar-badge {
    margin-right: auto;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--line);
}

.top-header {
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--page);
    border-radius: var(--radius);
    padding: 0 16px;
    width: 320px;
    height: 40px;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.header-search:focus-within {
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(56, 82, 214, 0.1);
}

.header-search input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    padding: 0 8px;
    font-size: 14px;
}

.header-search i {
    color: var(--muted);
    font-size: 16px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 18px;
    position: relative;
    transition: all var(--transition);
}

.header-btn:hover {
    background: var(--page);
    color: var(--ink);
}

.header-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
}

/* ============================================
   PAGE CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width, 280px);
    overflow-y: auto;
    height: 100vh;
}

.page-content {
    padding: 28px 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
}

.page-subtitle {
    color: var(--muted);
    font-size: 15px;
    margin-top: 4px;
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
}

.btn-primary:hover {
    background: var(--blue-strong);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-danger {
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
}

.btn-success {
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--page);
    color: var(--ink);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.btn-lg {
    height: 48px;
    padding: 0 28px;
    font-size: 16px;
}

.btn-icon {
    width: 40px;
    padding: 0;
    justify-content: center;
}

.btn-icon.sm {
    width: 32px;
    height: 32px;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 800;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   METRIC CARDS
   ============================================ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition);
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
}

.metric-icon.blue {
    background: var(--blue-pale);
    color: var(--blue);
}

.metric-icon.green {
    background: var(--green-bg);
    color: var(--green);
}

.metric-icon.orange {
    background: var(--orange-bg);
    color: var(--orange);
}

.metric-icon.red {
    background: var(--red-bg);
    color: var(--red);
}

.metric-icon.violet {
    background: var(--violet);
    color: #8b5cf6;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
}

.metric-change {
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.metric-change.up {
    color: var(--green);
}

.metric-change.down {
    color: var(--red);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 14px 16px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    border-bottom: 2px solid var(--line);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
}

.data-table tr:hover td {
    background: var(--blue-pale);
}

.data-table .user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 12px;
    color: #fff;
}

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

/* ============================================
   STATUS BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success {
    background: var(--green-bg);
    color: var(--green);
}

.badge-danger {
    background: var(--red-bg);
    color: var(--red);
}

.badge-warning {
    background: var(--amber);
    color: var(--amber-text);
}

.badge-info {
    background: var(--blue-soft);
    color: var(--blue);
}

.badge-default {
    background: var(--page);
    color: var(--muted);
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition);
    outline: none;
}

.form-textarea {
    height: auto;
    padding: 12px 14px;
    resize: vertical;
    min-height: 100px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(56, 82, 214, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--red);
}

.form-error {
    font-size: 13px;
    color: var(--red);
    font-weight: 600;
    margin-top: 4px;
}

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

.form-hint {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 17, 30, 0.5);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.25s ease;
}

.modal-box.lg {
    max-width: 720px;
}

.modal-box.sm {
    max-width: 420px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 20px;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--page);
    color: var(--ink);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   CHARTS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
}

.chart-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    background: var(--blue-soft);
    position: relative;
    transition: all var(--transition);
    min-height: 4px;
}

.chart-bar:hover {
    background: var(--blue);
    opacity: 0.8;
}

.chart-bar .bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--ink);
}

.tab.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   TOAST / NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    min-width: 300px;
}

.toast.success {
    border-right: 4px solid var(--green);
}

.toast.error {
    border-right: 4px solid var(--red);
}

.toast.info {
    border-right: 4px solid var(--blue);
}

.toast i {
    font-size: 18px;
}

.toast.success i {
    color: var(--green);
}

.toast.error i {
    color: var(--red);
}

.toast.info i {
    color: var(--blue);
}

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

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

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--line);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================
   LOADING
   ============================================ */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--line);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(100%);
    }

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

    .main-content {
        margin-right: 0;
    }

    .page-content {
        padding: 20px 16px;
    }

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

    .header-search {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .page-header p {
        font-size: 13px;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .shell {
        width: min(100% - 28px, 720px);
    }

    .header-search {
        display: none;
    }

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

    .top-header-left {
        gap: 8px;
    }

    .top-header-right {
        gap: 8px;
    }

    .top-header-right .btn {
        padding-inline: 10px;
        min-height: 34px;
        font-size: 12px;
    }

    .page-content {
        padding: 16px 12px;
    }

    .card {
        border-radius: 12px;
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-header h3 {
        font-size: 15px;
    }

    .card-body {
        padding: 14px 16px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-card .metric-value {
        font-size: 24px;
    }

    .metric-card .metric-label {
        font-size: 13px;
    }

    .metric-card .metric-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .table-container {
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 100px;
    }

    .user-cell {
        gap: 8px;
    }

    .user-cell .avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .user-cell .user-info strong {
        font-size: 13px;
    }

    .user-cell .user-info span {
        font-size: 11px;
    }

    .card-footer {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .card-footer .btn {
        font-size: 12px;
        min-height: 32px;
        padding-inline: 12px;
    }

    .form-select {
        font-size: 13px;
        height: 36px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-input {
        font-size: 13px;
        padding: 8px 12px;
    }

    .modal-box {
        width: 95%;
        max-width: 500px;
        margin: 20px auto;
        border-radius: 14px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-header h2 {
        font-size: 17px;
    }

    .modal-body {
        padding: 14px 16px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .sidebar-header {
        padding: 14px 16px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .sidebar-user {
        padding: 12px 16px;
    }

    .sidebar-user-info strong {
        font-size: 14px;
    }

    .sidebar-user-info span {
        font-size: 12px;
    }

    .sidebar-nav a {
        font-size: 13px;
        padding: 10px 16px;
    }

    .sidebar-nav .sidebar-section-title {
        font-size: 11px;
        padding: 8px 16px;
    }

    .day-column {
        min-height: 100px;
    }

    .day-column .day-header {
        font-size: 11px;
        padding: 4px;
    }

    .day-event {
        font-size: 10px;
        padding: 3px 4px;
    }

    .chart-container {
        min-height: 200px;
    }
}

/* ============================================
   Mobile Small (≤480px)
   ============================================ */
@media (max-width: 480px) {
    .shell {
        width: min(100% - 12px, 460px);
    }

    .page-content {
        padding: 12px 8px;
    }

    .top-header {
        padding: 0 8px;
        min-height: 48px;
    }

    .top-header-right .btn {
        padding-inline: 8px;
        min-height: 30px;
        font-size: 11px;
    }

    .page-header h1 {
        font-size: 18px;
    }

    .page-header p {
        font-size: 12px;
    }

    .card-header {
        padding: 12px 12px;
    }

    .card-header h3 {
        font-size: 14px;
    }

    .card-body {
        padding: 12px;
    }

    .metric-card {
        padding: 12px;
    }

    .metric-card .metric-value {
        font-size: 20px;
    }

    .metric-card .metric-label {
        font-size: 12px;
    }

    .metric-card .metric-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 8px;
        font-size: 12px;
        min-width: 80px;
    }

    .user-cell .avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .user-cell .user-info strong {
        font-size: 12px;
    }

    .user-cell .user-info span {
        font-size: 10px;
    }

    .card-footer {
        padding: 10px 12px;
    }

    .form-select {
        font-size: 12px;
        height: 32px;
    }

    .modal-box {
        width: 98%;
        border-radius: 12px;
        margin: 10px auto;
    }

    .modal-header {
        padding: 12px 12px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-body {
        padding: 12px;
    }

    .modal-footer {
        padding: 10px 12px;
    }

    .sidebar {
        width: 260px;
    }

    .sidebar-header {
        padding: 12px 12px;
    }

    .sidebar-header h2 {
        font-size: 16px;
    }

    .sidebar-user {
        padding: 10px 12px;
    }

    .sidebar-user-info strong {
        font-size: 13px;
    }

    .sidebar-user-info span {
        font-size: 11px;
    }

    .sidebar-nav a {
        font-size: 12px;
        padding: 8px 12px;
    }

    .sidebar-nav .sidebar-section-title {
        font-size: 10px;
        padding: 6px 12px;
    }

    .day-column {
        min-height: 80px;
    }

    .day-column .day-header {
        font-size: 10px;
    }

    .day-event {
        font-size: 9px;
        padding: 2px 3px;
    }

    .chart-container {
        min-height: 160px;
    }

    .actions-cell {
        gap: 4px;
    }

    .actions-cell .btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
        padding: 0;
    }
}

/* ============================================
   Default Profile Image — face-profile.png
   Replaces text-based letter avatars with the
   default face image for testing purposes.
   ============================================ */
.sidebar-avatar,
.header-avatar,
.data-table .user-avatar,
.conversation-item .conv-avatar,
.chat-header .chat-user .chat-avatar,
.avatar-preview {
    background-image: url('../face-profile.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    color: transparent !important;
}

/* ============================================
   ROLE WORKSPACES
   ============================================ */
.workspace-shortcut .sidebar-link {
    background: linear-gradient(135deg, #eef4ff, #f7f9ff);
    color: var(--blue);
    border: 1px solid #dce5ff;
}

.workspace-shortcut .sidebar-link.active {
    color: #fff;
    background: var(--blue);
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
}

.workspace-span-8 {
    grid-column: span 8;
}

.workspace-span-7 {
    grid-column: span 7;
}

.workspace-span-6 {
    grid-column: span 6;
}

.workspace-span-5 {
    grid-column: span 5;
}

.workspace-span-4 {
    grid-column: span 4;
}

.workspace-span-12 {
    grid-column: 1 / -1;
}

.workspace-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.workspace-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.workspace-card-header h2 {
    font-size: 18px;
    margin: 0 0 4px;
}

.workspace-card-header p,
.workspace-muted {
    color: var(--muted);
    font-size: 13px;
}

.workspace-card-body {
    padding: 22px;
}

.workspace-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.workspace-kpi {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(145deg, #fff, #f8faff);
}

.workspace-kpi span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.workspace-kpi strong {
    display: block;
    font-size: 25px;
    color: var(--ink);
}

.workspace-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.workspace-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.workspace-item-main {
    min-width: 0;
}

.workspace-item-main strong {
    display: block;
    margin-bottom: 4px;
}

.workspace-item-main small {
    color: var(--muted);
    line-height: 1.6;
}

.workspace-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.workspace-status.confirmed,
.workspace-status.paid,
.workspace-status.approved {
    background: var(--green-bg);
    color: #218a3d;
}

.workspace-status.pending,
.workspace-status.open {
    background: var(--amber);
    color: var(--amber-text);
}

.workspace-status.cancelled,
.workspace-status.refunded,
.workspace-status.rejected {
    background: var(--red-bg);
    color: var(--red);
}

.workspace-status.group {
    background: var(--violet);
    color: #7c3aed;
}

.workspace-status.private {
    background: var(--blue-pale);
    color: var(--blue);
}

.workspace-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.workspace-form-grid .full {
    grid-column: 1 / -1;
}

.workspace-note {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--blue-pale);
    color: #30466f;
    font-size: 13px;
    line-height: 1.7;
}

.workspace-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.workspace-tab {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-weight: 700;
}

.workspace-tab.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.workspace-empty {
    padding: 36px 18px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #cad2dd;
    border-radius: 14px;
}

@media (max-width: 1100px) {

    .workspace-span-8,
    .workspace-span-7,
    .workspace-span-6,
    .workspace-span-5,
    .workspace-span-4 {
        grid-column: 1 / -1;
    }

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

@media (max-width: 640px) {

    .workspace-kpis,
    .workspace-form-grid {
        grid-template-columns: 1fr;
    }

    .workspace-form-grid .full {
        grid-column: auto;
    }

    .workspace-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-actions {
        width: 100%;
    }

    .workspace-actions .btn {
        flex: 1;
        justify-content: center;
    }
}