/* ==========================================================================
   Planoral — Design System (Horizon UI inspired)
   Indigo #4318FF · Plus Jakarta Sans · Light canvas, soft shadows, pill UI
   ========================================================================== */

:root {
    /* Brand */
    --p-primary: #4318FF;
    --p-primary-600: #3311DB;
    --p-primary-100: #E9E3FF;
    --p-primary-50: #F4F1FF;
    --p-primary-rgb: 67, 24, 255;

    /* Surfaces */
    --p-canvas: #F4F7FE;
    --p-surface: #FFFFFF;
    --p-surface-2: #F7F9FC;
    --p-border: #E9EDF7;
    --p-border-strong: #D6DCEA;

    /* Text */
    --p-text: #1B2559;
    --p-text-2: #2B3674;
    --p-muted: #707EAE;
    --p-muted-2: #A3AED0;

    /* Semantic */
    --p-success: #05CD99;
    --p-success-bg: #DBFCEC;
    --p-warning: #FFB547;
    --p-warning-bg: #FFF6E5;
    --p-danger: #EE5D50;
    --p-danger-bg: #FDE3E0;
    --p-info: #3965FF;
    --p-info-bg: #E1E9FF;

    /* Shape */
    --p-radius-sm: 10px;
    --p-radius: 16px;
    --p-radius-lg: 20px;
    --p-radius-xl: 28px;
    --p-radius-pill: 999px;

    /* Shadows */
    --p-shadow-sm: 0 4px 12px rgba(112, 144, 176, 0.08);
    --p-shadow: 0 18px 40px rgba(112, 144, 176, 0.12);
    --p-shadow-lg: 0 30px 60px rgba(67, 24, 255, 0.16);

    /* Density */
    --p-pad: 20px;
    --p-gap: 16px;

    /* Typography */
    --p-font: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --p-font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;

    /* Layout */
    --sidebar-width: 264px;
    --sidebar-collapsed: 76px;
    --topbar-height: 76px;

    /* Legacy aliases (keep existing views working) */
    --brand: var(--p-primary);
    --brand-light: #6B47FF;
    --brand-dark: var(--p-primary-600);
    --brand-acc: #8E5BFF;
    --brand-acc-light: #B6A9FF;
    --ink: var(--p-text);
    --ink-2: var(--p-text-2);
    --ink-3: var(--p-muted);
    --line: var(--p-border);
    --line-dark: var(--p-border-strong);
    --bg: var(--p-canvas);
    --bg-alt: var(--p-surface-2);
    --card: var(--p-surface);
    --success: var(--p-success);
    --success-light: var(--p-success-bg);
    --danger: var(--p-danger);
    --danger-light: var(--p-danger-bg);
    --warn: var(--p-warning);
    --warn-light: var(--p-warning-bg);
    --info: var(--p-info);
    --info-light: var(--p-info-bg);
    --primary: var(--p-primary);
    --text-primary: var(--p-text);
    --text-secondary: var(--p-muted);
    --border: var(--p-border);
    --radius: var(--p-radius);
    --radius-sm: var(--p-radius-sm);
    --radius-lg: var(--p-radius-lg);
    --shadow: var(--p-shadow);
    --shadow-sm: var(--p-shadow-sm);
    --shadow-lg: var(--p-shadow-lg);
    --space: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-8: 48px;
    --space-10: 64px;
    --space-12: 80px;
    --font: var(--p-font);
    --font-mono: var(--p-font-mono);
}

/* Dark theme */
[data-theme="dark"] {
    --p-canvas: #0B1437;
    --p-surface: #111C44;
    --p-surface-2: #1B254B;
    --p-border: #233166;
    --p-border-strong: #2C3A78;
    --p-text: #FFFFFF;
    --p-text-2: #E0E5F2;
    --p-muted: #A3AED0;
    --p-muted-2: #707EAE;
    --p-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
    --p-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* Density */
[data-density="compact"] {
    --p-pad: 14px;
    --p-gap: 12px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--p-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--p-text-2);
    background: var(--p-canvas);
}

a { color: var(--p-primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--p-primary-600); }

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

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

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

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--p-border-strong); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: var(--p-text); letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

.text-success { color: var(--p-success); }
.text-danger { color: var(--p-danger); }
.text-warn, .text-warning { color: var(--p-warning); }
.text-info { color: var(--p-info); }
.text-muted { color: var(--p-muted); }
.text-secondary { color: var(--p-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-gradient {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.required { color: var(--p-danger); margin-left: 2px; }

/* Legacy back-link → page-back */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--p-muted);
    margin-bottom: 8px;
    text-decoration: none;
}
.back-link:hover { color: var(--p-primary); }

/* Charts grid + legend */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--p-muted);
}
.legend-dot, .legend-color {
    width: 10px; height: 10px;
    border-radius: 999px;
    background: var(--p-primary);
    display: inline-block;
}
.legend-color[data-status="completed"] { background: var(--p-success); }
.legend-color[data-status="cancelled"] { background: var(--p-danger); }
.legend-color[data-status="no_show"] { background: var(--p-warning); }
.legend-color[data-status="scheduled"] { background: var(--p-info); }
.legend-color[data-status="confirmed"] { background: var(--p-primary); }
.legend-label { color: var(--p-text-2); font-weight: 500; }
.legend-value { color: var(--p-muted); font-weight: 700; }

/* Patient layout / form wrapper helpers */
.patient-layout, .form-container { display: block; }
.form-container { max-width: 880px; }
.form-grid { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-row.two-col { grid-template-columns: repeat(2, 1fr); }
.form-section { margin-bottom: 24px; }
.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--p-border);
}
.form-input { /* alias for .input */
    width: 100%;
    background: var(--p-surface);
    border: 1.5px solid var(--p-border);
    border-radius: 999px;
    padding: 13px 18px;
    color: var(--p-text);
    font-weight: 500;
    font-size: 14px;
    outline: none;
}
.form-input:focus { border-color: var(--p-primary); box-shadow: 0 0 0 4px var(--p-primary-50); }
textarea.form-input { border-radius: 16px; resize: vertical; min-height: 100px; }
.form-group--full { grid-column: 1 / -1; }

@media (max-width: 700px) {
    .form-row, .form-row.two-col { grid-template-columns: 1fr; }
}

/* Patient avatar / patient-info legacy */
.patient-info {
    display: flex; align-items: center; gap: 12px;
}
.patient-info-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px;
    background: var(--p-surface-2);
    border-radius: 14px;
    margin-bottom: 18px;
}
.patient-avatar, .patient-avatar-lg {
    width: 38px; height: 38px;
    border-radius: 999px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.patient-avatar-lg { width: 64px; height: 64px; font-size: 18px; border-radius: 18px; }
.patient-name { font-weight: 700; color: var(--p-text); font-size: 14px; line-height: 1.2; text-decoration: none; }
.patient-name:hover { color: var(--p-primary); }
.patient-id { font-size: 12px; color: var(--p-muted); }
.patient-meta { color: var(--p-muted); font-size: 12px; }
.patient-link { color: var(--p-text); text-decoration: none; font-weight: 600; }
.patient-link:hover { color: var(--p-primary); }

/* Card with patient header */
.patient-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 18px;
}

/* Misc legacy aliases */
.contact-item { display: inline-flex; align-items: center; gap: 4px; }
.meta-item { display: inline-flex; align-items: center; gap: 4px; color: var(--p-muted); font-size: 13px; }
.medical-section { margin-bottom: 14px; }
.medical-section h4 { font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; font-weight: 700; }
.medical-section p { font-size: 13px; color: var(--p-text); line-height: 1.5; }

.notes-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--p-border); }
.notes-section h4 { font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; font-weight: 700; }
.notes-content { padding: 14px 18px; background: var(--p-surface-2); border-radius: 14px; line-height: 1.7; color: var(--p-text); }

/* Status select / status buttons */
.status-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.status-buttons .btn { font-size: 12px; }

