/* GAIA Atelier — components */

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: var(--r-lg); font-weight: 700; font-size: 15px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--burgundy-700); color: var(--cream-100); box-shadow: var(--sh-2); }
[data-theme="dark"] .btn-primary { background: var(--gold-500); color: var(--burgundy-900); }
.btn-gold { background: linear-gradient(180deg, #d6b274, var(--gold-500)); color: var(--burgundy-900); box-shadow: var(--sh-gold); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--text); background: transparent; }
.btn-danger { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.btn-light { background: rgba(250, 243, 233, .14); color: var(--on-dark); border: 1px solid rgba(250, 243, 233, .22); backdrop-filter: blur(6px); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: var(--r-md); }
.btn-xs { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-xl { height: 58px; font-size: 16px; border-radius: 20px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--sh-1); flex: none;
}
.icon-btn.on-dark { background: rgba(250, 243, 233, .12); border-color: rgba(250, 243, 233, .2); color: var(--on-dark); box-shadow: none; }
.icon-btn .dot { position: absolute; top: 9px; inset-inline-end: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-500); border: 2px solid var(--surface); }
.badge-n { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }

/* Chips & status ---------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.st { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.st-pending { --c: var(--st-pending); } .st-confirmed { --c: var(--st-confirmed); } .st-assigned { --c: var(--st-assigned); }
.st-on_the_way { --c: var(--st-on-the-way); } .st-started { --c: var(--st-started); } .st-completed { --c: var(--st-completed); }
.st-rescheduled { --c: var(--st-rescheduled); } .st-cancelled { --c: var(--st-cancelled); }
.st-paid { --c: var(--success); } .st-failed { --c: var(--danger); } .st-active { --c: var(--success); } .st-expired { --c: var(--ink-400); }
.st-approved { --c: var(--success); } .st-hidden { --c: var(--ink-400); } .st-rejected { --c: var(--danger); }
.chip-gold { background: color-mix(in srgb, var(--gold-500) 20%, transparent); color: var(--gold-600); }
[data-theme="dark"] .chip-gold { color: var(--gold-300); }
.chip-pick { height: 36px; padding: 0 14px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-weight: 500; }
.chip-pick.on { background: var(--burgundy-700); border-color: var(--burgundy-700); color: var(--cream-100); }
[data-theme="dark"] .chip-pick.on { background: var(--gold-500); border-color: var(--gold-500); color: var(--burgundy-900); }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter); margin-inline: calc(var(--gutter) * -1); scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }

/* Cards ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 16px; box-shadow: var(--sh-1); }
.card.flat { box-shadow: none; }
.card.tight { padding: 12px 14px; border-radius: var(--r-lg); }
.card-hero { position: relative; overflow: hidden; background: var(--hero); color: var(--on-dark); border-radius: 28px; padding: 20px; box-shadow: var(--sh-3); }
.card-hero .muted { color: var(--on-dark-2); }
.card-gold { background: linear-gradient(160deg, #f1e0bf, #e3c99a); color: var(--burgundy-900); border: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 12px; }
.sec-head h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.sec-head a, .sec-head button { font-size: 12.5px; font-weight: 700; color: var(--gold-600); }
.divider { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.list-row:last-child { border-bottom: 0; }
.lead { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--burgundy-600); flex: none; }
[data-theme="dark"] .lead { color: var(--gold-300); }
.lead.round { border-radius: 50%; }
.lead.gold { background: color-mix(in srgb, var(--gold-500) 22%, transparent); color: var(--gold-600); }
.lead.red { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.lead.green { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
.lead.blue { background: color-mix(in srgb, var(--info) 13%, transparent); color: var(--info); }

/* Avatars ----------------------------------------------------------------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 15px; color: var(--cream-100); background: linear-gradient(145deg, var(--burgundy-600), var(--burgundy-800)); border: 2px solid var(--gold-300); }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; border-width: 1.5px; }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; border-width: 3px; }
.avatar.alt { background: linear-gradient(145deg, var(--gold-500), var(--gold-600)); color: var(--burgundy-900); border-color: var(--cream-50); }
.avatar.arch-av { border-radius: 999px 999px 14px 14px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-inline-start: -10px; border-color: var(--surface); }
.avatar-stack .avatar:first-child { margin-inline-start: 0; }

/* Forms ------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.input { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--text-3); transition: border-color var(--t-base), box-shadow var(--t-base); }
.input:focus-within, .input.focus { border-color: var(--burgundy-700); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-500) 30%, transparent); }
.input input, .input textarea, .input span.val { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.input .val { color: var(--text); }
.input.area { height: auto; min-height: 92px; align-items: flex-start; padding: 12px 14px; }
.input .prefix { font-weight: 700; color: var(--text-2); direction: ltr; padding-inline-end: 10px; border-inline-end: 1px solid var(--line); }
.input.err { border-color: var(--danger); }
.hint { font-size: 11.5px; color: var(--text-3); }
.hint.err { color: var(--danger); }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--cream-300); position: relative; flex: none; transition: background var(--t-base) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: transform var(--t-base) var(--ease); }
.switch.on { background: var(--success); }
.switch.on::after { transform: translateX(20px); }
[dir="rtl"] .switch.on::after { transform: translateX(-20px); }
.check { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; background: var(--surface); transition: all var(--t-base) var(--ease); }
.check.on { background: var(--burgundy-700); border-color: var(--burgundy-700); color: var(--cream-100); }
[data-theme="dark"] .check.on { background: var(--gold-500); border-color: var(--gold-500); color: var(--burgundy-900); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; display: grid; place-items: center; }
.radio.on { border-color: var(--burgundy-700); }
.radio.on::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--burgundy-700); }
.seg { display: flex; padding: 4px; background: var(--surface-2); border-radius: 16px; gap: 2px; }
.seg button { flex: 1; height: 38px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--text-2); transition: all var(--t-base) var(--ease); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }
.tabs-u { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tabs-u button { padding: 10px 0; font-weight: 700; font-size: 14px; color: var(--text-3); position: relative; }
.tabs-u button.on { color: var(--text); }
.tabs-u button.on::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold-500); }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 14px; }
.stepper button { width: 34px; height: 34px; display: grid; place-items: center; }
.stepper span { min-width: 28px; text-align: center; font-weight: 700; }

/* Header ------------------------------------------------------------------ */
.topbar { display: flex; align-items: center; gap: 12px; height: 46px; margin-bottom: 8px; }
.topbar .t { flex: 1; text-align: center; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.topbar.start .t { text-align: start; }
.page-title { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.2; }

/* Floating nav (arch center) ---------------------------------------------- */
.nav {
  position: absolute; inset-inline: 14px; bottom: 16px; z-index: 40; height: 72px; border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 18px 40px -14px rgba(51, 11, 10, .35);
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
}
.nav .it { position: relative; flex: 1; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--text-3); transition: color var(--t-base); }
.nav .it.on { color: var(--burgundy-700); }
[data-theme="dark"] .nav .it.on { color: var(--gold-300); }
.nav .it.on::before { content: ""; position: absolute; top: 0; width: 40px; height: 4px; border-radius: 0 0 4px 4px; background: var(--gold-500); }
.nav .it .badge-n { top: 2px; inset-inline-end: 50%; margin-inline-end: -22px; border-color: var(--surface); }
.nav .core { width: 62px; height: 78px; margin-top: -30px; border-radius: 999px 999px 20px 20px; background: linear-gradient(170deg, #6b1f1d, #330b0a); color: var(--gold-300); display: grid; place-items: center; flex: none; box-shadow: 0 14px 26px -10px rgba(51, 11, 10, .65), inset 0 0 0 1.5px rgba(227, 201, 154, .5); border: 4px solid var(--bg); }
[data-theme="dark"] .nav .core { border-color: var(--bg); }

/* Hero header (burgundy) -------------------------------------------------- */
.hero-top { position: absolute; inset: 0 0 auto 0; height: 300px; background: var(--hero); border-radius: 0 0 40px 40px; z-index: 0; overflow: hidden; }
.hero-top::before { content: ""; position: absolute; inset: 0; background-image: inherit; }
.hero-top .arch-pattern { position: absolute; inset: 0; opacity: .9; }
.hero-content { position: relative; z-index: 1; color: var(--on-dark); }

/* Sheets / modal / toast --------------------------------------------------- */
.scrim { position: absolute; inset: 0; background: rgba(26, 6, 5, .5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity var(--t-base); backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; inset-inline: 0; bottom: 0; z-index: 80; background: var(--bg); border-radius: 32px 32px 0 0; padding: 12px var(--gutter) 28px; transform: translateY(105%); transition: transform var(--t-slow) var(--ease); max-height: 86%; overflow-y: auto; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.4); scrollbar-width: none; }
.sheet.show { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--cream-300); margin: 0 auto 14px; }
.static-sheet { position: relative; transform: none; border-radius: 28px; box-shadow: var(--sh-3); border: 1px solid var(--line); }
.toast { position: absolute; top: 62px; inset-inline: 20px; z-index: 90; background: var(--burgundy-800); color: var(--cream-100); padding: 12px 16px; border-radius: 18px; display: flex; gap: 10px; align-items: center; box-shadow: var(--sh-3); transform: translateY(-30px); opacity: 0; pointer-events: none; transition: transform var(--t-slow) var(--ease), opacity var(--t-base); font-weight: 500; }
.toast.show { transform: none; opacity: 1; }
.toast:empty { display: none; }

/* Progress / rings / bars ---------------------------------------------------- */
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold-500), var(--gold-300)); }
.bar.red > i { background: linear-gradient(90deg, var(--burgundy-600), var(--burgundy-500)); }
.ring { position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }

