@source '../**/*.blade.php';
@source '../**/*.js';

:root {
    --bg: #f3f7ff;
    --bg-deep: #dfe9ff;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-solid: #ffffff;
    --panel-muted: #f5f8ff;
    --text: #1b2942;
    --muted: #7385a4;
    --line: rgba(52, 86, 181, 0.12);
    --primary: #2f63df;
    --primary-deep: #2748a3;
    --primary-soft: #e4ecff;
    --accent: #22b07d;
    --accent-soft: #e6fbf2;
    --success: #19a46f;
    --danger: #dc4d5d;
    --warning: #e1a126;
    --shadow-lg: 0 24px 60px rgba(39, 72, 163, 0.12);
    --shadow-md: 0 14px 30px rgba(39, 72, 163, 0.08);
    --radius-xl: 18px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(47, 99, 223, 0.12), transparent 18rem),
        radial-gradient(circle at top right, rgba(34, 176, 125, 0.08), transparent 20rem),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
}

body.ui-locked {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.palette-note,
.field-note,
.table-meta,
.page-kicker,
.page-subtitle,
.metric-label,
.tiny {
    color: var(--muted);
}

.top-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Invoice ledger layout: keep financial values easy to scan at a glance. */
.invoice-card { overflow: visible; margin-inline: -1rem; padding-inline: .3rem; }
.invoice-table-wrap { margin: .9rem -.15rem 0; }
.invoice-table-wrap { overflow-x: hidden; }
.invoice-board { width: 100%; min-width: 0; table-layout: fixed; font-size: clamp(.56rem, .5vw, .7rem); }
.invoice-board thead th { background: linear-gradient(180deg, #d9ebff, #b4d0ed) !important; color: #173b75; font-size: clamp(.62rem, .55vw, .75rem); font-weight: 800; letter-spacing: 0; line-height: 1.05; padding: .5rem .16rem; border: 1px solid #8aaed7; text-transform: none; }
.invoice-board td { padding: .38rem .14rem; vertical-align: middle; overflow-wrap: anywhere; border-color: #cbd5e3; }
.invoice-number-cell { font-weight: 700; color: #264e9c; white-space: nowrap; font-size: .94em; }
.invoice-view-icon, .invoice-billing-icon, .invoice-delete-icon { width: 2.25rem; height: 2.25rem; display: inline-grid; place-items: center; border-radius: .4rem; }
.invoice-view-icon { background: linear-gradient(145deg, #87d854, #3f942a); color: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .13); }
.invoice-billing-icon { background: #f1f4f8; color: #202b3c; border: 1px solid #d4dce8; }
.invoice-billing-icon { cursor: pointer; }
.invoice-billing-icon:hover { color: #1e5bca; border-color: #91b5ee; background: #eaf2ff; }
.invoice-delete-icon { color: #b62323; background: #fff6f6; border: 1px solid #f0c5c5; }
.invoice-view-icon svg, .invoice-billing-icon svg, .invoice-delete-icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.invoice-file-link { color: #1d4599; font-weight: 800; text-decoration: underline; }
.invoice-owner-cell strong, .invoice-owner-cell span { display: block; }
.invoice-owner-cell strong { color: #744300; font-size: .94em; }
.invoice-owner-cell strong.invoice-member-name { color: #148142; }
.invoice-owner-cell strong.invoice-gold-name { color: #a86c00; }
.invoice-owner-cell strong.invoice-diamond-name { color: #087890; }
.invoice-owner-cell span { color: #58708f; margin-top: .1rem; font-size: .86em; }
.invoice-falcon-cell, .invoice-ring-cell { color: #df3da6; font-weight: 700; }
.invoice-money-net { background: #e5c28b !important; color: #23334b; font-weight: 800; }
.invoice-money-vat { background: #087d16 !important; color: #fff !important; font-weight: 800; }
.invoice-money-paid, .invoice-money-balance { background: #ffe161 !important; color: #26324a; font-weight: 800; }
.invoice-payment-cell { background: #f8bdc7 !important; color: #3f4051; font-weight: 700; }
.invoice-board .visit-status-badge { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; font-size: .95em; font-weight: 500; color: #293a56; }
.invoice-board .visit-status-paid { color: #19743b; }
.invoice-board .visit-status-unpaid { color: #3c4d70; }
.invoice-board .visit-status-partially-paid { color: #a56200; }
.invoice-board tfoot td { background: #93b4dc !important; color: #152c51; font-size: .84rem; font-weight: 800; border-top: 2px solid #537cae; }
.billing-receipt-backdrop { z-index: 180; }.billing-receipt-modal { z-index: 181; width: min(96vw, 1480px); max-height: 92vh; padding: 0; overflow: auto; }.billing-receipt-modal .modal-head { position: sticky; top: 0; z-index: 2; padding: 14px 20px; background: #fff; border-bottom: 1px solid #dce6f8; }.billing-receipt-content { padding: 20px; }.billing-receipt-brand { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 18px; color: #fff; background: linear-gradient(115deg, #173b88, #3678e8); }.billing-receipt-brand span { display: block; color: rgba(255,255,255,.74); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }.billing-receipt-brand h3 { margin: 3px 0 0; color: #fff; font-size: 1.2rem; }.billing-receipt-owner { display: grid; gap: 4px; text-align: right; }.billing-receipt-owner small { color: rgba(255,255,255,.82); }.billing-invoice-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 14px 0; border: 1px solid #d9e4f6; background: #d9e4f6; }.billing-invoice-meta div { display: grid; gap: 5px; padding: 13px 15px; background: #fff; }.billing-invoice-meta span { color: #71829d; font-size: .72rem; font-weight: 700; }.billing-invoice-meta strong { color: #1d3154; font-size: 1rem; }.billing-invoice-meta .billing-balance { background: #fff6ce; }.billing-invoice-meta .billing-balance strong { color: #916c00; }.billing-receipt-form { padding: 16px; border: 1px solid #d7e4fa; border-radius: 5px; background: #f9fbff; }.billing-payment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.billing-payment-grid .field { margin: 0; }.billing-payment-grid input,.billing-payment-grid select { min-height: 38px; }.billing-payment-summary { display: flex; justify-content: flex-end; gap: 20px; margin-top: 14px; padding: 10px 13px; border-top: 1px solid #d7e4fa; color: #536985; font-size: .82rem; }.billing-payment-summary strong { margin-left: 5px; color: #172f58; }.billing-payment-summary span:first-child strong { color: #b17200; }.billing-payment-summary span:last-child strong { color: #14743a; }.billing-form-message { margin: 12px 0 0; padding: 9px 12px; border-radius: 5px; font-size: .85rem; font-weight: 700; }.billing-form-message.success { color: #136e37; background: #dcf6e4; border: 1px solid #a4dfb6; }.billing-form-message.error { color: #b32b38; background: #fff0f1; border: 1px solid #f1b8bf; }.billing-receipts-history { margin-top: 18px; }.billing-receipts-history h4 { margin: 0 0 9px; color: #25395b; }.billing-receipts-history .table-wrap { max-height: 220px; }@media (max-width: 760px) { .billing-receipt-content { padding: 12px; }.billing-receipt-brand { align-items: flex-start; flex-direction: column; }.billing-receipt-owner { text-align: left; }.billing-invoice-meta,.billing-payment-grid { grid-template-columns: 1fr 1fr; }.billing-payment-summary { justify-content: flex-start; flex-wrap: wrap; gap: 8px 15px; } }
.billing-receipt-details{display:grid;grid-template-columns:180px 180px minmax(220px,1fr);gap:12px;margin-bottom:12px}.billing-receipt-details .field,.billing-notes{margin:0}.billing-allocation-table{overflow:hidden;border:1px solid #86a9d1;border-radius:5px;background:#fff}.billing-allocation-head,.billing-allocation-row{display:grid;grid-template-columns:repeat(9,minmax(72px,1fr))}.billing-allocation-head{color:#173b75;background:linear-gradient(180deg,#d9ebff,#b4d0ed);font-size:.7rem;font-weight:800}.billing-allocation-head span{padding:8px 7px;border-right:1px solid #8aaed7}.billing-allocation-row{border-top:1px solid #9bb7d9}.billing-allocation-row>*{min-height:52px;padding:10px 7px;border-right:1px solid #d0dbea}.billing-allocation-row strong{display:flex;align-items:center;color:#263957;background:#fff}.billing-allocation-row input{width:100%;min-height:30px;padding:4px 6px;border:1px solid #aebed3;border-radius:2px;background:#fff;font:inherit}.billing-allocation-total{display:flex;justify-content:flex-end;gap:9px;padding:8px 12px;color:#102c57;background:#94b4db;font-size:.78rem}.billing-allocation-total strong{min-width:72px}.billing-notes{margin-top:12px}.billing-notes input{min-height:36px}@media(max-width:760px){.billing-receipt-details{grid-template-columns:1fr 1fr}.billing-receipt-details .field:last-child{grid-column:1/-1}.billing-allocation-table{overflow-x:auto}.billing-allocation-head,.billing-allocation-row{min-width:760px}}
.modal-panel.wide.billing-receipt-modal{width:min(98vw,1480px);min-height:min(84vh,800px);max-height:94vh;border-radius:14px}
.billing-receipt-details-compact{grid-template-columns:180px 180px}.billing-overpaid{color:#b42332!important}
.receipt-table-wrap{margin-top:16px}.receipt-board{min-width:1420px;font-size:.72rem}.receipt-board th{padding:10px 7px;font-size:.68rem;background:linear-gradient(180deg,#dcecff,#b6d1ee);color:#173b75}.receipt-board td{padding:9px 7px;vertical-align:middle}.receipt-board .receipt-number-cell{font-weight:800;color:#2854a5}.receipt-board .receipt-owner-cell{font-weight:700}.receipt-board .receipt-falcon-cell{color:#d63b9e;font-weight:700}.receipt-board .receipt-cash-cell{background:#e0c18d;font-weight:800}.receipt-board .receipt-card-cell{background:#ffe25b;font-weight:800}.receipt-board .receipt-charge-cell{background:#9debb5;font-weight:800}.receipt-board .receipt-dpo-cell{background:#f4b5c1;font-weight:800}.receipt-board .receipt-bank-cell{background:#e6f0ff;font-weight:800}.receipt-board .receipt-total-cell{background:#b7cae7;font-weight:800}.receipt-board .receipt-net-cell{font-weight:800}.receipt-board tfoot td{padding:7px;background:#91b2da;color:#102d5a;font-weight:800}
.receipt-board thead th{background:linear-gradient(180deg,#d9ebff,#b4d0ed)!important;color:#173b75!important;font-size:clamp(.62rem,.55vw,.75rem)!important;font-weight:800!important;letter-spacing:0!important;line-height:1.05!important;padding:.5rem .16rem!important;border:1px solid #8aaed7!important;text-transform:none!important}
.falcon-table-wrap{margin-top:16px}.falcon-board{min-width:1450px;font-size:.75rem}.falcon-board thead th{background:linear-gradient(180deg,#d9ebff,#b4d0ed)!important;color:#173b75!important;font-size:.7rem!important;font-weight:800!important;letter-spacing:0!important;line-height:1.05!important;padding:.52rem .34rem!important;border:1px solid #8aaed7!important;text-transform:none!important}.falcon-board td{padding:.52rem .4rem;vertical-align:middle;border-color:#cbd5e3}.falcon-file-link{color:#264e9c;font-weight:800;text-decoration:underline}.falcon-class-cell{color:#fff;background:#087d16!important;font-weight:800}.falcon-owner-cell strong,.falcon-owner-cell span{display:block}.falcon-owner-cell strong{font-weight:800}.falcon-owner-cell span{margin-top:2px;color:#526b8f;font-size:.9em}.falcon-owner-cell.member strong{color:#148142}.falcon-owner-cell.gold strong{color:#a86c00}.falcon-owner-cell.diamond strong{color:#087890}.falcon-owner-cell.expired strong{color:#c23745}.falcon-owner-cell.non-member strong{color:#704300}.falcon-ring-cell{color:#df3da6;font-weight:700}.falcon-doc-action{color:#234d97;background:#edf3ff}.falcon-doc-action svg{width:1.1rem;height:1.1rem;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width: 720px) { .invoice-card { margin-inline: 0; padding-inline: .65rem; } .invoice-table-wrap { margin-inline: 0; overflow-x: auto; } .invoice-board { min-width: 1050px; } }

.system-footer {
    padding: 14px 18px 18px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
}

.main-panel { flex: 1; }

.topbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 10px 24px;
    overflow: visible;
    z-index: 60;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(112deg, #17377d 0%, #2859c5 48%, #3d7cff 100%);
}

.topbar::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: 23%;
    top: -255px;
    border-radius: 4px;
    border: 42px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.topbar-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.topbar-logo {
    width: 52px;
    height: 52px;
    padding: 5px;
    object-fit: contain;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 26px rgba(7, 27, 81, 0.24);
}

.topbar-brand-copy {
    display: grid;
    gap: 3px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.topbar-kicker {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-brand strong {
    font-size: 1.08rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.topbar-status {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.topbar-dropdown { position:relative; }
.topbar-dropdown > summary { list-style:none; }
.topbar-dropdown > summary::-webkit-details-marker { display:none; }
.topbar-menu-trigger { display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:6px 10px; border:1px solid rgba(255,255,255,.28); border-radius:5px; color:#fff; background:rgba(255,255,255,.1); cursor:pointer; font:inherit; font-size:.78rem; font-weight:700; }
.topbar-menu-trigger:hover,.topbar-dropdown.is-open .topbar-menu-trigger,.topbar-dropdown[open] .topbar-menu-trigger { background:rgba(255,255,255,.2); }
.topbar-menu-trigger svg,.topbar-dropdown-link svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.topbar-settings-trigger { width:34px; justify-content:center; padding:6px; }
.topbar-dropdown-menu { position:absolute; top:calc(100% + 7px); right:0; z-index:80; display:none; min-width:218px; padding:7px; border:1px solid #dce4f2; border-radius:5px; background:#fff; box-shadow:0 16px 34px rgba(16,38,77,.2); }
.topbar-dropdown.is-open .topbar-dropdown-menu { display:grid; gap:3px; }
.topbar-dropdown[open] .topbar-dropdown-menu { display:grid; gap:3px; }
.topbar-account-summary { display:grid; gap:2px; padding:8px 10px 10px; border-bottom:1px solid #e8edf5; color:var(--text); }
.topbar-account-summary strong { font-size:.82rem; }.topbar-account-summary span { color:var(--muted); font-size:.69rem; overflow-wrap:anywhere; }
.topbar-dropdown-link { display:flex; align-items:center; width:100%; min-height:35px; gap:8px; padding:7px 9px; border:0; border-radius:4px; color:#344663; background:transparent; cursor:pointer; font:inherit; font-size:.77rem; font-weight:650; text-align:left; }
.topbar-dropdown-link:hover { color:var(--primary); background:#f1f5ff; }.topbar-logout-link { margin-top:3px; color:#d33d4e; border-top:1px solid #eef1f6; }.topbar-logout-link:hover { color:#bd2637; background:#fff2f3; }

.mobile-menu-toggle {
    display: none !important;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 54px;
    padding: 7px 20px;
    border-bottom: 1px solid rgba(29, 70, 164, 0.12);
    background: #214cae;
    box-shadow: 0 10px 22px rgba(26, 64, 147, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.topnav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 3px;
}

.topnav-dropdown {
    position: relative;
    display: flex;
}

.topnav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.topnav-link:hover,
.topnav-link.active {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.topnav-dropdown-toggle {
    appearance: none;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: transparent;
}

.topnav-dropdown-toggle::after {
    content: "▾";
    margin-left: 8px;
    font-size: 0.72rem;
    opacity: 0.8;
}

.topnav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 190px;
    margin-top: 0;
    padding: 10px 8px 8px;
    border-radius: 14px;
    border: 1px solid rgba(47, 99, 223, 0.12);
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(27, 41, 66, 0.16);
    display: none;
    z-index: 30;
}

.topnav-dropdown:hover .topnav-dropdown-menu,
.topnav-dropdown:focus-within .topnav-dropdown-menu {
    display: grid;
    gap: 6px;
}

.topnav-dropdown-link {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--primary-deep);
    font-size: 0.82rem;
    font-weight: 700;
}

.topnav-dropdown-link:hover,
.topnav-dropdown-link.active {
    background: rgba(47, 99, 223, 0.08);
    color: var(--primary);
}

.topnav-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 0 0 0 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.shortcut-text,
.palette-note,
.field-note,
.table-meta,
.page-kicker,
.page-subtitle,
.metric-label,
.tiny {
    color: var(--muted);
}

.main-panel {
    min-width: 0;
    padding: 14px 18px 22px;
}

.masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.masthead-group {
    display: grid;
    gap: 4px;
}

.compact-head {
    margin-top: 2px;
}

.page-kicker {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.page-subtitle {
    color: var(--muted);
    max-width: 50rem;
    font-size: 0.85rem;
}

.masthead-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    font-size: 0.8rem;
}

.status-chip.compact {
    padding: 7px 11px;
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(7, 30, 92, 0.22);
    box-shadow: none;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 7px rgba(14, 139, 103, 0.12);
}

.toolbar-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.82rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.toolbar-btn:hover,
.btn:hover {
    transform: translateY(-1px);
}

.toolbar-btn {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    color: var(--primary-deep);
    box-shadow: var(--shadow-md);
}

.topbar .toolbar-btn,
.topnav .toolbar-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.topnav .toolbar-btn.primary {
    color: #1d4aa8;
    border-color: rgba(255, 255, 255, 0.76);
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(8, 28, 81, 0.22);
}

.toolbar-btn.primary,
.btn.primary {
    color: white;
    background: linear-gradient(135deg, #2f63df, #3f7dff);
    box-shadow: 0 10px 22px rgba(47, 99, 223, 0.28);
}

.toolbar-btn.compact,
.btn.compact {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.btn.secondary {
    background: #ffffff;
    color: var(--primary);
    border: 1px solid rgba(47, 99, 223, 0.18);
}

.btn.danger {
    color: var(--danger);
    background: rgba(202, 76, 67, 0.1);
    border: 1px solid rgba(202, 76, 67, 0.14);
}

.btn.ghost {
    color: var(--accent);
    background: rgba(34, 176, 125, 0.08);
    border: 1px solid rgba(34, 176, 125, 0.16);
}

.content-shell,
.stack {
    display: grid;
    gap: 14px;
}

.hero-panel,
.card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(47, 99, 223, 0.08);
    border-radius: var(--radius-xl);
    background: var(--panel);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
}

.card {
    padding: 16px;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 14px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.94));
    color: var(--text);
}

.hero-panel::before,
.card::before {
    content: "";
    position: absolute;
    inset: auto auto -40px -40px;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(47, 99, 223, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-copy {
    display: grid;
    gap: 10px;
    align-content: start;
}

.hero-copy h2 {
    margin: 0;
    font-size: clamp(1.2rem, 1.8vw, 1.7rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--primary-deep);
}

.hero-copy p {
    margin: 0;
    max-width: 52rem;
    color: var(--muted);
    font-size: 0.87rem;
}

.hero-actions,
.btn-row,
.quick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-side {
    display: grid;
    gap: 14px;
    align-content: start;
}

.glass-panel {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(47, 99, 223, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.92));
}

.glass-panel strong {
    display: block;
    color: var(--primary-deep);
}

.mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mini-metric {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(47, 99, 223, 0.1);
}

.mini-metric strong {
    color: var(--primary-deep);
}

.grid {
    display: grid;
    gap: 14px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(47, 99, 223, 0.08);
}

.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.metric-label {
    color: var(--muted);
    font-weight: 600;
}

.metric-icon {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e3edff, #f3f7ff);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 800;
}

.metric-value {
    margin: 0;
    font-size: clamp(1.15rem, 1.7vw, 1.5rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.metric-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.78rem;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
}

.trend.up {
    background: rgba(14, 139, 103, 0.1);
    color: var(--success);
}

.trend.flat {
    background: rgba(47, 99, 223, 0.1);
    color: var(--primary);
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.section-title,
.page-head h2 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.section-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.surface-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.surface-header-copy {
    display: grid;
    gap: 4px;
}

.surface-header-copy p {
    margin: 0;
    color: var(--muted);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(47, 99, 223, 0.08);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.quick-card:hover {
    transform: translateY(-3px);
    border-color: rgba(47, 99, 223, 0.22);
}

.promotions-stats .metric-card strong { font-size:2rem; line-height:1; color:#17243d; }
.promotions-stats .promotion-stat { display:flex; flex-direction:column; min-height:116px; align-items:flex-start; justify-content:flex-start; gap:7px; padding:20px 24px; border-radius:8px; box-shadow:0 6px 16px rgba(27,50,94,.06); }
.promotion-stat-icon { display:grid; width:48px; height:48px; place-items:center; border-radius:14px; color:#fff; box-shadow:0 8px 16px rgba(44,77,154,.18); }
.promotion-stat-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.promotion-stat-purple .promotion-stat-icon { background:#6754e8; }.promotion-stat-green .promotion-stat-icon { background:#18bd8a; }.promotion-stat-amber .promotion-stat-icon { background:#f5a915; }.promotion-stat-cyan .promotion-stat-icon { background:#1cbdd5; }
.promotion-stat > span:last-child { color:#526987; font-size:.92rem; font-weight:600; }
.promotion-modal { max-height:min(88vh,760px); overflow:auto; }.promotion-modal .promotion-form { padding:4px 2px 2px; }
.promotion-table-actions { display:flex; justify-content:flex-start; margin:0 0 14px; }
.promotion-editor h2, .promotion-editor + .card h2 { margin: 0 0 16px; font-size: 1.05rem; }
.promotion-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.promotion-form .form-span-2 { grid-column: span 2; }
.promotion-form .checkbox-field, .promotion-form .form-actions { align-self: end; }
.promotion-form .checkbox-field { display:flex; min-height:42px; align-items:center; gap:8px; font-weight:700; }
.promotion-form .checkbox-field input { width:auto; }
.promotion-form .form-actions { display:flex; gap:8px; }
.promotions-table td:last-child, .promotions-table th:last-child { width:52px; text-align:center; }
@media (max-width:900px) { .promotion-form { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .promotion-form { grid-template-columns:1fr; } .promotion-form .form-span-2 { grid-column:auto; } }

.quick-card-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e3edff, #f3f7ff);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.74rem;
}

.quick-card p,
.activity-line p,
.list-item p {
    margin: 0;
}

.table-wrap {
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(47, 99, 223, 0.08);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 36px rgba(30, 58, 102, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 11px;
    border-bottom: 1px solid rgba(13, 103, 117, 0.08);
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7faff;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

tbody tr {
    transition: background 0.18s ease;
}

tbody tr:hover {
    background: rgba(47, 99, 223, 0.035);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 2px;
}

.visit-quick-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(47, 99, 223, 0.1);
}

.visit-page-heading {
    padding: 4px 0 14px;
    border-bottom: 1px solid rgba(47, 99, 223, 0.1);
}

.visit-page-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 800;
}

.visit-quick-actions .btn {
    color: #12824c;
    border-color: #a8dfc4;
    background: #f4fcf7;
}

.visit-quick-actions .btn:hover {
    color: #0b693b;
    border-color: #65bd90;
    background: #e8f8ef;
}

.auto-generated-value {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px dashed #b9c7da;
    border-radius: 10px;
    background: #f7f9fc;
    color: #71829a;
    font-size: 0.82rem;
    font-weight: 700;
}

.visit-quick-actions .btn span {
    margin-right: 5px;
    font-size: 1.1em;
}

.table-toolbar .field {
    position: relative;
    display: block;
}

.table-toolbar input,
.table-toolbar select {
    min-height: 44px;
    border-color: #e0e6ef;
    background: #ffffff;
    color: #445875;
    box-shadow: none;
}

.table-toolbar input:focus,
.table-toolbar select:focus {
    border-color: #9bbcff;
    box-shadow: 0 0 0 3px rgba(47, 99, 223, 0.1);
}

.toolbar-search {
    flex: 1 1 300px;
}

.toolbar-search input {
    width: 100%;
    padding-left: 42px;
}

.toolbar-search-icon {
    position: absolute;
    top: 13px;
    left: 14px;
    width: 15px;
    height: 15px;
    border: 2px solid #91a2ba;
    border-radius: 4px;
    pointer-events: none;
}

.toolbar-search-icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    border-radius: 2px;
    background: #91a2ba;
    content: '';
    transform: rotate(45deg);
}

.toolbar-select {
    flex: 0 1 170px;
}

.toolbar-date {
    flex: 0 1 155px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.toolbar-filter,
.toolbar-reset,
.toolbar-add {
    min-height: 44px;
    white-space: nowrap;
}

.toolbar-add span {
    margin-right: 5px;
    font-size: 1.15em;
    line-height: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.field {
    display: grid;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    color: #36558f;
    font-size: 0.8rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid rgba(13, 103, 117, 0.11);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(47, 99, 223, 0.35);
    box-shadow: 0 0 0 4px rgba(47, 99, 223, 0.08);
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.list {
    display: grid;
    gap: 10px;
}

.list-item,
.activity-line {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(47, 99, 223, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.94));
}

.activity-line {
    display: grid;
    gap: 6px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.pill.success {
    color: var(--success);
    background: rgba(14, 139, 103, 0.11);
}

.pill.warning {
    color: var(--warning);
    background: rgba(207, 138, 22, 0.14);
}

.pill.info {
    color: var(--primary);
    background: rgba(47, 99, 223, 0.11);
}

.flash-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 80;
    display: grid;
    gap: 10px;
    max-width: 420px;
}

.flash,
.errors {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.25s ease;
}

.flash {
    color: #0d6d4d;
    background: rgba(235, 251, 242, 0.95);
    border-color: rgba(14, 139, 103, 0.16);
}

.treatment-success-notice {
    margin: 8px 0 10px;
    padding: 10px 14px;
    border: 1px solid #a9e7bd;
    background: #e9faee;
    color: #147337;
    font-weight: 700;
    border-radius: 8px;
}

.errors {
    color: var(--danger);
    background: rgba(255, 241, 239, 0.96);
    border-color: rgba(202, 76, 67, 0.16);
}

.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.errors ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

/* Laravel's stock paginator uses Tailwind utility classes, so style it locally. */
.pagination nav { width: min(100%, 760px); }
.pagination nav > div:first-child { display: none !important; }
.pagination nav > div:last-child { display: flex !important; align-items: center; justify-content: space-between; gap: 16px; }
.pagination nav > div:last-child > div:last-child { margin-left: auto; }
.pagination nav p { margin: 0; color: #65758f; font-size: .8rem; }
.pagination nav .inline-flex { display: inline-flex; align-items: center; }
.pagination nav .relative { position: relative; }
.pagination nav a,
.pagination nav [aria-current="page"] > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid #d6e1f2;
    color: #2859c5;
    background: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}
.pagination nav a:hover { background: #edf3ff; }
.pagination nav [aria-current="page"] > span { border-color: #2f63df; color: #fff; background: #2f63df; }
.pagination nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Compact pagination: controls only. */
.pagination nav { width: auto; }
.pagination nav > div:last-child { justify-content: center; gap: 0; }
.pagination nav > div:last-child > div:first-child { display: block; }
.pagination nav > div:last-child > div:last-child { margin-left: 0; }
.pagination nav a,
.pagination nav [aria-current="page"] > span { min-width: 30px; height: 30px; padding: 0 7px; border-radius: 0; font-size: .78rem; }
.pagination nav .inline-flex > :first-child { border-radius: 4px 0 0 4px; }
.pagination nav .inline-flex > :last-child { border-radius: 0 4px 4px 0; }

.pagination-per-page {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #65758f;
    font-size: .78rem;
    white-space: nowrap;
}

.pagination-per-page label { font-weight: 600; }

.pagination-per-page select {
    min-height: 30px;
    padding: 3px 24px 3px 8px;
    border: 1px solid #d6e1f2;
    border-radius: 4px;
    background: #fff;
    color: #21334f;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.inline-form {
    display: inline;
}

.surface-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.form-inline-alert {
    margin-bottom: 14px;
    padding: 11px 13px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b42318;
    background: #fff1f2;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.45;
}

.clinic-date-control { position: relative; width: 100%; }
.clinic-date-display { width: 100%; padding-right: 42px !important; }
.clinic-date-open { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; color: #15233e; background: transparent; transform: translateY(-50%); cursor: pointer; }
.clinic-date-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.clinic-date-native { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.table-enhance-toolbar { align-items:end; margin:16px 0 12px; padding:12px 14px; border:1px solid #e1e9f8; border-radius:10px; background:#f8faff; }
.table-enhance-toolbar .field { margin:0; }.table-instant-search { min-width:min(100%,300px); }.table-instant-search label { margin-bottom:5px; font-size:.72rem; }.table-instant-search input { min-height:36px; background:#fff; }.table-export-actions { display:flex; flex-wrap:wrap; gap:7px; }.table-export-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 11px; border:1px solid #d3dff5; border-radius:6px; color:#2859c5; background:#fff; cursor:pointer; font:inherit; font-size:.75rem; font-weight:800; }.table-export-button:hover { border-color:#97b6f4; background:#edf3ff; }.table-export-button svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.record-shell {
    display: grid;
    gap: 12px;
}

.record-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(47, 99, 223, 0.12);
    border-radius: 12px;
    background: linear-gradient(135deg, #2b56c6, #4180ff);
    color: #ffffff;
}

.record-banner h2,
.record-banner p {
    margin: 0;
}

.record-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.record-form {
    display: grid;
    gap: 12px;
}

.record-section {
    border: 1px solid rgba(47, 99, 223, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(252, 253, 255, 0.98), rgba(244, 248, 255, 0.94));
    overflow: hidden;
}

.record-shell:has(.service-autocomplete),
.record-section:has(.service-autocomplete) {
    overflow: visible;
}

.record-shell:has(#visit-falcon-search),
.record-section:has(#visit-falcon-search) {
    position: relative;
    z-index: 5;
    overflow: visible;
}

.autocomplete:has(#visit-falcon-search) {
    z-index: 10;
}

.record-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(47, 99, 223, 0.1);
    background: linear-gradient(135deg, #edf3ff, #dfe9ff);
}

.record-section-head h3,
.record-section-head p {
    margin: 0;
}

.record-section-body {
    padding: 12px;
}

.compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-compact label {
    font-size: 0.76rem;
}

.field-compact input,
.field-compact select,
.field-compact textarea {
    padding: 8px 9px;
    font-size: 0.8rem;
}

.line-card {
    padding: 12px;
    border: 1px solid rgba(13, 103, 117, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
}

.line-card + .line-card {
    margin-top: 10px;
}

.visit-services-field > label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 0.76rem;
    font-weight: 700;
}

.visit-service-list {
    display: grid;
    gap: 8px;
}

.visit-service-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #e2eaf7;
    border-radius: 5px;
    background: #ffffff;
}

.visit-service-row .autocomplete {
    min-width: 0;
}

.visit-service-row .btn {
    min-width: 92px;
}

/* Treatments belong to the archived medical sheet, not the active registration form. */
.registration-treatment-sheet {
    display: none;
}

.static-forms-history .registration-treatment-sheet {
    display: block;
}

.record-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding-top: 2px;
}

.hint {
    color: var(--muted);
    font-size: 0.75rem;
}

.inline-picker {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inline-picker > *:first-child {
    flex: 1 1 auto;
}

.mini-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(47, 99, 223, 0.18);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #eaf1ff);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.mini-action:hover {
    background: linear-gradient(180deg, #fefefe, #dcedf4);
}

.autocomplete {
    position: relative;
    flex: 1 1 auto;
}

.autocomplete-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 120;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(47, 99, 223, 0.16);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 43, 62, 0.14);
}

.autocomplete-item {
    display: grid;
    width: 100%;
    gap: 2px;
    padding: 8px 10px;
    border: none;
    border-bottom: 1px solid rgba(13, 103, 117, 0.08);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: rgba(47, 99, 223, 0.08);
}

.autocomplete-item strong {
    font-size: 0.8rem;
    color: var(--primary-deep);
}

.autocomplete-item span {
    color: var(--muted);
    font-size: 0.72rem;
}

.treatment-service-results .autocomplete-item small {
    color: #8a98ad;
    font-size: 0.68rem;
    font-weight: 500;
}

.modal-backdrop.nested-backdrop {
    z-index: 94;
}

.modal-panel.nested-modal {
    z-index: 95;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.info-block {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(47, 99, 223, 0.04);
    border: 1px solid rgba(47, 99, 223, 0.08);
}

/* Keep account settings intentionally quiet and focused. */
.account-shell { gap:16px; padding:20px; border:1px solid #e3e8f1; border-radius:5px; background:#ffffff; box-shadow:none; }
.account-shell .record-banner { display:block; padding:0; border:0; border-radius:0; background:transparent; color:var(--text); }
.account-shell .record-banner h2 { font-size:1.35rem; }
.account-shell .record-section { border-color:#e3e8f1; border-radius:5px; background:#ffffff; }
.account-shell .record-section-head { padding:13px 16px 0; border:0; background:transparent; }
.account-shell .record-section-head h3 { font-size:1rem; }
.account-shell .record-section-body { padding:16px; }
.account-shell .info-block { padding:9px 0; border:0; border-radius:0; background:transparent; }
.account-shell .info-block strong { display:block; margin-bottom:3px; font-size:.76rem; color:var(--muted); }

.empty-state {
    padding: 18px;
    text-align: center;
    color: var(--muted);
}

.floating-rail {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 50;
    display: grid;
    gap: 12px;
}

.mobile-nav-backdrop {
    display: none;
}

.fab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2f63df, #4180ff);
    color: white;
    box-shadow: 0 8px 18px rgba(9, 61, 69, 0.2);
    font-size: 0.8rem;
}

.fab.secondary {
    background: var(--panel-solid);
    color: var(--primary);
    border: 1px solid var(--line);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(11, 25, 34, 0.55);
    backdrop-filter: blur(6px);
}

.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 91;
    width: min(92vw, 560px);
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 36px 90px rgba(11, 25, 34, 0.25);
    transform: translate(-50%, -50%);
}

.modal-panel.wide {
    width: min(94vw, 720px);
}

.visit-modal-panel {
    width: min(96vw, 1180px);
    min-height: 680px;
    max-height: 92vh;
    padding: 0;
    overflow: auto;
    z-index: 141;
}

.visit-modal-backdrop {
    z-index: 140;
}

.visit-modal-head {
    margin: 0;
    padding: 16px 18px 10px;
}

.visit-modal-head h3 { font-size: 1rem; }

.visit-modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 18px;
    border-bottom: 1px solid rgba(47, 99, 223, 0.14);
}

.visit-modal-tabs button {
    padding: 9px 18px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.visit-modal-tabs button.active,
.visit-modal-tabs button:hover {
    border-color: rgba(47, 99, 223, 0.14);
    background: #eef4ff;
    color: var(--primary);
}

.visit-modal-tab-panel { padding: 16px 18px 20px; }
.visit-modal-tab-panel[data-visit-modal-panel="history"] { min-height: 540px; }
.visit-modal-tab-panel[hidden] { display: none; }
.visit-modal-edit-form .record-section:first-child { margin-top: 0; }
.visit-modal-edit-form .record-actions { padding-top: 12px; }

.history-heading { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; color: var(--text); }
.history-heading span { font-size: .78rem; font-weight: 700; }
.history-table-wrap { overflow-x: auto; border: 1px solid rgba(31, 57, 103, .36); }
.history-table { min-width: 860px; border-collapse: collapse; background: #fff; font-size: .72rem; }
.history-table th, .history-table td { padding: 9px 8px; border: 1px solid rgba(31, 57, 103, .2); white-space: nowrap; text-align: left; vertical-align: middle; }
.history-table th { position: static; background: #e6efff; color: var(--primary-deep); font-size: .68rem; letter-spacing: 0; text-transform: none; }
.history-table tbody tr:first-child { background: #ffd16f; }
.history-owner { color: #ee3e91; font-weight: 800; }
.history-icon-button { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #416b8f; font-size: 1.45rem; line-height: 1; cursor: pointer; }
.history-icon-button:hover { background: rgba(47, 99, 223, .1); }
.history-icon-button.dark { color: #313e42; font-size: 1.2rem; }
.history-icon-button.document { color: #168ed0; font-size: 1.7rem; }
.history-icon-button.document small { position: absolute; right: 2px; bottom: 1px; font-size: .8rem; }
.weight-sheet-backdrop { z-index: 150; }
.weight-sheet-modal { width: min(94vw, 920px); max-height: 92vh; padding: 0; overflow: auto; z-index: 151; }
.weight-sheet-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #f5f8ff; color: var(--primary-deep); }
.weight-sheet-toolbar button { width: 30px; height: 30px; margin-left: 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--primary); cursor: pointer; }
.weight-sheet-paper { min-height: 560px; padding: 28px 34px 50px; background: #fff; color: #111; font-family: Arial, sans-serif; }
.weight-sheet-header { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: center; font-size: .68rem; line-height: 1.5; }
.weight-sheet-header h2 { margin: 0 0 4px; font-size: 1.1rem; }
.weight-sheet-logo { display: grid; justify-items: center; gap: 2px; text-align: center; font-weight: 700; }
.weight-sheet-logo img { width: 170px; height: 118px; object-fit: contain; }
.weight-sheet-arabic { text-align: right; }
.weight-sheet-paper > h3 { margin: 24px 0 18px; border-bottom: 1px solid #222; padding-bottom: 8px; text-align: center; font-size: 1rem; }
.weight-sheet-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; font-size: .78rem; }
.weight-sheet-details > div { display: grid; grid-template-columns: 150px 1fr; min-height: 38px; border-bottom: 1px solid #aaa; align-items: center; }
.weight-sheet-details b { font-weight: 700; }
.weight-sheet-main-value span { font-size: 1.1rem; font-weight: 700; }
@media print { body.printing-weight-sheet * { visibility: hidden !important; } body.printing-weight-sheet .weight-sheet-modal, body.printing-weight-sheet .weight-sheet-modal * { visibility: visible !important; } body.printing-weight-sheet .weight-sheet-modal { position: absolute; inset: 0; width: 100%; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; } body.printing-weight-sheet .weight-sheet-toolbar { display: none; } body.printing-weight-sheet .weight-sheet-paper { min-height: 0; } }
.medical-sheet-backdrop { z-index: 160; }
.medical-sheet-modal { width: min(96vw, 940px); max-height: 92vh; padding: 0; overflow: auto; z-index: 161; }
.medical-sheet-paper { min-height: 720px; }
.medical-sheet-paper .static-form-page { display: block; }
.diagnostic-upload-backdrop { z-index: 170; }
.diagnostic-upload-modal { width: min(94vw, 680px); max-height: 92vh; overflow: auto; z-index: 171; }
.diagnostic-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.diagnostic-panel-head h3 { margin: 0; font-size: 1rem; }
.diagnostic-panel-head span { color: var(--muted); font-size: .76rem; }
.diagnostic-report-list { display: grid; gap: 10px; }
.diagnostic-report-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.diagnostic-report-type { padding: 6px 9px; border-radius: 999px; background: #e9f0ff; color: var(--primary); font-size: .7rem; font-weight: 800; }
.diagnostic-report-type.laboratory { background: #e0f7ee; color: #087a51; }.diagnostic-report-type.xray { background: #fff0d5; color: #9d5a00; }.diagnostic-report-type.endoscopy { background: #f4e8ff; color: #7430a0; }
.diagnostic-report-main { display: grid; gap: 3px; min-width: 0; }.diagnostic-report-main strong { font-size: .82rem; }.diagnostic-report-main span, .diagnostic-report-main p { margin: 0; color: var(--muted); font-size: .72rem; }
.diagnostic-status { padding: 4px 8px; border-radius: 999px; background: #d8f8d4; color: #237a2a; font-size: .68rem; font-weight: 800; }.diagnostic-status.pending { background: #fff0cc; color: #966000; }
.diagnostic-file-links { display: flex; gap: 5px; }.diagnostic-file-links a { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--primary); font-size: .65rem; font-weight: 800; text-decoration: none; }
.diagnostic-actions { display: flex; align-items: center; gap: 7px; }
.diagnostic-delete { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid #f2c5c7; border-radius: 8px; background: #fff4f4; color: #cf3340; cursor: pointer; font-size: .9rem; }.diagnostic-delete:hover { background: #cf3340; color: #fff; }
@media (max-width: 760px) { .diagnostic-report-card { grid-template-columns: 1fr auto; } .diagnostic-report-main { grid-column: 1 / -1; grid-row: 2; } }
@media print { body.printing-medical-sheet * { visibility: hidden !important; } body.printing-medical-sheet .medical-sheet-modal, body.printing-medical-sheet .medical-sheet-modal * { visibility: visible !important; } body.printing-medical-sheet .medical-sheet-modal { position: absolute; inset: 0; width: 100%; max-height: none; overflow: visible; border-radius: 0; box-shadow: none; } body.printing-medical-sheet .medical-sheet-modal .static-form-toolbar { display: none; } }

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.modal-head h3,
.modal-head p {
    margin: 0;
}

.modal-list {
    display: grid;
    gap: 8px;
}

.modal-link {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(47, 99, 223, 0.08);
    background: var(--panel-muted);
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.modal-link:hover {
    transform: translateX(3px);
    border-color: rgba(47, 99, 223, 0.24);
}

.nested-quick-owner-backdrop {
    z-index: 130;
}

.nested-quick-owner-modal {
    z-index: 131;
}

.palette-input {
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(47, 99, 223, 0.14);
    background: white;
}

.visit-board th,
.visit-board td {
    font-size: 0.78rem;
}

.visit-board td {
    vertical-align: middle;
}

.professional-table {
    min-width: 1180px;
}

.professional-table th {
    padding: 14px 15px;
    border-bottom: 1px solid rgba(47, 99, 223, 0.14);
    background: #f7f9fd;
    color: #3f587b;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.visit-board th {
    font-size: .76rem;
    letter-spacing: .02em;
    text-transform: none;
}

.professional-table td {
    padding: 15px;
    border-bottom-color: #edf1f7;
    color: #304564;
}

.professional-table tbody tr:nth-child(even) {
    background: #fbfcfe;
}

.professional-table tbody tr:hover {
    background: #f0f6ff;
}

.professional-table td:first-child {
    color: #8392a8;
    font-weight: 800;
}

.table-file-link {
    color: #2f63df;
    font-weight: 800;
    text-decoration: underline;
}

.table-file-link:hover {
    color: #1749b9;
    text-decoration: underline;
}

.forms-placeholder {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 5px;
    border: 0;
    border-radius: 10px;
    background: #f4f7fb;
    color: #71829a;
    cursor: pointer;
}

.forms-placeholder:hover {
    background: #e9f1ff;
    color: #2f63df;
}

.forms-placeholder svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.45;
}

.emt-placeholder {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    background: #df3f4d;
    box-shadow: 0 5px 10px rgba(223, 63, 77, 0.2);
    cursor: pointer;
}

.emt-placeholder:hover {
    background: #c92c3b;
}

.emt-placeholder svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.discount-placeholder {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    background: #18a56b;
    box-shadow: 0 5px 10px rgba(24, 165, 107, 0.2);
    cursor: pointer;
}

.discount-placeholder:hover {
    background: #108756;
}

.discount-placeholder svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.invoice-discount-modal { width: min(460px, calc(100vw - 32px)); }
.discount-form-message { padding: 9px 11px; border-radius: 7px; font-size: .86rem; font-weight: 700; }
.discount-form-message.success { color: #147337; background: #e9faee; border: 1px solid #a9e7bd; }
.discount-form-message.error { color: #b42332; background: #fff0f1; border: 1px solid #ffc6cc; }

.modal-panel.wide.treatment-modal-panel { inset: 0; top: 0; left: 0; width: 100vw; height: 100vh; max-height: none; padding: 0; overflow: hidden; border-radius: 0; transform: none; }
.modal-panel.wide.treatment-modal-panel > .modal-head { min-height: 44px; padding: 0 14px; border-bottom: 1px solid #dce6f8; }
.treatment-modal-content { height: calc(100% - 44px); padding: 8px 12px 10px; overflow: hidden; }
.treatment-workspace { display: grid; grid-template-rows: auto auto minmax(0, 1fr); height: 100%; gap: 16px; }
.treatment-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid #dce6f8; }
.treatment-kicker { display: block; margin-bottom: 4px; color: #2f63df; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.treatment-summary h3, .treatment-add-card h4 { margin: 0; color: #1d2c47; }
.treatment-summary h3 span, .treatment-summary p { color: #71829a; font-weight: 500; }
.treatment-summary p { margin: 4px 0 0; font-size: .9rem; }
.treatment-summary .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.treatment-add-card { padding: 0 0 16px; border: 0; border-bottom: 1px solid #dce6f8; border-radius: 0; background: transparent; }
.treatment-add-card h4 { margin-bottom: 12px; }
.treatment-add-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.treatment-add-heading h4 { margin: 0; }
.treatment-add-heading span { color: #71829a; font-size: .85rem; }
.treatment-add-grid { display: grid; gap: 8px; }
.treatment-add-labels, .treatment-add-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px 140px; gap: 12px; align-items: center; }
.treatment-add-labels { padding: 0 4px 2px; color: #355993; font-size: .84rem; font-weight: 750; }
.treatment-add-grid select, .treatment-add-grid input { min-height: 42px; }
.treatment-service-autocomplete { min-width: 0; }
.treatment-service-search { width: 100%; }
.treatment-service-results { z-index: 8; max-height: 180px; overflow-y: auto; }
.treatment-add-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.treatment-add-actions .btn { min-width: 210px; min-height: 42px; }
.treatment-table-wrap { flex: 1; margin: 0; border: 1px solid #dce6f8; border-radius: 10px; overflow: auto; }
.treatment-workspace > form[data-treatment-invoice-form] { display: flex; min-height: 0; }
.treatment-table th, .treatment-table td { white-space: nowrap; }
.treatment-table td:nth-child(3) { white-space: normal; min-width: 190px; }
.treatment-invoiced-row { opacity: .76; }
.treatment-payment-badge, .treatment-status-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.treatment-payment-badge, .treatment-status-badge.selected { color: #a45d00; background: #fff0cf; }
.treatment-status-badge.invoiced { color: #15803d; background: #d9f8d7; }
@media (max-width: 540px) { .treatment-modal-panel { inset: 0; width: 100vw; height: 100vh; } .treatment-modal-panel > .modal-head { min-height: 60px; padding: 0 16px; } .treatment-modal-content { height: calc(100% - 60px); padding: 14px 16px; overflow: auto; } .treatment-workspace { height: auto; } .treatment-summary { align-items: flex-start; flex-direction: column; } .treatment-add-heading { align-items: flex-start; flex-direction: column; gap: 4px; } .treatment-add-labels { display: none; } .treatment-add-line { grid-template-columns: 1fr; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #dce6f8; } .treatment-add-actions { justify-content: stretch; } .treatment-add-actions .btn { width: 100%; } }

.legacy-emt { display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr); height: 100%; min-height: 0; color: #12244a; font-family: Tahoma, Arial, sans-serif; }
.legacy-emt-identity { display: flex; align-items: center; gap: 10px; min-height: 24px; padding: 3px 10px; color: #162046; background: #fff600; font-size: .86rem; }
.legacy-emt-toolbar { display: flex; align-items: center; gap: 24px; min-height: 30px; padding: 2px 10px; background: #fff; }
.legacy-emt-toolbar h3 { margin: 0; color: #1b5cad; font-size: .93rem; font-weight: 600; }.legacy-emt-pages { display: flex; gap: 9px; color: #1737bf; font-size: .82rem; }.legacy-emt-pages button { padding: 0; border: 0; color: #1737bf; background: transparent; text-decoration: underline; cursor: pointer; }.legacy-emt-toolbar label { font-size: .82rem; color: #17233b; }
.legacy-emt-picker { min-width: 0; margin: 0 8px; padding: 6px 10px; border: 1px solid #1775ec; border-radius: 7px; background: linear-gradient(180deg, #fff 0%, #f7fbff 100%); box-shadow: 0 2px 5px rgba(29,95,184,.18); }.legacy-emt-picker legend { padding: 5px 12px; border: 1px solid #1775ec; color: #1558ab; background: #fff; font-size: .82rem; }.legacy-emt-picker form { display: grid; gap: 4px; }.legacy-emt-field-labels { display: grid; grid-template-columns: minmax(0,1fr) 170px 72px; gap: 12px; padding: 0 2px; color: #355993; font-size: .75rem; font-weight: 800; }
.legacy-emt-row { display: grid; grid-template-columns: minmax(0,1fr) 170px 72px; gap: 12px; align-items: center; }.legacy-emt-row input, .legacy-emt-row select { min-height: 30px; padding: 4px 8px; border: 1px solid #aab9cc; border-radius: 2px; background: #fff; font: inherit; font-size: .8rem; }.legacy-emt-row .treatment-service-search { width: 100%; min-height: 29px; padding: 4px 34px 4px 9px; border-color: #cbd9eb; border-radius: 6px; background: #fff; }.legacy-emt-row select, .legacy-emt-row input[type="number"] { min-height: 29px; border-color: #cbd9eb; border-radius: 6px; }.treatment-service-toggle { position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 4px; color: #2f63df; background: #edf3ff; transform: translateY(-50%); cursor: pointer; }.treatment-service-toggle:hover { background: #dce9ff; }.treatment-service-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }.legacy-emt-row .treatment-service-results { z-index: 25; max-height: 160px; overflow-y: auto; }.legacy-emt-form-actions { display: flex; justify-content: center; gap: 8px; margin-top: 5px; }.legacy-blue-button { min-width: 126px; min-height: 31px; padding: 5px 14px; border: 1px solid #0e6595; border-radius: 7px; color: #fff; background: linear-gradient(#42b7e8,#1374a8); box-shadow: inset 0 1px rgba(255,255,255,.45); font-weight: 700; cursor: pointer; }.legacy-blue-button:hover { background: linear-gradient(#3aa7d7,#0d638f); }
.legacy-emt-actions { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 5px 14px; color: #58677b; font-size: .8rem; }.legacy-emt-actions .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }.legacy-invoice-button { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid #7a9700; border-radius: 50%; color: #153a00; background: radial-gradient(circle at 35% 30%,#eaff60,#a7d100 68%,#6f8c00); box-shadow: 0 2px 5px rgba(70,100,0,.28); cursor: pointer; }.legacy-invoice-button:disabled { opacity: .42; cursor: not-allowed; }.legacy-invoice-button svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.legacy-emt [data-treatment-invoice-form] { min-height: 0; padding: 0 14px 14px; }.legacy-emt-table-wrap { height: 100%; overflow: auto; border: 1px solid #6e86a8; }.emt-treatment-table { width: 100%; font-size: .8rem; }.emt-treatment-table th { white-space: nowrap; }.emt-treatment-table td { vertical-align: middle; }.legacy-treatment-name { min-width: 230px; color: #102d60; font-weight: 700; }.legacy-treatment-name small { display: block; color: #ff1616; font-size: .72rem; }.emt-treatment-table .legacy-vat-cell { color: #fff; background: #087700; font-weight: 800; }.legacy-invoiced-row { opacity: .68; }.emt-treatment-table tfoot { background: #dbe9ff; font-weight: 800; }.emt-treatment-table tfoot td { text-align: right; }
@media (max-width: 540px) { .legacy-emt { height: auto; }.legacy-emt-identity, .legacy-emt-toolbar { flex-wrap: wrap; gap: 8px; }.legacy-emt-row { grid-template-columns: 1fr; gap: 5px; }.legacy-emt-field-labels { display: none; } }

.table-action-icons {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.owner-cell {
    display: grid;
    gap: 4px;
}

.owner-cell strong {
    color: #714000;
    font-weight: 700;
}
.owner-cell.membership-member strong { color: #147642; }
.owner-cell.membership-gold strong { color: #a86c00; }
.owner-cell.membership-diamond strong { color: #087890; }
.owner-cell.membership-expired strong { color: #a85e00; }
.visit-membership-label { width: fit-content; padding: 2px 7px; border-radius: 999px; color: #147642; background: #daf7e6; font-size: .66rem; font-weight: 800; line-height: 1.25; }
.visit-membership-label.expired { color: #a85e00; background: #fff0cf; }

.membership-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.membership-badge.member { color: #147642; background: #daf7e6; }
.membership-badge.gold { color: #8f5a00; background: #fff2cc; }
.membership-badge.diamond { color: #08758b; background: #dff5f9; }
.membership-badge.non-member { color: #58677d; background: #edf1f6; }
.membership-badge.expired { color: #a85e00; background: #fff0cf; }

.visit-date-cell { color: #1f467d !important; font-weight: 600; }
.visit-ring-cell { color: #df36a1 !important; font-weight: 800; }

.owner-phone-cell {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.copy-phone-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    padding: 0;
    border: 1px solid #dbe5f4;
    border-radius: 7px;
    color: #587195;
    background: #fff;
    cursor: pointer;
}

.copy-phone-label {
    position: absolute;
    left: calc(100% + 6px);
    z-index: 2;
    padding: 3px 6px;
    border-radius: 5px;
    color: #16864c;
    background: #effbf3;
    font-size: .68rem;
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-3px);
    transition: opacity .16s ease, transform .16s ease;
}

.copy-phone-button:hover {
    border-color: #a9c5fb;
    color: #2861d4;
    background: #f2f7ff;
}

.copy-phone-button.copied {
    border-color: #9cddbc;
    color: #16864c;
    background: #effbf3;
}

.copy-phone-button.copied .copy-phone-label {
    opacity: 1;
    transform: translateX(0);
}

.copy-phone-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.icon-action-form {
    display: inline-flex;
    margin: 0;
}

.icon-action {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e2e8f1;
    border-radius: 10px;
    background: #ffffff;
    color: #72829a;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

.icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.icon-action.view:hover {
    border-color: #b9d1ff;
    background: #edf4ff;
    color: #2f63df;
}

.icon-action.edit:hover {
    border-color: #f7d99e;
    background: #fff7e8;
    color: #b97800;
}

.icon-action.delete:hover {
    border-color: #ffc4cd;
    background: #fff0f2;
    color: #d43c52;
}

.mini-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(47, 99, 223, 0.1);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 800;
}

.mini-table-action.pay {
    background: rgba(25, 164, 111, 0.12);
    color: var(--success);
}

.visit-services-cell {
    min-width: 380px;
    color: #146c43;
    font-weight: 700;
}

.visit-type-badge,
.visit-status-badge {
    display: inline;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: .88rem;
    font-weight: 700;
}

.visit-type-new {
    color: #2251b5;
}

.visit-type-repeat {
    color: #177a2f;
}

.visit-type-follow-up,
.visit-type-followup {
    color: #9a6600;
}

.visit-status-open {
    color: #2f63df;
}

.visit-status-in-progress {
    color: #ae6f00;
}

.visit-status-invoiced {
    color: #1f7a28;
}

.visit-status-closed,
.visit-status-paid {
    color: #0d7b52;
}

.visit-status-draft,
.visit-status-unpaid {
    color: #4958a8;
}

.visit-status-partially-paid {
    color: #b96515;
}

.table-actions-tight {
    gap: 6px;
}

.static-form-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(12, 25, 48, 0.58);
    backdrop-filter: blur(4px);
}

.static-form-modal {
    position: fixed;
    inset: 2vh 10vw;
    z-index: 301;
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(10, 23, 48, 0.3);
}

.static-form-window {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.static-form-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 5px 14px;
    border-bottom: 1px solid #e5e9f0;
    color: #213b62;
}

.static-form-toolbar button {
    width: 34px;
    height: 32px;
    margin-left: 5px;
    border: 0;
    border-radius: 8px;
    background: #f2f5fa;
    color: #4b6382;
    cursor: pointer;
    font-size: 1.2rem;
}

.static-form-toolbar .static-form-print:hover {
    background: #e4efff;
    color: #2360ce;
}

.static-form-toolbar .static-form-close:hover {
    background: #fff0f2;
    color: #c3374c;
}

.static-form-tabs {
    display: flex;
    gap: 2px;
    padding: 4px 12px 0;
    border-bottom: 1px solid #c8c8c8;
}

.static-form-tabs button {
    padding: 7px 20px;
    border: 1px solid #bfc3c9;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
    background: #f2f2f2;
    color: #ed2b8a;
    cursor: pointer;
    font-weight: 800;
}

.static-form-tabs button.active {
    background: #ffffff;
}

.static-form-sheet {
    overflow: auto;
    width: 100%;
    padding: 36px 22px 50px;
    color: #111111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.35;
}

.static-form-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.static-form-header > :not(.static-form-logo) {
    display: none;
}

.static-form-header h2 {
    margin: 0 0 16px;
    color: #111111;
    font-size: 21px;
}

.static-form-header strong {
    display: block;
}

.static-form-logo {
    display: grid;
    justify-items: center;
    gap: 4px;
    text-align: center;
    font-weight: 800;
}

.static-form-logo img {
    width: 138px;
    height: 88px;
    object-fit: contain;
}

.static-form-arabic {
    text-align: right;
}

.static-form-arabic h2 {
    font-size: 22px;
}

.static-form-page {
    display: none;
}

.static-form-page.active {
    display: block;
}

.registration-editor ~ * { display: none !important; }
.registration-editor > h3 { border-bottom: 0; }
.registration-editor-lines { display: grid; gap: 7px; }
.registration-editor-lines > label, .registration-editor-grid > label { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 700; }
.registration-editor input[type="text"] { min-height: 28px; padding: 3px 7px; border: 1px solid #cbd5e1; border-radius: 3px; color: #111111; background: #ffffff; box-shadow: none; font: inherit; }
.registration-editor input[type="text"]:focus { border-color: #1f67d2; box-shadow: 0 0 0 2px rgba(31, 103, 210, 0.12); outline: 0; }
.registration-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 22px; }
.registration-editor fieldset { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 1px 0; padding: 4px 0; border: 0; border-bottom: 1px solid #a0a7b1; }
.registration-editor fieldset legend { padding: 0; margin-right: 10px; font-weight: 800; }
.registration-editor fieldset label { display: inline-flex !important; align-items: center; width: auto !important; gap: 5px; font-weight: 600; white-space: nowrap; }
.registration-editor fieldset input[type="checkbox"] { flex: 0 0 auto; width: 14px !important; min-width: 14px; height: 14px; min-height: 14px; margin: 0; padding: 0; accent-color: #1f67d2; }
.registration-physical-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.registration-physical-row > label:first-child { display: grid; grid-template-columns: 145px minmax(0, 1fr); align-items: center; gap: 10px; font-weight: 700; }
.registration-editor .registration-check-label { display: inline-flex !important; width: auto !important; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.registration-editor fieldset.registration-fluids { align-items: center; gap: 4px 12px; }
.registration-signature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.registration-signature-grid > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; font-weight: 700; }
.registration-editor-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.registration-editor-info.static-form-info-box { grid-template-columns: 1.05fr 1.05fr 1fr; gap: 6px 28px; margin: 12px 0 16px; padding: 12px 14px; border-color: #2268aa; border-radius: 7px; }
.registration-info-column { display: grid; align-content: start; gap: 6px; }
.registration-editor-info.static-form-info-box > .registration-info-column { display: grid; grid-template-columns: 1fr; align-content: start; gap: 6px; }
.registration-info-column > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 20px; }
.registration-editor-info.static-form-info-box > .registration-info-column > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 20px; }
.registration-info-column > div > b { min-width: 0; }
.registration-info-column .form-value { min-height: 18px; padding-bottom: 1px; border-bottom: 0; }
.registration-editor-info.static-form-info-box input[type="text"] { border-bottom: 0; }
.registration-editor .form-value, .registration-editor input[type="text"] { color: #111111; font-size: 12px; font-weight: 400; }
.registration-editor label, .registration-editor legend, .registration-editor-info.static-form-info-box b { color: #111111; }
.registration-editor-info .form-value, .registration-editor-lines > label:first-child .form-value { color: #ef1111; font-weight: 600; }
.registration-treatment-sheet { margin-top: 24px; padding-top: 20px; border-top: 1px solid #7e8794; }
.registration-treatment-sheet h3 { margin: 0 0 12px; border: 0; padding: 0; text-align: left; text-decoration: underline; }
.registration-treatment-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.registration-treatment-table th, .registration-treatment-table td { padding: 5px 7px; border: 1px solid #6f7a89; color: #111111; text-align: left; }
.registration-treatment-table th:last-child, .registration-treatment-table td:last-child { width: 96px; text-align: right; }
.registration-treatment-table thead th, .registration-treatment-table tfoot th { background: #eef4fb; font-weight: 800; }
.registration-readonly-note { color: #8b5a00; font-weight: 700; }

.static-form-page h3 {
    margin: 12px 0 14px;
    border-bottom: 1px solid #999999;
    padding-bottom: 7px;
    text-align: center;
    color: #111111;
    font-size: 18px;
}

.static-form-page .registration-editor > h3 {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 12px;
}

.static-form-page p {
    margin: 9px 0;
}

.form-value {
    color: #ef1111;
}

.hand-line,
.long-line,
.medium-line,
.extra-long-line {
    display: inline-block;
    min-width: 180px;
    height: 18px;
    border-bottom: 1px solid #777777;
    vertical-align: bottom;
}

.long-line {
    min-width: 330px;
}

.medium-line {
    min-width: 170px;
}

.extra-long-line {
    min-width: 620px;
}

.static-form-info-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 28px;
    margin: 16px 0 24px;
    padding: 16px;
    border: 1px solid #2385e8;
    border-radius: 8px;
}

.static-form-info-box div {
    display: flex;
    gap: 18px;
}

.static-form-info-box b {
    min-width: 70px;
}

.static-form-page hr {
    border: 0;
    border-top: 1px solid #999999;
    margin: 20px 0;
}

.signature-row {
    display: flex;
    justify-content: space-between;
    margin-top: 26px;
}

.signature-row i {
    display: inline-block;
    width: 230px;
    margin-left: 8px;
    border-bottom: 1px solid #777777;
}

.registration-lines p,
.medical-lines p {
    min-height: 25px;
}

.diagnosis-table {
    border: 1px solid #222222;
    border-collapse: collapse;
    width: 100%;
}

.diagnosis-table th,
.diagnosis-table td {
    padding: 5px;
    border: 1px solid #222222;
    background: #ffffff;
    color: #111111;
    text-align: left;
    text-transform: none;
}

.diagnosis-table th {
    background: #d9e8fa;
    font-size: 12px;
}

.performed-by {
    margin-top: 18px !important;
}

.clinic-footer {
    margin-top: 16px;
    text-align: center;
    font-weight: 800;
    line-height: 1.8;
}

@media (max-width: 760px) {
    .visit-modal-panel { min-height: 0; }
    .visit-modal-tab-panel[data-visit-modal-panel="history"] { min-height: 420px; }
    .static-form-modal {
        inset: 2vh 2vw;
    }

    .static-form-tabs {
        overflow-x: auto;
    }

    .static-form-tabs button {
        flex: 0 0 auto;
        padding: 9px 14px;
        font-size: 0.74rem;
    }

    .static-form-sheet {
        padding: 24px 14px 40px;
        font-size: 11px;
    }

    .static-form-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .static-form-arabic {
        text-align: center;
    }

    .static-form-info-box {
        grid-template-columns: 1fr;
    }

    .extra-long-line {
        min-width: 260px;
    }
}

@media print {
    .registration-editor-actions { display: none !important; }
    .registration-editor input[type="text"] { border: 0 !important; background: transparent !important; box-shadow: none !important; }
    .registration-treatment-sheet { break-before: page; page-break-before: always; min-height: 720px; }

    body.printing-static-form * {
        visibility: hidden !important;
    }

    body.printing-static-form .static-form-modal,
    body.printing-static-form .static-form-modal * {
        visibility: visible !important;
    }

    body.printing-static-form .static-form-modal {
        position: absolute;
        inset: 0;
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    body.printing-static-form .static-form-toolbar,
    body.printing-static-form .static-form-tabs {
        display: none;
    }

    body.printing-static-form .static-form-sheet {
        overflow: visible;
        width: 930px;
        padding: 22px;
    }
}

.invoice-balance-open {
    color: var(--danger);
    font-weight: 800;
}

.invoice-balance-clear {
    color: var(--success);
    font-weight: 800;
}

[hidden] {
    display: none !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .quick-grid,
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .main-panel {
        padding: 12px;
    }

    .masthead,
    .page-head,
    .surface-toolbar,
    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .masthead-actions,
    .topbar-status {
        width: 100%;
    }

    .topbar {
        position: relative;
        padding: 14px;
        gap: 12px;
    }

    .topbar-brand {
        width: 100%;
        padding-right: 88px;
    }

    .topbar-logo {
        width: 32px;
        height: 44px;
    }

    .topbar-brand strong {
        font-size: 0.9rem;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 14px;
        right: 14px;
        display: inline-flex !important;
        min-width: 74px;
        z-index: 3;
    }

    .topbar-status {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        align-items: center;
    }

    .topbar-status > * {
        width: auto;
        justify-content: center;
        text-align: center;
    }

    .topbar-status > *:last-child {
        grid-column: auto;
    }

    .topnav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 92;
        display: grid;
        gap: 14px;
        padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
        border-radius: 22px 22px 0 0;
        border: none;
        box-shadow: 0 -20px 50px rgba(27, 41, 66, 0.24);
        transform: translateY(105%);
        transition: transform 0.22s ease;
    }

    .topnav-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .topnav-dropdown {
        display: contents;
    }

    .topnav-dropdown-menu {
        position: static;
        min-width: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        display: grid;
        gap: 8px;
    }

    .topnav-link {
        justify-content: center;
        min-height: 42px;
        padding: 10px 8px;
        border: none;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        text-align: center;
    }

    .topnav-dropdown-toggle {
        display: none;
    }

    .topnav-dropdown-link {
        justify-content: center;
        min-height: 42px;
        padding: 10px 8px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
        text-align: center;
    }

    .topnav-dropdown-link:hover,
    .topnav-dropdown-link.active {
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
    }

    .topnav-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .topnav-actions > * {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    body.mobile-nav-open .topnav {
        transform: translateY(0);
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 91;
        display: block;
        background: rgba(11, 20, 39, 0.46);
        backdrop-filter: blur(4px);
    }

    .floating-rail {
        display: none;
    }

    .grid.two,
    .grid.three,
    .stats,
    .quick-grid,
    .form-grid,
    .compact-grid,
    .info-grid,
    .mini-metrics {
        grid-template-columns: 1fr;
    }

    .flash-stack {
        right: 14px;
        left: 14px;
        max-width: unset;
    }

    .visit-services-cell {
        min-width: 240px;
    }
}

@media (max-width: 640px) {
    .page-title {
        font-size: 1.35rem;
    }

    .topbar {
        padding: 12px 12px 10px;
    }

    .topbar-kicker {
        font-size: 0.66rem;
    }

    .topbar-brand strong {
        font-size: 0.82rem;
    }

    .topbar-brand {
        gap: 10px;
    }

    .topnav-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topnav-link {
        min-height: 40px;
        padding: 8px 6px;
        font-size: 0.74rem;
    }

    .topnav-actions {
        grid-template-columns: 1fr;
    }

    .topnav {
        padding: 14px 12px calc(18px + env(safe-area-inset-bottom));
    }

    .hero-panel,
    .card {
        border-radius: 20px;
    }

    .card,
    .hero-panel,
    .record-section-body,
    .modal-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .metric-card,
    .quick-card,
    .list-item,
    .activity-line {
        padding: 12px;
    }
}

/* Dashboard reception-focused layout. */
.dashboard-welcome{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 26px;border-radius:22px;color:#fff;background:linear-gradient(118deg,#173a88,#2861d4 60%,#4b88ff);box-shadow:0 18px 38px rgba(37,84,190,.22)}.dashboard-welcome-copy{display:grid;gap:7px}.dashboard-eyebrow{color:rgba(255,255,255,.72);font-size:.68rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.dashboard-welcome h2{margin:0;font-size:clamp(1.35rem,2vw,1.85rem);letter-spacing:-.045em}.dashboard-welcome p{margin:0;color:rgba(255,255,255,.82);font-size:.86rem}.dashboard-welcome-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}.dashboard-welcome .btn.primary{background:#fff;color:#1f54be}.dashboard-welcome .btn.secondary{color:#fff;border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.13)}.dashboard-welcome .btn.ghost{color:#d7fff0;border-color:rgba(215,255,240,.3);background:rgba(6,104,74,.2)}.dashboard-welcome-stat{display:grid;min-width:176px;padding:14px 18px;border:1px solid rgba(255,255,255,.22);border-radius:16px;background:rgba(8,37,109,.2)}.dashboard-welcome-stat span,.dashboard-welcome-stat small{color:rgba(255,255,255,.74);font-size:.75rem;font-weight:700}.dashboard-welcome-stat strong{margin:2px 0;font-size:2rem;line-height:1;letter-spacing:-.06em}
.dashboard-today,.dashboard-actions,.dashboard-stock-card{padding:16px}.today-visit-list,.dashboard-feed{display:grid;gap:7px}.today-visit-row{display:grid;grid-template-columns:60px minmax(150px,.9fr) minmax(190px,1.5fr) 100px 95px;align-items:center;gap:14px;padding:10px 12px;border:1px solid #e5ecfb;border-radius:13px;color:var(--text);background:#fff}.today-visit-row:hover{border-color:#b9cdfb;box-shadow:0 10px 18px rgba(32,77,173,.08)}.today-visit-file,.dashboard-feed-number{display:inline-grid;place-items:center;min-height:34px;padding:5px 8px;border-radius:9px;color:#255ed4;background:#eaf1ff;font-size:.82rem;font-weight:800}.today-visit-owner{display:grid;gap:2px;min-width:0}.today-visit-owner strong,.dashboard-feed-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.82rem}.today-visit-owner small,.dashboard-feed-row small{color:var(--muted);font-size:.72rem}.today-visit-service{overflow:hidden;color:#3b547e;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;font-weight:700}.today-empty{display:flex;align-items:center;gap:12px;min-height:76px;padding:12px;border:1px dashed #b9cdfb;border-radius:14px;color:var(--text);background:#f8faff}.today-empty-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:#255ed4;background:#eaf1ff;font-size:1.35rem}.today-empty div{display:grid;gap:3px;flex:1}.today-empty small{color:var(--muted);font-size:.76rem}
.dashboard-stats{gap:10px}.dashboard-stats .metric-card{position:relative;overflow:hidden;padding:13px 14px;box-shadow:0 8px 20px rgba(41,78,157,.06)}.dashboard-stats .metric-card:after{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#4b78e5}.dashboard-stats .metric-visits:after{background:#14a475}.dashboard-stats .metric-invoices:after{background:#e29925}.dashboard-stats .metric-revenue:after{background:#8057d9}.trend.warning{color:#a96500;background:#fff1d7}.dashboard-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.dashboard-action-card{display:grid;grid-template-columns:40px 1fr;column-gap:10px;align-items:center;padding:12px;border:1px solid #e4ebfb;border-radius:14px;color:var(--text);background:linear-gradient(135deg,#fff,#f7f9ff)}.dashboard-action-card:hover{border-color:#b8cafa;box-shadow:0 12px 22px rgba(32,77,173,.1)}.dashboard-action-icon{display:grid;grid-row:span 2;place-items:center;width:38px;height:38px;border-radius:11px;color:#235bd3;background:#e7efff;font-size:.72rem;font-weight:800}.dashboard-action-card strong{font-size:.82rem}.dashboard-action-card small{color:var(--muted);font-size:.7rem}.dashboard-feed-row{display:grid;grid-template-columns:minmax(58px,auto) 1fr auto;align-items:center;gap:10px;padding:9px;border:1px solid #e8eefb;border-radius:12px;color:var(--text);background:#fff}.dashboard-feed-row:hover{border-color:#bfd0f9}.dashboard-feed-row>span:nth-child(2){display:grid;gap:2px;min-width:0}.dashboard-feed-number.invoice{min-width:78px;color:#5d3eb2;background:#f0ebff;font-size:.67rem}
@media(max-width:980px){.dashboard-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.today-visit-row{grid-template-columns:56px minmax(130px,1fr) 1fr auto}.today-visit-service{display:none}}@media(max-width:640px){.dashboard-welcome{align-items:stretch;flex-direction:column;padding:18px}.dashboard-welcome-stat{grid-template-columns:1fr auto;align-items:center;min-width:0}.dashboard-welcome-stat strong{grid-row:span 2;grid-column:2}.today-visit-row{grid-template-columns:48px 1fr auto;gap:9px}.today-visit-row .visit-type-badge{display:none}.today-empty{align-items:flex-start;flex-wrap:wrap}.today-empty .btn{width:100%}.dashboard-action-grid{grid-template-columns:1fr 1fr}.dashboard-feed-row{grid-template-columns:54px 1fr}.dashboard-feed-row>:last-child{grid-column:2;justify-self:start}}

.dashboard-welcome{border-radius:16px}.dashboard-welcome-stat{border-radius:12px}.today-visit-row,.today-empty,.dashboard-action-card{border-radius:10px}.today-visit-file,.dashboard-feed-number,.dashboard-action-icon{border-radius:8px}.dashboard-feed-row{border-radius:9px}

.dashboard-welcome{color:var(--text);border:1px solid #dfe8f8;background:radial-gradient(circle at 92% 35%,rgba(40,188,151,.12),transparent 20%),#fff;box-shadow:0 12px 28px rgba(41,78,157,.08)}.dashboard-eyebrow{color:#2f63df}.dashboard-welcome p{color:var(--muted)}.dashboard-welcome .btn.primary{color:#fff;background:#2f63df}.dashboard-welcome .btn.secondary{color:#2f63df;border-color:#cbdafe;background:#fff}.dashboard-welcome .btn.ghost{color:#008a69;border-color:#b8eadc;background:#effbf6}.dashboard-welcome-stat{border-color:#dce8f8;background:#f7faff}.dashboard-welcome-stat span,.dashboard-welcome-stat small{color:var(--muted)}.dashboard-welcome-stat strong{color:var(--primary-deep)}

.dashboard-stats .metric-card{gap:12px;min-height:154px;padding:16px;border-radius:14px}.dashboard-stats .metric-top{align-items:center}.dashboard-stats .metric-icon{width:42px;height:42px;border-radius:12px;color:#fff;background:#2f63df}.dashboard-stats .metric-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dashboard-stats .metric-visits .metric-icon{background:#00ae87}.dashboard-stats .metric-invoices .metric-icon{background:#f1a31f}.dashboard-stats .metric-revenue .metric-icon{background:#8356e8}.metric-chip{padding:5px 8px;border:1px solid #cddcff;border-radius:6px;color:#2860d6;background:#f4f7ff;font-size:.68rem;font-weight:800}.metric-chip.live{color:#008c6e;border-color:#a9eadb;background:#e8faf4}.metric-chip.warning{color:#9d6500;border-color:#ffe0a5;background:#fff7e7}.metric-body{display:grid;gap:4px}.dashboard-stats .metric-label{font-size:.8rem}.dashboard-stats .metric-value{font-size:clamp(1.55rem,2vw,1.9rem)}.dashboard-stats .metric-foot{margin-top:auto}

/* Simple, compact action buttons. */
.dashboard-welcome{min-height:112px;padding:18px 22px;border:1px solid #dce5f0;border-left:4px solid #315f8e;border-radius:8px;color:#182b45;background:#fff;box-shadow:none}.dashboard-welcome-copy{gap:3px}.dashboard-eyebrow{color:#60738a;font-size:.72rem;font-weight:700;letter-spacing:.045em;text-transform:uppercase}.dashboard-welcome h2{font-size:1.55rem;letter-spacing:-.03em}.dashboard-welcome-stat{min-width:174px;padding:3px 0 3px 22px;border:0;border-left:1px solid #dce5f0;border-radius:0;background:transparent}.dashboard-welcome-stat span,.dashboard-welcome-stat small{color:#657991}.dashboard-welcome-stat strong{color:#2456a6}@media(max-width:640px){.dashboard-welcome{min-height:0;padding:16px}.dashboard-welcome-stat{padding:14px 0 0;border-top:1px solid #dce5f0;border-left:0}}
.toolbar-btn,.btn{min-height:34px;border-radius:6px;box-shadow:none}.toolbar-btn:hover,.btn:hover{transform:none;box-shadow:none}.toolbar-btn.primary,.btn.primary{background:#2f63df;box-shadow:none}.btn.secondary{border-radius:6px;box-shadow:none}

/* Keep data tables compact and squared-off across the system. */
.table-wrap,.history-table-wrap,.treatment-table-wrap,.legacy-emt-table-wrap{border-radius:5px}.table-wrap table:first-child thead tr:first-child th:first-child{border-top-left-radius:5px}.table-wrap table:first-child thead tr:first-child th:last-child{border-top-right-radius:5px}.table-wrap table:last-child tbody tr:last-child td:first-child,.table-wrap table:last-child tfoot tr:last-child td:first-child{border-bottom-left-radius:5px}.table-wrap table:last-child tbody tr:last-child td:last-child,.table-wrap table:last-child tfoot tr:last-child td:last-child{border-bottom-right-radius:5px}

/* Dedicated login layout: keeps the brand, form fields, and actions visually separated. */
.login-page{min-height:100vh;background:radial-gradient(circle at 50% 18%,#fff 0,#f6f9ff 42%,#eaf1ff 100%)}.login-shell{box-sizing:border-box;display:grid;min-height:100vh;place-items:center;padding:28px 18px}.login-card{box-sizing:border-box;width:min(100%,490px);padding:34px 38px 36px;border:1px solid #e4ebf8;border-radius:18px;background:#fff;box-shadow:0 24px 65px rgba(29,65,137,.13)}.login-brand{display:grid;justify-items:center;gap:16px;margin-bottom:28px;text-align:center}.login-logo{display:block;width:132px;height:88px;object-fit:contain}.login-title-group{display:grid;gap:6px}.login-kicker{color:#2f63df;font-size:.72rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase}.login-title-group h1{margin:0;color:#1c2b4a;font-size:clamp(1.7rem,5vw,2.15rem);line-height:1.12;letter-spacing:-.045em}.login-form{display:grid;gap:18px}.login-form .field{display:grid;gap:7px;margin:0}.login-form .field label{color:#31558f;font-size:.86rem;font-weight:800}.login-form .field input{box-sizing:border-box;min-height:48px;padding:11px 14px;border:1px solid #cad9f2;border-radius:10px;background:#f9fbff;font-size:.96rem}.login-form .field input:focus{outline:0;border-color:#78a0fa;background:#fff;box-shadow:0 0 0 3px rgba(47,99,223,.12)}.login-remember{margin-top:-2px}.login-remember label{display:flex;align-items:center;gap:10px;color:#456293;font-size:.88rem;font-weight:600}.login-remember input{width:16px;height:16px;margin:0;accent-color:#2f63df}.login-submit{width:100%;min-height:46px;margin-top:2px;font-size:.96rem;font-weight:800}@media(max-width:540px){.login-shell{padding:18px}.login-card{padding:28px 22px 30px;border-radius:14px}.login-brand{gap:13px;margin-bottom:24px}.login-logo{width:118px;height:76px}.login-form{gap:16px}}

/* Login icon keeps the compact title accessible without showing a text heading. */
.login-icon-title{display:grid!important;place-items:center}.login-title-icon{width:56px;height:56px;fill:none;stroke:#2f63df;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* Split login: the club image carries the welcome message while the form stays focused. */
.login-page{background:#eef3fb}
.login-shell{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);place-items:stretch;gap:0;min-height:100vh;padding:0}
.login-visual{position:relative;display:flex;align-items:flex-end;min-height:100vh;padding:clamp(34px,6vw,86px);overflow:hidden;background:#174678 url('login-club.jpg') center/cover no-repeat;color:#fff}
.login-visual-overlay{position:absolute;inset:0;background:linear-gradient(135deg,rgba(10,45,86,.88),rgba(15,71,112,.34) 58%,rgba(8,32,62,.78))}
.login-visual-content{position:relative;z-index:1;max-width:440px}
.login-visual-logo{display:block;width:154px;height:auto;margin-bottom:28px;object-fit:contain;filter:brightness(0) invert(1)}
.login-visual-kicker{margin:0 0 12px;color:#e9c37b;font-size:.78rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase}
.login-visual h2{margin:0;color:#fff;font-size:clamp(2rem,4vw,3.7rem);line-height:1.05;letter-spacing:-.05em}
.login-visual-copy{max-width:360px;margin:22px 0 32px;color:rgba(255,255,255,.82);font-size:1rem;line-height:1.65}
.login-visual-location{display:inline-block;padding-top:16px;border-top:1px solid rgba(255,255,255,.32);color:rgba(255,255,255,.9);font-size:.82rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.login-card{align-self:center;justify-self:center;width:min(100%,500px);padding:48px 54px;border:0;border-radius:0;background:#fff;box-shadow:none}
.login-brand{margin-bottom:36px}
.login-logo{display:none}
.login-title-group h1{font-size:clamp(2rem,3vw,2.7rem)}
@media(max-width:820px){.login-shell{grid-template-columns:1fr}.login-visual{display:none}.login-card{width:min(100%,540px);padding:42px 28px;border-radius:0}.login-page{background:#f4f7fc}}

/* Match the Falcons list header to the Visits table header. */
.falcon-board thead th{padding:13px 15px!important;border:0!important;border-bottom:1px solid #e2e5ec!important;background:#F5F6FA!important;color:#111827!important;font-size:.72rem!important;font-weight:700!important;letter-spacing:0!important;line-height:1.2!important;text-transform:none!important}.falcon-board{border-collapse:separate;border-spacing:0}.falcon-board thead th:first-child{border-top-left-radius:5px}.falcon-board thead th:last-child{border-top-right-radius:5px}

/* Shared light table header used by Visits, Falcons, Invoices, and Receipts. */
.invoice-board thead th,.receipt-board thead th{padding:13px 15px!important;border:0!important;border-bottom:1px solid #e2e5ec!important;background:#F5F6FA!important;color:#111827!important;font-size:.72rem!important;font-weight:700!important;letter-spacing:0!important;line-height:1.2!important;text-transform:none!important}.invoice-board,.receipt-board{border-collapse:separate;border-spacing:0}.invoice-board thead th:first-child,.receipt-board thead th:first-child{border-top-left-radius:5px}.invoice-board thead th:last-child,.receipt-board thead th:last-child{border-top-right-radius:5px}

/* Seasonal medicine stock grid with inline autosave. */
.medicine-page-actions,.medicine-season-picker,.medicine-stock-note{display:flex;align-items:center;gap:10px}.medicine-page-actions{flex-wrap:wrap}.medicine-season-picker{margin:0}.medicine-season-picker label{color:#526783;font-size:.78rem;font-weight:700}.medicine-season-picker select{min-height:34px;padding:5px 28px 5px 10px;border:1px solid #d5e0f2;border-radius:6px;background:#fff;color:#1d2e4c;font-weight:700}.medicine-stock-card{padding:14px}.medicine-stock-note{justify-content:space-between;margin-bottom:12px;color:#536985;font-size:.78rem}.medicine-save-state{color:#17805b;font-weight:700}.medicine-table-wrap{margin-top:0}.medicine-stock-board{width:100%;min-width:1080px;border-collapse:separate;border-spacing:0;font-size:.8rem}.medicine-stock-board th{padding:11px 10px;border-bottom:1px solid #e2e5ec;background:#F5F6FA;color:#111827;font-size:.72rem;font-weight:700;text-align:left;white-space:nowrap}.medicine-stock-board td{padding:7px 6px;border-bottom:1px solid #e7ecf4;vertical-align:middle}.medicine-stock-board tbody tr:hover td{background:#f8fbff}.medicine-stock-board input{box-sizing:border-box;width:100%;min-width:70px;min-height:34px;padding:6px 8px;border:1px solid transparent;border-radius:5px;background:transparent;color:#172642;font:inherit}.medicine-stock-board input:hover{border-color:#d7e2f4;background:#fff}.medicine-stock-board input:focus{outline:0;border-color:#82a8fb;background:#fff;box-shadow:0 0 0 3px rgba(47,99,223,.1)}.medicine-stock-board td:nth-child(2) input{min-width:180px}.medicine-stock-board td:nth-child(8) input{min-width:130px}.medicine-available{color:#126d4e;font-weight:800;white-space:nowrap}.medicine-available.empty{color:#bf303d}.medicine-row-status{display:inline-block;color:#4e6483;font-size:.72rem;white-space:nowrap}.medicine-row-status.saved{color:#168255}.medicine-row-status.saving{color:#936314}.medicine-row-status.error{max-width:130px;color:#bd3040;font-weight:700;white-space:normal}.medicine-stock-board .icon-action{width:30px;height:30px}.medicine-stock-board thead th:first-child{border-top-left-radius:5px}.medicine-stock-board thead th:last-child{border-top-right-radius:5px}@media(max-width:700px){.medicine-page-actions{width:100%;justify-content:space-between}.medicine-stock-note{align-items:flex-start;flex-direction:column}.medicine-stock-card{padding:10px}}

.medicine-stock-board{min-width:1000px}.medicine-stock-board input:not([type=hidden]){box-sizing:border-box;width:100%;min-width:70px;min-height:34px;padding:6px 8px;border:1px solid transparent;border-radius:5px;background:transparent;color:#172642;font:inherit}.medicine-stock-board input:not([type=hidden]):hover{border-color:#d7e2f4;background:#fff}.medicine-stock-board input:not([type=hidden]):focus{outline:0;border-color:#82a8fb;background:#fff;box-shadow:0 0 0 3px rgba(47,99,223,.1)}.medicine-stock-board td:first-child input[name=name]{min-width:180px}.medicine-stock-board tfoot td{padding:10px;border-top:1px solid #cbd8ec;background:#edf3fb;color:#15294d;font-weight:800}.medicine-date-control{display:grid;grid-template-columns:minmax(96px,1fr) 0;position:relative}.medicine-date-control [data-expiry-native]{position:absolute;width:0!important;min-width:0!important;opacity:0;pointer-events:none}.medicine-date-control [data-expiry-open]{position:absolute;right:3px;top:4px;width:26px;height:26px;border:0;border-radius:4px;background:#edf3ff;color:#2d64dd;cursor:pointer;font-size:13px}.medicine-date-control [data-expiry-display]{padding-right:32px!important;min-width:120px!important}

.medicine-stock-board th{text-transform:none!important;letter-spacing:0!important}
.medicine-stock-board td:first-child input[name=name]{font-weight:600}
.medicine-extra.has-value{border-color:#e1c04e!important;background:#fff2a8!important;color:#151515!important;font-weight:600}.medicine-stock-note-status{justify-content:flex-end}.medicine-stock-board td:nth-child(9) input{min-width:130px}
[data-confirm-dialog]{width:min(640px,calc(100vw - 32px));max-width:640px;padding:26px 28px}[data-confirm-dialog] .modal-head{margin-bottom:22px}[data-confirm-dialog] .modal-head h3{margin:0 0 9px}[data-confirm-dialog] [data-confirm-message]{margin:0;max-width:570px;line-height:1.55}[data-confirm-dialog] .btn-row{gap:12px;margin-top:0}