/* Info list legacy */
.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.info-item dt { color: var(--p-muted); font-size: 13px; }
.info-item dd { font-weight: 600; color: var(--p-text); margin: 0; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.info-grid .info-item { flex-direction: column; align-items: flex-start; gap: 4px; }
.info-label { font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.info-value { font-weight: 700; color: var(--p-text); }

/* Filter bar */
.filter-bar {
    background: var(--p-surface);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: var(--p-shadow-sm);
}
.filter-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-group { flex: 1; min-width: 180px; max-width: 240px; }

/* Tab content visibility (legacy uses .tab-content.active) */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Submit / page-actions / two-col helpers */
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 18px; border-top: 1px solid var(--p-border); margin-top: 18px; }

/* Empty-state legacy direct svg styling */
.empty-state svg { color: var(--p-primary); margin-bottom: 12px; }
.empty-state h3 { color: var(--p-text); margin-bottom: 6px; font-size: 16px; }

/* Insights legend / progress */
.progress-inline .progress-bar {
    width: 80px; height: 6px;
    background: var(--p-surface-2);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.progress-inline .progress-bar::before {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--p-primary), #8E5BFF);
    width: var(--progress, 0%);
}

/* Forms with `.form` class as card body */
form.form { display: block; }

/* Charts grid alt */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.insights-grid .card-wide { grid-column: span 2; }
@media (max-width: 1024px) {
    .insights-grid { grid-template-columns: 1fr; }
    .insights-grid .card-wide { grid-column: span 1; }
}

/* Patient sidebar */
.patient-sidebar { display: flex; flex-direction: column; gap: 18px; }
.patient-main { display: flex; flex-direction: column; gap: 18px; }
.patient-details h4 { margin: 0 0 6px; font-size: 16px; color: var(--p-text); }
.patient-details p { display: flex; align-items: center; gap: 6px; color: var(--p-text-2); margin-bottom: 4px; font-size: 13px; }
.patient-details a { color: var(--p-primary); text-decoration: none; }

/* Submit button alias */
.submit-btn {
    width: 100%;
    padding: 14px 22px;
    background: var(--p-primary);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.submit-btn:hover { background: var(--p-primary-600); }
.error-msg { display: block; margin-top: 4px; font-size: 12px; color: var(--p-danger); font-weight: 500; }

/* Auth page footer (legacy) */
.auth-page .auth-card {
    background: var(--p-surface);
    border-radius: 24px;
    box-shadow: var(--p-shadow);
    padding: 40px 32px;
}
.auth-page .auth-container { width: 100%; max-width: 480px; margin: 0 auto; }
.auth-header { text-align: center; margin-bottom: 28px; }

/* Error page support text */
.error-support { font-size: 12px; color: var(--p-muted); margin-top: 18px; }

/* Misc */
.p-0 { padding: 0; }

/* Legacy state class aliases (compatibility with existing app.js) */
.modal.modal-open, .modal.is-open, .modal[aria-hidden="false"] { opacity: 1; visibility: visible; }
.dropdown-menu.dropdown-open, .dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.toast.toast-show { opacity: 1; transform: translateY(0); }
.toast.toast-hide { opacity: 0; transform: translateY(-10px); transition: all 0.25s; }
.toast .toast-content { display: flex; align-items: center; gap: 10px; flex: 1; }
.toast .toast-icon { color: var(--p-primary); flex-shrink: 0; }
.toast.toast-success .toast-icon { color: var(--p-success); }
.toast.toast-error .toast-icon { color: var(--p-danger); }
.toast.toast-warning .toast-icon { color: var(--p-warning); }
.toast.toast-info .toast-icon { color: var(--p-info); }
.toast-success { border-left-color: var(--p-success); }
.toast-error { border-left-color: var(--p-danger); }
.toast-warning { border-left-color: var(--p-warning); }
.toast-info { border-left-color: var(--p-info); }
.toast-message { font-size: 13px; font-weight: 500; color: var(--p-text); }
.toast-close {
    background: none; border: none;
    color: var(--p-muted);
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    border-radius: 8px;
}
.toast-close:hover { color: var(--p-text); background: var(--p-surface-2); }
.modal-close-btn {
    width: 36px; height: 36px;
    border-radius: 999px;
    background: var(--p-surface-2);
    color: var(--p-muted);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.modal-close-btn:hover { background: var(--p-danger-bg); color: var(--p-danger); }
.modal-sm { max-width: 420px; }

/* Hidden helper */
.hidden { display: none !important; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 50, 0.4);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s;
}
.sidebar-overlay.open { opacity: 1; visibility: visible; }

/* ==========================================================================
   App layout
   ========================================================================== */

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    background: var(--p-canvas);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
}

.app-content {
    flex: 1;
    padding: 8px 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    background: var(--p-surface);
    border-right: 1px solid var(--p-border);
    padding: 28px 0 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header { padding: 0 28px 24px; border-bottom: 1px solid var(--p-border); margin-bottom: 20px; }

.sidebar-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--p-text);
}
.sidebar-logo:hover { color: var(--p-text); }
.sidebar-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 16px; flex: 1; overflow-y: auto; }
.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu--bottom { margin-top: auto; }

.sidebar-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--p-muted-2);
    font-weight: 700;
    padding: 18px 12px 8px;
}

.sidebar-item { list-style: none; }

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--p-muted);
    font-weight: 500;
    font-size: 14px;
    width: 100%;
    text-align: left;
    position: relative;
    transition: all 0.15s ease;
}
.sidebar-link:hover { background: var(--p-surface-2); color: var(--p-text-2); }
.sidebar-link svg { flex-shrink: 0; color: currentColor; }

.sidebar-item.active .sidebar-link {
    color: var(--p-primary);
    font-weight: 700;
    background: var(--p-primary-50);
}
.sidebar-item.active .sidebar-link::before {
    content: '';
    position: absolute;
    left: -16px; top: 8px; bottom: 8px;
    width: 4px;
    background: var(--p-primary);
    border-radius: 0 4px 4px 0;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--p-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
}

.sidebar-divider { height: 1px; background: var(--p-border); margin: 14px 14px; }

.sidebar-footer { padding: 0 16px; }

.sidebar-cta {
    margin: 0 0 12px;
    padding: 16px;
    background: linear-gradient(160deg, #4318FF 0%, #8E5BFF 100%);
    border-radius: 16px;
    color: white;
    font-size: 13px;
    box-shadow: 0 12px 28px rgba(67, 24, 255, 0.25);
}
.sidebar-cta-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.sidebar-cta p { margin: 0 0 12px; opacity: 0.85; font-size: 12px; line-height: 1.4; }
.sidebar-cta-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.sidebar-cta-btn:hover { background: rgba(255, 255, 255, 0.28); }

.sidebar-org {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    background: var(--p-surface-2);
    border-radius: 14px;
    margin-top: 12px;
}
.sidebar-org-avatar {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FFD24A, #FF8A4A);
    color: white;
    display: grid; place-items: center;
    font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-org-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-org-name { font-weight: 700; color: var(--p-text); font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-org-type { font-size: 11px; color: var(--p-muted); }

/* ==========================================================================
   Topbar
   ========================================================================== */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 247, 254, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--topbar-height);
}
[data-theme="dark"] .topbar { background: rgba(11, 20, 55, 0.85); }

.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-page {
    display: flex; flex-direction: column; min-width: 0;
}
.topbar-crumbs {
    font-size: 12px; color: var(--p-muted); margin-bottom: 4px;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.topbar-crumbs span.current { color: var(--p-text); font-weight: 600; }
.topbar-crumbs .sep { color: var(--p-muted-2); }
.topbar-title { font-size: 22px; font-weight: 800; color: var(--p-text); letter-spacing: -0.02em; line-height: 1.1; }

.topbar-toggle {
    display: none;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--p-surface);
    color: var(--p-text-2);
    align-items: center; justify-content: center;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--p-surface);
    padding: 8px 8px 8px 20px;
    border-radius: 999px;
    box-shadow: var(--p-shadow-sm);
}

.topbar-search {
    display: flex; align-items: center; gap: 10px;
    width: 240px; color: var(--p-muted);
    position: relative;
}
.topbar-search-icon { color: var(--p-muted); flex-shrink: 0; position: static; transform: none; }
.topbar-search-input {
    border: none; background: transparent; outline: none;
    flex: 1; color: var(--p-text); font-weight: 500; font-size: 13px;
    padding: 0;
    width: 100%;
}
.topbar-search-input::placeholder { color: var(--p-muted-2); }

.topbar-btn {
    width: 40px; height: 40px;
    border-radius: 999px;
    background: var(--p-surface-2);
    display: grid; place-items: center;
    color: var(--p-text-2);
    position: relative;
    transition: all 0.15s;
}
.topbar-btn:hover { background: var(--p-primary-50); color: var(--p-primary); }