/* KPI ---------------------------------------------------------------------- */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; position: relative; overflow: hidden; }
.kpi .v { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; margin-top: 4px; }
.kpi .l { font-size: 12px; color: var(--text-2); font-weight: 500; }
.kpi .delta { font-size: 11px; font-weight: 700; color: var(--success); }
.kpi .delta.neg { color: var(--danger); }
.kpi.dark { background: var(--hero); color: var(--on-dark); border: 0; }
.kpi.dark .l { color: var(--on-dark-2); }
.spark { position: absolute; inset-inline: 0; bottom: 0; height: 36px; opacity: .55; }

/* Timeline / status path ------------------------------------------------------ */
.path { position: relative; }
.path .stp { display: flex; gap: 14px; position: relative; padding-bottom: 20px; }
.path .stp:last-child { padding-bottom: 0; }
.path .stp::before { content: ""; position: absolute; top: 34px; bottom: 0; inset-inline-start: 16px; width: 2px; background: var(--line); }
.path .stp:last-child::before { display: none; }
.path .stp.done::before { background: var(--gold-500); }
.path .node { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-3); border: 2px solid var(--line); z-index: 1; }
.path .done .node { background: var(--gold-500); border-color: var(--gold-500); color: var(--burgundy-900); }
.path .now .node { background: var(--burgundy-700); border-color: var(--gold-300); color: var(--gold-300); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold-500) 25%, transparent); animation: pulse 2.4s var(--ease) infinite; }

