:root {
  color-scheme: dark;
  --bg: #0a090c;
  --sidebar: #121014;
  --surface: #1b191e;
  --surface-secondary: #242127;
  --surface-hover: #2b272f;
  --border: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 14%);
  --text: #f5f3f7;
  --text-muted: #aaa4b0;
  --accent: #c5a7ff;
  --accent-strong: #aa82fa;
  --accent-ink: #1b112e;
  --success: #72d6a0;
  --danger: #ff8d9b;
  --warning: #efc66d;
  --info: #8ec9ef;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 24px 70px rgb(0 0 0 / 28%);
  --sidebar-width: 264px;
  font-family: Inter, Geist, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
body::before { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 78% -15%, rgb(197 167 255 / 9%), transparent 34%), radial-gradient(circle at 20% 110%, rgb(102 69 141 / 8%), transparent 32%); content: ""; pointer-events: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(1.9rem, 3vw, 2.55rem); line-height: 1.15; letter-spacing: -0.04em; }
h2 { margin-bottom: 4px; font-size: 1.12rem; letter-spacing: -0.02em; }
h3 { margin-bottom: 5px; }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; transform: translateY(-150%); border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid rgb(197 167 255 / 60%); outline-offset: 3px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 26px 18px 20px; border-right: 1px solid var(--border); background: rgb(18 16 20 / 94%); backdrop-filter: blur(22px); }
.brand { display: flex; min-width: 0; align-items: center; gap: 12px; margin: 0 8px 26px; }
.brand-logo, .auth-logo, .settings-logo { object-fit: cover; border: 1px solid var(--border-strong); background: var(--surface-secondary); }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; }
.brand-mark { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid rgb(197 167 255 / 25%); border-radius: 13px; background: linear-gradient(145deg, var(--accent), #8d68d7); color: var(--accent-ink); font-size: .82rem; font-weight: 900; letter-spacing: -.03em; box-shadow: 0 9px 24px rgb(133 94 196 / 22%); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; }
.brand-copy strong { overflow: hidden; font-size: .96rem; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small, .profile-link small { color: var(--text-muted); font-size: .72rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 20px; }
.nav-label { margin: 17px 12px 7px; color: #77717c; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid transparent; border-radius: 11px; color: var(--text-muted); font-size: .9rem; font-weight: 560; transition: .18s ease; }
.sidebar-nav a span { display: inline-grid; width: 20px; place-items: center; color: #857e8a; font-size: 1rem; }
.sidebar-nav a:hover { background: rgb(255 255 255 / 3%); color: var(--text); }
.sidebar-nav a[aria-current="page"] { border-color: rgb(197 167 255 / 12%); background: rgb(197 167 255 / 10%); color: var(--accent); }
.sidebar-nav a[aria-current="page"] span { color: var(--accent); }
.sidebar-footer { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.profile-link { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-sm); }
.profile-link:hover { background: rgb(255 255 255 / 3%); }
.profile-link > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.profile-link strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid rgb(197 167 255 / 20%); border-radius: 50%; background: rgb(197 167 255 / 12%); color: var(--accent); font-weight: 800; }
.avatar-large { width: 47px; height: 47px; }
.avatar-xl { width: 76px; height: 76px; margin-bottom: 18px; font-size: 1.45rem; }
.main-content { min-height: 100vh; margin-left: var(--sidebar-width); padding: 40px clamp(26px, 4vw, 64px) 64px; }
.mobile-header, .bottom-nav, .mobile-more { display: none; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 700; line-height: 1; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 26px rgb(172 129 250 / 16%); }
.button-primary:hover { background: #d1b8ff; }
.button-secondary { border-color: var(--border-strong); background: var(--surface-secondary); color: var(--text); }
.button-secondary:hover, .button-ghost:hover { border-color: rgb(197 167 255 / 22%); background: var(--surface-hover); }
.button-ghost { border-color: var(--border); background: transparent; color: var(--text-muted); }
.button-danger { border-color: rgb(255 141 155 / 30%); background: rgb(255 141 155 / 12%); color: #ffc0c8; }
.button-danger:hover { background: rgb(255 141 155 / 20%); }
.button-wide { width: 100%; }
.button-large { min-height: 48px; }
.button-small { min-height: 34px; padding: 7px 11px; font-size: .78rem; }
.icon-button { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 1.25rem; font-weight: 800; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 auto 30px; max-width: 1380px; }
.page-header p:not(.eyebrow) { margin-bottom: 0; color: var(--text-muted); font-size: .98rem; }
.eyebrow { margin-bottom: 8px; color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgb(29 27 32 / 96%), rgb(24 22 27 / 96%)); box-shadow: inset 0 1px rgb(255 255 255 / 2%); }
.panel-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading { padding: 22px 24px; border-bottom: 1px solid var(--border); }
.panel-heading h2, .section-heading h2 { margin-bottom: 0; }
.panel-heading .eyebrow { margin-bottom: 4px; }
.panel-heading > a { color: var(--accent); font-size: .8rem; font-weight: 700; }

.metrics-grid { display: grid; max-width: 1380px; margin: 0 auto 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.metric-card::after { position: absolute; right: -25px; bottom: -45px; width: 100px; height: 100px; border-radius: 50%; background: rgb(197 167 255 / 4%); content: ""; }
.metric-card p { margin: 13px 0 4px; color: var(--text-muted); font-size: .78rem; }
.metric-card strong { display: block; font-size: clamp(1.22rem, 2vw, 1.7rem); letter-spacing: -.035em; }
.metric-card small { color: #77717c; font-size: .7rem; }
.metric-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; font-size: .9rem; }
.metric-icon.accent { background: rgb(197 167 255 / 12%); color: var(--accent); }
.metric-icon.neutral { background: rgb(142 201 239 / 10%); color: var(--info); }
.metric-icon.warning { background: rgb(239 198 109 / 10%); color: var(--warning); }
.metric-icon.success { background: rgb(114 214 160 / 10%); color: var(--success); }
.dashboard-grid { display: grid; max-width: 1380px; margin: 0 auto 20px; grid-template-columns: minmax(0, 2fr) minmax(280px, .72fr); gap: 20px; }
.pending-appointments-panel { max-width: 1380px; margin: 0 auto 20px; border-color: rgb(239 198 109 / 24%); }
.panel-description { margin: 6px 0 0; color: var(--text-muted); font-size: .74rem; }
.appointment-list { padding: 8px 12px 14px; }
.appointment-row { display: grid; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--border); grid-template-columns: 82px minmax(175px, 1fr) 100px minmax(135px, auto); gap: 12px; }
.appointment-row:last-child { border-bottom: 0; }
.appointment-row time { color: var(--text); font-size: .82rem; font-weight: 750; }
.dashboard-appointment-time { display: flex; flex-direction: column; }
.dashboard-appointment-time small { color: var(--text-muted); font-size: .62rem; }
.dashboard-appointment-date { display: flex; flex-direction: column; gap: 2px; }
.dashboard-appointment-date strong { color: var(--warning); font-size: .7rem; text-transform: capitalize; }
.dashboard-appointment-date time { color: var(--text-muted); font-size: .7rem; }
.appointment-person { display: flex; min-width: 0; flex-direction: column; }
.appointment-person strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.appointment-person small { color: var(--text-muted); font-size: .72rem; }
.appointment-price { text-align: right; font-size: .82rem; }
.dashboard-appointment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.dashboard-appointment-actions form { margin: 0; }
.dashboard-appointment-actions .button { min-height: 34px; padding: 7px 10px; }
.dashboard-appointment-actions .button-primary { white-space: nowrap; }
.paid-compact { color: var(--success); font-size: .68rem; font-weight: 800; white-space: nowrap; }
.dashboard-person { align-items: center; flex-direction: row; gap: 9px; }
.dashboard-person > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.dashboard-person .avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: .7rem; }
.dashboard-reminder-state { margin-top: 2px; font-size: .6rem !important; font-weight: 750; }
.dashboard-agenda-heading { display: flex; align-items: center; gap: 13px; }
.dashboard-agenda-heading a { color: var(--accent); font-size: .8rem; font-weight: 700; }
.status { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: .68rem; font-weight: 750; white-space: nowrap; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-pending { background: rgb(239 198 109 / 10%); color: var(--warning); }
.status-confirmed { background: rgb(142 201 239 / 10%); color: var(--info); }
.status-completed { background: rgb(114 214 160 / 10%); color: var(--success); }
.status-cancelled { background: rgb(255 141 155 / 9%); color: var(--danger); }
.status-no_show { background: rgb(170 164 176 / 10%); color: var(--text-muted); }
.next-card { padding: 24px; }
.next-card > h2 { margin-bottom: 22px; }
.next-time { margin-bottom: 22px; font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.06em; }
.next-time span { color: var(--text-muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.next-person { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.next-person > div:last-child { display: flex; flex-direction: column; }
.next-person strong { font-size: .86rem; }
.next-person small { color: var(--text-muted); font-size: .74rem; }
.countdown { display: flex; align-items: center; gap: 7px; margin-top: 18px; padding: 11px 12px; border-radius: var(--radius-sm); background: rgb(197 167 255 / 8%); color: var(--accent); font-size: .78rem; font-weight: 700; }
.next-reminder-button { margin-top: 12px; }
.weekly-panel { max-width: 1380px; margin: 0 auto; }
.weekly-content { display: grid; align-items: stretch; padding: 22px 24px 24px; grid-template-columns: minmax(250px, .75fr) minmax(340px, 1.25fr); gap: 36px; }
.weekly-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.weekly-totals > div { display: flex; flex-direction: column; padding: 14px; border-radius: 12px; background: rgb(255 255 255 / 2.5%); }
.weekly-totals span { color: var(--text-muted); font-size: .7rem; }
.weekly-totals strong { font-size: 1rem; }
.weekly-totals .weekly-profit { grid-column: 1 / -1; background: rgb(197 167 255 / 8%); }
.weekly-profit strong { color: var(--accent); font-size: 1.22rem; }
.chart-legend { display: flex; gap: 16px; color: var(--text-muted); font-size: .68rem; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend-sales, .bar-sales { background: var(--accent); }
.legend-expenses, .bar-expenses { background: #615a67; }
.mini-chart { display: flex; min-height: 150px; align-items: flex-end; justify-content: space-around; gap: 12px; padding-top: 8px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to bottom, transparent 0, transparent 49px, var(--border) 50px); }
.chart-day { display: flex; height: 150px; flex: 1; align-items: center; flex-direction: column; justify-content: flex-end; gap: 8px; }
.bars { display: flex; height: 120px; align-items: flex-end; justify-content: center; gap: 4px; }
.bar { display: block; width: clamp(7px, 1.2vw, 13px); min-height: 2px; border-radius: 4px 4px 1px 1px; }
.chart-day small { color: #817b85; font-size: .65rem; text-transform: uppercase; }

.empty-state { display: flex; min-height: 330px; align-items: center; justify-content: center; flex-direction: column; padding: 40px 20px; text-align: center; }
.empty-state > span { display: grid; width: 50px; height: 50px; margin-bottom: 16px; place-items: center; border-radius: 15px; background: rgb(197 167 255 / 9%); color: var(--accent); font-size: 1.2rem; }
.empty-state p { max-width: 400px; margin-bottom: 18px; color: var(--text-muted); }
.empty-state.compact { min-height: 210px; }
.pagination { display: grid; align-items: center; padding: 18px 22px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: .78rem; grid-template-columns: 1fr auto 1fr; gap: 12px; }
.pagination > :last-child { justify-self: end; }
.error-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.error-card { width: min(100%, 520px); padding: clamp(30px, 7vw, 56px); text-align: center; }
.error-card .brand { justify-content: center; margin-bottom: 32px; }
.error-code { margin-bottom: 8px; color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .16em; }
.error-card p { margin: 10px auto 24px; color: var(--text-muted); }
.table-panel { max-width: 1380px; margin: 0 auto; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 16px 22px; border-bottom: 1px solid var(--border); color: #85808a; font-size: .68rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 17px 22px; border-bottom: 1px solid var(--border); color: #d9d5dc; font-size: .82rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgb(255 255 255 / 1.5%); }
td > strong, td > small { display: block; }
td > small { max-width: 420px; margin-top: 2px; color: var(--text-muted); }
.table-actions { display: flex; justify-content: flex-end; gap: 7px; }
.table-actions form, .card-actions form { margin: 0; }
.mobile-card-list { display: none; }

.form-panel { max-width: 880px; margin: 0 auto; padding: 28px; }
.narrow-form { max-width: 620px; }
.section-heading { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.section-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field-span-2 { grid-column: span 2; }
.field label { color: #d9d5dc; font-size: .75rem; font-weight: 700; }
.field input:not([type="checkbox"]), .field textarea, .field select, .stack-form input { width: 100%; border: 1px solid var(--border-strong); border-radius: 11px; outline: none; background: #131116; color: var(--text); transition: border-color .15s ease, box-shadow .15s ease; }
.field input:not([type="checkbox"]), .field select, .stack-form input { height: 44px; padding: 0 13px; }
.field textarea { min-height: 100px; padding: 11px 13px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .stack-form input:focus { border-color: rgb(197 167 255 / 60%); box-shadow: 0 0 0 3px rgb(197 167 255 / 9%); }
.field input:disabled { color: #746f78; cursor: not-allowed; }
.field input[type="file"] { height: auto; padding: 9px; }
.field input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 11px; border: 0; border-radius: 8px; background: var(--surface-secondary); color: var(--text); cursor: pointer; }
.field-help { color: #817b85; font-size: .7rem; }
.field-help ul { margin: 5px 0 0; padding-left: 18px; }
.field-error, .errorlist { color: var(--danger); font-size: .72rem; }
.errorlist { margin: 0; padding-left: 18px; }
.form-alert { margin-bottom: 18px; padding: 11px 13px; border: 1px solid rgb(255 141 155 / 20%); border-radius: var(--radius-sm); background: rgb(255 141 155 / 7%); color: #ffc0c8; font-size: .78rem; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 11px; background: #131116; }
.input-prefix span { padding: 0 0 0 13px; color: var(--text-muted); font-size: .75rem; }
.input-prefix input { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.switch-field { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: rgb(255 255 255 / 1.5%); cursor: pointer; }
.switch-field input, .mini-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-control, .mini-switch > span { position: relative; width: 40px; height: 23px; flex: 0 0 40px; border-radius: 999px; background: #4a454e; transition: background .18s ease; }
.switch-control::after, .mini-switch > span::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #ddd9e0; content: ""; transition: transform .18s ease; }
.switch-field input:checked + .switch-control, .mini-switch input:checked + span { background: var(--accent); }
.switch-field input:checked + .switch-control::after, .mini-switch input:checked + span::after { transform: translateX(17px); background: var(--accent-ink); }
.switch-field input:focus-visible + .switch-control, .mini-switch input:focus-visible + span { outline: 3px solid rgb(197 167 255 / 55%); outline-offset: 3px; }
.switch-field > span:last-child { display: flex; flex-direction: column; }
.switch-field small { color: var(--text-muted); font-size: .7rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-actions-between { justify-content: space-between; }
.settings-layout { display: grid; max-width: 1380px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.settings-layout .form-panel { width: 100%; max-width: none; }
.settings-logo { width: 58px; height: 58px; border-radius: 15px; }
.hours-list { display: grid; gap: 2px; }
.hours-row { display: grid; position: relative; align-items: end; padding: 14px 4px; border-bottom: 1px solid var(--border); grid-template-columns: minmax(180px, 1fr) 180px 180px; gap: 18px; }
.hours-row:last-child { border-bottom: 0; }
.hours-day { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 7px; }
.hours-day > strong { font-size: .84rem; }
.mini-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mini-switch > span { width: 34px; height: 20px; flex-basis: 34px; }
.mini-switch > span::after { width: 14px; height: 14px; }
.mini-switch input:checked + span::after { transform: translateX(14px); }
.mini-switch small { min-width: 45px; color: var(--text-muted); font-size: .67rem; }
.row-error { grid-column: 1 / -1; color: var(--danger); font-size: .72rem; }
.sticky-form-actions { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px 13px 20px; border: 1px solid var(--border-strong); border-radius: 15px; background: rgb(22 20 24 / 92%); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.sticky-form-actions p { margin: 0; color: var(--text-muted); font-size: .76rem; }
.profile-grid { display: grid; max-width: 1000px; margin: 0 auto; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; }
.profile-summary { display: flex; align-items: center; flex-direction: column; padding: 34px 24px; text-align: center; }
.profile-summary h2 { margin-bottom: 3px; }
.profile-summary p { color: var(--text-muted); }
.role-pill { padding: 5px 10px; border-radius: 999px; background: rgb(197 167 255 / 10%); color: var(--accent); font-size: .7rem; font-weight: 700; }

.messages { position: fixed; top: 20px; right: 24px; z-index: 50; display: grid; gap: 8px; width: min(380px, calc(100vw - 40px)); }
.message { padding: 12px 15px; border: 1px solid var(--border-strong); border-radius: 12px; background: #262229; box-shadow: var(--shadow); font-size: .8rem; }
.message-success { border-color: rgb(114 214 160 / 22%); color: #a8ecc6; }

.auth-body { display: grid; min-height: 100vh; place-items: center; padding: 28px; }
.auth-body::after { position: fixed; width: 380px; height: 380px; border: 1px solid rgb(197 167 255 / 8%); border-radius: 50%; background: radial-gradient(circle, rgb(197 167 255 / 6%), transparent 65%); content: ""; transform: translate(42vw, -30vh); }
.auth-shell { position: relative; z-index: 1; width: min(100%, 430px); }
.auth-card { padding: clamp(28px, 6vw, 44px); border: 1px solid var(--border-strong); border-radius: 26px; background: rgb(25 23 28 / 92%); box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.auth-brand { margin-bottom: 30px; text-align: center; }
.auth-logo { width: 68px; height: 68px; margin-bottom: 20px; border-radius: 20px; }
.brand-mark-large { width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 20px; font-size: 1.05rem; }
.auth-brand h1 { margin-bottom: 8px; font-size: 1.8rem; }
.auth-brand p:last-child { margin: 0; color: var(--text-muted); font-size: .85rem; }
.stack-form { display: grid; gap: 17px; }
.stack-form .field { gap: 7px; }
.stack-form label { color: #d9d5dc; font-size: .75rem; font-weight: 700; }
.auth-footnote { margin: 18px 0 0; color: #706a74; font-size: .7rem; text-align: center; }

.agenda-toolbar { display: grid; max-width: 1380px; align-items: center; margin: 0 auto 18px; padding: 10px; grid-template-columns: auto 1fr auto; gap: 18px; }
.segmented { display: flex; padding: 3px; border-radius: 10px; background: #111014; }
.segmented a { padding: 7px 13px; border-radius: 8px; color: var(--text-muted); font-size: .75rem; font-weight: 700; }
.segmented a[aria-current="page"] { background: var(--surface-secondary); color: var(--accent); box-shadow: 0 2px 8px rgb(0 0 0 / 20%); }
.date-navigation { display: flex; align-items: center; justify-content: center; gap: 14px; }
.date-navigation strong { min-width: 220px; font-size: .84rem; text-align: center; text-transform: capitalize; }
.icon-button.subtle { width: 36px; height: 36px; min-height: 36px; border: 1px solid var(--border); background: transparent; color: var(--text); box-shadow: none; }
.week-grid { display: grid; max-width: 1380px; min-height: 570px; overflow-x: auto; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); grid-template-columns: repeat(7, minmax(142px, 1fr)); }
.day-column { min-width: 0; border-right: 1px solid var(--border); }
.day-column:last-child { border-right: 0; }
.day-column > header { display: flex; height: 78px; align-items: center; justify-content: center; flex-direction: column; border-bottom: 1px solid var(--border); }
.day-column > header span { color: var(--text-muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; }
.day-column > header strong { font-size: 1.35rem; }
.day-column.is-today > header strong { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.day-appointments { display: grid; align-content: start; gap: 8px; padding: 10px; }
.calendar-appointment { display: flex; min-height: 94px; flex-direction: column; padding: 11px; border: 1px solid var(--border); border-left: 3px solid #77717c; border-radius: 10px; background: rgb(255 255 255 / 2.5%); transition: background .15s ease, transform .15s ease; }
.calendar-appointment:hover { background: var(--surface-hover); transform: translateY(-1px); }
.calendar-appointment strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-appointment time, .calendar-appointment small { color: var(--text-muted); font-size: .65rem; }
.calendar-appointment time { margin-top: 5px; color: #d7d2dc; }
.status-border-pending { border-left-color: var(--warning); }
.status-border-confirmed { border-left-color: var(--info); }
.status-border-completed { border-left-color: var(--success); }
.status-border-cancelled { border-left-color: var(--danger); opacity: .65; }
.status-border-no_show { opacity: .65; }
.empty-day { display: flex; min-height: 70px; align-items: center; justify-content: center; gap: 4px; border: 1px dashed transparent; border-radius: 10px; color: #68626d; font-size: .68rem; }
.empty-day:hover { border-color: var(--border-strong); color: var(--accent); }
.today-agenda, .month-calendar { max-width: 1380px; margin: 0 auto; overflow: hidden; }
.count-pill { padding: 5px 9px; border-radius: 999px; background: rgb(197 167 255 / 9%); color: var(--accent); font-size: .68rem; font-weight: 700; }
.today-list { padding: 8px 12px 14px; }
.today-appointment { display: grid; align-items: center; min-height: 82px; padding: 12px; border-bottom: 1px solid var(--border); grid-template-columns: 100px minmax(180px, 1fr) 110px auto; gap: 15px; }
.today-appointment:last-child { border-bottom: 0; }
.today-appointment > time { font-size: .9rem; font-weight: 800; }
.today-person { display: flex; flex-direction: column; }
.today-person strong { font-size: .86rem; }
.today-person small { color: var(--text-muted); font-size: .72rem; }
.quick-actions { display: flex; justify-content: flex-end; gap: 6px; }
.quick-actions form { margin: 0; }
.danger-text { color: var(--danger); }
.month-weekdays, .month-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-weekdays { border-bottom: 1px solid var(--border); }
.month-weekdays span { padding: 14px; color: var(--text-muted); font-size: .68rem; font-weight: 750; text-align: center; text-transform: uppercase; }
.month-day { display: flex; min-height: 112px; align-items: flex-start; flex-direction: column; padding: 13px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .15s ease; }
.month-day:last-child { border-right: 0; }
.month-day:hover { background: var(--surface-hover); }
.month-day strong { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; font-size: .78rem; }
.month-day.is-today strong { background: var(--accent); color: var(--accent-ink); }
.month-day span { margin-top: auto; padding: 4px 7px; border-radius: 7px; background: rgb(197 167 255 / 9%); color: var(--accent); font-size: .65rem; font-weight: 700; }
.month-day small { margin-top: auto; color: #6f6973; font-size: .63rem; }
.outside-month { opacity: .34; }

.appointment-form-layout { display: grid; max-width: 1120px; align-items: start; margin: 0 auto; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.appointment-form-layout > .form-panel { width: 100%; max-width: none; }
.appointment-form-layout:not(:has(.quick-customer-panel:not([hidden]))) { grid-template-columns: minmax(0, 760px); justify-content: center; }
.quick-customer-panel { position: sticky; top: 24px; display: grid; gap: 16px; padding: 22px; }
.quick-customer-panel[hidden] { display: none; }
.quick-customer-panel .section-heading { margin-bottom: 0; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.text-button { padding: 3px; border: 0; background: none; color: var(--accent); cursor: pointer; font-size: .72rem; font-weight: 750; }
.select-search { height: 38px !important; background: #18151b !important; font-size: .76rem !important; }
.service-preview { display: flex; gap: 9px; margin-top: 3px; }
.service-preview[hidden] { display: none; }
.service-preview span { display: flex; flex: 1; flex-direction: column; padding: 9px 11px; border-radius: 9px; background: rgb(197 167 255 / 7%); }
.service-preview small { color: var(--text-muted); font-size: .63rem; }
.service-preview strong { color: var(--accent); font-size: .78rem; }
.slot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.slot-grid p { grid-column: 1 / -1; margin: 0; padding: 14px; border-radius: 10px; background: rgb(255 255 255 / 2%); color: var(--text-muted); font-size: .72rem; text-align: center; }
.slot-button { min-height: 40px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 9px; background: #151318; color: var(--text); cursor: pointer; font-size: .69rem; }
.slot-button:hover:not(:disabled), .slot-button[aria-pressed="true"] { border-color: var(--accent); background: rgb(197 167 255 / 12%); color: var(--accent); }
.slot-button:disabled { color: #5e5961; text-decoration: line-through; cursor: not-allowed; opacity: .55; }

.detail-layout, .charge-layout { display: grid; max-width: 1000px; align-items: start; margin: 0 auto; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .7fr); gap: 20px; }
.detail-card, .action-card, .charge-summary { padding: 26px; }
.detail-time { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; padding-bottom: 21px; border-bottom: 1px solid var(--border); }
.detail-time time { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 850; letter-spacing: -.06em; }
.detail-time span { color: var(--text-muted); font-size: .75rem; }
.detail-list { display: grid; margin: 0; grid-template-columns: 1fr 1fr; gap: 0; }
.detail-list > div { padding: 14px 0; border-bottom: 1px solid var(--border); }
.detail-list > div:nth-child(odd) { padding-right: 20px; }
.detail-list dt { color: var(--text-muted); font-size: .68rem; }
.detail-list dd { margin: 3px 0 0; font-size: .84rem; font-weight: 650; }
.detail-list a { color: var(--accent); }
.detail-list .detail-notes { grid-column: 1 / -1; }
.action-card > p { color: var(--text-muted); font-size: .76rem; }
.action-stack { display: grid; gap: 9px; margin-top: 21px; }
.action-stack form { margin: 0; }
.status-large { padding: 8px 12px; font-size: .76rem; }
.charge-button { margin-top: 8px; box-shadow: 0 0 0 4px rgb(197 167 255 / 7%), 0 10px 30px rgb(172 129 250 / 18%); }
.paid-notice { padding: 12px; border-radius: 10px; background: rgb(114 214 160 / 9%); color: var(--success); font-size: .78rem; font-weight: 750; text-align: center; }
.reminder-status-card { display: flex; align-items: center; gap: 11px; margin-top: 20px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: rgb(197 167 255 / 5%); }
.reminder-status-card > span { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: rgb(197 167 255 / 10%); color: var(--accent); }
.reminder-status-card > div { display: flex; min-width: 0; flex-direction: column; }
.reminder-status-card small { color: var(--text-muted); font-size: .66rem; }
.reminder-status-card strong { font-size: .78rem; }
.manual-reminder-actions { display: grid; gap: 10px; margin-top: 12px; }
.manual-reminder-confirm { padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: rgb(114 214 160 / 5%); }
.manual-reminder-confirm[hidden], [data-reminder-confirmation][hidden] { display: none; }
.manual-reminder-confirm p, .reminder-help { margin: 0 0 10px; color: var(--text-muted); font-size: .72rem; }
.whatsapp-button { border-color: rgb(114 214 160 / 30%); background: rgb(114 214 160 / 12%); color: var(--success); }
.whatsapp-button:hover { background: rgb(114 214 160 / 20%); }
.reminder-state-pending, .reminder-indicator-pending { color: var(--warning); }
.reminder-state-sent, .reminder-indicator-sent { color: var(--success); }
.reminder-state-expired, .reminder-state-too_late { color: var(--text-muted); }
.reminder-panel { max-width: 1380px; margin: 0 auto 20px; overflow: hidden; }
.manual-reminder-list { padding: 4px 18px 12px; }
.manual-reminder-row { display: grid; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); grid-template-columns: 90px minmax(150px, 1fr) auto; gap: 14px; }
.manual-reminder-row:last-child { border-bottom: 0; }
.manual-reminder-row > time { color: var(--accent); font-size: .74rem; font-weight: 800; }
.manual-reminder-row > div:not(.manual-reminder-row-actions) { display: flex; flex-direction: column; }
.manual-reminder-row small { color: var(--text-muted); font-size: .68rem; }
.manual-reminder-row-actions { display: flex; align-items: center; gap: 8px; }
.manual-reminder-row-actions form { margin: 0; }
.reminder-indicator { display: block; margin-top: 5px; font-size: .61rem; font-weight: 750; }
.whatsapp-dialog { width: min(440px, calc(100% - 28px)); padding: 24px; border: 1px solid var(--border-strong); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.whatsapp-dialog::backdrop { background: rgb(5 4 7 / 72%); backdrop-filter: blur(4px); }
.whatsapp-dialog .dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.whatsapp-dialog > p { margin: 15px 0 20px; color: var(--text-muted); font-size: .8rem; }
.whatsapp-dialog > p strong { color: var(--text); }
.whatsapp-dialog form { margin-bottom: 8px; }
.confirmation-dialog { width: min(500px, calc(100% - 28px)); }
.whatsapp-message-preview { margin: 0 0 18px; padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: #131116; color: #ded9e2; font-size: .78rem; line-height: 1.65; white-space: pre-line; }
.confirmation-dialog .whatsapp-button { margin-bottom: 8px; }
.settings-note { margin-top: 20px; padding: 14px; border-radius: 11px; background: rgb(197 167 255 / 6%); }
.settings-note strong { color: var(--accent); font-size: .76rem; }
.settings-note p { margin: 3px 0 0; color: var(--text-muted); font-size: .72rem; }

.search-bar { display: flex; max-width: 1380px; align-items: center; gap: 9px; margin: 0 auto 16px; padding: 9px 10px 9px 16px; }
.search-bar > span { color: var(--text-muted); font-size: 1.15rem; }
.search-bar input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.customer-cell { display: flex; align-items: center; gap: 10px; }
.customer-cell .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: .72rem; }
.row-link { color: var(--accent); font-size: 1.1rem; }
.customer-mobile-card { color: inherit; }
.customer-mobile-card > small { color: var(--text-muted); }
.title-with-avatar { display: flex; align-items: center; gap: 17px; }
.title-with-avatar .avatar-xl { margin: 0; }
.customer-metrics .metric-date { font-size: 1.25rem; }
.customer-detail-grid { display: grid; max-width: 1380px; margin: 0 auto; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr); gap: 20px; }
.history-panel { overflow: hidden; }
.history-list { padding: 7px 13px 13px; }
.history-row { display: grid; align-items: center; padding: 14px 10px; border-bottom: 1px solid var(--border); grid-template-columns: 100px minmax(150px, 1fr) 110px 90px; gap: 14px; }
.history-row:last-child { border-bottom: 0; }
.history-row time { color: var(--text-muted); font-size: .72rem; }
.history-row > div { display: flex; flex-direction: column; }
.history-row > div strong { font-size: .82rem; }
.history-row > div small { color: var(--text-muted); font-size: .68rem; }
.history-row > strong { font-size: .78rem; text-align: right; }
.customer-notes { padding: 25px; }
.customer-notes .detail-list { grid-template-columns: 1fr; }
.customer-notes .detail-list > div { padding-right: 0; }

.sales-metrics { grid-template-columns: repeat(3, 1fr); }
.filter-panel { display: grid; max-width: 1380px; align-items: end; gap: 14px; margin: 0 auto 20px; padding: 18px; }
.financial-filters { grid-template-columns: 1fr 1.2fr auto; }
.financial-filters.has-custom-dates { grid-template-columns: 1fr 1fr 1fr 1.2fr auto; }
.report-filters { grid-template-columns: 1.1fr auto auto; }
.report-filters.has-custom-dates { grid-template-columns: 1.1fr 1fr 1fr auto auto; }
.custom-date-field[hidden] { display: none; }
.filter-panel .form-alert { grid-column: 1 / -1; margin-bottom: 0; }
.filter-panel .button { min-height: 44px; }
.period-caption { margin: 0; color: var(--text-muted); font-size: .72rem; text-align: right; white-space: nowrap; }
.money-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 11px; background: #131116; }
.money-input span { padding-left: 13px; color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.money-input input { border: 0 !important; background: transparent !important; box-shadow: none !important; }
.financial-table-panel .panel-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: .72rem; }
.table-subtitle { max-width: 300px; }
.report-metrics { margin-bottom: 20px; }
.report-metrics .metric-card { min-height: 178px; }
.comparison { display: block; margin-top: 8px; }
.comparison-up { color: var(--success) !important; }
.comparison-down { color: var(--danger) !important; }
.comparison-expenses.comparison-up { color: var(--danger) !important; }
.comparison-expenses.comparison-down { color: var(--success) !important; }
.comparison-same, .comparison-none { color: var(--text-muted) !important; }
.metric-help { display: block; margin-top: 4px; color: #77717c; font-size: .66rem; }
.report-chart-panel { max-width: 1380px; margin: 0 auto 20px; overflow: hidden; }
.financial-chart { display: flex; height: 260px; align-items: flex-end; gap: clamp(2px, .7vw, 10px); padding: 26px 24px 18px; background: repeating-linear-gradient(to bottom, transparent 0, transparent 69px, var(--border) 70px); }
.financial-chart-day { display: flex; min-width: 0; height: 215px; flex: 1; align-items: center; flex-direction: column; justify-content: flex-end; gap: 8px; }
.financial-bars { display: flex; width: 100%; max-width: 34px; height: 185px; align-items: flex-end; justify-content: center; gap: 3px; }
.financial-bars .bar { width: min(12px, 42%); }
.financial-chart-day small { overflow: hidden; width: 100%; color: #817b85; font-size: .62rem; text-align: center; text-overflow: clip; }
.report-grid { display: grid; max-width: 1380px; margin: 0 auto; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-list { overflow: hidden; }
.rank-list, .breakdown-list, .summary-list { padding: 8px 22px 16px; }
.rank-header, .rank-row { display: grid; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--border); grid-template-columns: minmax(0, 1fr) 80px 120px; gap: 12px; }
.rank-header { color: #85808a; font-size: .64rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.rank-row:last-child { border-bottom: 0; }
.rank-row strong, .rank-row span { font-size: .78rem; }
.rank-row > :not(:first-child) { text-align: right; }
.breakdown-list > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.breakdown-list > div:last-child { border-bottom: 0; }
.breakdown-list span { display: flex; flex-direction: column; }
.breakdown-list > div > span:last-child { text-align: right; }
.breakdown-list strong { font-size: .8rem; }
.breakdown-list small { color: var(--text-muted); font-size: .66rem; }
.summary-list { margin: 0; }
.summary-list div { display: flex; align-items: center; justify-content: space-between; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--text-muted); font-size: .75rem; }
.summary-list dd { margin: 0; font-size: .86rem; font-weight: 800; }
.panel-empty { min-height: 135px; margin: 0; padding: 45px 22px; color: var(--text-muted); font-size: .78rem; text-align: center; }
.confirmation-layout { display: grid; min-height: calc(100vh - 150px); place-items: center; }
.confirmation-card { width: min(520px, 100%); padding: 34px; }
.confirmation-card > p:not(.eyebrow) { color: var(--text-muted); }
.danger-symbol { display: grid; width: 52px; height: 52px; margin-bottom: 20px; place-items: center; border-radius: 15px; background: rgb(255 141 155 / 10%); color: var(--danger); font-size: 1.3rem; font-weight: 900; }
.confirmation-summary { margin: 24px 0 0; }
.confirmation-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--border); }
.confirmation-summary dt { color: var(--text-muted); font-size: .72rem; }
.confirmation-summary dd { margin: 0; font-size: .82rem; font-weight: 750; text-align: right; }
.charge-layout { grid-template-columns: minmax(260px, .65fr) minmax(0, 1fr); }
.charge-layout .form-panel { width: 100%; max-width: none; }
.charge-summary { text-align: center; }
.paid-icon { display: grid; width: 56px; height: 56px; margin: 0 auto 17px; place-items: center; border-radius: 17px; background: rgb(114 214 160 / 10%); color: var(--success); font-size: 1.3rem; }
.charge-summary > p { color: var(--text-muted); }
.charge-summary dl { margin: 24px 0 0; }
.charge-summary dl div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.charge-summary dt { color: var(--text-muted); font-size: .72rem; }
.charge-summary dd { margin: 0; font-size: .82rem; font-weight: 750; }

.receipt-page-header { max-width: 720px; }
.receipt-stage { display: grid; max-width: 720px; margin: 0 auto; padding: 34px; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-large); background: #161419; box-shadow: var(--shadow); }
.thermal-receipt { box-sizing: border-box; width: 72mm; min-height: 120mm; padding: 8mm 6mm; background: #fff; box-shadow: 0 18px 45px rgb(0 0 0 / 35%); color: #111; font-family: "Courier New", Courier, monospace; font-size: 11px; line-height: 1.35; }
.receipt-brand { text-align: center; }
.receipt-brand img { width: 18mm; height: 18mm; margin: 0 auto 3mm; object-fit: contain; filter: grayscale(1) contrast(1.2); }
.receipt-brand h2 { margin: 0 0 2mm; color: #000; font-family: inherit; font-size: 16px; text-transform: uppercase; }
.receipt-brand p { margin: 1mm 0; color: #222; font-size: 10px; }
.receipt-rule { margin: 4mm 0; border-top: 1px dashed #111; }
.receipt-meta { margin: 0; }
.receipt-meta div { display: flex; justify-content: space-between; gap: 4mm; margin: 1.5mm 0; }
.receipt-meta dt { color: #222; }
.receipt-meta dd { margin: 0; font-weight: 700; text-align: right; }
.receipt-items { display: grid; gap: 3mm; }
.receipt-item { display: grid; align-items: start; grid-template-columns: minmax(0, 1fr) auto; gap: 3mm; }
.receipt-item > div { display: flex; min-width: 0; flex-direction: column; }
.receipt-item strong { overflow-wrap: anywhere; }
.receipt-item small { margin-top: 1mm; color: #333; }
.receipt-total { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 800; }
.receipt-total strong { font-size: 18px; }
.receipt-notes { margin: 4mm 0 0; padding-top: 3mm; border-top: 1px dotted #555; overflow-wrap: anywhere; }
.receipt-footer { margin-top: 9mm; text-align: center; }
.receipt-footer p { margin: 0 0 1mm; font-size: 13px; font-weight: 800; }
.receipt-footer small { color: #333; }
.receipt-actions { display: flex; max-width: 720px; justify-content: center; margin: 18px auto 0; }

@media print {
  @page { size: 80mm auto; margin: 0; }
  body { margin: 0; background: #fff; }
  body * { visibility: hidden !important; }
  #thermal-receipt, #thermal-receipt * { visibility: visible !important; }
  #thermal-receipt { position: absolute; top: 0; left: 0; width: 72mm; min-height: 0; padding: 4mm; box-shadow: none; color: #000; }
  html[data-receipt-width="58"] #thermal-receipt { width: 48mm; padding: 3mm; font-size: 9px; }
  html[data-receipt-width="58"] .receipt-brand h2 { font-size: 13px; }
  html[data-receipt-width="58"] .receipt-total { font-size: 12px; }
  html[data-receipt-width="58"] .receipt-total strong { font-size: 15px; }
}

@media (max-width: 1100px) {
  :root { --sidebar-width: 232px; }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(250px, .7fr); }
  .appointment-row { grid-template-columns: 75px minmax(130px, 1fr) 100px minmax(125px, auto); }
  .appointment-price { display: none; }
  .weekly-content { gap: 22px; }
  .hours-row { grid-template-columns: minmax(160px, 1fr) 150px 150px; }
  .today-appointment { grid-template-columns: 85px minmax(150px, 1fr) 100px; }
  .quick-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .financial-filters, .report-filters, .financial-filters.has-custom-dates, .report-filters.has-custom-dates { grid-template-columns: 1fr 1fr; }
  .filter-panel .button, .period-caption { grid-column: auto; }
}

@media (max-width: 800px) {
  .sidebar { display: none; }
  .mobile-header { position: sticky; top: 0; z-index: 20; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--border); background: rgb(10 9 12 / 88%); backdrop-filter: blur(20px); }
  .mobile-header .brand { margin: 0; }
  .mobile-header .brand-logo, .mobile-header .brand-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
  .mobile-header .brand-copy strong { max-width: 190px; }
  .mobile-header .icon-button { width: 44px; height: 44px; }
  .main-content { margin-left: 0; padding: 28px 18px 104px; }
  .bottom-nav { position: fixed; inset: auto 12px 12px; z-index: 30; display: grid; height: 66px; padding: 7px; border: 1px solid var(--border-strong); border-radius: 18px; background: rgb(24 22 27 / 94%); box-shadow: var(--shadow); grid-template-columns: repeat(4, 1fr); backdrop-filter: blur(20px); }
  .bottom-nav a, .bottom-nav button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; border: 0; border-radius: 12px; background: transparent; color: var(--text-muted); cursor: pointer; }
  .bottom-nav span { height: 23px; font-size: 1.05rem; }
  .bottom-nav small { font-size: .61rem; font-weight: 700; }
  .bottom-nav [aria-current="page"] { background: rgb(197 167 255 / 10%); color: var(--accent); }
  .mobile-more { position: fixed; right: 12px; bottom: 88px; z-index: 29; display: grid; width: min(260px, calc(100vw - 24px)); overflow: hidden; padding: 8px; border: 1px solid var(--border-strong); border-radius: 16px; background: #211e23; box-shadow: var(--shadow); }
  .mobile-more[hidden] { display: none; }
  .mobile-more a, .mobile-more button { display: block; width: 100%; padding: 11px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: .82rem; text-align: left; }
  .mobile-more a:hover, .mobile-more button:hover { background: var(--surface-hover); }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .dashboard-header .header-actions { width: 100%; }
  .dashboard-header .header-actions .button { flex: 1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .next-card { min-height: 260px; }
  .weekly-content { grid-template-columns: 1fr; }
  .hours-row { grid-template-columns: 1fr 1fr; }
  .hours-day { grid-column: 1 / -1; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-summary { padding: 24px; }
  .profile-summary .avatar-xl { width: 58px; height: 58px; margin-bottom: 11px; }
  .agenda-toolbar { grid-template-columns: 1fr auto; }
  .date-navigation { grid-column: 1 / -1; grid-row: 2; }
  .agenda-toolbar > .button { grid-column: 2; grid-row: 1; }
  .week-grid { min-height: 500px; grid-template-columns: repeat(7, minmax(135px, 1fr)); }
  .appointment-form-layout, .detail-layout, .charge-layout, .customer-detail-grid { grid-template-columns: 1fr; }
  .quick-customer-panel { position: static; grid-row: 1; }
  .action-card { order: -1; }
  .customer-notes { order: -1; }
  .report-grid { grid-template-columns: 1fr; }
  .report-header .button { width: 100%; }
  .button, .slot-button { min-height: 44px; }
  .icon-button.subtle { width: 44px; height: 44px; min-height: 44px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .main-content { padding-right: 14px; padding-left: 14px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 15px; }
  .metric-card strong { font-size: 1.08rem; }
  .metric-card small { display: none; }
  .manual-reminder-row { align-items: start; grid-template-columns: 68px minmax(0, 1fr); gap: 8px 10px; }
  .manual-reminder-row-actions { grid-column: 1 / -1; }
  .manual-reminder-row-actions .button { min-height: 44px; }
  .panel { border-radius: var(--radius); }
  .panel-heading { padding: 18px; }
  .panel-heading > a { display: none; }
  .appointment-list { padding: 5px 10px 10px; }
  .appointment-row { padding: 13px 7px; grid-template-columns: 67px minmax(0, 1fr); gap: 5px 10px; }
  .appointment-row .status { grid-column: 2; }
  .dashboard-appointment-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 5px; }
  .dashboard-appointment-actions .button { min-height: 44px; }
  .dashboard-agenda-heading .count-pill { display: none; }
  .weekly-panel .panel-heading { align-items: flex-start; flex-direction: column; }
  .weekly-content { padding: 18px; }
  .chart-legend { width: 100%; }
  .table-scroll { display: none; }
  .mobile-card-list { display: grid; gap: 10px; padding: 10px; }
  .mobile-data-card { padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: rgb(255 255 255 / 1.5%); }
  .mobile-data-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-data-card p { margin: 7px 0 14px; color: var(--text-muted); font-size: .75rem; }
  .mobile-data-card dl { display: grid; margin: 0; grid-template-columns: 1fr 1fr; }
  .mobile-data-card dl div { display: flex; flex-direction: column; }
  .mobile-data-card dt { color: var(--text-muted); font-size: .67rem; }
  .mobile-data-card dd { margin: 0; font-size: .8rem; font-weight: 700; }
  .card-actions { display: flex; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--border); }
  .form-panel { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .field-span-2 { grid-column: auto; }
  .hours-row { padding: 16px 0; grid-template-columns: 1fr 1fr; gap: 11px; }
  .sticky-form-actions p { display: none; }
  .sticky-form-actions .button { width: 100%; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .form-actions-between { flex-direction: column; }
  .messages { top: 78px; right: 14px; width: calc(100vw - 28px); }
  .auth-body { padding: 14px; }
  .auth-card { padding: 28px 20px; border-radius: 20px; }
  .agenda-toolbar { gap: 10px; }
  .agenda-toolbar > .button { display: none; }
  .segmented { grid-column: 1 / -1; }
  .segmented a { display: flex; min-height: 44px; align-items: center; justify-content: center; flex: 1; text-align: center; }
  .text-button { min-height: 44px; }
  .date-navigation { gap: 7px; }
  .date-navigation strong { min-width: 0; flex: 1; font-size: .75rem; }
  .week-grid { border-radius: var(--radius); }
  .today-list { padding: 4px 10px 10px; }
  .today-appointment { align-items: start; padding: 15px 7px; grid-template-columns: 75px minmax(0, 1fr); gap: 7px 10px; }
  .today-appointment .status { grid-column: 2; }
  .quick-actions { grid-column: 1 / -1; margin-top: 5px; }
  .quick-actions .button { min-height: 44px; }
  .month-calendar { overflow-x: auto; }
  .month-weekdays, .month-week { min-width: 665px; }
  .month-day { min-height: 92px; }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-card, .action-card, .charge-summary { padding: 20px 16px; }
  .detail-list { grid-template-columns: 1fr; }
  .detail-list > div:nth-child(odd) { padding-right: 0; }
  .detail-list .detail-notes { grid-column: auto; }
  .customer-detail-header .title-with-avatar { align-items: flex-start; }
  .customer-detail-header .avatar-xl { width: 52px; height: 52px; flex-basis: 52px; }
  .customer-detail-header .header-actions { width: 100%; }
  .customer-detail-header .header-actions .button { flex: 1; }
  .customer-metrics { grid-template-columns: 1fr 1fr; }
  .history-row { grid-template-columns: 80px minmax(0, 1fr); gap: 7px 10px; }
  .history-row .status { grid-column: 2; }
  .history-row > strong { display: none; }
  .sales-metrics { grid-template-columns: 1fr; }
  .expense-metrics { grid-template-columns: 1fr 1fr; }
  .expense-metrics .metric-card:last-child { grid-column: 1 / -1; }
  .financial-filters, .report-filters, .financial-filters.has-custom-dates, .report-filters.has-custom-dates { grid-template-columns: 1fr; }
  .filter-panel .button, .period-caption { width: 100%; grid-column: 1; }
  .period-caption { text-align: left; }
  .report-metrics { grid-template-columns: 1fr 1fr; }
  .report-metrics .metric-card { min-height: 164px; }
  .report-metrics .metric-card small { display: block; }
  .report-metrics .metric-card strong { font-size: 1rem; }
  .financial-chart { height: 230px; padding: 20px 12px 14px; }
  .financial-chart-day { height: 195px; }
  .financial-bars { height: 165px; gap: 1px; }
  .financial-chart-day small { font-size: .52rem; }
  .rank-list, .breakdown-list, .summary-list { padding-right: 15px; padding-left: 15px; }
  .rank-header { display: none; }
  .rank-header, .rank-row { grid-template-columns: minmax(0, 1fr) 55px 92px; gap: 7px; }
  .confirmation-card { padding: 26px 20px; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input { min-width: calc(100% - 42px); }
}

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