.topbar-notifications { position: relative; }
.notification-badge {
    position: absolute;
    top: 6px; right: 6px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    background: var(--p-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--p-surface);
}

/* Theme toggle */
#theme-toggle .icon-moon { display: none; }
[data-theme="dark"] #theme-toggle .icon-sun { display: none; }
[data-theme="dark"] #theme-toggle .icon-moon { display: block; }

/* Wallet widget in topbar */
.wallet-widget {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 6px 14px;
    background: var(--p-surface-2);
    border-radius: 999px;
    color: var(--p-text);
    font-size: 13px;
    font-weight: 600;
}
.wallet-widget:hover { background: var(--p-primary-50); color: var(--p-primary); }
.wallet-balance { display: flex; align-items: center; gap: 8px; }
.wallet-buy {
    background: var(--p-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Profile dropdown */
.topbar-profile { position: relative; }
.topbar-profile-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    color: var(--p-text);
    transition: background 0.15s;
}
.topbar-profile-btn:hover { background: var(--p-surface-2); }
.topbar-profile-name { font-weight: 600; font-size: 13px; }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--p-surface);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    box-shadow: var(--p-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.18s;
    z-index: 1000;
    overflow: hidden;
}
.dropdown.open .dropdown-menu,
.dropdown-menu.open,
.topbar-profile:focus-within .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    color: var(--p-text-2);
    width: 100%;
    text-align: left;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.12s;
}
.dropdown-item:hover { background: var(--p-surface-2); color: var(--p-text); }
.dropdown-item--danger, .dropdown-item.danger { color: var(--p-danger); }
.dropdown-item--danger:hover { background: var(--p-danger-bg); color: var(--p-danger); }
.dropdown-divider { height: 1px; background: var(--p-border); margin: 6px 4px; }

/* ==========================================================================
   Avatars
   ========================================================================== */

.avatar {
    width: 40px; height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFD24A, #FF8A4A);
    color: white;
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px;
    flex-shrink: 0;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg, .avatar-large { width: 56px; height: 56px; font-size: 18px; border-radius: 999px; }
.avatar--xl { width: 80px; height: 80px; font-size: 24px; border-radius: 24px; }
.avatar--square { border-radius: 12px; }

.avatar.c-1, .avatar--c1 { background: linear-gradient(135deg, #FF8A8A, #EE5D50); }
.avatar.c-2, .avatar--c2 { background: linear-gradient(135deg, #6FE9C2, #05CD99); }
.avatar.c-3, .avatar--c3 { background: linear-gradient(135deg, #7FA3FF, #3965FF); }
.avatar.c-4, .avatar--c4 { background: linear-gradient(135deg, #FFD78A, #FFB547); }
.avatar.c-5, .avatar--c5 { background: linear-gradient(135deg, #C58CFF, #8E5BFF); }
.avatar.c-6, .avatar--c6 { background: linear-gradient(135deg, #4FD9FF, #00B3C6); }

/* User cell (avatar + name + meta) */
.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell-info { display: flex; flex-direction: column; min-width: 0; }
.user-cell-name { color: var(--p-text); font-weight: 700; font-size: 14px; line-height: 1.2; }
.user-cell-meta { color: var(--p-muted); font-size: 12px; line-height: 1.3; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 120ms ease;
    white-space: nowrap;
    line-height: 1;
    text-decoration: none;
}
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary, .btn-primary {
    background: var(--p-primary);
    color: white;
    box-shadow: 0 8px 18px rgba(67, 24, 255, 0.25);
}
.btn--primary:hover, .btn-primary:hover {
    background: var(--p-primary-600);
    color: white;
    box-shadow: 0 12px 24px rgba(67, 24, 255, 0.35);
}

.btn--ghost, .btn-ghost {
    background: var(--p-primary-50);
    color: var(--p-primary);
}
.btn--ghost:hover, .btn-ghost:hover {
    background: var(--p-primary-100);
    color: var(--p-primary);
}

.btn--outline, .btn-outline, .btn-secondary, .btn--secondary {
    background: transparent;
    border: 1.5px solid var(--p-border-strong);
    color: var(--p-text-2);
}
.btn--outline:hover, .btn-outline:hover, .btn-secondary:hover {
    border-color: var(--p-primary);
    color: var(--p-primary);
    background: var(--p-primary-50);
}

.btn--danger, .btn-danger {
    background: var(--p-danger);
    color: white;
    box-shadow: 0 8px 18px rgba(238, 93, 80, 0.25);
}
.btn--danger:hover, .btn-danger:hover {
    background: #E04A3D;
    color: white;
}

.btn--success {
    background: var(--p-success);
    color: white;
    box-shadow: 0 8px 18px rgba(5, 205, 153, 0.25);
}

.btn--sm, .btn-sm { padding: 8px 14px; font-size: 12px; }
.btn--lg, .btn-lg { padding: 14px 28px; font-size: 14px; }
.btn--xl { padding: 16px 32px; font-size: 15px; }
.btn--block, .btn-block { width: 100%; }
.btn--icon, .btn-icon { padding: 0; width: 40px; height: 40px; border-radius: 999px; }
.btn--icon-sm { width: 32px; height: 32px; }

.btn-group { display: inline-flex; gap: 8px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.form-label, .label {
    display: flex; align-items: center;
    font-size: 13px; font-weight: 600; color: var(--p-text);
    margin-bottom: 0;
}
.form-label-link { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--p-primary); }

.form-hint, .form-help {
    font-size: 12px; color: var(--p-muted);
    margin-top: 4px;
}
.form-error {
    font-size: 12px; color: var(--p-danger); font-weight: 500;
    margin-top: 4px;
    display: block;
}

.input, .select, .textarea, input.input, select.select, textarea.textarea {
    width: 100%;
    background: var(--p-surface);
    border: 1.5px solid var(--p-border);
    border-radius: 999px;
    padding: 13px 18px;
    color: var(--p-text);
    font-weight: 500;
    font-size: 14px;
    outline: none;
    transition: border-color 120ms, box-shadow 120ms, background 120ms;
}
.textarea, textarea.textarea {
    border-radius: 16px;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--p-primary);
    box-shadow: 0 0 0 4px var(--p-primary-50);
    background: var(--p-surface);
}
.input::placeholder, .textarea::placeholder { color: var(--p-muted-2); }

.input--error, .input.error { border-color: var(--p-danger); background: var(--p-danger-bg); }
.input--lg, .input-lg { padding: 16px 22px; font-size: 15px; }
.input--sm { padding: 9px 14px; font-size: 12px; }
.input--center {
    text-align: center;
    letter-spacing: 0.4em;
    font-weight: 700;
    font-size: 18px;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23707EAE' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}
.select--sm { padding: 9px 38px 9px 14px; font-size: 12px; }

/* Input group / icon */
.input-icon, .input-group {
    position: relative;
    display: flex; align-items: center;
}
.input-icon > svg, .input-group > svg.input-icon-svg {
    position: absolute; left: 18px;
    color: var(--p-muted);
    pointer-events: none;
    z-index: 1;
}
.input-icon .input { padding-left: 46px; }
.input-icon .input-toggle {
    position: absolute; right: 14px;
    background: none; border: none;
    color: var(--p-muted);
    padding: 4px;
    cursor: pointer;
}
.input-icon .input-toggle:hover { color: var(--p-text); }

/* Checkbox / radio */
.checkbox, .radio {
    display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer; font-weight: 500; color: var(--p-text-2);
    font-size: 13px;
}
.checkbox input, .radio input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.checkbox-mark {
    flex-shrink: 0;
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--p-border-strong);
    background: var(--p-surface);
    display: grid; place-items: center;
    color: white;
    transition: all 0.15s;
}
.radio .checkbox-mark { border-radius: 999px; }
.checkbox input:checked + .checkbox-mark,
.radio input:checked + .checkbox-mark {
    background: var(--p-primary);
    border-color: var(--p-primary);
}
.checkbox input:checked + .checkbox-mark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
.radio input:checked + .checkbox-mark::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 999px;
    background: white;
}
.checkbox-label { font-size: 13px; color: var(--p-text-2); line-height: 1.4; }
.checkbox-group, .checkbox-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.checkbox-inline { display: inline-flex; }

/* Toggle switch */
.toggle {
    width: 42px; height: 24px;
    background: var(--p-border-strong);
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    flex-shrink: 0;
}
.toggle::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border-radius: 999px;
    background: white;
    top: 3px; left: 3px;
    transition: left 0.15s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle.on, .toggle[aria-checked="true"] { background: var(--p-primary); }
.toggle.on::after, .toggle[aria-checked="true"]::after { left: 21px; }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--p-surface);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-sm);
    overflow: hidden;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--p-border);
}
.card-title { font-size: 16px; font-weight: 700; color: var(--p-text); margin: 0; line-height: 1.2; }
.card-body { padding: 22px 24px; }
.card-body--compact { padding: 16px 18px; }
.card-footer { padding: 18px 24px; border-top: 1px solid var(--p-border); display: flex; justify-content: flex-end; gap: 10px; }
.card-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.card-actions .btn { width: 100%; }
.card-meta { font-size: 12px; color: var(--p-muted); }

.card-pad-lg .card-body { padding: 28px; }
.card--flat { box-shadow: none; border: 1px solid var(--p-border); }
.card--gradient {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    color: white;
}
.card-danger { border-left: 4px solid var(--p-danger); }
.card-warning { border-left: 4px solid var(--p-warning); }

/* ==========================================================================
   Badges & pills
   ========================================================================== */

.badge, .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--p-surface-2);
    color: var(--p-muted);
    line-height: 1;
    white-space: nowrap;
}
.pill::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 999px;
    background: currentColor;
}
.badge--success, .badge-success, .pill-success { background: var(--p-success-bg); color: var(--p-success); }
.badge--danger, .badge-danger, .pill-danger { background: var(--p-danger-bg); color: var(--p-danger); }
.badge--warning, .badge-warning, .pill-warning { background: var(--p-warning-bg); color: var(--p-warning); }
.badge--info, .badge-info, .pill-info { background: var(--p-info-bg); color: var(--p-info); }
.badge--secondary, .badge--neutral { background: var(--p-surface-2); color: var(--p-muted); }
.badge--primary, .pill-primary { background: var(--p-primary-50); color: var(--p-primary); }
.badge--sm { font-size: 10px; padding: 3px 8px; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrapper, .table-container {
    background: var(--p-surface);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-sm);
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--p-muted);
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--p-border);
    background: var(--p-surface-2);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--p-border);
    font-size: 13px;
    color: var(--p-text-2);
    font-weight: 500;
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--p-surface-2); }
.table-sm td { padding: 10px 14px; font-size: 12px; }
.table-sm th { padding: 10px 14px; }

