/* ==========================================================================
   Cardinal Star Healing — admin area
   --------------------------------------------------------------------------
   A calm, fixed palette (not themed by the Theme Studio) with a touch of the
   brand. Class prefix: a-.  Shell: .a-shell > .a-top (mobile bar) + .a-side
   (left nav) + .a-main.  Breakpoints: 640px and 900px.
   ========================================================================== */

:root {
  --a-bg: #F6F2F3; --a-surface: #FFFFFF; --a-surface-2: #FAF7F8; --a-ink: #1D1E20; --a-muted: #6B6468; --a-muted-2: #9C9598;
  --a-line: #E8E0E2; --a-line-strong: #CFC4C7;
  --a-primary: #B76969; --a-primary-strong: #9B5555; --a-primary-soft: #F5E9E9; --a-primary-rgb: 183, 105, 105;
  --a-accent: #C41E3A; --a-dark: #3A2C2C; --a-dark-2: #2A1F1F; --a-dark-rgb: 58, 44, 44;
  --a-danger: #B42318; --a-danger-soft: #FBE4E4; --a-success: #1E6B33; --a-success-soft: #E4F1E6; --a-warn: #7A4D00; --a-warn-soft: #FBF0D9; --a-info: #1F4E79; --a-info-soft: #E3EDF7;
  --a-radius: 14px; --a-radius-sm: 8px; --a-radius-input: 10px; --a-side-w: 15.5rem; --a-top-h: 3.75rem;
  --a-shadow: 0 6px 22px rgba(58, 44, 44, .06); --a-shadow-lg: 0 24px 60px rgba(42, 31, 31, .25);
  --a-font-display: 'Lora', Georgia, serif; --a-font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --a-ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.admin { margin: 0; min-height: 100vh; background: var(--a-bg); color: var(--a-ink); font-family: var(--a-font-body); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--a-font-display); font-weight: 500; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.1rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--a-primary-strong); text-underline-offset: .15em; }