@keyframes pulse { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--gold-500) 0%, transparent); } }
@keyframes breathe { 0%, 100% { transform: scale(.88); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
@keyframes shine { to { background-position: 200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise var(--t-slow) var(--ease) both; }
.rise > *:nth-child(2) { animation-delay: 60ms; } .rise > *:nth-child(3) { animation-delay: 120ms; }
.rise > *:nth-child(4) { animation-delay: 180ms; } .rise > *:nth-child(5) { animation-delay: 240ms; } .rise > *:nth-child(6) { animation-delay: 300ms; }

/* Booking card (arched ribbon) -------------------------------------------------- */
.bk { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 12px; box-shadow: var(--sh-1); width: 100%; text-align: start; position: relative; }
.bk .time { width: 58px; flex: none; border-radius: 999px 999px 14px 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 0 10px; font-family: var(--font-display); line-height: 1.1; }
.bk .time b { font-size: 19px; font-weight: 600; }
.bk .time small { font-size: 10.5px; color: var(--text-2); font-family: var(--font); }
.bk.live .time { background: var(--burgundy-700); color: var(--cream-100); }
.bk.live .time small { color: var(--gold-300); }
.bk.done { opacity: .72; }
.bk .meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }

/* Admin: tables, bars, gantt ---------------------------------------------------- */
.tbl-row { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl-row:last-child { border-bottom: 0; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 5px; }
.gantt { position: relative; }
.gantt .lane { display: flex; align-items: center; gap: 10px; height: 54px; border-bottom: 1px dashed var(--line); }
.gantt .lane-track { position: relative; flex: 1; height: 38px; direction: ltr; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(16.666% - 1px), var(--line) calc(16.666% - 1px), var(--line) 16.666%); }
.gantt .blk { position: absolute; top: 3px; bottom: 3px; border-radius: 10px; background: var(--c, var(--burgundy-600)); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 6px; overflow: hidden; line-height: 1.2; }
.gantt .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gold-500); z-index: 2; }
.gantt .now::before { content: ""; position: absolute; top: -4px; inset-inline-start: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); }

.empty { text-align: center; padding: 30px 20px; color: var(--text-2); }
.empty img { width: 150px; opacity: .9; }
.skeleton { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: shine 1.4s linear infinite; border-radius: 12px; }
.tag-need { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.tag-need.none { background: #dff0e7; color: #1f6a4a; }
.tag-need.tiny { background: #fbefd2; color: #8a5f12; }
.tag-need.big { background: #f6dcd9; color: #9b2118; }