.table-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}
.alert--success, .alert-success { background: var(--p-success-bg); color: #038A66; }
.alert--danger, .alert-danger { background: var(--p-danger-bg); color: #B83C30; }
.alert--warning, .alert-warning { background: var(--p-warning-bg); color: #B5752E; }
.alert--info, .alert-info { background: var(--p-info-bg); color: #2849C2; }

.alert-close {
    margin-left: auto;
    background: none; border: none;
    font-size: 18px;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    flex-shrink: 0;
}
.alert-close:hover { opacity: 1; }
.alert-list { margin: 8px 0 0 18px; padding: 0; }

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.18s;
    padding: 24px;
}
.modal.open, .modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 50, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1;
}
.modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-content {
    background: var(--p-surface);
    border-radius: 24px;
    box-shadow: var(--p-shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--p-border);
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--p-text); margin: 0; }
.modal-close {
    width: 36px; height: 36px;
    border-radius: 999px;
    background: var(--p-surface-2);
    color: var(--p-muted);
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.modal-close:hover { background: var(--p-danger-bg); color: var(--p-danger); }
.modal-body { padding: 22px 26px; overflow-y: auto; flex: 1; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 18px 26px;
    border-top: 1px solid var(--p-border);
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 2000;
    pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: var(--p-surface);
    border-radius: 14px;
    box-shadow: var(--p-shadow);
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    animation: toast-in 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
    border-left: 4px solid var(--p-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--p-text);
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.toast--success { border-left-color: var(--p-success); }
.toast--error, .toast--danger { border-left-color: var(--p-danger); }
.toast--warning { border-left-color: var(--p-warning); }
.toast--info { border-left-color: var(--p-info); }

/* ==========================================================================
   Page header
   ========================================================================== */

.page-header {
    display: flex; align-items: flex-end; gap: 16px;
    margin-bottom: 8px;
}
.page-header-content { flex: 1; min-width: 0; }
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--p-muted);
    margin-bottom: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.page-back:hover { color: var(--p-primary); }
.page-title { font-size: 28px; font-weight: 800; color: var(--p-text); letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.page-subtitle { color: var(--p-muted); font-size: 14px; margin-top: 4px; }
.page-header-actions { display: flex; gap: 10px; align-items: center; }

/* ==========================================================================
   Stats / KPI cards
   ========================================================================== */

.stats-grid, .stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stat-card {
    background: var(--p-surface);
    border-radius: var(--p-radius-lg);
    box-shadow: var(--p-shadow-sm);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card-primary {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    color: white;
}
.stat-card-primary .stat-label,
.stat-card-primary .stat-value { color: white; }
.stat-card-primary .stat-icon { background: rgba(255, 255, 255, 0.18); color: white; }

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 999px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.stat-icon--primary, .stat-icon-primary { background: var(--p-primary-50); color: var(--p-primary); }
.stat-icon--success, .stat-icon-success { background: var(--p-success-bg); color: var(--p-success); }
.stat-icon--info, .stat-icon-info { background: var(--p-info-bg); color: var(--p-info); }
.stat-icon--warning, .stat-icon-warning { background: var(--p-warning-bg); color: var(--p-warning); }
.stat-icon--danger, .stat-icon-danger { background: var(--p-danger-bg); color: var(--p-danger); }

.stat-content { flex: 1; min-width: 0; }
.stat-label {
    color: var(--p-muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}
.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -0.02em;
    line-height: 1.1;
    display: block;
}
.stat-number { font-size: 20px; font-weight: 800; color: var(--p-text); }
.stat-change {
    font-size: 11px;
    font-weight: 700;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-change-up { color: var(--p-success); }
.stat-change-down { color: var(--p-danger); }

/* ==========================================================================
   Dashboard grid
   ========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}
.dashboard-main { display: flex; flex-direction: column; gap: 24px; }
.dashboard-sidebar { display: flex; flex-direction: column; gap: 24px; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--p-surface-2);
    border-radius: 14px;
    color: var(--p-text);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    border: 1.5px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}
.quick-action svg, .quick-action img {
    width: 36px; height: 36px;
    padding: 8px;
    border-radius: 12px;
    background: var(--p-surface);
    color: var(--p-primary);
    box-shadow: var(--p-shadow-sm);
}
.quick-action:hover {
    border-color: var(--p-primary);
    color: var(--p-text);
    background: var(--p-surface-2);
}

/* Appointment list (dashboard) */
.appointment-list { display: flex; flex-direction: column; }
.appointment-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--p-border);
    align-items: center;
}
.appointment-item:first-child { border-top: none; }
.appointment-time {
    font-size: 16px;
    font-weight: 800;
    color: var(--p-text);
    text-align: center;
}
.appointment-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.appointment-patient { font-weight: 700; color: var(--p-text); font-size: 14px; }
.appointment-procedure { color: var(--p-muted); font-size: 12px; }

/* File list (dashboard) */
.file-list { display: flex; flex-direction: column; }
.file-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0;
    border-top: 1px solid var(--p-border);
    color: inherit;
    text-decoration: none;
    transition: background 0.12s;
}
.file-item:first-child { border-top: none; }
.file-item:hover { background: var(--p-surface-2); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.file-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--p-surface-2);
    color: var(--p-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.file-info { flex: 1; min-width: 0; }
.file-name {
    color: var(--p-text);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.file-meta { color: var(--p-muted); font-size: 11px; display: block; }

/* Wallet card */
.wallet-card {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}
.wallet-card::before {
    content: '';
    position: absolute;
    right: -40px; top: -40px;
    width: 160px; height: 160px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}
.wallet-card::after {
    content: '';
    position: absolute;
    right: -80px; bottom: -80px;
    width: 200px; height: 200px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}
.wallet-card .card-body { position: relative; z-index: 1; }
.wallet-balance-lg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.wallet-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wallet-amount {
    font-size: 32px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
}
.wallet-card .btn--primary {
    background: white;
    color: var(--p-primary);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}
.wallet-card .btn--primary:hover { background: rgba(255, 255, 255, 0.9); color: var(--p-primary); }

/* Usage stats */
.usage-stats { display: flex; flex-direction: column; gap: 12px; }
.usage-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--p-border);
}
.usage-item:first-child { border-top: none; padding-top: 0; }
.usage-label { font-size: 13px; color: var(--p-muted); }
.usage-value { font-size: 14px; font-weight: 700; color: var(--p-text); }

/* ==========================================================================
   Empty state
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--p-muted);
}
.empty-state--sm { padding: 28px 20px; }
.empty-state-icon {
    width: 80px; height: 80px;
    border-radius: 999px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin: 0 auto 16px;
}
.empty-state--sm .empty-state-icon { width: 60px; height: 60px; }
.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: 6px;
}
.empty-state-text { color: var(--p-muted); font-size: 14px; margin-bottom: 18px; }
.empty-state-inline { padding: 24px; }

/* ==========================================================================
   Toolbar
   ========================================================================== */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--p-border);
    background: var(--p-surface);
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 12px; }
.toolbar-divider { width: 1px; height: 24px; background: var(--p-border); }
.toolbar-search { position: relative; }
.toolbar-search svg {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--p-muted);
    pointer-events: none;
}
.toolbar-search input {
    background: var(--p-surface-2);
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 10px 16px 10px 42px;
    width: 280px;
    font-size: 13px;
    font-weight: 500;
    color: var(--p-text);
    outline: none;
    transition: all 0.12s;
}
.toolbar-search input:focus {
    border-color: var(--p-primary);
    background: var(--p-surface);
    box-shadow: 0 0 0 4px var(--p-primary-50);
}
.toolbar-filters { display: flex; align-items: center; gap: 8px; }
.toolbar-group { display: flex; align-items: center; gap: 6px; }

