@font-face {
    font-family: "Rubik";
    src: url("../fonts/rubik/Rubik-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("../fonts/rubik/Rubik-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Rubik";
    src: url("../fonts/rubik/Rubik-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: #dd4b43;
    --brand-dark: #b93833;
    --identity-orange: #dd4b43;
    --identity-gray: #8791a5;
    --slate: var(--identity-gray);
    --ink: #1f2633;
    --muted: #697386;
    --line: #e6e9ef;
    --surface: #ffffff;
    --canvas: #f5f6f8;
    --success: #287a5b;
    --danger: #b83232;
    --sidebar: #171b23;
    --radius: 14px;
    --shadow: 0 7px 16px rgba(23, 27, 35, .24);
    --agenda-card-shadow: var(--shadow);
    --section-header-tint: rgba(221, 75, 67, .1);
    --section-header-border: rgba(221, 75, 67, .3);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Rubik", system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
    transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.vefort-icon {
    --vefort-icon-size: 1em;
    display: inline-block;
    flex: 0 0 auto;
    width: var(--vefort-icon-size);
    height: var(--vefort-icon-size);
    background-color: currentColor;
    -webkit-mask-image: var(--vefort-icon-source);
    mask-image: var(--vefort-icon-source);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.vefort-icon-address-card { --vefort-icon-source: url("../icons/vefort/address-card.svg"); }
.vefort-icon-bone { --vefort-icon-source: url("../icons/vefort/bone.svg"); }
.vefort-icon-book { --vefort-icon-source: url("../icons/vefort/book.svg"); }
.vefort-icon-bottle-water { --vefort-icon-source: url("../icons/vefort/bottle-water.svg"); }
.vefort-icon-calendar-days { --vefort-icon-source: url("../icons/vefort/calendar-days.svg"); }
.vefort-icon-cash-app { --vefort-icon-source: url("../icons/vefort/cash-app.svg"); }
.vefort-icon-chart-line { --vefort-icon-source: url("../icons/vefort/chart-line.svg"); }
.vefort-icon-clock { --vefort-icon-source: url("../icons/vefort/clock.svg"); }
.vefort-icon-file-circle-exclamation { --vefort-icon-source: url("../icons/vefort/file-circle-exclamation.svg"); }
.vefort-icon-file-contract { --vefort-icon-source: url("../icons/vefort/file-contract.svg"); }
.vefort-icon-gear { --vefort-icon-source: url("../icons/vefort/gear.svg"); }
.vefort-icon-gears { --vefort-icon-source: url("../icons/vefort/gears.svg"); }
.vefort-icon-heart-pulse { --vefort-icon-source: url("../icons/vefort/heart-pulse.svg"); }
.vefort-icon-house-chimney-medical { --vefort-icon-source: url("../icons/vefort/house-chimney-medical.svg"); }
.vefort-icon-paperclip { --vefort-icon-source: url("../icons/vefort/paperclip.svg"); }
.vefort-icon-right-from-bracket { --vefort-icon-source: url("../icons/vefort/right-from-bracket.svg"); }
.vefort-icon-scroll { --vefort-icon-source: url("../icons/vefort/scroll.svg"); }
.vefort-icon-stethoscope { --vefort-icon-source: url("../icons/vefort/stethoscope.svg"); }
.vefort-icon-syringe { --vefort-icon-source: url("../icons/vefort/syringe.svg"); }
.vefort-icon-user-check { --vefort-icon-source: url("../icons/vefort/user-check.svg"); }
.vefort-icon-user-clock { --vefort-icon-source: url("../icons/vefort/user-clock.svg"); }
.vefort-icon-user-gear { --vefort-icon-source: url("../icons/vefort/user-gear.svg"); }
.vefort-icon-user-nurse { --vefort-icon-source: url("../icons/vefort/user-nurse.svg"); }
.vefort-icon-users { --vefort-icon-source: url("../icons/vefort/users.svg"); }
.vefort-icon-wine-bottle { --vefort-icon-source: url("../icons/vefort/wine-bottle.svg"); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(221, 75, 67, 0.25);
    outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 26px 18px 18px;
    background: var(--sidebar);
    color: #fff;
    z-index: 20;
}

.brand { display: block; padding: 2px 6px 20px; }
.brand img { display: block; width: 174px; height: 68px; object-fit: contain; object-position: left center; }
.mobile-menu-toggle, .mobile-account { display: none; }
.sidebar-divider { flex: 0 0 auto; width: 100%; height: 1px; margin: 0 0 18px; background: #fff; opacity: .72; }

.main-nav { display: grid; gap: 7px; min-height: 0; padding-right: 3px; overflow-y: auto; }
.main-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 11px;
    color: #bfc5d0;
    font-weight: 500;
}
.main-nav a .vefort-icon { --vefort-icon-size: 21px; width: 22px; }
.main-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.main-nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 24px rgba(221, 75, 67, .25); }

.sidebar-user {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 32px;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding: 16px 4px 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user small { color: #9ba3b2; font-size: 11px; }
.avatar, .therapist-avatar {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}

.main-content { min-width: 0; padding: 34px 38px 48px; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 25px;
}
.page-header h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -.03em; }
.module-title, .agenda-title, .patients-title { display: flex; align-items: center; gap: 11px; }
.module-title .vefort-icon, .agenda-title .vefort-icon, .patients-title .vefort-icon { --vefort-icon-size: .78em; color: var(--sidebar); }
.section-title-with-icon { display: flex; align-items: center; gap: 8px; }
.section-title-with-icon .vefort-icon { --vefort-icon-size: .88em; color: var(--identity-orange); }
.page-header p { margin: 7px 0 0; color: var(--muted); }
.page-header .agenda-current-period { margin-top: 9px; color: var(--identity-orange); font-size: clamp(16px, 1.7vw, 20px); font-weight: 600; letter-spacing: -.015em; }
.eyebrow { color: var(--brand) !important; font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.header-actions, .form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions { display: flex; justify-content: center; gap: 10px; }

.button, .date-control {
    appearance: none;
    border: 1px solid var(--identity-gray);
    border-radius: 10px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 16px;
    background: var(--identity-gray);
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 7px 18px rgba(86, 96, 116, .24);
    transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover, .date-control:hover { border-color: color-mix(in srgb, var(--identity-gray) 84%, #000); background: color-mix(in srgb, var(--identity-gray) 84%, #000); box-shadow: 0 9px 20px rgba(86, 96, 116, .3); transform: translateY(-1px); }
.button.primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(221, 75, 67, .2); }
.button.primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); box-shadow: 0 9px 22px rgba(221, 75, 67, .28); }
.agenda-new-appointment-button { min-width: 178px; min-height: 48px; padding: 0 26px; border-radius: 12px; font-size: 14px; }
.button.subtle, .button.identity-gray { border-color: var(--identity-gray); background: var(--identity-gray); color: #fff; box-shadow: 0 7px 18px rgba(86, 96, 116, .24); }
.button.subtle:hover, .button.identity-gray:hover { border-color: color-mix(in srgb, var(--identity-gray) 84%, #000); background: color-mix(in srgb, var(--identity-gray) 84%, #000); }
.button.danger { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(221, 75, 67, .2); }
.button.danger:hover { border-color: var(--brand-dark); background: var(--brand-dark); box-shadow: 0 9px 22px rgba(221, 75, 67, .28); }
.button.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.button.wide { width: 100%; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.icon-button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 21px;
}
.icon-button:hover { background: rgba(128,128,128,.12); }

.flash { margin: 0 0 20px; padding: 13px 16px; border-radius: 11px; box-shadow: var(--shadow); }
.flash.success { border: 1px solid #bde5d4; background: #f1fbf7; color: #206349; }
.flash.error { border: 1px solid #f0c6c3; background: #fff5f4; color: #943832; }
.flash.warning { border: 1px solid #efd49e; background: #fff9ec; color: #7a581e; }
.flash ul { margin: 6px 0 0; padding-left: 20px; }

.agenda-toolbar {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.date-control { min-width: 38px; min-height: 36px; padding: 0; border-color: var(--line); font-size: 25px; }
.date-picker { display: flex; align-items: center; gap: 9px; }
.date-picker label { color: var(--muted); font-size: 12px; font-weight: 500; }
.date-picker input { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.agenda-date-picker { position: relative; }
.agenda-date-picker .picker-trigger { width: 220px; min-height: 38px; padding: 5px 9px; border-radius: 9px; }
.agenda-date-picker .picker-trigger svg, .agenda-date-picker .picker-trigger > .vefort-icon { width: 18px; height: 18px; }
.agenda-date-picker .picker-trigger small { font-size: 7px; }
.agenda-date-picker .picker-trigger strong { font-size: 9px; }
.agenda-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; color: var(--muted); font-size: 11px; }
.agenda-legend span, .detail-list dd { display: inline-flex; align-items: center; gap: 6px; }
.agenda-legend i, .detail-list i { width: 9px; height: 9px; border-radius: 50%; background: var(--legend-color); flex: none; }

.agenda-controls { margin-bottom: 15px; }
.agenda-view-switch {
    flex: none;
    width: fit-content;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-left: 4px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--identity-orange) 32%, #fff);
    border-radius: 12px;
    background: color-mix(in srgb, var(--identity-orange) 9%, #fff);
}
.agenda-view-switch a { min-width: 72px; padding: 6px 10px; border-radius: 8px; color: var(--brand-dark); font-size: 11px; font-weight: 500; text-align: center; }
.agenda-view-switch a:hover { background: color-mix(in srgb, var(--identity-orange) 17%, #fff); color: var(--brand-dark); }
.agenda-view-switch a.active { background: var(--identity-orange); color: #fff; box-shadow: 0 5px 13px rgba(221, 75, 67, .3); }
.agenda-controls .agenda-toolbar { margin-bottom: 0; border-color: #d8dce4; background: #fff; box-shadow: var(--agenda-card-shadow); }
.agenda-controls .picker-trigger { border-color: #d8dce4; background: #f8f9fb; color: var(--ink); box-shadow: none; }
.agenda-controls .picker-trigger:hover { border-color: #bbc1cc; background: #f0f2f5; }
.agenda-controls .agenda-date-picker .picker-trigger svg, .agenda-controls .agenda-date-picker .picker-trigger > .vefort-icon { color: var(--identity-orange); stroke: var(--identity-orange); }
.agenda-controls .agenda-date-picker .picker-trigger small, .agenda-controls .agenda-date-picker .picker-trigger > i { color: var(--muted); }
.agenda-controls .agenda-view-switch { border-color: color-mix(in srgb, var(--identity-orange) 32%, #fff); background: color-mix(in srgb, var(--identity-orange) 9%, #fff); }
.agenda-controls .agenda-view-switch a { color: var(--brand-dark); }
.agenda-controls .agenda-view-switch a:hover { background: color-mix(in srgb, var(--identity-orange) 17%, #fff); color: var(--brand-dark); }
.agenda-controls .agenda-view-switch a.active { background: var(--identity-orange); color: #fff; box-shadow: 0 5px 13px rgba(221, 75, 67, .3); }
.clinic-shifts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-left: auto; color: var(--muted); font-size: 11px; }
.clinic-shifts span { display: inline-flex; align-items: center; gap: 5px; }
.clinic-shifts strong { color: var(--ink); font-weight: 600; }
.shift-icon { width: 8px; height: 8px; border-radius: 50%; background: var(--identity-gray); }
.shift-icon.afternoon { background: var(--identity-orange); }
.agenda-controls .shift-icon.morning { background: var(--identity-gray); }
.agenda-controls .shift-icon.afternoon { background: var(--identity-orange); }

.agenda-scroll-hint { display: none; margin: -5px 0 10px; color: var(--muted); font-size: 12px; }
.agenda-frame { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--agenda-card-shadow); overscroll-behavior: contain; scrollbar-gutter: stable; }
.agenda-frame:focus-visible { outline: 3px solid rgba(221, 75, 67, .25); outline-offset: 3px; }
[data-scroll-region="true"]:focus-visible { outline: 3px solid rgba(221, 75, 67, .25); outline-offset: -3px; }
.schedule {
    --hour-height: 72px;
    min-width: calc(72px + (var(--therapist-count) * 210px));
    display: grid;
    grid-template-columns: 72px repeat(var(--therapist-count), minmax(210px, 1fr));
}
.schedule-header {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 82px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.97);
}
.time-heading { left: 0; z-index: 7; display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 500; }
.therapist-heading { display: flex; align-items: center; justify-content: center; gap: 10px; border-left: 1px solid var(--line); }
.therapist-heading .therapist-avatar { background: var(--therapist-color); }
.therapist-heading strong, .therapist-heading small { display: block; }
.therapist-heading strong { font-size: 14px; }
.therapist-heading small { color: var(--muted); font-size: 10px; }
.schedule-body { position: relative; height: var(--schedule-height, 864px); }
.time-column { position: sticky; left: 0; z-index: 4; border-right: 1px solid var(--line); background: #fbfbfc; }
.time-label { position: absolute; left: 0; width: 100%; transform: translateY(-7px); color: #8a93a3; font-size: 10px; text-align: center; }
.time-column .time-label:first-of-type { transform: translateY(4px); }
.therapist-day { border-right: 1px solid var(--line); background: #fff; }
.therapist-day:last-child { border-right: 0; }
.hour-line, .half-hour-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.half-hour-line { background: #f0f2f5; }
.shift-separator { position: absolute; left: 0; right: 0; z-index: 0; background: transparent; }
.shift-separator::after { position: absolute; top: 50%; right: 0; left: 0; height: 4px; border-radius: 4px; background: #c7ccd5; content: ''; transform: translateY(-50%); }

.agenda-period-frame { overflow: auto; scrollbar-gutter: auto; }
.week-agenda { min-width: 1120px; display: grid; grid-template-columns: repeat(7, minmax(155px, 1fr)); }
.week-day { min-height: 520px; border-right: 1px solid var(--line); background: #fff; }
.week-day:last-child { border-right: 0; }
.week-day > header { min-height: 86px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 1px 8px; padding: 14px; border-bottom: 1px solid rgba(221, 75, 67, .3); background: rgba(221, 75, 67, .1); color: var(--ink); }
.week-day > header span { color: var(--ink); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.week-day > header strong { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); font-size: 20px; }
.week-day > header small { color: var(--muted); font-size: 10px; }
.week-day.is-today > header { background: rgba(221, 75, 67, .1); }
.week-day.is-today > header strong { background: var(--brand); color: #fff; }
.week-appointments { display: grid; align-content: start; gap: 8px; padding: 10px; }
.week-appointments > p { margin: 24px 0; color: #9aa1ad; font-size: 11px; text-align: center; }
.week-appointment {
    width: 100%;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 0;
    border-left: 10px solid color-mix(in srgb, var(--appointment-color) 75%, #000);
    border-radius: 9px;
    background: color-mix(in srgb, var(--appointment-color) 90%, white);
    color: #fff;
    cursor: pointer;
    text-align: left;
}
.week-appointment:hover { filter: saturate(1.1); box-shadow: 0 7px 18px rgba(31,38,51,.1); }
.week-appointment > span { font-size: 10px; font-weight: 600; }
.week-appointment > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.week-appointment > small { overflow: hidden; color: rgba(255,255,255,.88); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.week-appointment > em { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: rgba(255,255,255,.88); font-size: 9px; font-style: normal; }
.week-appointment > em i { width: 7px; height: 7px; border-radius: 50%; background: var(--therapist-color); }
.week-appointment.status-cancelled, .month-appointment.status-cancelled { opacity: .48; text-decoration: line-through; }

.month-agenda { min-width: 980px; display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); }
.month-weekday { padding: 12px 14px; border-right: 1px solid rgba(221, 75, 67, .22); border-bottom: 1px solid rgba(221, 75, 67, .3); background: rgba(221, 75, 67, .1); color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-align: center; text-transform: uppercase; }
.month-weekday:nth-child(7) { border-right: 0; }
.month-day { position: relative; min-height: 132px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.month-day:nth-child(7n) { border-right: 0; }
.month-day.outside-month { background: #fafbfc; opacity: .56; }
.month-day-link { position: absolute; z-index: 1; inset: 0; background: transparent; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.month-day-link:hover { background: color-mix(in srgb, var(--identity-orange) 6%, transparent); }
.month-day-link:focus-visible { outline: 3px solid rgba(221, 75, 67, .28); outline-offset: -4px; }
.month-day > header { position: relative; z-index: 2; display: flex; justify-content: flex-end; align-items: center; gap: 6px; min-height: 27px; pointer-events: none; }
.month-day > header span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; font-weight: 600; }
.month-day > header small { order: -1; min-width: 20px; padding: 2px 5px; border-radius: 99px; background: #edf0f4; color: var(--muted); font-size: 9px; text-align: center; }
.month-day.is-today > header span { background: var(--brand); color: #fff; }
.month-appointments { position: relative; z-index: 2; display: grid; gap: 4px; margin-top: 5px; pointer-events: none; }
.month-appointment { width: 100%; display: grid; grid-template-columns: 15px 31px minmax(0,1fr); gap: 5px; align-items: center; padding: 4px 5px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--appointment-color) 90%, white); color: #fff; cursor: pointer; text-align: left; pointer-events: auto; }
.month-appointment:hover { background: color-mix(in srgb, var(--appointment-color) 95%, white); }
.month-appointment i { width: 15px; height: 15px; border-radius: 50%; background: color-mix(in srgb, var(--appointment-color) 75%, #000); }
.month-appointment span { font-size: 9px; font-weight: 600; }
.month-appointment strong { overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.month-more { padding: 3px 5px; color: var(--brand-dark); font-size: 9px; font-weight: 600; }

.appointment-card {
    position: absolute;
    left: 5px;
    right: 5px;
    z-index: 2;
    overflow: hidden;
    padding: 6px 9px;
    border: 0;
    border-left: 10px solid color-mix(in srgb, var(--appointment-color) 75%, #000);
    border-radius: 8px;
    background: color-mix(in srgb, var(--appointment-color) 90%, white);
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 4px 10px rgba(31, 38, 51, .07);
}
.appointment-card:hover { z-index: 4; filter: saturate(1.08); box-shadow: 0 8px 20px rgba(31, 38, 51, .14); }
.appointment-card span, .appointment-card strong, .appointment-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appointment-card span { font-size: 9px; font-weight: 500; }
.appointment-card strong { margin-top: 1px; font-size: 12px; }
.appointment-card small { opacity: .72; font-size: 10px; }
.appointment-card.is-compact { padding: 3px 8px; }
.appointment-card.is-compact span { font-size: 8px; }
.appointment-card.is-compact strong { margin-top: 0; font-size: 10px; }
.appointment-card.is-compact small { display: none; }
.appointment-card.status-cancelled { opacity: .48; text-decoration: line-through; }
.appointment-card.status-completed { opacity: .72; }
.appointment-card.status-in_progress { box-shadow: 0 0 0 2px color-mix(in srgb, var(--appointment-color) 45%, white), 0 8px 20px rgba(31, 38, 51, .14); }

.agenda-block { position: absolute; left: 5px; right: 5px; z-index: 1; overflow: hidden; padding: 6px 9px; border: 1px dashed #aeb5c2; border-radius: 8px; background: repeating-linear-gradient(-45deg, #f1f3f6, #f1f3f6 7px, #e9ecf1 7px, #e9ecf1 14px); color: #596273; }
.agenda-block strong, .agenda-block small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda-block strong { font-size: 10px; }
.agenda-block small { font-size: 9px; }

.empty-state { padding: 70px 20px; text-align: center; }
.empty-state h2 { margin: 0 0 7px; }
.empty-state p { color: var(--muted); }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; margin-bottom: 20px; }
.summary-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.summary-card span, .summary-card strong { display: block; }
.summary-card span { color: var(--muted); font-size: 12px; }
.summary-card strong { margin-top: 4px; font-size: 29px; }
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(315px, 1fr)); gap: 16px; }
.service-card { display: flex; flex-direction: column; gap: 15px; padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.service-card.recently-created, .service-card:target { border-color: var(--identity-orange); box-shadow: 0 0 0 3px rgba(221, 75, 67, .12), 0 12px 28px rgba(31, 38, 51, .16); outline: none; }
.service-created-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: -4px 0 0; padding: 10px 12px; border-radius: 10px; background: #edf9f4; color: #24664d; font-size: 11px; }
.service-created-notice strong, .service-created-notice span { display: block; }
.service-card.inactive { opacity: .67; box-shadow: none; }
.service-card-heading { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.service-card-heading { margin: -19px -19px 0; padding: 15px 19px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.color-dot { width: 12px; height: 38px; border-radius: 7px; background: var(--service-color); }
.service-card h2 { margin: 0; font-size: 17px; }
.service-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.status-pill { padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 500; }
.status-pill.on { background: #e5f6ee; color: #24664d; }
.status-pill.off { background: #edf0f4; color: #616a78; }
.patient-status-pill { min-width: 86px; padding: 7px 13px; color: #fff; text-align: center; font-size: 11px; font-weight: 700; }
.patient-status-pill.patient-active { background: var(--identity-orange); }
.patient-status-pill.patient-inactive { background: var(--sidebar); }
.patient-status-pill.patient-discharged { background: var(--identity-gray); }
.service-card details { border-top: 1px solid var(--line); padding-top: 12px; }
.service-card summary { color: var(--brand); cursor: pointer; font-size: 12px; font-weight: 500; }
.service-card details[open] summary { margin-bottom: 14px; }

.surface-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.section-heading p { margin: 0 0 4px; }
.surface-card > .section-heading { margin: -22px -22px 18px; padding: 15px 22px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.therapist-tabs { display: flex; gap: 9px; margin-bottom: 18px; overflow-x: auto; padding: 2px 2px 8px; }
.therapist-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 13px 0 7px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.therapist-tabs a span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--therapist-color); color: #fff; font-weight: 700; }
.therapist-tabs a.active { border-color: var(--brand); color: var(--brand); box-shadow: 0 5px 16px rgba(221, 75, 67, .12); }
.schedule-admin-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 18px; align-items: start; }
.schedule-admin-aside { display: grid; gap: 18px; }
.weekly-hours-form { display: grid; }
.weekday-row { display: grid; grid-template-columns: 90px minmax(300px, 1fr) 68px; gap: 12px; align-items: center; min-height: 132px; border-bottom: 1px solid var(--line); }
.weekday-toggle { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; }
.weekday-toggle input { width: 17px; height: 17px; accent-color: var(--brand); }
.time-range { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 7px; align-items: end; }
.time-range > span { align-self: center; color: var(--muted); text-align: center; }
.time-range label { display: grid; gap: 3px; }
.time-range label span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.time-range input { width: 100%; min-height: 38px; padding: 0 9px; border: 1px solid #d8dce4; border-radius: 8px; color: var(--ink); }
.time-range input:disabled { background: #f0f2f5; opacity: .55; }
.time-picker-inline { position: relative; min-width: 0; display: grid; gap: 3px; }
.time-picker-inline > label { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.time-picker-inline .picker-trigger { min-height: 38px; padding: 4px 7px; border-radius: 8px; }
.time-picker-inline .picker-trigger svg, .time-picker-inline .picker-trigger > .vefort-icon { width: 16px; height: 16px; }
.time-picker-inline .picker-trigger small { display: none; }
.time-picker-inline .picker-trigger strong { font-size: 10px; }
.time-picker-inline[data-time-disabled] .picker-trigger { background: #f0f2f5; color: var(--muted); cursor: not-allowed; opacity: .55; }
.datetime-picker-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 8px; }
.datetime-picker-part { position: relative; min-width: 0; }
.datetime-picker-part > label { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.datetime-picker-part .picker-trigger { min-height: 40px; padding: 4px 8px; border-radius: 8px; }
.datetime-picker-part .picker-trigger svg, .datetime-picker-part .picker-trigger > .vefort-icon { width: 16px; height: 16px; }
.datetime-picker-part .picker-trigger small { display: none; }
.datetime-picker-part .picker-trigger strong { font-size: 10px; }
.time-ranges-split { display: grid; gap: 8px; }
.shift-range { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; align-items: end; }
.shift-range > strong { padding-bottom: 12px; color: var(--ink); font-size: 10px; font-weight: 600; }
.weekday-row > small { color: var(--muted); font-size: 10px; text-align: right; }
.weekly-actions { margin-top: 18px; }
.muted-copy { color: var(--muted); font-size: 12px; }
.block-list { display: grid; gap: 10px; }
.block-list article { position: relative; display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--slate); border-radius: 10px; background: #fafbfc; }
.block-list article.cancelled { opacity: .55; }
.block-list article strong { font-size: 12px; }
.block-list article p { margin: 0; color: var(--muted); font-size: 11px; }
.block-list article small { color: #929aa8; font-size: 9px; }
.block-list article form { margin-top: 7px; }
.block-type { width: max-content; padding: 3px 7px; border-radius: 99px; background: #edf0f4; color: #586374; font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

.patient-search { margin-bottom: 16px; }
.patient-directory-eyebrow { font-size: 14px; letter-spacing: .14em; }
.patient-new-button { min-width: 205px; min-height: 50px; padding: 0 30px; border-radius: 12px; font-size: 14px; }
.patient-search form { display: flex; width: 100%; align-items: end; gap: 10px; }
.patient-search .search-field { flex: 1 1 auto; min-width: 0; }
.patient-search .status-filter { flex: 0 0 170px; width: 170px; }
.patient-search .button.primary { flex: 0 0 190px; min-width: 190px; min-height: 42px; padding: 0 30px; font-size: 14px; }
.directory-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.directory-heading p { margin: 0; }
.directory-heading small { color: var(--muted); }
.surface-card > .directory-heading { margin: -22px -22px 13px; padding: 15px 22px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.patient-table { display: grid; width: 100%; margin: 0 auto; }
.patient-row { display: grid; grid-template-columns: minmax(200px, 1.35fr) minmax(150px, 1fr) 110px 70px 85px minmax(176px, .8fr); gap: 12px; align-items: center; min-height: 68px; padding: 9px 5px; border-bottom: 1px solid var(--line); text-align: center; }
.patient-row > * { justify-self: center; }
.patient-row > :first-child { justify-self: start; text-align: left; }
.patient-row:last-child { border-bottom: 0; }
.patient-table-header { min-height: 35px; color: var(--muted); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.patient-row > div:not(.patient-identity) strong, .patient-row > div:not(.patient-identity) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-row > div:not(.patient-identity) strong { font-size: 12px; }
.patient-row > div:not(.patient-identity) small { color: var(--muted); font-size: 10px; }
.patient-identity { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.patient-identity > div { text-align: left; }
.patient-identity > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #f8e2e0; color: var(--brand); font-weight: 700; }
.patient-identity strong, .patient-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.patient-identity strong { font-size: 13px; }
.patient-identity small { color: var(--muted); font-size: 10px; }
.patient-record-button { min-width: 170px; white-space: nowrap; }
.simple-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }
.simple-pagination a { color: var(--brand); font-weight: 500; }
.simple-pagination span { color: #a3a9b4; }

.back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--brand); }
.patient-back-button { min-width: 170px; margin-bottom: 16px; }
.patient-file-eyebrow { margin-top: 0 !important; font-size: 14px; letter-spacing: .14em; }
.patient-birth-summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.patient-birth-summary strong { color: var(--identity-orange); font-size: 15px; font-weight: 700; }
.patient-birth-summary span { color: var(--muted); }
.patient-profile-header { align-items: center; }
.patient-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.patient-overview-grid .eyebrow { font-size: 12px; }
.profile-data-list { display: grid; grid-template-columns: 1fr; gap: 13px; margin: 16px 0 0; }
.profile-data-list div { min-width: 0; }
.profile-data-list dt { color: var(--muted); font-size: 11px; }
.profile-data-list dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }
.profile-data-wide { grid-column: span 2; }
.administrative-actions-card { display: grid; align-content: start; gap: 10px; }
.administrative-actions-card form { margin: 0; }
.patient-status-form { display: grid; gap: 10px; padding-top: 2px; }
.patient-status-form .form-group { text-align: left; }
.patient-administrative-note { display: grid; gap: 5px; margin: 4px 0 3px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #f8f9fb; }
.patient-administrative-note span { color: var(--muted); font-size: 11px; font-weight: 600; }
.patient-administrative-note p { margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.patient-information-card { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.patient-information-card > div { min-width: 0; flex: 1; }
.patient-information-card .eyebrow { margin-bottom: 12px; font-size: 12px; }
.patient-information-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.patient-information-grid > div { display: grid; min-width: 0; gap: 5px; }
.patient-information-grid span { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.patient-information-grid strong { overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.patient-information-card .status-pill { display: inline-flex; width: max-content; font-style: normal; }
.patient-anamnesis-button { min-width: 210px; min-height: 46px; justify-content: center; }
.patient-appointments-section { margin-bottom: 28px; }
.patient-history-heading { align-items: center; }
.patient-history-heading .eyebrow { font-size: 13px; }
.patient-history-heading h2 { font-size: 23px; }
.patient-history-summary { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-align: left; }
.patient-history-summary > strong { color: var(--identity-orange); font-size: 34px; line-height: 1; }
.patient-history-summary span, .patient-history-summary small { display: block; }
.patient-history-summary span { color: var(--ink); font-size: 12px; font-weight: 600; }
.patient-history-summary small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.appointment-history-table { display: grid; }
.appointment-history-table article { display: grid; grid-template-columns: 72px minmax(180px, 1fr) minmax(130px, .7fr) 120px 95px 105px; gap: 13px; align-items: center; min-height: 68px; border-bottom: 1px solid var(--line); }
.appointment-history-table article:last-child { border-bottom: 0; }
.appointment-history-table article > div:not(.appointment-history-date) strong, .appointment-history-table article > div:not(.appointment-history-date) small { display: block; }
.appointment-history-table article > div:not(.appointment-history-date) strong { font-size: 12px; }
.appointment-history-table article > div:not(.appointment-history-date) small { color: var(--muted); font-size: 10px; }
.appointment-history-date { display: flex; align-items: baseline; gap: 5px; }
.appointment-history-date strong { font-size: 22px; }
.appointment-history-date span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.clinical-note-badge { width: max-content; padding: 4px 7px; border-radius: 99px; background: #e9f6ef; color: #25624b; font-size: 9px; font-weight: 500; }

.clinical-section { margin-top: 28px; }
.clinical-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 14px; }
.clinical-section-heading h2 { margin: 0; font-size: 23px; }
.clinical-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.clinical-section-heading > small { color: var(--muted); font-size: 10px; }
.anamnesis-form { display: grid; gap: 18px; }
.anamnesis-page-header { margin-bottom: 22px; }
.anamnesis-patient-name { margin-bottom: 6px; font-size: clamp(32px, 4vw, 46px); line-height: 1.03; }
.anamnesis-patient-summary { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 15px; }
.anamnesis-patient-summary strong { color: var(--identity-orange); font-size: 17px; }
.anamnesis-status-pill { min-width: 124px; min-height: 37px; justify-content: center; padding: 9px 19px; font-size: 13px; }
.anamnesis-section { display: grid; gap: 17px; }
.anamnesis-section .section-heading { margin-bottom: 0; }
.anamnesis-section .section-heading h2 { margin: 2px 0 0; font-size: 21px; }
.anamnesis-section .section-heading small { color: var(--muted); font-size: 10px; }
.anamnesis-section .section-heading .anamnesis-updated-at { color: var(--identity-orange); font-size: 13px; font-weight: 700; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "reason signs" "therapist symptoms"; align-items: start; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form > .span-2 { grid-column: auto; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form > :nth-child(1) { grid-area: reason; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form > :nth-child(2) { grid-area: signs; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form > :nth-child(3) { grid-area: symptoms; }
.anamnesis-form > .anamnesis-section:first-of-type .grid-form > :nth-child(4) { grid-area: therapist; }
.anamnesis-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.anamnesis-secondary-grid { margin-top: 2px; }
.compact-field { margin-top: 14px; }
.compact-fieldset { min-height: 100%; padding-top: 13px; }
.anamnesis-toggle { display: flex; align-items: center; gap: 8px; color: #505a6a; font-size: 11px; }
.anamnesis-allergy-choice { display: flex; gap: 12px; }
.anamnesis-allergy-choice label { display: inline-flex; align-items: center; gap: 7px; min-width: 76px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: #505a6a; cursor: pointer; font-size: 12px; font-weight: 600; }
.anamnesis-allergy-choice input { accent-color: var(--identity-orange); }
.anamnesis-session-counter { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid rgba(221,75,67,.24); border-radius: 12px; background: rgba(221,75,67,.06); }
.anamnesis-session-counter div { display: flex; align-items: baseline; gap: 10px; }
.anamnesis-session-counter span { color: var(--muted); font-size: 12px; font-weight: 600; }
.anamnesis-session-counter strong { color: var(--identity-orange); font-size: 31px; line-height: 1; }
.session-add-button { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: var(--identity-orange); color: #fff; box-shadow: 0 5px 12px rgba(221,75,67,.32); cursor: pointer; font: inherit; font-size: 25px; line-height: 1; }
.session-add-button:hover { filter: brightness(.94); transform: translateY(-1px); }
.anamnesis-empty-sessions { margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.anamnesis-session-list { display: grid; gap: 10px; }
.anamnesis-treatment-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 18px; align-items: stretch; }
.anamnesis-treatment-fields { align-content: start; }
.anamnesis-treatment-plan { display: grid; align-content: start; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.anamnesis-treatment-options { display: grid; gap: 9px; }
.anamnesis-treatment-options label { display: flex; align-items: center; gap: 8px; color: #505a6a; cursor: pointer; font-size: 12px; font-weight: 600; }
.anamnesis-treatment-options input { accent-color: var(--identity-orange); }
.anamnesis-session-summary { display: grid; grid-template-columns: minmax(130px, .4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; }
.anamnesis-session-summary > div:first-child strong, .anamnesis-session-summary > div:first-child span { display: block; }
.anamnesis-session-summary > div:first-child strong { font-size: 13px; }
.anamnesis-session-summary > div:first-child span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.anamnesis-session-summary p { margin: 0; color: #404958; font-size: 11px; line-height: 1.45; }
.anamnesis-session-notes { padding-left: 12px; border-left: 1px solid var(--line); }
.anamnesis-session-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.anamnesis-session-flags span { padding: 4px 7px; border-radius: 99px; background: rgba(221,75,67,.12); color: var(--identity-orange); font-size: 9px; font-weight: 700; }
.anamnesis-session-actions { display: flex; gap: 7px; }
.anamnesis-session-actions .button { min-width: auto; }
.anamnesis-general-notes { margin-top: 4px; }
.anamnesis-attachments-section { margin-top: 18px; }
.anamnesis-attachment-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.anamnesis-attachment-group { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.anamnesis-attachment-group > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.anamnesis-attachment-group h3 { margin: 0; font-size: 14px; }
.anamnesis-attachment-group > header span, .anamnesis-attachment-upload small { color: var(--muted); font-size: 10px; }
.anamnesis-attachment-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.anamnesis-attachment { display: grid; gap: 7px; }
.anamnesis-attachment > a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.anamnesis-attachment img { display: block; width: 100%; height: 92px; object-fit: cover; }
.anamnesis-attachment form { margin: 0; }
.anamnesis-attachment form .button { width: 100%; }
.anamnesis-pdf-file { display: grid !important; min-height: 92px; place-content: center; gap: 5px; text-align: center; }
.anamnesis-pdf-file strong { color: var(--identity-orange); font-size: 18px; }
.anamnesis-pdf-file span { color: var(--muted); font-size: 10px; }
.anamnesis-attachment-upload { display: grid; gap: 8px; padding-top: 5px; border-top: 1px solid var(--line); }
.anamnesis-attachment-upload label { display: grid; gap: 6px; color: #404958; font-size: 11px; font-weight: 600; }
.anamnesis-attachment-upload input[type="file"] { max-width: 100%; color: var(--muted); font-size: 10px; }
.anamnesis-attachment-upload .button { justify-self: start; }
.clinical-session-modal, .anamnesis-attachment-modal { width: min(690px, calc(100% - 24px)); }
.clinical-session-toggle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.anamnesis-actions { justify-content: center; margin: 4px 0 24px; }
.anamnesis-review-card { margin-top: 18px; }
.anamnesis-review-form { display: grid; gap: 18px; }
.anamnesis-review-date { color: var(--identity-orange); font-size: 13px; font-weight: 700; }
.clinical-session-modal .modal-actions, .anamnesis-attachment-modal .modal-actions, .anamnesis-delete-modal .modal-actions { justify-content: center; }
.anamnesis-delete-modal { width: min(480px, calc(100% - 24px)); }
.anamnesis-delete-modal .modal-card { padding: 26px; }
.anamnesis-delete-content { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 14px; align-items: center; padding: 15px; border: 1px solid rgba(221,75,67,.22); border-radius: 13px; background: rgba(221,75,67,.06); }
.anamnesis-delete-content p { margin: 0; color: #505a6a; font-size: 13px; line-height: 1.55; }
.anamnesis-delete-content strong { display: inline; color: var(--ink); overflow-wrap: anywhere; }
.anamnesis-delete-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--identity-orange); color: #fff; box-shadow: 0 7px 16px rgba(221,75,67,.28); font-size: 23px; font-weight: 800; }
.anamnesis-delete-icon .vefort-icon { --vefort-icon-size: 21px; }
.clinical-history-form { display: grid; gap: 20px; }
.clinical-fieldset { margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 11px; }
.clinical-fieldset legend { padding: 0 6px; font-size: 12px; font-weight: 500; }
.clinical-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.clinical-check-grid label, .consent-fieldset label { color: #505a6a; font-size: 11px; }
.clinical-check-grid input, .condition-card input, .consent-fieldset input { accent-color: var(--brand); }
.condition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.condition-card { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc; }
.condition-card label { font-size: 12px; font-weight: 500; }
.condition-card textarea { width: 100%; padding: 9px; border: 1px solid #d8dce4; border-radius: 8px; resize: vertical; font-size: 11px; }
.clinical-alert-fields textarea { min-height: 95px; }
.consent-fieldset { display: grid; gap: 11px; background: #fbfbfc; }
.consent-fieldset small { color: var(--muted); font-size: 9px; }
.consent-recorded { margin: 0; color: var(--success); font-size: 11px; font-weight: 500; }
.clinical-restricted { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.clinical-restricted > span { font-size: 30px; }
.clinical-restricted h2 { margin: 0; font-size: 18px; }
.clinical-restricted p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.empty-clinical-notes { text-align: center; }
.empty-clinical-notes h3 { margin: 0; }
.empty-clinical-notes p { margin: 5px 0 0; color: var(--muted); }
.clinical-note-list { display: grid; gap: 12px; }
.clinical-note { padding: 0; overflow: hidden; }
.clinical-note > summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; cursor: pointer; list-style: none; }
.clinical-note > summary::-webkit-details-marker { display: none; }
.clinical-note > summary strong, .clinical-note > summary small { display: block; }
.clinical-note > summary strong { font-size: 13px; }
.clinical-note > summary small, .clinical-note > summary > span { color: var(--muted); font-size: 10px; }
.clinical-note-therapist, .clinical-note-signed { color: var(--identity-orange) !important; font-style: normal; font-weight: 700; }
.clinical-note[open] > summary { border-bottom: 1px solid var(--line); background: #fafbfc; }
.clinical-note-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 20px; }
.clinical-note-body h4 { margin: 0 0 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.clinical-note-body p { margin: 0; font-size: 12px; }
.note-signature, .addendum-list, .addendum-form { grid-column: span 2; }
.note-signature { padding: 12px; border-radius: 9px; background: #f2f5f8; color: var(--muted); font-size: 10px !important; }
.addendum-list { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.addendum-list article { padding: 12px; border-left: 3px solid var(--slate); border-radius: 7px; background: #f7f8fa; }
.addendum-list article strong { font-size: 11px; }
.addendum-list article p { margin: 4px 0; }
.addendum-list article small { color: var(--muted); font-size: 9px; }
.addendum-form { padding-top: 8px; border-top: 1px solid var(--line); }
.addendum-form > summary { color: var(--brand); cursor: pointer; font-size: 11px; font-weight: 500; }
.addendum-form form { margin-top: 12px; }
.signing-warning { margin: 16px 0 0; padding: 11px; border: 1px solid #f0d5a7; border-radius: 9px; background: #fff9ee; color: #7d581d; font-size: 10px; }
.clinical-note-modal { width: min(880px, calc(100% - 24px)); }
.clinical-note-form { padding: 24px 28px; }
.clinical-note-context { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr); gap: 16px; padding: 16px; border: 1px solid rgba(221,75,67,.22); border-radius: 13px; background: linear-gradient(135deg, rgba(221,75,67,.075), rgba(255,255,255,.7)); }
.clinical-note-context .form-group { gap: 6px; }
.clinical-note-context input[readonly] { border-color: rgba(135,145,165,.38); background: rgba(135,145,165,.1); color: #4f5969; font-weight: 600; cursor: default; }
.clinical-note-readonly-fields { display: grid; grid-template-columns: minmax(105px, .4fr) minmax(0, 1fr); gap: 11px; }
.clinical-note-fields { margin-top: 17px; gap: 13px 16px; }
.clinical-note-fields textarea { resize: vertical; }
.clinical-note-actions { justify-content: center; }
.clinical-note-actions .button { min-width: 170px; }

.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-form.compact { gap: 11px; }
.span-2 { grid-column: span 2; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    border: 1px solid #d8dce4;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    padding: 10px 11px;
}
.form-group input, .form-group select { min-height: 42px; }
.form-group input[type="color"] { padding: 4px; }
.form-group textarea { resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); }
.form-group small { color: var(--muted); font-size: 10px; }
.field-error { color: var(--danger) !important; }
.check-row { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.stack-form { display: grid; gap: 17px; }

.color-select-control { position: relative; }
.color-select-trigger { width: 100%; min-height: 42px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid #d8dce4; border-radius: 9px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease; }
.color-select-trigger:hover { border-color: #bbc1cc; }
.color-select-trigger[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(221, 75, 67, .12); }
.color-select-trigger strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 400; white-space: normal; }
.color-select-trigger i { color: var(--slate); font-size: 15px; font-style: normal; }
.color-select-control[data-invalid="true"] .color-select-trigger { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(184, 50, 50, .12); }
.color-identifier, .color-select-options > button > span:first-child { flex: 0 0 auto; width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; background: var(--identifier-color, var(--option-color, var(--slate))); box-shadow: 0 0 0 1px rgba(31, 38, 51, .13), 0 3px 7px color-mix(in srgb, var(--identifier-color, var(--option-color, var(--slate))) 32%, transparent); }
.color-select-options { position: absolute; z-index: 75; top: calc(100% + 7px); right: 0; left: 0; max-height: 310px; padding: 6px; border: 1px solid #dce0e7; border-radius: 12px; background: #fff; box-shadow: 0 18px 42px rgba(31, 38, 51, .2); overflow-y: auto; }
.color-select-options[hidden] { display: none; }
.color-select-options > button { width: 100%; min-height: 39px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px 9px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.color-select-options > button:hover, .color-select-options > button:focus-visible { background: #f4f5f7; }
.color-select-options > button[aria-selected="true"] { background: #fff1f0; box-shadow: inset 3px 0 var(--brand); }
.color-select-options > button strong, .color-select-options > button small { display: block; }
.color-select-options > button strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; white-space: normal; }
.color-select-options > button small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.service-color-options { min-width: 280px; }

.picker-field { position: relative; }
.picker-trigger { width: 100%; min-height: 52px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 11px; border: 1px solid #d8dce4; border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s ease, box-shadow .15s ease; }
.picker-trigger:hover { border-color: #bbc1cc; }
.picker-trigger[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(221, 75, 67, .12); }
.picker-trigger svg { width: 21px; height: 21px; fill: none; stroke: var(--brand); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.picker-trigger > .vefort-icon { --vefort-icon-size: 21px; color: var(--brand); }
.picker-trigger > span { display: grid; gap: 1px; min-width: 0; }
.picker-trigger small { color: var(--muted); font-size: 8px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.picker-trigger strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.picker-trigger > i { color: var(--slate); font-size: 15px; font-style: normal; }
.appointment-picker-panel { position: fixed; z-index: 80; top: 50%; left: 50%; width: 310px; max-height: calc(100vh - 48px); padding: 15px; border: 1px solid #dde1e8; border-radius: 15px; background: #fff; box-shadow: 0 26px 70px rgba(25, 31, 42, .28); overflow-y: auto; transform: translate(-50%, -50%); }
.appointment-picker-panel[hidden] { display: none; }
.agenda-date-picker .appointment-picker-panel { position: absolute; top: calc(100% + 8px); right: auto; bottom: auto; left: 0; max-height: min(430px, calc(100vh - 150px)); transform: none; }

.picker-panel-header { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 12px; }
.picker-panel-header strong { font-size: 13px; text-align: center; }
.picker-panel-header button { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #f3f4f6; color: var(--ink); cursor: pointer; font-size: 20px; }
.picker-panel-header button:hover { background: #e8eaee; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekdays { margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 600; text-align: center; text-transform: uppercase; }
.calendar-weekdays span { display: grid; place-items: center; min-height: 25px; }
.calendar-days button { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; font-size: 10px; }
.calendar-days button:hover { background: #f2f3f6; }
.calendar-days button:disabled { background: transparent; color: #d1d5dc; cursor: not-allowed; }
.calendar-days button[data-outside-month] { color: #b6bdc8; }
.calendar-days button[data-today] { box-shadow: inset 0 0 0 1px var(--slate); font-weight: 600; }
.calendar-days button[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: 0 7px 15px rgba(221, 75, 67, .24); font-weight: 600; }
.picker-text-action { width: 100%; margin-top: 10px; padding: 8px; border: 0; border-radius: 8px; background: #f5f6f8; color: var(--brand-dark); cursor: pointer; font-size: 9px; font-weight: 600; }
.picker-text-action:hover { background: #eceef2; }
.patient-calendar-popover { width: 342px; }
.patient-calendar-header { grid-template-columns: 34px minmax(0, 1fr) 34px; }
.calendar-period-selectors { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 6px; }
.calendar-period-selectors select { width: 100%; min-height: 34px; padding: 0 25px 0 8px; border: 1px solid #d8dce4; border-radius: 8px; background-color: #fff; color: var(--ink); font-size: 11px; font-weight: 600; }
.patient-birth-field .picker-trigger { min-height: 44px; }
.patient-birth-field .picker-trigger strong { color: var(--muted); font-weight: 500; }
.patient-birth-field .picker-trigger.has-value strong { color: var(--ink); }

.clock-popover { right: auto; left: 50%; width: 316px; }
.clock-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.clock-panel-heading span { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.clock-panel-heading strong { color: var(--brand); font-size: 18px; }
.clock-period { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; width: 154px; margin: 0 auto 12px; padding: 4px; border-radius: 10px; background: #f1f3f6; }
.clock-period button, .clock-minutes button { min-height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 600; }
.clock-period button[aria-pressed="true"], .clock-minutes button[aria-pressed="true"] { background: #fff; color: var(--brand-dark); box-shadow: 0 3px 10px rgba(31, 38, 51, .1); }
.analog-clock { position: relative; width: 218px; height: 218px; margin: 0 auto 13px; border: 1px solid #dfe3e9; border-radius: 50%; background: radial-gradient(circle at center, #fff 0 54%, #f8f9fb 55% 100%); box-shadow: inset 0 0 0 7px #fff, 0 12px 28px rgba(31, 38, 51, .1); }
.analog-clock::before { position: absolute; inset: 14px; border: 1px solid #eef0f3; border-radius: inherit; content: ''; }
.clock-hour { position: absolute; z-index: 3; top: 50%; left: 50%; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #3b4453; cursor: pointer; font-size: 9px; font-weight: 600; transform: translate(-50%, -50%) rotate(var(--clock-angle)) translateY(-82px) rotate(calc(0deg - var(--clock-angle))); }
.clock-hour:hover:not(:disabled) { background: #f2d9d7; color: var(--brand-dark); }
.clock-hour[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: 0 5px 13px rgba(221, 75, 67, .28); }
.clock-hour:disabled { color: #c9ced6; cursor: not-allowed; }
.clock-hand { position: absolute; z-index: 2; bottom: 50%; left: 50%; border-radius: 99px; transform-origin: 50% 100%; pointer-events: none; transition: transform .2s ease; }
.hour-hand { width: 4px; height: 52px; background: #374151; }
.minute-hand { width: 2px; height: 72px; background: var(--brand); }
.clock-pin { position: absolute; z-index: 4; top: 50%; left: 50%; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 1px rgba(221, 75, 67, .3); transform: translate(-50%, -50%); }
.clock-minutes { display: grid; grid-template-columns: repeat(2, 70px); justify-content: center; gap: 6px; margin-bottom: 12px; }
.clock-minutes button { background: #f2f4f7; }
.clock-confirm { width: 100%; min-height: 37px; font-size: 10px; }

.patient-combobox { position: relative; }
.patient-combobox-options {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 40;
    max-height: 240px;
    padding: 6px;
    border: 1px solid #d9dde5;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(31, 38, 51, .18);
    overflow-y: auto;
}
.patient-combobox-options[hidden], .patient-combobox-options [hidden] { display: none; }
.patient-combobox-options button { width: 100%; display: flex; align-items: center; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.patient-combobox-options button:hover, .patient-combobox-options button[data-active] { background: #fff1f0; }
.patient-combobox-options button[aria-selected="true"] { box-shadow: inset 3px 0 var(--brand); }
.patient-combobox-options button span, .patient-combobox-options button strong, .patient-combobox-options button small { display: block; }
.patient-combobox-options button strong { font-size: 12px; }
.patient-combobox-options button small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.patient-combobox-options p { margin: 0; padding: 16px 10px; color: var(--muted); font-size: 11px; text-align: center; }
.patient-selection { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 9px 10px 9px 12px; border: 1px solid #f2cbc8; border-radius: 10px; background: #fff5f4; }
.patient-selection[hidden] { display: none; }
.patient-selection span { display: grid; gap: 1px; min-width: 0; }
.patient-selection small { color: var(--brand-dark); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.patient-selection strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.patient-selection button { flex: 0 0 auto; width: 28px; height: 28px; border: 0; border-radius: 8px; background: #fff; color: var(--brand-dark); cursor: pointer; font-size: 18px; }
.patient-selection button:hover { background: #fee7e5; }
.appointment-form-note { display: grid; gap: 3px; margin-top: -4px; padding: 10px 12px; border-radius: 9px; background: #f6f7f9; color: var(--muted); }
.appointment-form-note span { font-size: 11px; }
.appointment-form-note small { font-size: 10px; }

.modal { width: min(610px, calc(100% - 24px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 17px; background: transparent; box-shadow: 0 28px 80px rgba(20, 25, 35, .28); overflow: auto; }
.appointment-modal { width: min(680px, calc(100% - 24px)); }
.appointment-detail-modal { width: min(760px, calc(100% - 24px)); }
.patient-directory-modal { width: min(760px, calc(100% - 24px)); box-shadow: 0 28px 74px rgba(20, 25, 35, .38); }
.patient-directory-modal .modal-header { margin-bottom: 14px; }
.patient-directory-modal .grid-form { gap: 8px 16px; }
.patient-directory-modal .form-group { gap: 4px; }
.patient-directory-modal .form-group input, .patient-directory-modal .form-group select, .patient-directory-modal .patient-birth-field .picker-trigger { min-height: 38px; }
.modal::backdrop { background: rgba(18, 23, 31, .56); backdrop-filter: blur(3px); }
.modal-card { display: block; margin: 0; padding: 24px; border: 0; border-radius: 17px; background: #fff; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 22px; }
.modal-header h2 { margin: 0; font-size: 23px; }
.modal-header p { margin: 0 0 4px; }
.modal-actions { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.appointment-modal-actions { justify-content: center; }
.patient-modal-actions { justify-content: center; }
.patient-directory-modal .patient-modal-actions { margin-top: 12px; padding-top: 12px; }
.patient-modal-actions .button { min-width: 154px; }
.appointment-detail { min-width: 0; }
.appointment-detail .modal-header .eyebrow { font-size: 13px; }
.appointment-detail .modal-header h2 { font-size: 25px; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list div { display: grid; grid-template-columns: 150px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: 13px; }
.detail-list dd { margin: 0; font-size: 14px; font-weight: 500; }
.appointment-entity-badge { display: inline-flex; align-items: center; min-height: 29px; padding: 5px 11px; border-radius: 8px; background: var(--entity-color, var(--identity-gray)); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.25; text-shadow: 0 1px 2px rgba(0, 0, 0, .2); }

.appointment-status { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border-radius: 99px; background: #edf0f4; color: #566171; font-size: 11px; font-weight: 500; }
.appointment-status.status-confirmed { background: #e8f1ff; color: #245b9c; }
.appointment-status.status-arrived { background: #e8f8f2; color: #256b52; }
.appointment-status.status-in_progress { background: #fff0de; color: #905216; }
.appointment-status.status-completed { background: #e2f4eb; color: #205d46; }
.appointment-status.status-no_show, .appointment-status.status-cancelled { background: #f7e9e8; color: #983a34; }

.status-actions { margin-top: 18px; padding: 15px; border: 1px solid var(--identity-gray); border-radius: 11px; background: rgba(135, 145, 165, .35); color: var(--ink); }
.status-actions h3, .audit-timeline h3 { margin: 0 0 11px; font-size: 12px; }
.status-actions > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.status-actions .status-action-button { border-color: var(--identity-orange); background: var(--identity-orange); color: #fff; box-shadow: 0 5px 12px rgba(31, 38, 51, .18); }
.status-actions .status-action-button:hover { border-color: var(--brand-dark); background: var(--brand-dark); }
.appointment-detail-actions { align-items: center; justify-content: center; flex-wrap: wrap; }
.appointment-detail-actions > form { display: flex; }
.appointment-detail-actions > .button, .appointment-detail-actions > form .button { min-height: 42px; padding-right: 14px; padding-left: 14px; white-space: nowrap; }

.appointment-cancel-modal { width: min(520px, calc(100% - 24px)); }
.appointment-cancel-modal .modal-card { padding: 26px; }
.appointment-cancel-content { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; align-items: center; padding: 15px; border: 1px solid rgba(221,75,67,.24); border-radius: 13px; background: rgba(221,75,67,.07); }
.appointment-cancel-content > div { min-width: 0; }
.appointment-cancel-content strong { display: block; color: var(--ink); font-size: 14px; }
.appointment-cancel-content p { margin: 4px 0 0; color: #596273; font-size: 12px; line-height: 1.5; }
.appointment-cancel-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: var(--identity-orange); color: #fff; box-shadow: 0 8px 18px rgba(221,75,67,.3); font-size: 24px; font-weight: 800; }
.appointment-cancel-summary { display: grid; gap: 0; margin: 16px 0 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.appointment-cancel-summary div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 48px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.appointment-cancel-summary div:last-child { border-bottom: 0; }
.appointment-cancel-summary dt { color: var(--muted); font-size: 11px; }
.appointment-cancel-summary dd { min-width: 0; margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.appointment-cancel-modal .modal-actions { justify-content: center; }
.appointment-cancel-modal .modal-actions .button { min-width: 170px; }

.audit-timeline { margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }
.audit-timeline ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.audit-timeline li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 9px; }
.audit-timeline li > span { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(221, 75, 67, .11); }
.audit-timeline strong, .audit-timeline small { display: block; }
.audit-timeline strong { font-size: 11px; }
.audit-timeline small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.cash-closed-layout { display: grid; grid-template-columns: minmax(280px, 390px) minmax(0, 1fr); gap: 22px; align-items: start; }
.open-cash-card { display: grid; gap: 11px; padding: 27px; }
.open-cash-card h2, .open-cash-card p { margin: 0; }
.open-cash-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.6; }
.cash-state-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 5px; border-radius: 16px; background: var(--brand); color: #fff; font-size: 22px; font-weight: 600; box-shadow: 0 10px 24px rgba(221, 75, 67, .22); }
.cash-state-icon .vefort-icon { --vefort-icon-size: 23px; }
.cash-session-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 19px; padding: 15px 18px; border: 1px solid var(--identity-orange); border-radius: 12px; background: var(--identity-orange); box-shadow: 0 10px 24px rgba(221, 75, 67, .18); }
.cash-session-banner > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; }
.cash-session-banner strong { color: #fff; font-size: 12px; }
.cash-session-banner small { grid-column: 2; color: rgba(255, 255, 255, .82); font-size: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255, 255, 255, .18); }
.cash-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.cash-summary-grid article { display: grid; gap: 5px; min-height: 100px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.cash-summary-grid span, .cash-summary-grid small { color: var(--muted); font-size: 10px; }
.cash-summary-grid strong { align-self: end; font-size: 20px; }
.cash-summary-grid .outflow { color: var(--danger); }
.cash-summary-grid .expected-card { border-color: #efbeb9; background: linear-gradient(145deg, #fff, #fff5f3); }
.cash-summary-grid .expected-card strong { color: var(--brand); }
.cash-operation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.cash-transactions { min-width: 0; }
.cash-list { display: grid; gap: 0; }
.cash-list article { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.cash-list article:first-child { border-top: 0; }
.cash-list article.cancelled { opacity: .48; }
.cash-list article.cancelled > div { text-decoration: line-through; }
.cash-list article > div { min-width: 0; }
.cash-list article > div strong, .cash-list article > div small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-list article > div strong { font-size: 11px; }
.cash-list article > div small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.cash-list article > strong { font-size: 12px; white-space: nowrap; }
.cash-list-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; font-weight: 600; }
.cash-list-icon.income { background: #e6f5ee; color: #237152; }
.cash-list-icon.expense { background: #fbe9e7; color: #a4433d; }
.cash-cancel-control { position: relative; }
.cash-cancel-control summary { color: var(--danger); cursor: pointer; font-size: 9px; }
.cash-cancel-control form { position: absolute; z-index: 3; right: 0; display: grid; gap: 7px; width: 215px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 15px 35px rgba(28, 34, 44, .16); }
.cash-cancel-control input { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.cash-cancel-control button { padding: 7px; border: 0; border-radius: 7px; background: var(--identity-orange); color: #fff; box-shadow: 0 5px 12px rgba(221, 75, 67, .22); cursor: pointer; }
.close-cash-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 17px; border-radius: 11px; background: #f3f5f8; }
.close-cash-summary span { color: var(--muted); font-size: 11px; }
.close-cash-summary strong { font-size: 22px; }
.cash-history { min-width: 0; }
.cash-history-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: 10px; margin-bottom: 17px; }
.cash-history-table { min-width: 720px; }
.cash-history { overflow-x: auto; }
.cash-history-row { display: grid; grid-template-columns: .75fr 1fr .8fr .8fr .8fr 1fr; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 10px; }
.cash-history-row.header { border: 0; color: var(--muted); font-size: 9px; font-weight: 500; text-transform: uppercase; }
.cash-history-row .negative { color: var(--danger); }
.cash-history-row .positive { color: #237152; }

.receipt-page-header { max-width: 1100px; margin-right: auto; margin-left: auto; }
.receipt-actions { align-items: center; flex-wrap: wrap; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--agenda-card-shadow); }
.receipt-actions .button { min-width: 126px; min-height: 46px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.receipt-actions .receipt-back { border-color: var(--identity-gray); background: var(--identity-gray); color: #fff; }
.receipt-actions .receipt-pdf { border-color: var(--identity-orange); background: var(--identity-orange); color: #fff; }
.button.whatsapp, .receipt-actions .receipt-whatsapp { border-color: #248a5a; background: #248a5a; color: #fff; box-shadow: 0 8px 20px rgba(36, 138, 90, .2); }
.button.whatsapp:hover, .receipt-actions .receipt-whatsapp:hover { border-color: #17663f; background: #17663f; box-shadow: 0 9px 22px rgba(36, 138, 90, .28); }
.receipt-paper { position: relative; max-width: 720px; margin: 0 auto; padding: 44px 52px; border: 1px solid #e3e5e9; border-radius: 3px; background: #fff; box-shadow: 0 24px 60px rgba(27, 33, 43, .1); overflow: hidden; }
.receipt-paper::before { position: absolute; top: 0; right: 0; left: 0; height: 7px; background: linear-gradient(90deg, var(--brand), #f49a77 48%, var(--slate)); content: ''; }
.receipt-brand { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.receipt-brand img { width: 190px; height: 66px; object-fit: contain; object-position: left center; }
.receipt-brand div { text-align: right; }
.receipt-brand span, .receipt-brand strong { display: block; }
.receipt-brand span { color: var(--muted); font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.receipt-brand strong { margin-top: 5px; font-size: 14px; }
.receipt-cancelled { margin: 22px 0 -5px; padding: 12px; border: 2px solid var(--danger); color: var(--danger); font-size: 20px; font-weight: 700; letter-spacing: .18em; text-align: center; transform: rotate(-2deg); }
.receipt-amount { display: grid; place-items: center; gap: 8px; padding: 36px 0; text-align: center; }
.receipt-amount span { color: var(--muted); font-size: 11px; }
.receipt-amount strong { color: var(--brand); font-size: 38px; line-height: 1; }
.receipt-amount strong small { font-size: 13px; }
.receipt-amount em { padding: 5px 10px; border-radius: 99px; background: #f1f3f6; color: #5f6877; font-size: 9px; font-style: normal; }
.receipt-details { margin: 0; border-top: 1px solid var(--line); }
.receipt-details div { display: grid; grid-template-columns: 145px 1fr; gap: 20px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.receipt-details dt { color: var(--muted); font-size: 10px; }
.receipt-details dd { margin: 0; font-size: 11px; font-weight: 500; text-align: right; }
.receipt-cancellation-detail { display: grid; gap: 4px; margin-top: 20px; padding: 13px; border-radius: 9px; background: #fbeceb; color: #923d38; font-size: 10px; }
.receipt-footer { display: grid; gap: 5px; padding-top: 33px; text-align: center; }
.receipt-footer p { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.receipt-footer strong { color: #7b4d21; font-size: 9px; text-transform: uppercase; }
.receipt-footer small { color: var(--muted); font-size: 8px; }
.receipt-phone-warning { max-width: 720px; margin: 13px auto 0; color: var(--muted); font-size: 10px; text-align: center; }
.receipt-products { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }
.receipt-products h2 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.receipt-products > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 10px; }
.receipt-products span strong, .receipt-products span small { display: block; }
.receipt-products span small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.integrity-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 13px 16px; border: 1px solid #cbddeb; border-radius: 11px; background: #f1f8fd; color: #395b72; }
.integrity-notice > span { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%; background: #dcecf7; font-weight: 600; }
.integrity-notice p { margin: 0; font-size: 10px; }
.method-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.method-card { display: grid; gap: 16px; }
.method-card.inactive { opacity: .62; }
.method-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.method-card > header { margin: -22px -22px 0; padding: 15px 22px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.method-card h2, .method-card p { margin: 0; }
.method-card h2 { font-size: 14px; }
.method-card p { margin-top: 3px; color: var(--muted); font-size: 8px; }
.method-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: #edf0f4; color: #5f6878; font-size: 15px; font-weight: 600; }
.method-icon.cash { background: #e6f5ee; color: #237152; }
.method-icon .vefort-icon { --vefort-icon-size: 17px; }
.method-kind { display: grid; gap: 3px; padding: 11px; border-radius: 9px; background: #f7f8fa; }
.method-kind strong { font-size: 10px; }
.method-kind small { color: var(--muted); font-size: 8px; }
.method-card details > summary { color: var(--brand); cursor: pointer; font-size: 10px; font-weight: 500; }
.method-card details form { margin-top: 13px; }

.product-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.summary-card.warning strong { color: #9a631f; }
.product-search { margin-bottom: 18px; }
.product-search form { display: flex; align-items: end; gap: 12px; }
.product-search .form-group { flex: 1; }

/* Punto de venta de bebidas */
.product-pos-header { margin-bottom: 18px; }
.pos-closed-state { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px; }
.pos-closed-state > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--identity-orange) 12%, #fff); color: var(--brand); font-size: 22px; font-weight: 700; }
.pos-closed-state h2, .pos-closed-state p { margin: 0; }
.pos-closed-state h2 { margin-top: 3px; font-size: 18px; }
.pos-closed-state p:last-child { margin-top: 4px; color: var(--muted); font-size: 12px; }
.beverage-pos { --pos-checkout-height: 632px; margin-bottom: 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--agenda-card-shadow); }
.beverage-pos-heading, .pos-cart > header, .inventory-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.beverage-pos-heading { margin-bottom: 16px; }
.beverage-pos-heading h2, .beverage-pos-heading p, .pos-cart h2, .pos-cart p { margin: 0; }
.beverage-pos-heading h2 { margin-top: 3px; font-size: 21px; }
.pos-open-session { padding: 8px 11px; border-radius: 999px; background: color-mix(in srgb, #2b9d71 12%, #fff); color: #265e49; font-size: 11px; font-weight: 700; }
.pos-search-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.pos-search-row .form-group { margin: 0; }
.pos-search-row .form-group > span { display: block; margin-bottom: 5px; color: var(--brand-dark); font-size: 11px; font-weight: 700; }
.pos-search-feedback { min-height: 17px; margin: 4px 0 11px; color: var(--brand); font-size: 11px; font-weight: 600; }
.beverage-pos-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(285px, .42fr); gap: 18px; height: var(--pos-checkout-height); min-height: 0; align-items: stretch; }
.pos-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); align-content: start; gap: 12px; min-height: 0; padding-right: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.pos-product-card { display: grid; gap: 8px; min-height: 205px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfd; transition: transform .16s ease, box-shadow .16s ease; }
.pos-product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pos-product-card[hidden] { display: none; }
.pos-product-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pos-product-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--identity-orange) 10%, #fff); color: var(--brand); }
.pos-product-icon .vefort-icon { --vefort-icon-size: 15px; }
.stock-state { color: #31815f; font-size: 9px; font-weight: 700; }
.stock-state.low { color: #b47822; }
.pos-product-card h3 { margin: 1px 0 0; color: var(--brand-dark); font-size: 14px; line-height: 1.3; }
.pos-product-card p { overflow: hidden; margin: 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pos-product-card > strong { align-self: end; color: var(--brand-dark); font-size: 17px; }
.pos-product-card .button { width: 100%; }
.pos-empty-catalog { display: grid; gap: 5px; min-height: 150px; place-content: center; grid-column: 1 / -1; padding: 20px; border: 1px dashed #cfd5df; border-radius: 14px; color: var(--muted); text-align: center; }
.pos-empty-catalog strong { color: var(--brand-dark); }
.pos-cart { position: sticky; top: 18px; display: grid; grid-template-rows: auto minmax(90px, 1fr); gap: 14px; align-self: stretch; height: 100%; min-height: 0; box-sizing: border-box; padding: 17px; }
.pos-cart > header { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pos-cart h2 { margin-top: 3px; font-size: 19px; }
.pos-clear-cart { padding: 0; border: 0; background: transparent; color: var(--identity-gray); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.pos-clear-cart:disabled { opacity: .45; cursor: default; }
.pos-cart-items { display: grid; gap: 9px; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.pos-cart-empty { margin: auto 0; color: var(--muted); font-size: 12px; text-align: center; }
.pos-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid #edf0f4; }
.pos-cart-line strong, .pos-cart-line small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-cart-line strong { color: var(--brand-dark); font-size: 12px; }
.pos-cart-line small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.pos-quantity-controls { display: grid; grid-template-columns: 25px 36px 25px; align-items: center; }
.pos-quantity-controls button { width: 25px; height: 25px; padding: 0; border: 1px solid #d9dde5; border-radius: 7px; background: #fff; color: var(--brand-dark); cursor: pointer; font-size: 16px; line-height: 1; }
.pos-quantity-controls button:disabled { cursor: default; opacity: .45; }
.pos-quantity-controls input { width: 34px; height: 25px; padding: 0 2px; border: 0; background: transparent; color: var(--brand-dark); font-size: 11px; font-weight: 700; text-align: center; }
.pos-cart .form-group { margin: 0; }
.pos-payment-warning { margin: 0; color: #a4544d; font-size: 10px; }
.pos-total { display: flex; align-items: end; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pos-total strong { color: var(--brand-dark); font-size: 24px; }
.pos-cash-tender { display: grid; gap: 10px; padding: 13px; border: 1px solid color-mix(in srgb, var(--identity-orange) 24%, #fff); border-radius: 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--identity-orange) 8%, #fff), #fff); }
.pos-cash-tender[hidden] { display: none !important; }
.pos-cash-tender-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pos-cash-tender-heading span { color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.pos-cash-tender-heading small { color: var(--muted); font-size: 9px; }
.pos-cash-tender .form-group { display: grid; gap: 5px; }
.pos-cash-tender .form-group label { color: var(--brand-dark); font-size: 10px; font-weight: 700; }
.pos-cash-tender .form-group input { min-height: 40px; border-color: #e5c1bc; background: rgba(255, 255, 255, .9); }
.pos-payment-reference { display: grid; gap: 10px; padding: 13px; border: 1px solid #dbe0e8; border-radius: 12px; background: #f7f8fa; }
.pos-payment-reference[hidden] { display: none !important; }
.pos-payment-reference-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pos-payment-reference-heading span { color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.pos-payment-reference-heading small { color: var(--muted); font-size: 9px; }
.pos-payment-reference .form-group { display: grid; gap: 5px; }
.pos-payment-reference .form-group label { color: var(--brand-dark); font-size: 10px; font-weight: 700; }
.pos-payment-reference .form-group input { min-height: 40px; background: #fff; }
.pos-exact-cash { min-height: 31px; padding: 7px 9px; border-radius: 8px; background: rgba(255, 255, 255, .78); color: var(--brand-dark); font-size: 11px; font-weight: 700; }
.pos-exact-cash input { accent-color: var(--identity-orange); }
.pos-change { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; border-top: 1px solid color-mix(in srgb, var(--identity-orange) 20%, #fff); color: var(--muted); font-size: 11px; }
.pos-change strong { color: var(--identity-orange); font-size: 18px; }
.appointment-checkout-layout { grid-template-columns: minmax(0, 1fr) minmax(310px, .46fr); }
.appointment-checkout-details { display: grid; align-content: start; gap: 15px; min-height: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--identity-orange) 7%, #fff), #fff 42%); overflow-y: auto; }
.appointment-checkout-patient { display: grid; gap: 4px; padding: 0 0 15px; border-bottom: 1px solid var(--line); }
.appointment-checkout-patient span, .appointment-checkout-list dt, .appointment-checkout-balance span, .appointment-checkout-concept span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; }
.appointment-checkout-patient strong { color: var(--brand-dark); font-size: 22px; line-height: 1.15; }
.appointment-checkout-patient small { color: var(--muted); font-size: 12px; }
.appointment-checkout-list { display: grid; gap: 0; margin: 0; }
.appointment-checkout-list > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 43px; border-bottom: 1px solid #e5e8ed; }
.appointment-checkout-list dt, .appointment-checkout-list dd { margin: 0; }
.appointment-checkout-list dd { color: var(--brand-dark); font-size: 13px; font-weight: 700; }
.appointment-checkout-balance { display: grid; gap: 8px; margin-top: auto; padding: 14px; border: 1px solid color-mix(in srgb, var(--identity-orange) 20%, #fff); border-radius: 12px; background: rgba(255, 255, 255, .8); }
.appointment-checkout-balance > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.appointment-checkout-balance strong { color: var(--brand-dark); font-size: 14px; }
.appointment-checkout-balance-total { margin-top: 4px; padding-top: 11px; border-top: 1px solid color-mix(in srgb, var(--identity-orange) 20%, #fff); }
.appointment-checkout-balance-total strong { color: var(--identity-orange); font-size: 22px; }
.appointment-checkout-concept { display: grid; gap: 4px; padding: 0 0 13px; border-bottom: 1px solid var(--line); }
.appointment-checkout-concept strong { color: var(--brand-dark); font-size: 14px; }
.appointment-checkout-concept small { color: var(--muted); font-size: 10px; }
.ticket-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 20px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: var(--agenda-card-shadow); }
.ticket-tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 15px; border-radius: 10px; color: var(--brand-dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.ticket-tabs a .vefort-icon { --vefort-icon-size: 17px; color: var(--identity-orange); }
.ticket-tabs a:hover { background: #f7f8fa; }
.ticket-tabs a.active { background: var(--identity-orange); box-shadow: 0 8px 18px rgba(221, 75, 67, .2); color: #fff; }
.ticket-tabs a.active .vefort-icon { color: #fff; }
.ticket-directory { padding: 21px; }
.ticket-directory .section-heading { align-items: center; margin-bottom: 18px; }
.ticket-directory .section-heading h2 { margin: 3px 0 0; font-size: 20px; }
.ticket-directory-heading { flex-wrap: wrap; }
.ticket-date-filter { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 9px; border: 1px solid var(--line); border-radius: 11px; background: #f8f9fb; }
.ticket-date-picker { position: relative; min-width: 190px; }
.ticket-date-filter .picker-trigger { min-height: 36px; padding: 4px 8px; border-radius: 8px; }
.ticket-date-filter .picker-trigger svg, .ticket-date-filter .picker-trigger > .vefort-icon { width: 17px; height: 17px; }
.ticket-date-filter .picker-trigger small { font-size: 7px; }
.ticket-date-filter .picker-trigger strong { font-size: 10px; }
.ticket-date-filter .appointment-picker-panel { position: absolute; top: calc(100% + 8px); right: 0; bottom: auto; left: auto; max-height: min(430px, calc(100vh - 80px)); transform: none; }
.ticket-date-filter .button { min-height: 36px; }
.ticket-private-label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: color-mix(in srgb, #2b9d71 11%, #fff); color: #24644b; font-size: 10px; font-weight: 700; }
.ticket-private-label .vefort-icon { --vefort-icon-size: 12px; }
.ticket-list { display: grid; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ticket-row { display: grid; grid-template-columns: 42px minmax(170px, 1fr) minmax(115px, .45fr) auto auto; align-items: center; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.ticket-row:first-child { border-top: 0; }
.ticket-row-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--identity-orange) 11%, #fff); color: var(--identity-orange); }
.ticket-row-icon .vefort-icon { --vefort-icon-size: 18px; }
.ticket-row-main strong, .ticket-row-main span, .ticket-row-meta small, .ticket-row-meta strong { display: block; }
.ticket-row-main strong { color: var(--brand-dark); font-size: 13px; }
.ticket-row-main span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.ticket-row-meta { text-align: right; }
.ticket-row-meta small { color: var(--muted); font-size: 9px; }
.ticket-row-meta strong { margin-top: 3px; color: var(--brand-dark); font-size: 13px; }
.ticket-row-status { min-width: 93px; text-align: center; }
.ticket-empty-state { display: grid; place-items: center; gap: 6px; min-height: 240px; color: var(--muted); text-align: center; }
.ticket-empty-state > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--identity-orange) 10%, #fff); color: var(--identity-orange); font-size: 22px; }
.ticket-empty-state > span .vefort-icon { --vefort-icon-size: 22px; }
.ticket-empty-state strong { color: var(--brand-dark); font-size: 15px; }
.ticket-empty-state p { margin: 0; font-size: 11px; }
.pagination-wrap { display: flex; justify-content: center; margin-top: 17px; }
.beverage-inventory { margin-top: 10px; }
.inventory-heading { margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(105deg, color-mix(in srgb, var(--identity-orange) 7%, #fff), #fff 60%); box-shadow: var(--shadow); }
.inventory-heading h2 { margin: 3px 0 0; font-size: 22px; }
.inventory-heading p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.inventory-search { position: relative; width: min(100%, 310px); margin: 0; }
.inventory-search input { width: 100%; min-height: 42px; padding: 0 14px 0 42px; border: 1px solid #dce1e8; border-radius: 12px; background: rgba(255, 255, 255, .92); box-shadow: 0 5px 12px rgba(23, 27, 35, .05); color: var(--brand-dark); font-size: 12px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.inventory-search input::placeholder { color: #8791a5; }
.inventory-search:focus-within input { border-color: var(--identity-orange); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--identity-orange) 14%, transparent), 0 8px 17px rgba(23, 27, 35, .08); outline: none; }
.inventory-search-icon { position: absolute; z-index: 1; top: 50%; left: 14px; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--identity-orange); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; pointer-events: none; }
.inventory-empty-search { margin: 18px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.inventory-product-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 13px; }
.inventory-product-card.is-filtered-out { display: none !important; }
.inventory-product-card { display: grid; gap: 13px; padding: 16px; }
.inventory-product-card > header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.inventory-product-card h3 { margin: 4px 0 0; color: var(--brand-dark); font-size: 16px; }
.inventory-product-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.inventory-product-metrics span { display: grid; gap: 3px; padding: 8px; border-radius: 9px; background: #f6f7f9; }
.inventory-product-metrics small { color: var(--muted); font-size: 9px; }
.inventory-product-metrics strong { color: var(--brand-dark); font-size: 12px; }
.inventory-product-metrics .loss { color: var(--brand); }
.beverage-product-modal .modal-actions { justify-content: center; }
.profit-preview { display: flex; align-items: center; gap: 13px; min-height: 86px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--identity-orange) 21%, #fff); border-radius: 12px; background: color-mix(in srgb, var(--identity-orange) 5%, #fff); }
.profit-preview > div:last-child { display: grid; gap: 4px; }
.profit-preview strong { color: var(--brand-dark); font-size: 13px; }
.profit-preview small { color: var(--muted); font-size: 10px; }
.profit-ring { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: conic-gradient(var(--identity-orange) var(--margin-progress, 0%), #e8ebef 0); }
.profit-ring::before { content: ''; position: absolute; width: 46px; height: 46px; border-radius: 50%; background: #fff; }
.profit-ring span { position: relative; z-index: 1; color: var(--brand-dark); font-size: 10px; font-weight: 800; }
.profit-preview.loss { border-color: #f1c2bd; background: #fff7f6; }
.profit-preview.loss .profit-ring { background: conic-gradient(var(--brand) var(--margin-progress, 0%), #f2e4e2 0); }
.product-search .check-row { min-height: 42px; }
.product-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-card { display: grid; gap: 15px; position: relative; }
.product-card.inactive { opacity: .62; }
.product-card.low-stock::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; border-radius: 12px 12px 0 0; background: #e6a44e; content: ''; }
.product-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-card > header { margin: -22px -22px 0; padding: 15px 22px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.product-card h2, .product-card p { margin: 0; }
.product-card h2 { margin-top: 5px; font-size: 15px; }
.product-card header p { margin-top: 3px; color: var(--brand); font-size: 11px; font-weight: 500; }
.product-sku { color: var(--muted); font-size: 8px; letter-spacing: .05em; }
.stock-meter { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 13px; border-radius: 10px; background: #f5f7f9; }
.stock-meter span, .stock-meter small { color: var(--muted); font-size: 9px; }
.stock-meter strong { grid-row: span 2; align-self: center; font-size: 27px; }
.stock-meter em { grid-column: span 2; justify-self: start; margin-top: 5px; padding: 3px 7px; border-radius: 99px; background: #fff1db; color: #915c1b; font-size: 8px; font-style: normal; font-weight: 500; }
.last-stock-movement { color: var(--muted); font-size: 8px; line-height: 1.5; }
.product-card-actions { display: grid; grid-template-columns: 1.35fr .78fr 1.1fr; gap: 7px; align-items: stretch; }
.product-card-actions .button, .product-card-actions form { width: 100%; min-width: 0; height: 42px; }
.product-card-actions .button { min-height: 42px; padding: 7px 6px; justify-content: center; font-size: 11px; white-space: nowrap; }
.product-card-actions details { grid-column: 1 / -1; }
.product-card-actions details > summary { color: var(--brand); cursor: pointer; font-size: 10px; font-weight: 500; }
.product-card-actions details form { margin-top: 12px; }
.empty-product-state { grid-column: 1 / -1; padding: 40px; text-align: center; }
.empty-product-state > span { font-size: 30px; }
.empty-product-state h2 { margin: 8px 0 4px; font-size: 16px; }
.empty-product-state p { margin: 0; color: var(--muted); font-size: 10px; }

.product-sale-modal { width: min(720px, calc(100% - 24px)); }
.sale-customer-fields { margin-bottom: 18px; }
.sale-product-list { display: grid; max-height: 315px; border: 1px solid var(--line); border-radius: 11px; overflow-y: auto; }
.sale-product-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; align-items: center; gap: 13px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.sale-product-row:first-child { border-top: 0; }
.sale-product-row:hover { background: #fafbfc; }
.sale-product-row span strong, .sale-product-row span small { display: block; }
.sale-product-row span strong { font-size: 11px; }
.sale-product-row span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.sale-product-row em { color: var(--brand); font-size: 11px; font-style: normal; font-weight: 500; }
.sale-product-row input { width: 72px; min-height: 36px; border: 1px solid #d8dce4; border-radius: 8px; text-align: center; }
.sale-total { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding: 14px; border-radius: 10px; background: #fff3f1; }
.sale-total span { color: var(--muted); font-size: 10px; }
.sale-total strong { color: var(--brand); font-size: 21px; }
.empty-sale-products { display: grid; place-items: center; gap: 9px; padding: 30px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; }
.empty-sale-products > span { font-size: 27px; }
.empty-sale-products p { margin: 0; font-size: 11px; }

.reports-header { align-items: center; margin-bottom: 17px; }
.report-dashboard-header .module-title { font-size: 36px; }
.report-dashboard-header { gap: 20px; }
.report-dashboard-header > div:first-child { display: grid; justify-items: start; }
.report-period-chip { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 7px 10px; border-radius: 99px; background: rgba(221, 75, 67, .1); color: var(--identity-orange); font-size: 11px; font-weight: 700; }
.report-period-chip .vefort-icon { --vefort-icon-size: 12px; }
.open-cash-chip { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 9px; padding: 12px 15px; border: 1px solid #c9e8da; border-radius: 12px; background: #effaf5; box-shadow: var(--shadow); }
.open-cash-chip > span { grid-row: span 2; width: 9px; height: 9px; border-radius: 50%; background: #2b9d71; box-shadow: 0 0 0 5px rgba(43, 157, 113, .12); }
.open-cash-chip strong { color: #25664d; font-size: 11px; }
.open-cash-chip small { color: #638174; font-size: 9px; }
.closed-cash-chip { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 99px; background: #eceff3; color: var(--muted); font-size: 10px; font-weight: 600; }
.closed-cash-chip .vefort-icon { --vefort-icon-size: 12px; }
.report-dashboard-filter { margin-bottom: 18px; padding: 16px 20px; border-color: #e0e4ea; background: linear-gradient(100deg, rgba(221, 75, 67, .045), #fff 48%); }
.report-filter-card form { display: flex; align-items: stretch; gap: 13px; }
.report-filter-card .form-group { width: 190px; }
.report-dashboard-filter .form-group > label { font-size: 12px; }
.report-dashboard-filter .report-update-button,
.report-dashboard-filter .report-excel-button { align-self: end; min-height: 42px; padding: 9px 15px; font-size: 13px; }
.report-excel-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #247e59; background: #2b9d71; box-shadow: 0 8px 16px rgba(43, 157, 113, .2); color: #fff; }
.report-excel-button:hover, .report-excel-button:focus-visible { border-color: #1d6949; background: #247e59; color: #fff; }
.report-excel-button .vefort-icon { --vefort-icon-size: 14px; }
.report-period-summary { display: grid; place-content: center; justify-items: center; min-width: 188px; margin-left: auto; padding: 8px 14px; border-left: 1px solid var(--line); color: var(--muted); text-align: center; }
.report-period-summary strong { color: var(--brand-dark); font-size: 15px; line-height: 1.15; }
.report-period-summary small { margin-top: 5px; font-size: 9px; line-height: 1.3; }
.report-kpi-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 13px; margin-bottom: 20px; }
.report-kpi { position: relative; display: grid; min-height: 174px; padding: 18px; overflow: hidden; border: 1px solid #e0e4ea; border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.report-kpi::after { position: absolute; right: -22px; bottom: -32px; width: 87px; height: 87px; border-radius: 50%; background: rgba(135, 145, 165, .06); content: ''; }
.report-kpi--featured { grid-column: span 5; order: 1; border-color: rgba(221, 75, 67, .48); background: linear-gradient(140deg, #fff 35%, rgba(221, 75, 67, .15)); }
.report-kpi--attendance { order: 2; }
.report-kpi:not(.report-kpi--featured) { grid-column: span 2; order: 3; }
.report-kpi--featured::after { width: 135px; height: 135px; background: rgba(221, 75, 67, .12); }
.report-kpi--warning { border-color: rgba(221, 75, 67, .45); }
.report-kpi-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 12px; border-radius: 10px; background: rgba(221, 75, 67, .1); color: var(--identity-orange); }
.report-kpi-icon .vefort-icon { --vefort-icon-size: 18px; }
.report-kpi > p, .report-kpi > em, .report-kpi > small { position: relative; z-index: 1; margin: 0; }
.report-kpi > p { color: var(--muted); font-size: 11px; font-weight: 700; }
.report-kpi > strong { position: relative; z-index: 1; align-self: end; margin-top: 7px; color: var(--brand-dark); font-size: 26px; line-height: 1.05; letter-spacing: -.8px; }
.report-kpi--featured > strong { color: var(--identity-orange); font-size: 33px; }
.report-kpi > em { margin-top: 7px; color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.45; }
.report-delta { display: inline-flex; align-items: center; width: fit-content; margin-top: 8px !important; padding: 4px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; }
.report-delta.up { background: #e5f7ef; color: #287a5b; }
.report-delta.down { background: #fff0ef; color: #b7423c; }
.report-delta.neutral { background: #f0f2f5; color: #657084; }
.report-hero-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .78fr) minmax(280px, .78fr); gap: 18px; margin-bottom: 18px; }
.report-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.report-card-heading p { margin: 0 0 4px; }
.report-card-heading h2 { margin: 0; font-size: 21px; }
.report-card-heading small, .report-card-heading > strong { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 500; }
.report-card-heading > .vefort-icon { --vefort-icon-size: 20px; color: var(--identity-orange); }
.report-chart-card, .report-donut-card, .report-ranking-card, .report-inventory-card, .report-operations-card, .report-export-card, .report-audit-card { padding: 18px; border: 1px solid #e0e4ea; border-radius: 14px; box-shadow: var(--shadow); }
.report-chart-card { min-width: 0; }
.report-chart-actions { display: grid; justify-items: end; gap: 9px; }
.report-chart-legend { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.report-chart-legend span::before { display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 2px; background: var(--identity-orange); content: ''; }
.report-chart-legend .outflows::before { background: var(--identity-gray); }
.report-grouping-tabs { display: inline-flex; padding: 3px; border-radius: 8px; background: #f0f2f5; }
.report-grouping-tabs a { padding: 6px 9px; border-radius: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.report-grouping-tabs a.active { background: var(--brand-dark); color: #fff; box-shadow: 0 3px 7px rgba(23, 27, 35, .19); }
.report-chart-scroll { overflow-x: auto; padding: 7px 3px 2px; }
.report-bar-chart { display: grid; grid-template-columns: repeat(var(--chart-columns), minmax(36px, 1fr)); gap: 7px; min-width: 440px; height: 238px; padding: 5px 0 0; border-bottom: 1px solid #e4e7eb; }
.report-chart-column { display: grid; grid-template-rows: 1fr auto; min-width: 0; gap: 7px; }
.report-bar-pair { display: flex; align-items: end; justify-content: center; gap: 4px; min-height: 0; padding: 0 2px; background: repeating-linear-gradient(to bottom, transparent 0 36px, #edf0f3 36px 37px); }
.report-bar-pair i { display: block; width: min(14px, 38%); height: var(--bar-height); min-height: 0; border-radius: 5px 5px 2px 2px; background: var(--identity-orange); box-shadow: 0 5px 10px rgba(221, 75, 67, .19); }
.report-bar-pair i.outflows { background: var(--identity-gray); box-shadow: 0 5px 10px rgba(135, 145, 165, .19); }
.report-chart-column > strong { overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 600; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.report-chart-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 15px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.report-chart-footer strong { color: var(--brand-dark); }
.report-donut-card { display: flex; flex-direction: column; min-height: 304px; }
.report-donut-layout { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 17px; flex: 1; }
.report-donut { position: relative; display: grid; place-content: center; width: 116px; height: 116px; border-radius: 50%; background: var(--donut); text-align: center; }
.report-donut::after { position: absolute; inset: 18px; border-radius: 50%; background: #fff; content: ''; }
.report-donut strong, .report-donut small { position: relative; z-index: 1; display: block; }
.report-donut strong { color: var(--brand-dark); font-size: 20px; }
.report-donut small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-donut--small { width: 102px; height: 102px; }
.report-donut--small::after { inset: 16px; }
.report-donut-legend { display: grid; gap: 8px; }
.report-donut-legend > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.report-donut-legend i { width: 7px; height: 7px; border-radius: 2px; background: var(--legend-color); }
.report-donut-legend span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-donut-legend strong { color: var(--brand-dark); font-size: 10px; }
.report-inline-link { display: inline-flex; align-items: center; gap: 5px; width: fit-content; margin-top: 12px; color: var(--identity-orange); font-size: 10px; font-weight: 700; }
.report-inline-link span { font-size: 13px; }
.report-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.report-ranking-list { display: grid; gap: 11px; }
.report-ranking-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(56px, .8fr) auto; align-items: center; gap: 10px; }
.report-ranking-row > div { min-width: 0; }
.report-ranking-row strong, .report-ranking-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-ranking-row strong { color: var(--brand-dark); font-size: 11px; }
.report-ranking-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-ranking-row > span { position: relative; height: 7px; overflow: hidden; border-radius: 99px; background: #eef0f3; }
.report-ranking-row > span i { position: absolute; inset: 0 auto 0 0; width: var(--progress); border-radius: inherit; background: linear-gradient(90deg, var(--identity-orange), #ef9b94); }
.report-ranking-row > b { color: var(--brand-dark); font-size: 10px; text-align: right; }
.report-inventory-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 15px; }
.report-inventory-values > div { display: grid; gap: 4px; padding: 10px; border-radius: 9px; background: #f5f6f8; }
.report-inventory-values span { color: var(--muted); font-size: 9px; }
.report-inventory-values strong { color: var(--brand-dark); font-size: 15px; }
.report-low-stock-list { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.report-low-stock-list > strong { color: var(--identity-orange); font-size: 11px; }
.report-low-stock-list > div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.report-low-stock-list > div b { color: var(--brand-dark); font-size: 10px; }
.report-low-stock-list p { margin: 0; color: #287a5b; font-size: 10px; line-height: 1.5; }
.report-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(305px, .75fr); gap: 18px; margin-bottom: 18px; }
.report-operations-list { display: grid; }
.report-operation-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.report-operation-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(221, 75, 67, .09); color: var(--identity-orange); }
.report-operation-icon .vefort-icon { --vefort-icon-size: 14px; }
.report-operation-row > div { min-width: 0; }
.report-operation-row strong, .report-operation-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-operation-row strong { color: var(--brand-dark); font-size: 11px; }
.report-operation-row small, .report-operation-row time { margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-operation-row > b { color: #287a5b; font-size: 12px; text-align: right; }
.report-operation-row > b.outflow { color: var(--identity-orange); }
.report-export-card > p { margin: -5px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.report-export-list { display: grid; gap: 7px; }
.report-export-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; }
.report-export-list a:hover { border-color: rgba(221, 75, 67, .5); background: rgba(221, 75, 67, .04); }
.report-export-list > a > .vefort-icon { --vefort-icon-size: 15px; display: grid; place-items: center; width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: #f1f3f6; color: var(--identity-orange); }
.report-export-list strong, .report-export-list small { display: block; }
.report-export-list strong { color: var(--brand-dark); font-size: 11px; }
.report-export-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.report-export-list em { padding: 3px 6px; border-radius: 5px; background: rgba(43, 157, 113, .12); color: #287a5b; font-size: 8px; font-style: normal; font-weight: 700; }
.report-audit-card { margin-bottom: 18px; }
.report-audit-list { display: grid; }
.report-audit-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.report-audit-list p { margin: 0; }
.report-audit-list p strong, .report-audit-list p small { display: block; }
.report-audit-list p strong { color: var(--brand-dark); font-size: 11px; }
.report-audit-list p small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.report-audit-list code, .audit-log-technical code { padding: 3px 6px; border-radius: 5px; background: #f1f3f6; color: #596374; font-family: inherit; font-size: 8px; }
.audit-user-initial { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #eceff3; color: #5d6675; font-size: 10px; font-weight: 600; }

/* Clínica */
.clinic-page-header { margin-bottom: 18px; }
.clinic-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 20px; padding: 5px; border: 1px solid #d9dde5; border-radius: 14px; background: #fff; box-shadow: var(--agenda-card-shadow); }
.clinic-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.clinic-tabs a .vefort-icon, .cash-tabs a .vefort-icon { --vefort-icon-size: 16px; color: var(--identity-orange); }
.clinic-tabs a:hover { background: color-mix(in srgb, var(--identity-orange) 8%, #fff); color: var(--brand-dark); }
.clinic-tabs a.active { background: var(--identity-orange); color: #fff; box-shadow: 0 6px 15px rgba(221, 75, 67, .3); }
.clinic-tabs a.active .vefort-icon, .cash-tabs a.active .vefort-icon { color: #fff; }
.clinic-panel { min-width: 0; }
.clinic-section-heading { align-items: center; margin-bottom: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(105deg, color-mix(in srgb, var(--identity-orange) 7%, #fff), #fff 60%); box-shadow: var(--shadow); }
.clinic-section-heading h2 { font-size: 22px; }
.clinic-section-heading > div > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.clinic-panel .modal-actions { justify-content: center; }

.cash-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 20px; padding: 5px; border: 1px solid #d9dde5; border-radius: 14px; background: #fff; box-shadow: var(--agenda-card-shadow); }
.cash-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.cash-tabs a:hover { background: color-mix(in srgb, var(--identity-orange) 8%, #fff); color: var(--brand-dark); }
.cash-tabs a.active { background: var(--identity-orange); color: #fff; box-shadow: 0 6px 15px rgba(221, 75, 67, .3); }


.audit-filter-card { margin-bottom: 18px; }
.audit-filter-card form { display: grid; grid-template-columns: 165px minmax(170px, .7fr) minmax(260px, 1.3fr) auto auto; align-items: end; gap: 10px; }
.audit-log-list { min-width: 0; }
.audit-log-list > .section-heading > small { color: var(--muted); font-size: 8px; }
.audit-log-list article { display: grid; grid-template-columns: 76px auto minmax(220px, 1fr) minmax(180px, .7fr); align-items: center; gap: 14px; padding: 13px 2px; border-top: 1px solid var(--line); }
.audit-log-list time strong, .audit-log-list time span { display: block; }
.audit-log-list time strong { font-size: 11px; }
.audit-log-list time span { color: var(--muted); font-size: 7px; }
.audit-log-main strong, .audit-log-main small, .audit-log-technical small { display: block; }
.audit-log-main strong { font-size: 10px; }
.audit-log-main small, .audit-log-technical small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.audit-log-technical { text-align: right; }
.audit-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.audit-summary-grid article { min-height: 106px; padding: 18px; border: 1px solid #f1d3d1; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #fff5f4 100%); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; }
.audit-summary-grid span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.audit-summary-grid strong { margin: 5px 0 3px; color: var(--identity-orange); font-size: 28px; line-height: 1; }
.audit-summary-grid small { color: var(--muted); font-size: 10px; }
.audit-log-entry { border-top: 1px solid var(--line); }
.audit-log-entry:first-of-type { border-top: 0; }
.audit-log-entry > summary { display: grid; grid-template-columns: 82px auto minmax(220px, 1fr) minmax(190px, .75fr) 18px; align-items: center; gap: 14px; padding: 15px 2px; cursor: pointer; list-style: none; }
.audit-log-entry > summary::-webkit-details-marker { display: none; }
.audit-log-entry[open] > summary { border-bottom: 1px solid var(--line); }
.audit-result { display: inline-flex; align-items: center; gap: 5px; color: #087c5b; font-size: 9px; font-weight: 800; }
.audit-result::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #20ae7d; box-shadow: 0 0 0 4px #e2f6ee; }
.audit-entry-toggle { color: var(--identity-orange); font-size: 16px; font-weight: 800; transition: transform .2s ease; }
.audit-log-entry[open] .audit-entry-toggle { transform: rotate(180deg); }
.audit-log-details { padding: 14px 0 18px 126px; }
.audit-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.audit-detail-grid > div { min-width: 0; padding: 10px 12px; border-radius: 10px; background: #f7f8fa; }
.audit-detail-grid span, .audit-detail-grid strong { display: block; }
.audit-detail-grid span { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.audit-detail-grid strong, .audit-detail-grid code { overflow-wrap: anywhere; color: var(--ink); font-size: 10px; font-weight: 700; }
.audit-targets { margin: 12px 0 0; color: var(--muted); font-size: 9px; }
.audit-targets span { display: inline-block; margin: 4px 4px 0 0; padding: 3px 7px; border-radius: 999px; background: #eef1f5; color: #5b6678; font-size: 8px; font-weight: 700; }
.empty-audit-state { padding: 40px 20px; text-align: center; }
.empty-audit-state > span { font-size: 30px; }
.empty-audit-state > span .vefort-icon { --vefort-icon-size: 30px; color: var(--identity-orange); }
.empty-audit-state h2 { margin: 8px 0 4px; font-size: 15px; }
.empty-audit-state p { margin: 0; color: var(--muted); font-size: 9px; }

.sidebar-profile-link { min-width: 0; }
.team-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.user-directory { margin-bottom: 24px; overflow: hidden; }
.user-directory > .section-heading > small { color: var(--muted); font-size: 9px; }
.user-table { width: 100%; min-width: 0; }
.user-row { display: grid; grid-template-columns: minmax(210px, 1.4fr) minmax(90px, .6fr) minmax(115px, .75fr) minmax(105px, .7fr) minmax(70px, .45fr) minmax(195px, auto); align-items: center; gap: 11px; padding: 12px 3px; border-top: 1px solid var(--line); font-size: 9px; }
.user-row.header { border: 0; color: var(--muted); font-size: 7px; font-weight: 500; text-transform: uppercase; }
.user-row.inactive { opacity: .58; }
.user-data-cell { min-width: 0; overflow-wrap: anywhere; }
.user-identity { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-identity .avatar { flex: 0 0 auto; width: 31px; height: 31px; font-size: 10px; }
.user-identity p { min-width: 0; margin: 0; }
.user-identity strong, .user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-identity strong { font-size: 10px; }
.user-identity small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.user-identity em { padding: 2px 5px; border-radius: 5px; background: #fff0ed; color: var(--brand); font-size: 7px; font-style: normal; font-weight: 500; }
.user-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.user-actions form { margin: 0; }
.user-actions .button { white-space: nowrap; }
.user-admin-modal { width: min(720px, calc(100% - 24px)); overflow-x: hidden; box-shadow: 0 30px 85px rgba(20, 25, 35, .4); }
.user-admin-modal .modal-card { padding: 27px; }
.user-admin-modal .modal-header { margin-bottom: 16px; }
.user-admin-summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 18px; padding: 14px 16px; border: 1px solid rgba(221, 75, 67, .22); border-radius: 13px; background: rgba(221, 75, 67, .07); }
.user-admin-summary .avatar { width: 44px; height: 44px; font-size: 15px; box-shadow: 0 8px 18px rgba(221, 75, 67, .24); }
.user-admin-summary div { min-width: 0; }
.user-admin-summary strong, .user-admin-summary small { display: block; overflow-wrap: anywhere; }
.user-admin-summary strong { color: var(--ink); font-size: 14px; }
.user-admin-summary small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-admin-section { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.user-admin-section + .user-admin-section { margin-top: 14px; }
.user-admin-section > header { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 15px; }
.user-admin-section > header > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--identity-orange); color: #fff; font-size: 18px; font-weight: 700; box-shadow: 0 6px 14px rgba(221, 75, 67, .22); }
.user-admin-section > header > span .vefort-icon { --vefort-icon-size: 18px; }
.user-admin-section h3, .user-admin-section p { margin: 0; }
.user-admin-section h3 { color: var(--ink); font-size: 14px; }
.user-admin-section header p { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.user-admin-form-actions { margin-top: 7px; }
.user-admin-form-actions .button { min-width: 154px; }
.user-security-section { border-color: rgba(135, 145, 165, .3); background: rgba(135, 145, 165, .08); }
.user-security-section > header > span { background: var(--identity-gray); box-shadow: 0 6px 14px rgba(86, 96, 116, .2); }
.user-security-note { margin: 0; padding: 10px 12px; border-radius: 9px; background: #fff; color: var(--muted); font-size: 10px; line-height: 1.5; }
.user-security-actions { justify-content: center; }
.user-security-actions .button { min-width: 210px; }
.user-self-security-note { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(135, 145, 165, .28); border-radius: 10px; background: rgba(135, 145, 165, .08); color: var(--muted); font-size: 10px; text-align: center; }
.team-profile-section { margin-top: 10px; }
.therapist-profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.therapist-profile-card { display: grid; gap: 14px; position: relative; }
.therapist-profile-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--therapist-color); content: ''; }
.therapist-profile-card.inactive { opacity: .58; }
.therapist-profile-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.therapist-profile-card > header { margin: -22px -22px 0; padding: 15px 22px; border-bottom: 1px solid var(--section-header-border); border-radius: var(--radius) var(--radius) 0 0; background: var(--section-header-tint); }
.therapist-profile-card > header > span:first-child { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; background: var(--therapist-color); color: #fff; font-size: 11px; font-weight: 600; }
.therapist-profile-card h3, .therapist-profile-card p { margin: 0; }
.therapist-profile-card h3 { font-size: 12px; }
.therapist-profile-card p { margin-top: 2px; color: var(--muted); font-size: 7px; }
.therapist-profile-card dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.therapist-profile-card dl div { padding: 9px; border-radius: 8px; background: #f6f7f9; }
.therapist-profile-card dt, .therapist-profile-card dd { margin: 0; }
.therapist-profile-card dt { color: var(--muted); font-size: 7px; }
.therapist-profile-card dd { margin-top: 3px; font-size: 9px; font-weight: 500; }
.therapist-profile-card > details > summary { color: var(--brand); cursor: pointer; font-size: 9px; font-weight: 500; }
.therapist-profile-card > details form { margin-top: 12px; }
.password-page { max-width: 590px; margin: 25px auto 0; }
.password-card { padding: 28px; }
.mandatory-password-banner { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; padding: 12px; border: 1px solid #efd3a4; border-radius: 10px; background: #fff9ee; }
.mandatory-password-banner > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #f2d9ac; color: #7d581d; font-weight: 700; }
.mandatory-password-banner p { margin: 0; }
.mandatory-password-banner strong, .mandatory-password-banner small { display: block; }
.mandatory-password-banner strong { font-size: 10px; }
.mandatory-password-banner small { margin-top: 2px; color: #7d6b4b; font-size: 8px; }
.password-back-link { display: block; margin-top: 17px; color: var(--muted); font-size: 9px; text-align: center; }

.patient-table-header,
.cash-history-row.header,
.mini-report-table > div.header,
.user-row.header {
    border: 1px solid var(--section-header-border);
    border-radius: 9px;
    background: var(--section-header-tint);
    color: var(--ink);
}
.patient-table-header { padding-right: 10px; padding-left: 10px; }
.cash-history-row.header, .mini-report-table > div.header, .user-row.header { padding-right: 8px; padding-left: 8px; }

/* El texto operativo nunca baja del mínimo legible en tablas, tarjetas o recibos. */
.main-content small,
.main-content code,
.therapist-heading small,
.time-label,
.appointment-card span,
.appointment-card small,
.agenda-block strong,
.agenda-block small,
.status-pill,
.time-range label span,
.weekday-row > small,
.block-list article small,
.block-type,
.patient-table-header,
.patient-row,
.appointment-history-date span,
.clinical-note-badge,
.cash-history-row,
.receipt-brand span,
.receipt-amount em,
.receipt-footer strong,
.method-kind strong,
.product-sku,
.stock-meter span,
.stock-meter em,
.closed-cash-chip,
.daily-report-row > span,
.daily-report-row > strong,
.export-list strong,
.export-list em,
.mini-report-table > div,
.report-audit-preview > div p strong,
.audit-user-initial,
.audit-log-list time span,
.audit-log-main strong,
.user-row,
.user-identity .avatar,
.user-identity strong,
.user-identity em,
.therapist-profile-card dt,
.therapist-profile-card dd,
.mandatory-password-banner strong {
    font-size: .72rem !important;
}

.login-page {
    --login-pantone: #dd4b43;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    overflow-x: hidden;
    background: var(--login-pantone);
}

.bot-trap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.login-experience {
    width: min(430px, calc(100vw - 32px));
    display: grid;
    justify-items: center;
}

.login-logo-trigger {
    appearance: none;
    position: relative;
    width: 100%;
    display: grid;
    justify-items: center;
    padding: 20px 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    animation: login-logo-float 3.2s ease-in-out infinite;
    transition: padding .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}

.login-logo-trigger img {
    display: block;
    width: min(142%, 120vw);
    max-width: none;
    height: auto;
    filter: drop-shadow(0 14px 24px rgba(91, 28, 25, .18));
    transition: width .65s cubic-bezier(.22, 1, .36, 1), filter .4s ease;
}

.login-logo-trigger:hover img { filter: drop-shadow(0 18px 28px rgba(91, 28, 25, .28)); }
.login-logo-trigger:focus-visible { outline: 3px solid #fff; outline-offset: 7px; border-radius: 16px; }
.login-logo-trigger:disabled { cursor: default; }

.login-reveal-hint {
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    width: 100%;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .82;
    transform: translateX(-50%);
    transition: opacity .25s ease, transform .35s ease;
}

.login-panel {
    width: calc(100% + 32px);
    max-height: 0;
    margin-inline: -16px;
    padding: 0 16px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(34px) scale(.95);
    transform-origin: top center;
    transition:
        max-height .72s cubic-bezier(.22, 1, .36, 1),
        padding .72s cubic-bezier(.22, 1, .36, 1),
        opacity .36s ease .08s,
        transform .58s cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear .72s;
}

.login-experience.is-open .login-logo-trigger {
    padding-block: 0 8px;
    animation: none;
    transform: translateY(-3px);
}

.login-experience.is-open .login-logo-trigger img {
    width: 118%;
    filter: drop-shadow(0 9px 16px rgba(91, 28, 25, .16));
}

.login-experience.is-open .login-reveal-hint {
    opacity: 0;
    transform: translate(-50%, -8px);
}

.login-experience.is-open .login-panel,
.no-js .login-panel {
    max-height: 700px;
    padding-block: 12px 42px;
    opacity: 1;
    overflow: visible;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition:
        max-height .72s cubic-bezier(.22, 1, .36, 1),
        padding .72s cubic-bezier(.22, 1, .36, 1),
        opacity .4s ease .1s,
        transform .58s cubic-bezier(.22, 1, .36, 1),
        visibility 0s;
}

.no-js .login-logo-trigger { display: none; }

.login-card {
    width: 100%;
    padding: 32px 34px 28px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 24px;
    background: #fff;
    box-shadow:
        0 32px 86px rgba(70, 19, 17, .38),
        0 10px 28px rgba(70, 19, 17, .18);
}

.login-heading { margin-bottom: 22px; text-align: center; }
.login-heading h1 { margin: 0; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.02em; }
.login-remember { margin-top: -2px; }
.button.primary.login-submit { min-height: 47px; border-color: var(--brand-dark); background: var(--brand-dark); }
.button.primary.login-submit:hover { border-color: #9f302c; background: #9f302c; }
.login-help { margin: 21px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

@keyframes login-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@media (max-width: 1180px) {
    .user-table { display: grid; gap: 12px; }
    .user-row.header { display: none; }
    .user-row:not(.header) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
    .user-identity { grid-column: 1 / -1; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
    .user-identity strong, .user-identity small { white-space: normal; overflow-wrap: anywhere; }
    .user-data-cell { min-height: 55px; padding: 9px 11px; border-radius: 9px; background: #f6f7f9; font-size: 11px; }
    .user-data-cell::before { display: block; margin-bottom: 4px; color: var(--muted); content: attr(data-label); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
    .user-status-cell .status-pill { display: inline-flex; }
    .user-actions { grid-column: 1 / -1; flex-wrap: wrap; padding-top: 2px; }
    .user-actions > .button, .user-actions > form { flex: 1 1 145px; }
    .user-actions > .button, .user-actions > form .button { width: 100%; }
}

@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: sticky; top: 0; height: auto; min-height: 0; padding: 12px 16px; flex-flow: row wrap; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(16, 20, 28, .16); }
    .brand { padding: 0; }
    .brand img { width: 116px; height: 44px; }
    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 44px;
        margin-left: auto;
        padding: 0 12px;
        border: 1px solid rgba(255,255,255,.16);
        border-radius: 10px;
        background: rgba(255,255,255,.06);
        color: #fff;
        cursor: pointer;
        font-weight: 500;
    }
    .mobile-menu-icon { display: grid; gap: 4px; width: 20px; }
    .mobile-menu-icon i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
    .sidebar-divider { flex-basis: 100%; margin: 0 0 2px; }
    .main-nav { flex-basis: 100%; width: 100%; max-height: calc(100vh - 78px); margin: 0; padding: 5px 0 3px; overflow-y: auto; }
    .main-nav[data-open="false"] { display: none; }
    .main-nav a { min-height: 44px; padding: 0 12px; font-size: 14px; }
    .main-nav a span { display: inline-block; }
    .mobile-account { display: grid; gap: 5px; margin-top: 7px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); }
    .mobile-account-summary { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 4px 12px 9px; }
    .mobile-account-summary strong, .mobile-account-summary small { display: block; }
    .mobile-account-summary small { color: #aeb6c3; }
    .mobile-account form { margin: 0; }
    .mobile-account-action { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 11px; background: transparent; color: #bfc5d0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; text-align: left; }
    .mobile-account-action span { width: 22px; font-size: 22px; text-align: center; }
    .mobile-account-action:hover { background: rgba(255,255,255,.06); color: #fff; }
    .sidebar-user { display: none; }
    .main-content { padding: 23px 16px 36px; }
    .agenda-toolbar { flex-wrap: wrap; }
    .clinic-shifts { width: 100%; margin: 4px 0 0; }
    .agenda-legend { width: 100%; margin: 4px 0 0; }
    .agenda-scroll-hint { display: block; }
    .agenda-frame { max-height: calc(100vh - 235px); min-height: 430px; overflow: auto; }
    .schedule { grid-template-columns: 64px repeat(var(--therapist-count), minmax(190px, 1fr)); min-width: calc(64px + (var(--therapist-count) * 190px)); }
    .schedule-header { min-height: 70px; }
    .appointment-card { touch-action: manipulation; }
    .schedule-admin-grid { grid-template-columns: 1fr; }
    .patient-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .patient-personal-card, .patient-contact-card { grid-column: span 1; }
    .patient-information-card { align-items: flex-start; flex-direction: column; }
    .patient-information-card > div { width: 100%; }
    .patient-information-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .anamnesis-history-grid { grid-template-columns: 1fr; }
    .anamnesis-attachment-groups { grid-template-columns: 1fr; }
    .clinical-note-context { grid-template-columns: 1fr; }
    .anamnesis-treatment-layout { grid-template-columns: 1fr; }
    .anamnesis-session-summary { grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr); }
    .anamnesis-session-notes { grid-column: 1 / -1; padding-top: 10px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
    .anamnesis-session-actions { grid-column: 1 / -1; }
    .patient-directory, .patient-appointments-section { overflow-x: auto; }
    .patient-table { min-width: 1000px; }
    .appointment-history-table { min-width: 900px; }
    .cash-closed-layout, .cash-operation-grid { grid-template-columns: 1fr; }
    .cash-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cash-summary-grid .expected-card { grid-column: span 2; }
    .beverage-pos { --pos-checkout-height: auto; }
    .beverage-pos-layout { grid-template-columns: 1fr; height: auto; }
    .pos-catalog { padding-right: 0; overflow: visible; }
    .appointment-checkout-details { overflow: visible; }
    .pos-cart { position: static; grid-template-rows: none; height: auto; }
    .pos-cart-items { min-height: 90px; max-height: 310px; }
    .ticket-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
    .ticket-row-meta { text-align: left; }
    .ticket-row-status { grid-column: 2; text-align: left; }
    .ticket-row .button { grid-column: 3; grid-row: 1 / span 2; }
    .method-list, .product-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-metrics .primary-metric { grid-column: span 2; }
    .report-two-column, .report-table-grid { grid-template-columns: 1fr; }
    .audit-filter-card form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-log-list article, .audit-log-entry > summary { grid-template-columns: 65px auto minmax(0, 1fr); }
    .audit-log-technical { grid-column: 3; text-align: left; }
    .audit-log-details { padding-left: 80px; }
    .audit-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-summary, .therapist-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .page-header { align-items: flex-start; flex-direction: column; }
    .team-clinic-heading { align-items: stretch; flex-direction: column; }
    .team-clinic-heading .header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .team-clinic-heading .header-actions .button { min-width: 0; white-space: normal; }
    .patient-history-heading { align-items: flex-start; flex-direction: column; }
    .patient-history-summary { justify-content: flex-start; }
    .header-actions { width: 100%; }
    .header-actions .button { flex: 1; }
    .agenda-toolbar { align-items: stretch; }
    .agenda-view-switch { width: 100%; }
    .agenda-view-switch a { min-width: 0; min-height: 42px; display: grid; place-items: center; }
    .agenda-toolbar .date-control, .agenda-toolbar > .button { min-width: 44px; min-height: 44px; }
    .date-picker { order: 5; width: 100%; }
    .date-picker input { flex: 1; min-width: 0; min-height: 44px; }
    .agenda-date-picker .picker-trigger { width: 100%; min-height: 44px; }
    .agenda-legend { flex-wrap: nowrap; padding-bottom: 4px; overflow-x: auto; }
    .agenda-legend span { flex: none; }
    .grid-form { grid-template-columns: 1fr; }
    .datetime-picker-grid { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .anamnesis-form > .anamnesis-section:first-of-type .grid-form { grid-template-areas: "reason" "therapist" "signs" "symptoms"; }
    .anamnesis-form > .anamnesis-section:first-of-type .grid-form > .span-2 { grid-column: 1; }
    .profile-data-wide { grid-column: span 1; }
    .appointment-picker-panel { right: auto; left: 50%; width: min(310px, calc(100vw - 40px)); }
    .analog-clock { width: 208px; height: 208px; }
    .clock-hour { transform: translate(-50%, -50%) rotate(var(--clock-angle)) translateY(-77px) rotate(calc(0deg - var(--clock-angle))); }
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .service-list { grid-template-columns: 1fr; }
    .modal-card { padding: 20px; }
    .modal-actions { flex-wrap: wrap; }
    .modal-actions > .button, .modal-actions > form, .modal-actions > form .button { width: 100%; }
    .modal-actions > .button, .modal-actions > form { flex: 1 1 100%; }
    .form-group input, .form-group select, .form-group textarea { min-height: 44px; }
    .login-card { padding: 28px 22px 24px; }
    .detail-list div { grid-template-columns: 1fr; gap: 4px; }
    .appointment-cancel-summary div { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
    .weekday-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 0; }
    .time-ranges-split { grid-template-columns: 1fr; }
    .weekday-row > small { text-align: left; }
    .patient-search form { align-items: stretch; flex-direction: column; }
    .patient-search .search-field, .patient-search .status-filter, .patient-search .button.primary { flex: 0 0 auto; width: 100%; min-width: 0; }
    .patient-overview-grid { grid-template-columns: 1fr; }
    .patient-personal-card, .patient-contact-card { grid-column: span 1; }
    .patient-information-grid { grid-template-columns: 1fr; }
    .patient-anamnesis-button { width: 100%; }
    .anamnesis-patient-name { font-size: 32px; }
    .anamnesis-status-pill { min-width: 110px; }
    .anamnesis-session-summary { grid-template-columns: 1fr; }
    .clinical-session-toggle-grid { grid-template-columns: 1fr; }
    .anamnesis-attachment-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .clinical-note-readonly-fields { grid-template-columns: 1fr; }
    .clinical-note-form { padding: 20px; }
    .clinical-note-actions .button { min-width: 0; }
    .profile-data-list, .clinical-check-grid, .condition-grid, .clinical-note-body { grid-template-columns: 1fr; }
    .note-signature, .addendum-list, .addendum-form { grid-column: span 1; }
    .clinical-section-heading { align-items: flex-start; flex-direction: column; }
    .cash-session-banner { align-items: stretch; flex-direction: column; }
    .cash-summary-grid { grid-template-columns: 1fr; }
    .cash-summary-grid .expected-card { grid-column: span 1; }
    .cash-list article { grid-template-columns: auto minmax(0, 1fr) auto; }
    .cash-list article .button, .cash-cancel-control, .cash-list article .status-pill { grid-column: 2 / -1; justify-self: start; }
    .cash-history-filters { grid-template-columns: 1fr; }
    .receipt-paper { padding: 33px 23px; }
    .receipt-brand { align-items: flex-start; flex-direction: column; }
    .receipt-brand div { text-align: left; }
    .receipt-details div { grid-template-columns: 1fr; gap: 4px; }
    .receipt-details dd { text-align: left; }
    .method-list, .product-list, .product-summary { grid-template-columns: 1fr; }
    .product-search form { align-items: stretch; flex-direction: column; }
    .pos-closed-state, .beverage-pos-heading, .inventory-heading { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
    .pos-closed-state { grid-template-columns: 1fr; }
    .pos-closed-state > span { display: none; }
    .pos-search-row, .beverage-pos-layout { grid-template-columns: 1fr; }
    .pos-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pos-cart { position: static; }
    .ticket-tabs { display: grid; grid-template-columns: 1fr; }
    .ticket-tabs a { justify-content: center; }
    .ticket-directory .section-heading { align-items: flex-start; flex-direction: column; }
    .ticket-date-filter { width: 100%; margin-left: 0; }
    .ticket-date-picker { flex: 1; min-width: 0; }
    .ticket-row { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
    .ticket-row-meta, .ticket-row-status { grid-column: 2; }
    .ticket-row .button { grid-column: 1 / -1; grid-row: auto; width: 100%; }
    .sale-product-row { grid-template-columns: minmax(0, 1fr) auto; }
    .sale-product-row input { grid-column: 1 / -1; width: 100%; }
    .report-filter-card form, .audit-filter-card form { align-items: stretch; grid-template-columns: 1fr; flex-direction: column; }
    .report-filter-card form { display: flex; }
    .report-filter-card .form-group { width: 100%; }
    .report-filter-card form > span { margin-left: 0; }
    .report-metrics { grid-template-columns: 1fr; }
    .report-metrics .primary-metric { grid-column: span 1; }
    .daily-report-card > footer { flex-direction: column; }
    .audit-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .audit-log-list article, .audit-log-entry > summary { grid-template-columns: 55px auto minmax(0, 1fr); gap: 9px; }
    .audit-log-technical { grid-column: 1 / -1; }
    .audit-entry-toggle { grid-column: 3; grid-row: 1; justify-self: end; }
    .audit-log-details { padding-left: 0; }
    .audit-detail-grid { grid-template-columns: 1fr; }
    .team-summary, .therapist-profile-grid { grid-template-columns: 1fr; }
    .user-row:not(.header) { grid-template-columns: 1fr; }
    .user-identity, .user-actions { grid-column: 1; }
    .user-admin-summary { grid-template-columns: auto minmax(0, 1fr); }
    .user-admin-summary .status-pill { grid-column: 2; justify-self: start; }
    .user-admin-section { padding: 14px; }
    .user-security-actions .button { width: 100%; min-width: 0; }
}

@media (max-width: 1320px) {
    .report-hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .85fr); }
    .report-attendance-card { grid-column: span 2; }
}

@media (max-width: 980px) {
    .report-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-kpi--featured { grid-column: span 2; }
    .report-kpi:not(.report-kpi--featured) { grid-column: auto; }
    .report-hero-grid, .report-analysis-grid, .report-bottom-grid { grid-template-columns: 1fr; }
    .report-attendance-card { grid-column: auto; }
    .report-donut-card { min-height: 0; }
    .report-dashboard-header { align-items: flex-start; flex-direction: column; }
    .report-cash-status { align-self: stretch; width: 100%; }
}

@media (max-width: 560px) {
    .report-kpi-grid { grid-template-columns: 1fr; }
    .report-kpi--featured, .report-kpi:not(.report-kpi--featured) { grid-column: auto; }
    .report-kpi { min-height: 144px; }
    .report-dashboard-filter { padding: 15px; }
    .report-dashboard-filter .button { width: 100%; }
    .report-chart-card, .report-donut-card, .report-ranking-card, .report-inventory-card, .report-operations-card, .report-export-card, .report-audit-card { padding: 15px; }
    .report-card-heading { align-items: flex-start; flex-direction: column; }
    .report-chart-actions { width: 100%; justify-items: start; }
    .report-chart-footer { flex-direction: column; }
    .report-donut-layout { gap: 12px; }
    .report-donut { width: 102px; height: 102px; }
    .report-donut::after { inset: 16px; }
    .report-ranking-row { grid-template-columns: minmax(0, 1fr) 75px; }
    .report-ranking-row > span { grid-column: 1 / -1; grid-row: 2; }
    .report-ranking-row > b { grid-column: 2; grid-row: 1; }
    .report-inventory-values { grid-template-columns: 1fr; }
    .report-operation-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .report-operation-row time { grid-column: 2; }
    .report-operation-row > b { grid-column: 3; grid-row: 1 / span 2; }
    .report-audit-list > div { grid-template-columns: auto minmax(0, 1fr); }
    .report-audit-list code { grid-column: 2; justify-self: start; }
}

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

@media print {
    @page { margin: 12mm; size: auto; }
    body { background: #fff; }
    .sidebar, .no-print, .flash { display: none !important; }
    .app-shell { display: block; }
    .main-content { padding: 0; }
    .receipt-paper { max-width: none; margin: 0; padding: 28px 34px; border: 0; box-shadow: none; }
}

/* Respaldo */
.backup-page-header { align-items: center; }
.backup-mail-status, .backup-config-badge, .backup-history-count, .backup-run-status { border-radius: 999px; font-size: .78rem; font-weight: 800; padding: 8px 12px; }
.backup-mail-status { background: #fff0ef; color: #a13c36; }
.backup-mail-status.is-ready, .backup-config-badge.is-enabled { background: #e5f6ee; color: #08724d; }
.backup-hero-card, .backup-settings-card, .backup-history-card { background: #fff; border: 1px solid #e4e8ef; border-radius: 18px; box-shadow: 0 12px 28px #171b2314; margin-top: 22px; padding: 26px; }
.backup-hero-card { align-items: center; background: linear-gradient(118deg, #fff 0%, #fff7f6 100%); border-color: #f3bbb7; display: grid; gap: 20px; grid-template-columns: auto minmax(0, 1fr) auto; }
.backup-hero-icon, .backup-run-icon { align-items: center; background: #fff0ef; border-radius: 15px; color: #dd4b43; display: flex; justify-content: center; }
.backup-hero-icon { height: 64px; width: 64px; }
.backup-hero-icon .vefort-icon { height: 30px; width: 30px; }
.backup-hero-content h2, .backup-card-heading h2 { color: #171b23; font-size: 1.28rem; margin: 4px 0 6px; }
.backup-hero-content > p:not(.eyebrow) { color: #62718a; margin: 0; }
.backup-security-points { color: #08724d; display: flex; flex-wrap: wrap; font-size: .82rem; font-weight: 750; gap: 8px 16px; margin-top: 13px; }
.backup-generate-form .button { min-width: 184px; justify-content: center; }
.backup-card-heading { align-items: center; display: flex; gap: 18px; justify-content: space-between; }
.backup-config-badge, .backup-history-count { background: #f0f3f8; color: #62718a; white-space: nowrap; }
.backup-settings-form { display: grid; gap: 18px; margin-top: 20px; }
.backup-switch-control { align-items: center; color: #171b23; cursor: pointer; display: inline-flex; gap: 10px; width: fit-content; }
.backup-switch-control input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.backup-switch-control span { background: #8791a5; border-radius: 999px; height: 24px; position: relative; transition: background .2s ease; width: 44px; }
.backup-switch-control span::after { background: #fff; border-radius: 50%; content: ''; height: 18px; left: 3px; position: absolute; top: 3px; transition: transform .2s ease; width: 18px; }
.backup-switch-control input:checked + span { background: #dd4b43; }
.backup-switch-control input:checked + span::after { transform: translateX(20px); }
.backup-switch-control input:focus-visible + span { outline: 3px solid #dd4b4360; outline-offset: 3px; }
.backup-recipient-group textarea { min-height: 88px; resize: vertical; }
.backup-recipient-group small, .backup-mail-help, .backup-future-channel { color: #68758b; font-size: .82rem; line-height: 1.45; }
.backup-settings-actions { align-items: center; border-top: 1px solid #e7ebf1; display: flex; gap: 18px; justify-content: space-between; padding-top: 18px; }
.backup-future-channel { align-items: center; background: #f5f7fa; border-radius: 10px; display: flex; gap: 8px; margin: 18px 0 0; padding: 10px 12px; }
.backup-future-channel .vefort-icon { color: #8791a5; height: 16px; width: 16px; }
.backup-empty-state { align-items: center; color: #68758b; display: flex; flex-direction: column; gap: 8px; min-height: 180px; justify-content: center; text-align: center; }
.backup-empty-state .vefort-icon { color: #dd4b43; height: 34px; width: 34px; }
.backup-empty-state strong { color: #171b23; }
.backup-run-list { margin-top: 18px; }
.backup-run-row { align-items: center; border-top: 1px solid #e7ebf1; display: grid; gap: 13px; grid-template-columns: 38px minmax(180px, 1.4fr) minmax(120px, .7fr) auto auto; padding: 15px 0; position: relative; }
.backup-run-icon { border-radius: 11px; height: 38px; width: 38px; }
.backup-run-icon .vefort-icon { height: 17px; width: 17px; }
.backup-run-main { display: grid; gap: 3px; min-width: 0; }
.backup-run-main strong { color: #171b23; font-size: .9rem; }
.backup-run-main span, .backup-run-detail { color: #68758b; font-size: .78rem; }
.backup-run-detail { display: flex; flex-direction: column; gap: 3px; }
.backup-run-status.status-pending, .backup-run-status.status-processing { background: #fff1dc; color: #a65f10; }
.backup-run-status.status-verified { background: #edf1f6; color: #61708a; }
.backup-run-status.status-sent { background: #e5f6ee; color: #08724d; }
.backup-run-status.status-failed { background: #fff0ef; color: #b73730; }
.backup-run-error { color: #b73730; font-size: .78rem; grid-column: 2 / -1; margin: -4px 0 0; }
.backup-run-row .button.compact { font-size: .76rem; min-height: 34px; padding: 7px 10px; white-space: nowrap; }
.pagination-wrap { margin-top: 20px; }

@media (max-width: 760px) {
    .backup-page-header { align-items: flex-start; flex-direction: column; }
    .backup-hero-card { align-items: flex-start; grid-template-columns: auto minmax(0, 1fr); }
    .backup-generate-form { grid-column: 1 / -1; width: 100%; }
    .backup-generate-form .button { width: 100%; }
    .backup-settings-actions { align-items: stretch; flex-direction: column; }
    .backup-settings-actions .button { width: 100%; }
    .backup-run-row { align-items: start; grid-template-columns: 38px minmax(0, 1fr) auto; }
    .backup-run-detail { grid-column: 2; }
    .backup-run-status { grid-column: 3; grid-row: 1; }
    .backup-run-row form { grid-column: 2 / -1; }
}

/* Ajustes finales para pantallas táctiles y resoluciones compactas. */
@media (max-width: 860px) {
    .main-content { padding: clamp(18px, 3vw, 23px) clamp(12px, 2.5vw, 16px) max(30px, env(safe-area-inset-bottom)); }
    .patient-directory, .patient-appointments-section, .cash-history, .report-chart-scroll, .user-directory, .therapist-tabs, .agenda-legend {
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }
    .modal { max-height: calc(100dvh - 20px); overscroll-behavior: contain; }
}

@media (max-width: 560px) {
    .sidebar { padding: 10px 12px; gap: 8px; }
    .brand img { width: 108px; height: 42px; }
    .mobile-menu-toggle { min-height: 42px; padding: 0 10px; }
    .main-nav { max-height: calc(100dvh - 70px); }
    .page-header { gap: 14px; margin-bottom: 20px; }
    .page-header h1 { font-size: clamp(26px, 8vw, 32px); }
    .page-header > div > p:not(.eyebrow) { font-size: 14px; }
    .header-actions { flex-wrap: wrap; }
    .header-actions .button { flex: 1 1 148px; min-width: 0; }
    .clinic-tabs, .cash-tabs { display: grid; grid-template-columns: 1fr; padding: 6px; }
    .clinic-tabs a, .cash-tabs a { justify-content: flex-start; padding: 0 14px; }
    .clinic-section-heading { align-items: flex-start; flex-direction: column; padding: 16px; }
    .ticket-directory, .beverage-pos { padding: 15px; border-radius: 12px; }
    .modal { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); margin: 8px auto; border-radius: 14px; }
    .modal-card { padding: 18px 16px; border-radius: 14px; }
    .modal-header { gap: 10px; margin-bottom: 17px; }
    .modal-header h2 { font-size: 21px; overflow-wrap: anywhere; }
    .clock-popover { width: min(316px, calc(100vw - 16px)); }
    .patient-calendar-popover { width: min(342px, calc(100vw - 16px)); }
    .backup-hero-card, .backup-settings-card, .backup-history-card { margin-top: 16px; padding: 18px 16px; border-radius: 14px; }
    .backup-card-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
    .backup-run-row { gap: 10px; }
    .backup-run-status { max-width: 118px; text-align: center; }
    .login-logo-trigger img { width: min(118%, calc(100vw - 32px)); }
    .login-experience.is-open .login-logo-trigger img { width: min(108%, calc(100vw - 32px)); }
}

@media (max-width: 360px) {
    .main-content { padding-right: 10px; padding-left: 10px; }
    .page-header h1 { font-size: 26px; }
    .agenda-view-switch a { padding-right: 6px; padding-left: 6px; font-size: 10px; }
    .summary-grid, .pos-catalog { grid-template-columns: 1fr; }
    .anamnesis-attachment-list { grid-template-columns: 1fr; }
    .backup-hero-card { grid-template-columns: 1fr; }
    .backup-generate-form { grid-column: auto; }
    .login-logo-trigger img, .login-experience.is-open .login-logo-trigger img { width: calc(100vw - 28px); }
}

@media (max-width: 860px) and (max-height: 700px) {
    .modal { max-height: calc(100dvh - 12px); }
    .modal-card { padding-top: 16px; padding-bottom: 16px; }
    .modal-actions { margin-top: 16px; padding-top: 13px; }
}

.backup-run-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; grid-column: 1 / -1; min-width: 0; }
.backup-run-actions form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.backup-run-actions label { display: flex; align-items: center; gap: 6px; }
.backup-run-actions input[type=checkbox] { width: auto; }
.backup-run-error, .backup-run-main { overflow-wrap: anywhere; }
.anamnesis-dirty-notice { position: sticky; top: 8px; z-index: 8; padding: 12px 16px; background: #fff4df; color: #623f00; border: 1px solid #dfbc72; border-radius: 10px; margin-bottom: 16px; }
@media (max-width: 600px) {
    .backup-run-actions, .backup-run-actions form { align-items: stretch; flex-direction: column; }
    .backup-run-actions .button { width: 100%; }
}