a:hover { color: var(--a-dark); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--a-primary); outline-offset: 2px; border-radius: 3px; }
.icon { flex: none; vertical-align: middle; }
.star { width: 1em; height: 1em; color: var(--a-accent); }
.muted { color: var(--a-muted); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.a-sub { color: var(--a-muted); margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 300; background: var(--a-primary); color: #fff; padding: .5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.skip:focus { left: .5rem; }

/* Shell
   -------------------------------------------------------------------------- */
.a-shell { min-height: 100vh; }
.a-top {
  position: sticky; top: 0; z-index: 90; display: flex; align-items: center; gap: .5rem;
  height: var(--a-top-h); padding: 0 .75rem; background: var(--a-dark); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.a-top-brand { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 0; color: #fff; text-decoration: none; font-family: var(--a-font-display); font-size: 1.05rem; }
.a-top-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-top-logo { height: 2rem; width: auto; background: #fff; border-radius: 6px; padding: .15rem .3rem; }
.a-top-link { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; color: #fff; }
.a-top-link:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.a-nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.a-nav-toggle:hover { background: rgba(255, 255, 255, .12); }
.a-nav-toggle-bars { position: relative; width: 1.3rem; height: .9rem; display: block; }
.a-nav-toggle-bars span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s var(--a-ease), opacity .2s, top .25s var(--a-ease); }
.a-nav-toggle-bars span:nth-child(1) { top: 0; }
.a-nav-toggle-bars span:nth-child(2) { top: calc(50% - 1px); }
.a-nav-toggle-bars span:nth-child(3) { top: calc(100% - 2px); }
.a-nav-toggle[aria-expanded="true"] .a-nav-toggle-bars span:nth-child(1) { top: calc(50% - 1px); transform: rotate(45deg); }
.a-nav-toggle[aria-expanded="true"] .a-nav-toggle-bars span:nth-child(2) { opacity: 0; }
.a-nav-toggle[aria-expanded="true"] .a-nav-toggle-bars span:nth-child(3) { top: calc(50% - 1px); transform: rotate(-45deg); }
.a-backdrop { position: fixed; inset: 0; z-index: 94; background: rgba(42, 31, 31, .5); }

.a-side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 95; width: min(var(--a-side-w), 86vw);
  display: flex; flex-direction: column; background: linear-gradient(170deg, var(--a-dark) 0%, var(--a-dark-2) 100%); color: #fff;
  box-shadow: var(--a-shadow-lg); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
html.js .a-side { transform: translateX(-102%); transition: transform .3s var(--a-ease); }
html.js .a-side.is-open { transform: none; }
body.a-nav-open { overflow: hidden; }
html:not(.js) .a-side { position: static; width: auto; box-shadow: none; }
html:not(.js) .a-top { display: none; }
.a-side-brand { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.1rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.a-side-logo { height: 2.6rem; width: auto; max-width: 5rem; background: #fff; border-radius: 8px; padding: .25rem .4rem; }
.a-side-mark { display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.a-side-mark .star { width: 1.3rem; height: 1.3rem; }
.a-side-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.a-side-brand-text strong { font-family: var(--a-font-display); font-weight: 500; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-side-brand-text span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.a-side-nav { flex: 1; padding: .75rem .6rem; }
.a-side-nav ul { list-style: none; margin: 0; padding: 0; }
.a-side-nav li + li { margin-top: .1rem; }
.a-side-nav a {
  display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: var(--a-radius-sm);
  color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: background .15s var(--a-ease), color .15s var(--a-ease);
}
.a-side-nav a .icon { opacity: .8; }
.a-side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.a-side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .15); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--a-primary); }
.a-side-nav a[aria-current="page"] .icon { opacity: 1; }
.a-side-foot { padding: .75rem .6rem 1rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.a-side-link { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .75rem; border: 0; border-radius: var(--a-radius-sm); background: transparent; color: rgba(255, 255, 255, .75); text-decoration: none; font-size: .9rem; cursor: pointer; text-align: left; }
.a-side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.a-side-user { display: flex; align-items: center; gap: .6rem; margin: .25rem 0; padding: .4rem .75rem; color: rgba(255, 255, 255, .6); font-size: .9rem; }
.a-side-logout { margin: 0; }

.a-main { padding: 1.25rem 1rem 3rem; max-width: 76rem; margin: 0 auto; outline: none; }
body.is-wide .a-main { max-width: none; }

/* Page head, columns, grids
   -------------------------------------------------------------------------- */
.a-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 0 0 1.5rem; }
.a-head h1 { margin-bottom: .15rem; }
.a-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.a-cols { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.a-grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: minmax(0, 1fr); }
.a-stats { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 1.5rem; }
.a-split { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1rem; }
.a-stack > * + * { margin-top: 1rem; }

/* Cards
   -------------------------------------------------------------------------- */
.a-card { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1.25rem 1.4rem; margin: 0 0 1.25rem; box-shadow: var(--a-shadow); }
.a-card > :last-child { margin-bottom: 0; }
.a-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.a-card-head h2 { margin: 0; }
.a-card-head .a-sub { margin: 0; }
.a-card-flush { padding: 0; overflow: hidden; }
.a-card-flush .a-card-head { padding: 1rem 1.4rem 0; }
.a-card-tint { background: #FBF4F7; border-color: #F0DDE6; }
.a-card-warn { background: var(--a-warn-soft); border-color: #F2DFB3; }
.a-card.is-link { transition: transform .2s var(--a-ease), box-shadow .2s var(--a-ease); }
.a-card.is-link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(58, 44, 44, .1); }
.a-stat { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1rem 1.1rem; box-shadow: var(--a-shadow); color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
a.a-stat:hover { border-color: var(--a-primary); color: inherit; }
.a-stat-n { font-family: var(--a-font-display); font-size: 1.9rem; line-height: 1.05; font-weight: 500; }
.a-stat-l { font-size: .85rem; color: var(--a-muted); line-height: 1.3; }
.a-stat.is-warn .a-stat-n { color: var(--a-warn); }
.a-stat.is-danger .a-stat-n { color: var(--a-danger); }
.a-stat.is-ok .a-stat-n { color: var(--a-success); }
.a-stat.is-primary .a-stat-n { color: var(--a-primary-strong); }
.a-empty { padding: 1.5rem 1rem; text-align: center; color: var(--a-muted); }
.a-empty .star { display: block; margin: 0 auto .5rem; width: 1.4rem; height: 1.4rem; opacity: .6; }

/* Flash messages
   -------------------------------------------------------------------------- */
.a-flash { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--a-radius-input); background: var(--a-success-soft); color: var(--a-success); margin: 0 0 1.25rem; font-weight: 500; }
.a-flash .icon { flex: none; margin-top: .1rem; }
.a-flash.is-error { background: var(--a-danger-soft); color: #8A1C1C; }
.a-flash.is-warn { background: var(--a-warn-soft); color: var(--a-warn); }
.a-flash.is-info { background: var(--a-info-soft); color: var(--a-info); }
.a-flash > div { flex: 1; }
.a-flash p { margin: 0; }

/* Forms
   -------------------------------------------------------------------------- */
.a-field { margin: 0 0 1.1rem; min-width: 0; }
.a-field > label, .a-label, .a-field legend { display: block; font-weight: 600; font-size: .92rem; margin: 0 0 .35rem; }
.a-field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]), .a-field select, .a-field textarea, .a-input {
  display: block; width: 100%; min-height: 2.75rem; padding: .6rem .85rem; background: var(--a-surface); color: var(--a-ink);
  border: 1px solid var(--a-line-strong); border-radius: var(--a-radius-input); font-size: 1rem; line-height: 1.4; -webkit-appearance: none; appearance: none;
  transition: border-color .15s var(--a-ease), box-shadow .15s var(--a-ease);
}
.a-field input:focus, .a-field select:focus, .a-field textarea:focus, .a-input:focus { outline: none; border-color: var(--a-primary); box-shadow: 0 0 0 3px rgba(var(--a-primary-rgb), .2); }
.a-field textarea, textarea.a-input { min-height: 7rem; resize: vertical; }
.a-field select, select.a-input {
  padding-right: 2.5rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center; background-size: 1rem;
}
.a-field input[type="color"] { width: 3rem; height: 2.75rem; padding: .2rem; border: 1px solid var(--a-line-strong); border-radius: var(--a-radius-input); background: #fff; cursor: pointer; }
.a-field input[type="range"] { width: 100%; accent-color: var(--a-primary); }
.a-field .is-invalid, .a-field [aria-invalid="true"] { border-color: var(--a-danger) !important; }
.a-error { color: var(--a-danger); font-size: .88rem; font-weight: 500; margin: .35rem 0 0; }
.a-error:empty { display: none; }
.a-hint { display: block; font-size: .85rem; color: var(--a-muted); margin: .35rem 0 0; }
.a-check, .a-radio { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; cursor: pointer; }
.a-check input, .a-radio input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; flex: none; accent-color: var(--a-primary); cursor: pointer; }
.a-check + .a-check, .a-radio + .a-radio { margin-top: .5rem; }
.a-check-list { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.a-check-list .a-check + .a-check { margin-top: 0; }
.a-toggle { position: relative; display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500; }
.a-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a-toggle-track { position: relative; flex: none; width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--a-line-strong); transition: background .2s var(--a-ease); }
.a-toggle-track::after { content: ""; position: absolute; top: .15rem; left: .15rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s var(--a-ease); }
.a-toggle input:checked + .a-toggle-track { background: var(--a-primary); }
.a-toggle input:checked + .a-toggle-track::after { transform: translateX(1.1rem); }
.a-toggle input:focus-visible + .a-toggle-track { outline: 3px solid var(--a-primary); outline-offset: 2px; }
.a-row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; }
.a-row .a-field { flex: 1 1 10rem; margin-bottom: 0; }
.a-row-tight { gap: .5rem; align-items: center; }
.a-set { border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 1rem 1.1rem; margin: 0 0 1.1rem; min-width: 0; }
.a-set legend { padding: 0 .4rem; font-weight: 600; }
.a-inline-form { display: inline; }
.a-form-foot { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--a-line); }
.a-copy { display: flex; gap: .5rem; align-items: stretch; }
.a-copy .a-input { flex: 1; min-width: 0; font-size: .92rem; }
.a-copy .a-btn { flex: none; }

/* Buttons
   -------------------------------------------------------------------------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.6rem; padding: .5rem 1.15rem;
  border: 1px solid var(--a-line-strong); border-radius: 999px; background: var(--a-surface); color: var(--a-ink);
  font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--a-ease), color .15s var(--a-ease), border-color .15s var(--a-ease), transform .15s var(--a-ease), box-shadow .15s var(--a-ease);
}
.a-btn .icon { width: 1.05em; height: 1.05em; }
.a-btn:hover { border-color: var(--a-dark); color: var(--a-dark); transform: translateY(-1px); }
.a-btn[disabled], .a-btn[aria-disabled="true"] { opacity: .55; cursor: default; transform: none !important; }
.a-btn-primary { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.a-btn-primary:hover { background: var(--a-primary-strong); border-color: var(--a-primary-strong); color: #fff; box-shadow: 0 8px 18px rgba(var(--a-primary-rgb), .3); }
.a-btn-dark { background: var(--a-dark); border-color: var(--a-dark); color: #fff; }
.a-btn-dark:hover { background: var(--a-dark-2); color: #fff; }
.a-btn-danger { background: transparent; border-color: var(--a-danger); color: var(--a-danger); }
.a-btn-danger:hover { background: var(--a-danger); color: #fff; border-color: var(--a-danger); }
.a-btn-ghost { background: transparent; border-color: transparent; color: var(--a-primary-strong); }
.a-btn-ghost:hover { background: var(--a-primary-soft); border-color: transparent; color: var(--a-primary-strong); }
.a-btn-small { min-height: 2.1rem; padding: .3rem .85rem; font-size: .86rem; }
.a-btn-icon { width: 2.4rem; min-height: 2.4rem; padding: 0; border-radius: 50%; }
.a-btn-block { display: flex; width: 100%; }
.a-link { background: none; border: 0; padding: 0; color: var(--a-primary-strong); text-decoration: underline; cursor: pointer; font: inherit; }
.a-link:hover { color: var(--a-dark); }

/* Badges
   -------------------------------------------------------------------------- */
.a-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; background: #EFEAEC; color: #4A4246; white-space: nowrap; line-height: 1.4; }
.a-badge.is-confirmed, .a-badge.is-pay-paid, .a-badge.is-ok, .a-badge.is-approved { background: var(--a-success-soft); color: var(--a-success); }
.a-badge.is-pending, .a-badge.is-expired, .a-badge.is-pay-unpaid, .a-badge.is-warn { background: var(--a-warn-soft); color: var(--a-warn); }
.a-badge.is-cancelled, .a-badge.is-danger { background: var(--a-danger-soft); color: #8A1C1C; }
.a-badge.is-completed { background: var(--a-info-soft); color: var(--a-info); }
.a-badge.is-no_show, .a-badge.is-pay-refunded, .a-badge.is-muted { background: #EAE6E8; color: var(--a-muted); }
.a-badge.is-new, .a-badge.is-accent { background: var(--a-accent); color: #fff; }
.a-badge.is-primary { background: var(--a-primary-soft); color: var(--a-primary-strong); }
.a-dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; background: var(--a-primary); vertical-align: middle; }

/* Lists, tables, definition lists
   -------------------------------------------------------------------------- */
.a-list { list-style: none; margin: 0; padding: 0; }
.a-item { padding: .8rem 0; border-top: 1px solid var(--a-line); }
.a-item:first-child { border-top: 0; }
.a-item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem 1rem; }
.a-item-title { font-weight: 600; color: var(--a-ink); text-decoration: none; }
.a-item-title:hover { color: var(--a-primary-strong); text-decoration: underline; }
.a-item-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; color: var(--a-muted); font-size: .9rem; }
.a-day { font-family: var(--a-font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--a-muted); margin: 1.25rem 0 .25rem; }
.a-day:first-child { margin-top: 0; }
.a-table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -1.4rem; padding: 0 1.4rem; }   /* relative: keeps visually-hidden text inside the scroll box */
table.a-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.a-table th, .a-table td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--a-line); vertical-align: top; }
.a-table th { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--a-muted); white-space: nowrap; }
.a-table tbody tr:hover { background: var(--a-surface-2); }
.a-table td.is-num, .a-table th.is-num { text-align: right; }
.a-table .a-actions { justify-content: flex-end; }
.a-dl { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: .45rem 1rem; margin: 0; }
.a-dl dt { color: var(--a-muted); font-weight: 500; }
.a-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.a-steps { list-style: none; margin: 0; padding: 0; }
.a-steps li { display: flex; gap: .65rem; align-items: flex-start; padding: .45rem 0; }
.a-steps .mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1.5px solid var(--a-line-strong); font-size: .8rem; margin-top: .1rem; color: var(--a-muted); }
.a-steps .is-done { color: var(--a-muted); }
.a-steps .is-done .mark { background: var(--a-success-soft); border-color: transparent; color: var(--a-success); }
.a-steps .is-done a { color: var(--a-muted); }
.a-req { list-style: none; padding: 0; margin: 0; }
.a-req li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-top: 1px solid var(--a-line); }
.a-req li:first-child { border-top: 0; }
.a-req .ok { color: var(--a-success); font-weight: 600; }
.a-req .bad { color: var(--a-danger); font-weight: 600; }
.a-quick { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-quick a { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; border: 1px solid var(--a-line); border-radius: var(--a-radius-sm); color: var(--a-ink); text-decoration: none; font-weight: 500; font-size: .92rem; background: var(--a-surface-2); transition: border-color .15s var(--a-ease), background .15s var(--a-ease); }
.a-quick a:hover { border-color: var(--a-primary); background: var(--a-primary-soft); color: var(--a-ink); }
.a-quick a .icon { color: var(--a-primary-strong); }

/* Tabs
   -------------------------------------------------------------------------- */
.a-tabs { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--a-line); margin: 0 0 1.25rem; -webkit-overflow-scrolling: touch; }
.a-tabs a, .a-tabs button { flex: none; padding: .65rem .9rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--a-muted); font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.a-tabs a:hover, .a-tabs button:hover { color: var(--a-ink); }
.a-tabs a[aria-current="page"], .a-tabs a.is-active, .a-tabs button[aria-selected="true"], .a-tabs button.is-active { color: var(--a-primary-strong); border-bottom-color: var(--a-primary); }
.a-tab-panel[hidden] { display: none; }
.a-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.a-pills a, .a-pills button { padding: .35rem .85rem; border-radius: 999px; border: 1px solid var(--a-line-strong); background: var(--a-surface); color: var(--a-ink); font-size: .88rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.a-pills a[aria-current="page"], .a-pills a.is-active, .a-pills button.is-active { background: var(--a-dark); border-color: var(--a-dark); color: #fff; }

/* Details / more
   -------------------------------------------------------------------------- */
details.a-more { border: 1px solid var(--a-line); border-radius: var(--a-radius-sm); padding: 0 1rem; margin: 0 0 1rem; background: var(--a-surface); }
details.a-more summary { cursor: pointer; padding: .7rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.a-more summary::-webkit-details-marker { display: none; }
details.a-more summary::after { content: ""; width: .5rem; height: .5rem; border-right: 2px solid var(--a-primary); border-bottom: 2px solid var(--a-primary); transform: rotate(45deg); transition: transform .2s; }
details.a-more[open] summary::after { transform: rotate(-135deg); }
details.a-more > :not(summary) { margin-bottom: 1rem; }

/* Plain shell (sign-in, installer)
   -------------------------------------------------------------------------- */
body.a-plain { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, var(--a-dark) 0%, var(--a-dark-2) 100%); color: var(--a-ink); padding: 2rem 1rem; }
.a-plain-decor { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.a-plain-decor .star { position: absolute; color: #fff; opacity: .14; }
.a-plain-decor .star:nth-child(1) { left: 8%; top: 12%; width: 1.4rem; height: 1.4rem; }
.a-plain-decor .star:nth-child(2) { right: 10%; top: 22%; width: .9rem; height: .9rem; }
.a-plain-decor .star:nth-child(3) { left: 18%; bottom: 14%; width: .7rem; height: .7rem; }
.a-narrow { position: relative; width: 100%; max-width: 28rem; margin: 0 auto; }
.a-narrow.is-wide { max-width: 44rem; }
.a-plain-brand { text-align: center; margin: 0 0 1.25rem; }
.a-plain-logo { display: inline-block; height: 4.25rem; width: auto; background: #fff; border-radius: 14px; padding: .4rem .7rem; }
.a-plain-mark { display: inline-flex; width: 3.5rem; height: 3.5rem; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.a-plain-mark .star { width: 1.8rem; height: 1.8rem; }
.a-narrow > h1, .a-narrow > .a-sub { color: #fff; text-align: center; }
.a-narrow > .a-sub { color: rgba(255, 255, 255, .7); margin-bottom: 1.25rem; }
.a-narrow > p.muted { color: rgba(255, 255, 255, .7); text-align: center; }
.a-narrow .a-card { padding: 1.5rem 1.6rem; border-radius: 18px; box-shadow: var(--a-shadow-lg); border: 0; }
.a-narrow .a-flash { margin-top: 0; }
.a-plain-foot { text-align: center; color: rgba(255, 255, 255, .55); font-size: .85rem; margin-top: 1.25rem; }
.a-plain-foot a { color: rgba(255, 255, 255, .8); }

/* Live updates (assets/js/admin-live.js)
   -------------------------------------------------------------------------- */
.a-side-nav a .a-nav-badge { margin-left: auto; }
.a-nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 1.45rem; height: 1.3rem; padding: 0 .4rem; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.a-nav-badge.is-accent { background: var(--a-accent); color: #fff; }
.a-nav-badge.is-muted { background: rgba(255, 255, 255, .16); color: #fff; }
.a-nav-badge.is-live-new { animation: a-live-pop .5s var(--a-ease) 1; }
.a-nav-toggle { position: relative; }
.a-nav-toggle-dot { position: absolute; top: .45rem; right: .4rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--a-accent); box-shadow: 0 0 0 2px var(--a-dark); }

.a-live-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin: -.5rem 0 1rem; font-size: .88rem; color: var(--a-muted); }
.a-live-status { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.a-live-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--a-success); box-shadow: 0 0 0 3px var(--a-success-soft); }
.a-live-bar.is-error .a-live-status { color: var(--a-warn); }
.a-live-bar.is-error .a-live-dot { background: var(--a-warn); box-shadow: 0 0 0 3px var(--a-warn-soft); }
.a-live-bar.is-off .a-live-dot { background: var(--a-muted-2); box-shadow: none; }
.a-live-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.a-live-chime { font-size: .88rem; color: var(--a-ink); }
.a-live-bar [data-live-refresh].is-busy .icon { animation: a-live-spin .9s linear infinite; }

.a-item.is-live-new { animation: a-live-row 3s var(--a-ease) 1; border-radius: var(--a-radius-sm); }
.a-stat.is-live-new, .a-dl dd.is-live-new, .a-steps li.is-live-new { animation: a-live-ring 3s var(--a-ease) 1; border-radius: var(--a-radius-sm); }
.a-stat.is-live-new { border-radius: var(--a-radius); }
@keyframes a-live-row { 0%, 35% { background-color: var(--a-primary-soft); box-shadow: -.6rem 0 0 var(--a-primary-soft), .6rem 0 0 var(--a-primary-soft); } 100% { background-color: rgba(245, 233, 233, 0); box-shadow: -.6rem 0 0 rgba(245, 233, 233, 0), .6rem 0 0 rgba(245, 233, 233, 0); } }
@keyframes a-live-ring { 0%, 35% { box-shadow: 0 0 0 3px rgba(var(--a-primary-rgb), .55); } 100% { box-shadow: 0 0 0 3px rgba(var(--a-primary-rgb), 0); } }
@keyframes a-live-pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes a-live-spin { to { transform: rotate(360deg); } }
@keyframes a-toast-in { from { opacity: 0; transform: translateY(.75rem); } to { opacity: 1; transform: none; } }

.a-toasts { position: fixed; z-index: 200; right: 1rem; bottom: 1rem; width: min(23rem, calc(100vw - 2rem)); display: flex; flex-direction: column; gap: .6rem; pointer-events: none; }
.a-toast { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .8rem .6rem .8rem .9rem; background: var(--a-surface); color: var(--a-ink); border: 1px solid var(--a-line); border-left: 4px solid var(--a-primary); border-radius: var(--a-radius); box-shadow: var(--a-shadow-lg); animation: a-toast-in .3s var(--a-ease) 1; }
.a-toast-icon { display: inline-flex; color: var(--a-primary-strong); margin-top: .1rem; }
.a-toast-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; font-size: .9rem; line-height: 1.4; }
.a-toast-body strong { font-weight: 700; }
.a-toast-body span { color: var(--a-muted); overflow-wrap: anywhere; }
.a-toast-link { align-self: flex-start; margin-top: .2rem; font-weight: 600; }
.a-toast-close { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; margin: -.35rem 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--a-muted); cursor: pointer; }
.a-toast-close:hover { background: var(--a-surface-2); color: var(--a-ink); }
.a-toast.is-booking, .a-toast.is-payment { border-left-color: var(--a-success); }
.a-toast.is-booking .a-toast-icon, .a-toast.is-payment .a-toast-icon { color: var(--a-success); }
.a-toast.is-attention { border-left-color: var(--a-warn); }
.a-toast.is-attention .a-toast-icon { color: var(--a-warn); }
.a-toast.is-cancel, .a-toast.is-signedout { border-left-color: var(--a-danger); }
.a-toast.is-cancel .a-toast-icon, .a-toast.is-signedout .a-toast-icon { color: var(--a-danger); }
.a-toast.is-message .a-toast-icon { color: var(--a-info); }
.a-toast.is-message { border-left-color: var(--a-info); }

.a-live-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; padding: .7rem .8rem .7rem 1rem; border-radius: var(--a-radius-input); background: var(--a-info-soft); color: var(--a-info); font-weight: 500; }
.a-live-banner p { margin: 0; display: flex; align-items: center; gap: .55rem; }

@media (max-width: 639px) {
  .a-toasts { right: .75rem; left: .75rem; bottom: .75rem; width: auto; }
  .a-live-bar { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  /* No movement: a highlight is a plain tint that the script removes after a few seconds. */
  .a-item.is-live-new { animation: none; background-color: var(--a-primary-soft); }
  .a-stat.is-live-new, .a-dl dd.is-live-new, .a-steps li.is-live-new { animation: none; box-shadow: 0 0 0 3px rgba(var(--a-primary-rgb), .45); }
  .a-nav-badge.is-live-new, .a-toast, .a-live-bar [data-live-refresh].is-busy .icon { animation: none; }
}
@media print {
  .a-toasts, .a-live-bar, .a-live-banner { display: none !important; }
}

/* Breakpoints
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .a-main { padding: 1.5rem 1.5rem 3rem; }
  .a-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .a-top { display: none; }
  .a-backdrop { display: none !important; }
  html.js .a-side, .a-side { transform: none; box-shadow: none; }
  .a-main { margin-left: var(--a-side-w); padding: 2rem clamp(1.5rem, 3vw, 2.75rem) 4rem; max-width: calc(76rem + var(--a-side-w)); }
  .a-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .a-cols-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-stats { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
  .a-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .a-table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .a-card { padding: 1.1rem 1rem; }
  .a-card-flush .a-card-head { padding: 1rem 1rem 0; }
  /* Phones: tabs wrap onto more rows instead of scrolling off-screen behind a thin scrollbar. */
  .a-tabs { flex-wrap: wrap; overflow-x: visible; gap: 0 .15rem; }
  .a-tabs a, .a-tabs button { padding: .55rem .7rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .a-side, .a-top, .a-backdrop, .a-actions, .a-btn { display: none !important; }
  .a-main { margin: 0; padding: 0; }
  body.admin { background: #fff; }
  .a-card { box-shadow: none; break-inside: avoid; }
}