/* View toggle */
.view-toggle {
    display: flex;
    background: var(--p-surface-2);
    padding: 3px;
    border-radius: 999px;
}
.view-toggle-btn {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--p-muted);
    transition: all 0.12s;
    display: grid;
    place-items: center;
}
.view-toggle-btn.active {
    background: var(--p-surface);
    color: var(--p-primary);
    box-shadow: var(--p-shadow-sm);
}

/* Tabs */
.tabs {
    display: flex; gap: 4px;
    background: var(--p-surface-2);
    padding: 4px;
    border-radius: 999px;
    width: fit-content;
}
.tab {
    background: none;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    color: var(--p-muted);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.12s;
}
.tab.active, .tab[aria-selected="true"] {
    background: var(--p-surface);
    color: var(--p-primary);
    box-shadow: var(--p-shadow-sm);
}
.tab-content { padding-top: 18px; }
.tab-header { display: flex; flex-direction: column; gap: 12px; }

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-top: 1px solid var(--p-border);
    color: var(--p-muted);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}
.pagination-info { font-size: 13px; color: var(--p-muted); }
.pagination-list { display: flex; gap: 4px; align-items: center; }
.pagination-btn {
    min-width: 32px; height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--p-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination-btn:hover { background: var(--p-surface-2); color: var(--p-text-2); }
.pagination-btn.active, .pagination-btn[aria-current="page"] {
    background: var(--p-primary);
    color: white;
}

/* ==========================================================================
   Spinner
   ========================================================================== */

.spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Progress / meter
   ========================================================================== */

.progress-bar, .meter {
    height: 8px;
    border-radius: 999px;
    background: var(--p-surface-2);
    overflow: hidden;
}
.progress-fill, .meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-primary), #8E5BFF);
    border-radius: 999px;
    transition: width 0.3s ease;
}
.progress-inline { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--p-muted); }

/* Confidence bar (DICOM/AI) */
.confidence-bar { display: flex; align-items: center; gap: 8px; }
.confidence-fill {
    height: 6px;
    background: linear-gradient(90deg, var(--p-success), var(--p-primary));
    border-radius: 999px;
    flex: 1;
}
.confidence-value { font-size: 12px; font-weight: 700; color: var(--p-success); }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.row-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.row-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; }
.row-1-3 { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.section { margin-bottom: 24px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--p-text); margin-bottom: 14px; }
.section-subtitle { font-size: 13px; color: var(--p-muted); margin-bottom: 18px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dl-grid { display: grid; grid-template-columns: 140px 1fr; gap: 8px 18px; font-size: 13px; }
.dl-grid dt { color: var(--p-muted); }
.dl-grid dd { color: var(--p-text); font-weight: 600; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Segmented */
.segmented {
    display: inline-flex;
    background: var(--p-surface-2);
    padding: 4px;
    border-radius: 999px;
    gap: 2px;
}
.segmented button {
    background: none; border: none;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--p-muted);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}
.segmented button.active {
    background: var(--p-primary);
    color: white;
}

/* ==========================================================================
   Auth
   ========================================================================== */

.auth-body, body.auth-page {
    background: var(--p-canvas);
    min-height: 100vh;
    margin: 0;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}
.auth-form-side {
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 48px;
    background: var(--p-canvas);
}
.auth-form-inner { width: 100%; max-width: 440px; }

.auth-logo {
    display: flex; align-items: center;
    margin-bottom: 32px;
    text-decoration: none;
}
.auth-logo-img {
    height: 30px;
    width: auto;
    display: block;
}

.auth-title { font-size: 32px; font-weight: 800; color: var(--p-text); letter-spacing: -0.02em; margin-bottom: 8px; }
.auth-subtitle, .auth-lead { color: var(--p-muted); font-size: 14px; margin-bottom: 32px; line-height: 1.5; }
.auth-subtitle a, .auth-lead a { color: var(--p-primary); font-weight: 700; }

.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .form-group { margin-bottom: 0; }
.auth-actions { display: flex; align-items: center; gap: 12px; }
.auth-alt { text-align: center; color: var(--p-muted); font-size: 13px; margin-top: 24px; }
.auth-alt a { color: var(--p-primary); font-weight: 700; }
.auth-footer { text-align: center; margin-top: 24px; color: var(--p-muted); font-size: 12px; }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    color: var(--p-muted); font-size: 12px; font-weight: 600;
    margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--p-border);
}

.auth-resend { color: var(--p-primary); font-weight: 700; cursor: pointer; }

.auth-hero {
    background: linear-gradient(135deg, #4318FF 0%, #8E5BFF 60%, #C58CFF 100%);
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 48px;
}
.auth-hero::before {
    content: '';
    position: absolute;
    inset: -40%;
    background:
            radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 40%),
            radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.15), transparent 50%);
}
.auth-hero-card {
    position: relative;
    text-align: center;
    color: white;
    max-width: 460px;
}
.auth-hero-mark {
    width: 96px; height: 96px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 0 auto 24px;
    display: grid; place-items: center;
    color: white;
}
.auth-hero h2 {
    font-size: 36px;
    margin: 0 0 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: white;
}
.auth-hero p {
    opacity: 0.85;
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.5;
    font-size: 15px;
}
.auth-hero-bullets {
    display: flex; gap: 8px; justify-content: center;
    margin-top: 32px;
}
.auth-hero-bullets span {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.4);
    width: 8px;
}
.auth-hero-bullets span.active {
    background: rgba(255, 255, 255, 0.9);
    width: 24px;
}

/* OTP / digit input */
.auth-otp { display: flex; gap: 10px; margin-bottom: 24px; }
.auth-otp input {
    width: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    padding: 18px 0;
    border-radius: 14px;
    border: 1.5px solid var(--p-border);
    background: var(--p-surface);
    color: var(--p-text);
    outline: none;
}
.auth-otp input:focus {
    border-color: var(--p-primary);
    box-shadow: 0 0 0 4px var(--p-primary-50);
}

/* Auth type selector */
.auth-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.auth-type-option {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 18px;
    border: 2px solid var(--p-border);
    border-radius: 16px;
    color: var(--p-text-2);
    background: var(--p-surface);
    transition: all 0.15s;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.auth-type-option:hover { border-color: var(--p-primary); color: var(--p-primary); }
.auth-type-option.active {
    border-color: var(--p-primary);
    background: var(--p-primary-50);
    color: var(--p-primary);
}

.register-form, .auth-form .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.register-footer { text-align: center; color: var(--p-muted); font-size: 13px; margin-top: 18px; }

/* Auth small icon (verify) */
.auth-icon {
    width: 96px; height: 96px;
    border-radius: 28px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin: 0 auto 24px;
}

/* ==========================================================================
   File grid / cards
   ========================================================================== */

.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.file-card {
    background: var(--p-surface);
    border-radius: 18px;
    box-shadow: var(--p-shadow-sm);
    overflow: hidden;
    transition: all 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.file-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--p-shadow);
}
.file-card-preview {
    position: relative;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--p-surface-2) 0%, var(--p-primary-50) 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.file-card-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-card-icon { color: var(--p-primary); }
.file-card-badge { position: absolute; top: 10px; right: 10px; }
.file-card-info { padding: 14px 16px; flex: 1; }
.file-card-name {
    font-weight: 700;
    color: var(--p-text);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    display: block;
}
.file-card-meta { font-size: 11px; color: var(--p-muted); }
.file-card-actions {
    display: flex; gap: 4px;
    padding: 0 12px 12px;
    justify-content: flex-end;
}
.file-actions { display: flex; gap: 6px; }
.file-thumbnail {
    width: 60px; height: 60px;
    border-radius: 12px;
    background: var(--p-surface-2);
    display: grid; place-items: center;
    color: var(--p-primary);
    flex-shrink: 0;
}

/* ==========================================================================
   Upload zone
   ========================================================================== */

.upload-zone {
    border: 2px dashed var(--p-border-strong);
    border-radius: 24px;
    padding: 56px 24px;
    text-align: center;
    background: var(--p-surface);
    margin-bottom: 24px;
    transition: all 0.15s;
}
.upload-zone:hover, .upload-zone.dragover, .drop-zone.dragover {
    border-color: var(--p-primary);
    background: var(--p-primary-50);
}
.upload-zone-icon {
    width: 64px; height: 64px;
    border-radius: 999px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin: 0 auto 16px;
}
.upload-zone-text { font-size: 16px; font-weight: 700; color: var(--p-text); margin-bottom: 6px; }
.upload-zone-hint { font-size: 13px; color: var(--p-muted); }
.upload-zone-link { color: var(--p-primary); font-weight: 700; cursor: pointer; }
.upload-progress {
    background: var(--p-surface-2);
    border-radius: 999px;
    overflow: hidden;
    height: 8px;
    margin-top: 12px;
}
.upload-progress-bar { height: 100%; background: var(--p-surface-2); border-radius: 999px; overflow: hidden; }
.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-primary), #8E5BFF);
    border-radius: 999px;
}
.upload-progress-text { font-size: 12px; color: var(--p-muted); margin-top: 6px; }

/* ==========================================================================
   Wallet pages
   ========================================================================== */

.wallet-layout { max-width: 1100px; }

.wallet-balance-card {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    border-radius: 24px;
    padding: 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(67, 24, 255, 0.25);
}
.wallet-balance-card::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 240px; height: 240px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}
.wallet-balance-card::after {
    content: '';
    position: absolute;
    right: -120px; bottom: -120px;
    width: 320px; height: 320px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}
.wallet-balance-content { position: relative; z-index: 1; margin-bottom: 24px; }
.wallet-balance-label { color: rgba(255, 255, 255, 0.85); font-size: 14px; font-weight: 600; margin-bottom: 8px; display: block; }
.wallet-balance-amount { font-size: 48px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: white; }
.wallet-balance-stats { display: flex; gap: 32px; position: relative; z-index: 1; flex-wrap: wrap; }
.wallet-stat { display: flex; flex-direction: column; gap: 2px; }
.wallet-stat-value { font-size: 20px; font-weight: 800; color: white; }
.wallet-stat-label { font-size: 12px; color: rgba(255, 255, 255, 0.85); }

/* Pricing cards */
.pricing { padding: 24px 0; }
.pricing-grid, .package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.pricing-card, .package-card {
    position: relative;
    background: var(--p-surface);
    border: 2px solid var(--p-border);
    border-radius: 24px;
    padding: 32px 28px;
    transition: all 0.15s;
}
.pricing-card:hover, .package-card:hover {
    border-color: var(--p-primary);
    transform: translateY(-4px);
}
.pricing-card-popular, .package-card--popular {
    border-color: var(--p-primary);
    background: linear-gradient(180deg, var(--p-primary-50), var(--p-surface));
    box-shadow: 0 20px 40px rgba(67, 24, 255, 0.15);
}
.pricing-badge, .package-badge {
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    background: var(--p-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.pricing-header, .package-header { margin-bottom: 18px; }
.pricing-name, .package-name { font-size: 16px; font-weight: 700; color: var(--p-text); margin-bottom: 6px; }
.package-credits { font-size: 36px; font-weight: 800; color: var(--p-primary); letter-spacing: -0.02em; line-height: 1; }
.package-credits span { font-size: 14px; font-weight: 500; color: var(--p-muted); }
.package-price {
    margin: 18px 0;
    padding: 18px 0;
    border-top: 1px solid var(--p-border);
    border-bottom: 1px solid var(--p-border);
}
.pricing-price, .package-amount { font-size: 28px; font-weight: 800; color: var(--p-text); letter-spacing: -0.02em; }
.package-per-credit { font-size: 12px; color: var(--p-muted); margin-top: 4px; }
.pricing-features, .package-features { list-style: none; padding: 0; margin-bottom: 18px; }
.pricing-features li, .package-features li {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    color: var(--p-text-2);
}
.pricing-features svg, .package-features svg { color: var(--p-success); flex-shrink: 0; }

.price-amount { font-size: 28px; font-weight: 800; color: var(--p-text); }
.price-credits { font-size: 14px; color: var(--p-muted); margin-top: 4px; }

/* ==========================================================================
   Share / public pages
   ========================================================================== */

.share-body, body.share-page {
    background: var(--p-canvas);
    min-height: 100vh;
    margin: 0;
}
.share-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.share-header {
    padding: 18px 32px;
    background: var(--p-surface);
    border-bottom: 1px solid var(--p-border);
}
.share-logo { display: flex; align-items: center; gap: 10px; color: var(--p-text); font-weight: 800; font-size: 18px; }
.share-main {
    flex: 1;
    display: flex;
    align-items: center; justify-content: center;
    padding: 48px 24px;
}
.share-card {
    background: var(--p-surface);
    border-radius: 24px;
    box-shadow: var(--p-shadow);
    max-width: 560px;
    width: 100%;
    overflow: hidden;
}
.share-preview {
    aspect-ratio: 16 / 10;
    background: var(--p-surface-2);
    display: grid; place-items: center;
}
.share-image { width: 100%; height: 100%; object-fit: contain; }
.share-file-icon, .share-icon {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--p-primary);
}
.share-info { padding: 24px 28px; text-align: center; }
.share-title { font-size: 22px; font-weight: 800; color: var(--p-text); margin-bottom: 8px; }
.share-meta { color: var(--p-muted); font-size: 13px; margin-bottom: 14px; }
.share-expiry {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--p-warning-bg);
    color: var(--p-warning);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.share-actions {
    display: flex; flex-direction: column; gap: 10px;
    padding: 0 28px 24px;
}
.share-footer {
    padding: 18px 32px;
    text-align: center;
    color: var(--p-muted);
    font-size: 12px;
    border-top: 1px solid var(--p-border);
}

.share-password-card {
    background: var(--p-surface);
    border-radius: 24px;
    box-shadow: var(--p-shadow);
    max-width: 460px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
}
.share-password-icon {
    width: 80px; height: 80px;
    border-radius: 24px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin: 0 auto 18px;
}
.share-password-title { font-size: 22px; font-weight: 800; color: var(--p-text); margin-bottom: 8px; }
.share-password-text { color: var(--p-muted); font-size: 14px; margin-bottom: 24px; }
.share-password-form { text-align: left; }

/* ==========================================================================
   Error pages
   ========================================================================== */

.error-body, body.error-page {
    background: var(--p-canvas);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    margin: 0;
    padding: 24px;
}
.error-container {
    text-align: center;
    max-width: 520px;
    background: var(--p-surface);
    border-radius: 28px;
    box-shadow: var(--p-shadow);
    padding: 56px 40px;
}
.error-illustration {
    width: 120px; height: 120px;
    border-radius: 36px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin: 0 auto 24px;
}
.error-code {
    font-size: 96px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--p-primary), #8E5BFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.04em;
}
.error-title { font-size: 24px; font-weight: 800; color: var(--p-text); margin-bottom: 10px; }
.error-message { color: var(--p-muted); font-size: 14px; margin-bottom: 24px; line-height: 1.5; }
.error-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.error-support { font-size: 12px; color: var(--p-muted); margin-top: 24px; }

/* ==========================================================================
   Profile / settings
   ========================================================================== */

.profile-layout, .settings-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: flex-start;
}
.profile-nav, .settings-nav {
    background: var(--p-surface);
    border-radius: 18px;
    box-shadow: var(--p-shadow-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 100px;
}
.profile-nav-item, .settings-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--p-muted);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.12s;
    text-decoration: none;
}
.profile-nav-item:hover, .settings-nav-item:hover {
    background: var(--p-surface-2);
    color: var(--p-text);
}
.profile-nav-item.active, .settings-nav-item.active,
.profile-nav-item[aria-current], .settings-nav-item[aria-current] {
    background: var(--p-primary-50);
    color: var(--p-primary);
}
.profile-content, .settings-content { display: flex; flex-direction: column; gap: 18px; }
.profile-section, .settings-section {
    background: var(--p-surface);
    border-radius: 20px;
    box-shadow: var(--p-shadow-sm);
    padding: 24px;
}

.profile-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.profile-meta { display: flex; flex-direction: column; }
.avatar-section { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0; }

/* Danger zone */
.danger-zone {
    background: var(--p-danger-bg);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid #FFC7C0;
}
.danger-zone .section-title { color: var(--p-danger); }
.danger-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid #FFC7C0;
}
.danger-item:first-of-type { border-top: none; padding-top: 0; }

/* ==========================================================================
   Calendar
   ========================================================================== */

.calendar-container {
    background: var(--p-surface);
    border-radius: 20px;
    box-shadow: var(--p-shadow-sm);
    overflow: hidden;
}
.calendar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--p-border);
}
.calendar-body { padding: 0; }
.calendar-day, .calendar-cell {
    background: var(--p-surface);
    border-right: 1px solid var(--p-border);
    border-bottom: 1px solid var(--p-border);
    min-height: 110px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
}
.calendar-day:hover, .calendar-cell:hover { background: var(--p-surface-2); }
.calendar-cell-disabled { background: var(--p-surface-2); color: var(--p-muted-2); }
.calendar-header-cell {
    background: var(--p-surface-2);
    padding: 12px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--p-muted);
    text-align: center;
}
.calendar-event {
    background: var(--p-primary-50);
    color: var(--p-primary);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-event:hover { background: var(--p-primary); color: white; }
.calendar-more { font-size: 11px; color: var(--p-muted); font-weight: 600; padding: 2px 8px; }

.date-day { font-size: 14px; font-weight: 700; color: var(--p-text); }
.date-month { font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.date-nav { display: flex; align-items: center; gap: 8px; }
.date-range-picker {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--p-surface-2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--p-text-2);
}

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 11px; top: 4px; bottom: 4px;
    width: 2px;
    background: var(--p-border);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -32px; top: 0;
    width: 24px; height: 24px;
    border-radius: 999px;
    background: var(--p-primary);
    box-shadow: 0 0 0 4px var(--p-surface);
}
.timeline-time, .timeline-hour { font-size: 11px; color: var(--p-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.timeline-card { background: var(--p-surface-2); border-radius: 14px; padding: 14px 18px; }
.timeline-content { display: flex; flex-direction: column; gap: 4px; }

/* Activity list */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--p-border);
}
.activity-item:first-child { border-top: none; }
.activity-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; }
.activity-time { font-size: 11px; color: var(--p-muted); margin-top: 4px; }
.activity-action { font-size: 13px; color: var(--p-text); font-weight: 600; }

/* ==========================================================================
   DICOM viewer (dark override)
   ========================================================================== */

.dicom-shell, .file-viewer {
    background: #06080F;
    color: #E5EAF5;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 60px 280px 1fr 320px;
}
.viewer-container, .file-viewer-canvas-wrapper {
    background: #0B0F1F;
    border-right: 1px solid #1B2244;
    overflow: auto;
}
.viewer-canvas {
    background: #06080F;
    width: 100%;
    height: 100%;
}
.viewer-panel {
    background: #0B0F1F;
    border-left: 1px solid #1B2244;
    color: #E5EAF5;
    padding: 18px;
    overflow-y: auto;
}
.viewer-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #1B2244; font-size: 13px; }
.viewer-label { color: #8895C5; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.dicom-rail {
    background: #0B0F1F;
    border-right: 1px solid #1B2244;
    display: flex; flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 8px;
}
.dicom-rail button {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: transparent;
    color: #8895C5;
    display: grid; place-items: center;
    transition: all 0.15s;
}
.dicom-rail button.active { background: var(--p-primary); color: white; }
.dicom-rail button:hover:not(.active) { background: #1B2244; color: white; }

/* AI / measurement results */
.results-panel { background: var(--p-surface); border-radius: 18px; padding: 18px; }
.result-card {
    background: var(--p-surface-2);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}
.comparison-list { display: flex; flex-direction: column; gap: 10px; }
.comparison-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--p-border); }
.comparison-item:last-child { border-bottom: none; }
.comparison-label { color: var(--p-muted); font-size: 13px; }
.comparison-value { font-weight: 700; color: var(--p-text); font-family: var(--p-font-mono); font-size: 14px; }

/* Arc points (DICOM cross-section) */
.arc-points-list { display: flex; flex-direction: column; gap: 6px; }
.arc-point {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    background: rgba(67, 24, 255, 0.15);
    border-radius: 10px;
    color: white;
    font-size: 13px;
}
.arc-point-remove {
    margin-left: auto;
    background: none; border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

/* Versions */
.version-list { display: flex; flex-direction: column; gap: 10px; }
.version-item {
    background: var(--p-surface-2);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer;
}
.version-item:hover { background: var(--p-primary-50); }
.version-info { display: flex; flex-direction: column; gap: 2px; }
.version-number { font-weight: 700; color: var(--p-text); font-size: 13px; }
.version-date, .version-meta { font-size: 11px; color: var(--p-muted); }

/* ==========================================================================
   Treatment / appointment / prescription pages
   ========================================================================== */

.appointment-card {
    background: var(--p-surface);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--p-shadow-sm);
    border-left: 4px solid var(--p-primary);
}
.appointment-detail { display: flex; flex-direction: column; gap: 14px; }
.appointment-header {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--p-border);
    margin-bottom: 14px;
}
.appointment-datetime, .datetime-date { font-weight: 700; color: var(--p-text); font-size: 18px; }
.datetime-time { font-size: 14px; color: var(--p-muted); margin-top: 2px; }
.appointment-time-cell { display: flex; flex-direction: column; align-items: center; }
.appointment-status { display: flex; align-items: center; gap: 8px; }
.appointment-type { font-size: 13px; color: var(--p-muted); }
.appointment-form .form-group { margin-bottom: 14px; }
.appointment-notes { padding: 14px; background: var(--p-surface-2); border-radius: 14px; font-size: 13px; color: var(--p-text-2); }
.appointment-breakdown { display: flex; flex-wrap: wrap; gap: 12px; }

.breakdown-item { background: var(--p-surface-2); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.breakdown-label { font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.breakdown-value { font-size: 14px; font-weight: 700; color: var(--p-text); }

.contact-info { display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--p-text-2); }
.contact-item svg { color: var(--p-muted); }

/* Plan / prescription rows */
.plan-item-row, .prescription-item-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--p-border);
}

/* Procedure list */
.procedure-list { display: flex; flex-direction: column; gap: 10px; }
.procedure-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px;
    background: var(--p-surface-2);
    border-radius: 14px;
}
.procedure-rank {
    width: 36px; height: 36px;
    border-radius: 999px;
    background: var(--p-primary);
    color: white;
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}
.procedure-info { flex: 1; min-width: 0; }
.procedure-name { font-weight: 700; color: var(--p-text); font-size: 14px; }
.procedure-count { font-size: 12px; color: var(--p-muted); }

/* Type list (insights/reports) */
.type-list { display: flex; flex-direction: column; gap: 14px; }
.type-item { display: grid; grid-template-columns: 1fr 80px; gap: 14px; align-items: center; }
.type-info { display: flex; flex-direction: column; gap: 4px; }
.type-name { font-size: 13px; font-weight: 700; color: var(--p-text); }
.type-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--p-surface-2);
    overflow: hidden;
}
.type-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--p-primary), #8E5BFF);
    border-radius: 999px;
}
.type-count { text-align: right; font-weight: 700; font-size: 13px; color: var(--p-text); }

/* Tooth chart */
.tooth-numbers { display: flex; gap: 3px; justify-content: center; }
.tooth-numbers-row { display: flex; gap: 3px; justify-content: center; flex-wrap: nowrap; }

/* ==========================================================================
   DICOM page extra
   ========================================================================== */

.code-box, code, pre.code {
    font-family: var(--p-font-mono);
    background: var(--p-surface-2);
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 12px;
    color: var(--p-text);
}
pre.code { padding: 14px 18px; line-height: 1.6; overflow-x: auto; }

/* Color dot */
.color-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }

/* Slider */
.slider-container { padding: 8px 0; }

/* Slice number */
.slice-number {
    display: inline-block;
    padding: 4px 10px;
    background: var(--p-surface-2);
    border-radius: 999px;
    font-family: var(--p-font-mono);
    font-size: 12px;
    color: var(--p-text);
    font-weight: 600;
}

/* ==========================================================================
   Settings nav extras
   ========================================================================== */

.toggle-color { display: inline-block; width: 20px; height: 20px; border-radius: 999px; }

/* Small detail */
.role-badge {
    background: var(--p-primary-50);
    color: var(--p-primary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Test notice (test payment page) */
.test-notice {
    background: var(--p-warning-bg);
    color: #B5752E;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Payment card */
.payment-card {
    background: var(--p-surface);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--p-shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
}
.payment-card:hover, .payment-card.active { border-color: var(--p-primary); background: var(--p-primary-50); }
.payment-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--p-surface-2);
    color: var(--p-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.payment-info { flex: 1; }
.payment-title { font-weight: 700; color: var(--p-text); font-size: 14px; }

/* PDF embed */
.pdf-embed { border: 1px solid var(--p-border); border-radius: 14px; width: 100%; min-height: 600px; }

/* Report viewer */
.report-viewer {
    background: var(--p-surface);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--p-shadow-sm);
}
.report-details { display: flex; flex-direction: column; gap: 12px; }
.report-icon { color: var(--p-primary); }
.report-info { display: flex; flex-direction: column; gap: 2px; }
.report-meta { color: var(--p-muted); font-size: 12px; }

/* Code (share link box) */
.code {
    font-family: var(--p-font-mono);
    background: var(--p-surface-2);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--p-text);
    word-break: break-all;
}

/* CTA / hero / landing */
.cta {
    background: linear-gradient(135deg, var(--p-primary) 0%, #8E5BFF 100%);
    color: white;
    padding: 48px;
    border-radius: 28px;
    text-align: center;
}
.feature-card {
    background: var(--p-surface);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--p-shadow-sm);
}
.feature-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--p-primary-50);
    color: var(--p-primary);
    display: grid; place-items: center;
    margin-bottom: 14px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Stat sub-blocks (insights) */
.stat-pending { color: var(--p-warning); }
.stat-completed { color: var(--p-success); }
.stat-total { color: var(--p-primary); }

/* Toggle password / search input wrapper */
.toggle-password {
    background: none; border: none;
    color: var(--p-muted);
    cursor: pointer;
    padding: 4px;
}
.toggle-password:hover { color: var(--p-text); }
.search-input-wrapper { position: relative; }
.search-input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1.5px solid var(--p-border);
    border-radius: 999px;
    background: var(--p-surface);
    font-size: 13px;
    outline: none;
}
.search-input:focus { border-color: var(--p-primary); box-shadow: 0 0 0 4px var(--p-primary-50); }

/* Tweaks panel (custom-built) */
.tweaks-toggle {
    position: fixed;
    right: 24px; bottom: 24px;
    width: 52px; height: 52px;
    border-radius: 999px;
    background: var(--p-primary);
    color: white;
    display: grid; place-items: center;
    box-shadow: 0 12px 28px rgba(67, 24, 255, 0.4);
    z-index: 999;
    border: none;
    cursor: pointer;
    transition: transform 0.15s;
}
.tweaks-toggle:hover { transform: scale(1.05); }
.tweaks-panel {
    position: fixed;
    right: 24px; bottom: 88px;
    width: 280px;
    background: var(--p-surface);
    border-radius: 20px;
    box-shadow: var(--p-shadow-lg);
    padding: 20px;
    z-index: 999;
    display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-section { margin-bottom: 16px; }
.tweaks-section:last-child { margin-bottom: 0; }
.tweaks-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--p-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.tweaks-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.tweaks-row:last-child { margin-bottom: 0; }
.tweaks-label { font-size: 13px; font-weight: 600; color: var(--p-text); }
.tweaks-segmented {
    display: inline-flex;
    background: var(--p-surface-2);
    padding: 3px;
    border-radius: 999px;
    gap: 2px;
}
.tweaks-segmented button {
    background: none; border: none;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--p-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}
.tweaks-segmented button.active {
    background: var(--p-primary);
    color: white;
}
.tweaks-accents { display: flex; gap: 8px; flex-wrap: wrap; }
.tweaks-accent {
    width: 32px; height: 32px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.12s;
}
.tweaks-accent.active { border-color: white; box-shadow: 0 0 0 2px currentColor; }

/* ==========================================================================
   Dark theme overrides
   ========================================================================== */

[data-theme="dark"] body { color: var(--p-text-2); background: var(--p-canvas); }
[data-theme="dark"] .quick-action svg, [data-theme="dark"] .quick-action img { background: var(--p-surface); }
[data-theme="dark"] .upload-zone { background: var(--p-surface); }
[data-theme="dark"] .pricing-card-popular, [data-theme="dark"] .package-card--popular {
    background: linear-gradient(180deg, rgba(67, 24, 255, 0.18), var(--p-surface));
}
[data-theme="dark"] .topbar-search input,
[data-theme="dark"] .toolbar-search input,
[data-theme="dark"] .search-input { background: var(--p-surface-2); color: var(--p-text); }

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .sidebar, .topbar, .page-header-actions, .tweaks-toggle, .tweaks-panel,
    .toolbar, .btn, .dropdown, .modal, .toast-container, .pagination {
        display: none !important;
    }
    .app-layout { grid-template-columns: 1fr; }
    .app-content { padding: 0; max-width: 100%; }
    .card, .stat-card { box-shadow: none; border: 1px solid #ddd; }
    body { background: white; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
    .stats-grid, .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-sidebar { display: grid; grid-template-columns: repeat(2, 1fr); }
    .pricing-grid, .package-grid, .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
    .charts-grid, .detail-grid, .two-col, .row-2-1, .row-1-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        width: 280px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open { transform: translateX(0); box-shadow: var(--p-shadow-lg); }
    .topbar-toggle { display: flex; }
    .topbar { padding: 14px 16px; gap: 12px; }
    .topbar-search { display: none; }
    .topbar-actions { padding: 6px 6px 6px 12px; gap: 6px; }
    .topbar-profile-name { display: none; }
    .app-content { padding: 8px 16px 32px; }
    .stats-grid, .stats-grid-4, .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
    .dashboard-sidebar { grid-template-columns: 1fr; }
    .pricing-grid, .package-grid, .features-grid { grid-template-columns: 1fr; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-form-side { padding: 32px 24px; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header-actions { flex-wrap: wrap; }
    .profile-layout, .settings-layout { grid-template-columns: 1fr; }
    .profile-nav, .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
    .dicom-shell, .file-viewer { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
}

@media (max-width: 540px) {
    .stats-grid, .stats-grid-4, .grid-4, .grid-3, .grid-2, .quick-actions { grid-template-columns: 1fr; }
    .file-grid { grid-template-columns: 1fr; }
    .topbar-page .topbar-crumbs { display: none; }
    .auth-otp { gap: 6px; }
    .auth-otp input { width: 44px; padding: 14px 0; font-size: 18px; }
    .error-container { padding: 32px 20px; }
    .error-code { font-size: 64px; }
}
