/* Lazy Bite — components.css : reusable UI kit shared by customer, restaurant and admin surfaces */

/* ============ Buttons ============ */
.btn {
  --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-pill); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 650; font-size: var(--fs-base);
  line-height: 1.2; white-space: nowrap; cursor: pointer; position: relative;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { --btn-bg: var(--primary); }
.btn-primary:hover { --btn-bg: var(--primary-dark); }
.btn-dark { --btn-bg: var(--text-primary); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-primary); --btn-bd: var(--border-strong); }
.btn-ghost:hover { --btn-bg: var(--surface); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary-dark); }
.btn-soft:hover { --btn-bg: #ffe7dc; }
.btn-quiet { --btn-bg: var(--surface); --btn-fg: var(--text-primary); }
.btn-danger { --btn-bg: var(--danger); }
.btn-success { --btn-bg: var(--success); }
.btn-white { --btn-bg: #fff; --btn-fg: var(--text-primary); --btn-bd: var(--border); }
.btn-lg { padding: 15px 26px; font-size: var(--fs-md); }
.btn-sm { padding: 8px 13px; font-size: var(--fs-sm); }
.btn-xs { padding: 6px 10px; font-size: var(--fs-xs); border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-square { padding: 10px; border-radius: var(--radius-sm); }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-pill); }
.btn.is-loading { color: transparent; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-ghost.is-loading::after, .btn-white.is-loading::after { border-color: rgba(15,23,42,.25); border-top-color: var(--text-primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Chips / pills / badges ============ */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: #fff; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: all var(--dur-fast) var(--ease); }
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--text-primary); border-color: var(--text-primary); color: #fff; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll > * { flex: none; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--radius-xs);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .01em; background: var(--surface-2); color: var(--text-secondary); }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: #b45309; }
.badge-danger  { background: var(--danger-soft); color: var(--danger); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-dark    { background: var(--text-primary); color: #fff; }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.veg, .nonveg { width: 15px; height: 15px; border-radius: 3px; display: inline-grid; place-items: center; flex: none;
  border: 1.6px solid var(--success); }
.nonveg { border-color: #b91c1c; }
.veg::after, .nonveg::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.nonveg::after { background: #b91c1c; }

.ready-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: var(--radius-pill);
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 750; font-size: var(--fs-sm); }
.ready-pill svg { width: 15px; height: 15px; }
.ready-pill-solid { background: var(--primary); color: #fff; }

.rating { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: var(--fs-sm);
  color: #166534; background: var(--success-soft); padding: 4px 9px; border-radius: var(--radius-xs); }
.rating svg { width: 13px; height: 13px; }

/* ============ Cards ============ */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-pad { padding: var(--sp-5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5); border-bottom: 1px solid var(--border); }
.card-head h3, .card-head h4 { font-size: var(--fs-lg); }
.card-body { padding: var(--sp-5); }
.card-foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface); }
.card-hover { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }

/* Restaurant card */
.r-card { display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); position: relative; }
.r-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.r-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.r-card:hover .r-card__media img { transform: scale(1.05); }
.r-card__offer { position: absolute; left: 12px; bottom: 12px; background: rgba(15,23,42,.82); color: #fff;
  padding: 6px 11px; border-radius: var(--radius-xs); font-size: var(--fs-xs); font-weight: 700; backdrop-filter: blur(6px); }
.r-card__fav { position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.r-card__fav svg { width: 18px; height: 18px; stroke: var(--text-secondary); fill: none; transition: all var(--dur-fast) var(--ease); }
.r-card__fav.is-active svg { stroke: var(--primary-dark); fill: var(--primary-dark); }
.r-card__fav:active { transform: scale(.88); }
.r-card__body { padding: var(--sp-4); display: grid; gap: 8px; }
.r-card__title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.r-card__title h3 { font-size: var(--fs-md); letter-spacing: -.01em; }
.r-card__meta { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: var(--fs-sm); flex-wrap: wrap; }
.r-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.r-card__ready { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px;
  padding-top: 10px; border-top: 1px dashed var(--border); }
.r-card__modes { display: flex; gap: 6px; }
.r-card.is-closed .r-card__media::after { content: 'Closed'; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15,23,42,.55); color: #fff; font-weight: 800; letter-spacing: .04em; }
.r-card-link { display: block; color: inherit; }

/* Food card */
.f-card { display: flex; gap: var(--sp-4); padding: var(--sp-4); border: 1px solid var(--border);
  border-radius: var(--radius-md); background: #fff; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.f-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.f-card__info { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.f-card__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.f-card__desc { font-size: var(--fs-sm); color: var(--text-secondary); }
.f-card__meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); }
.f-card__price { font-weight: 750; font-size: var(--fs-md); }
.f-card__media { position: relative; width: 118px; flex: none; }
.f-card__media img { width: 118px; height: 118px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.f-card__add { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); }
.f-card.is-soldout { opacity: .55; }
.f-card.is-soldout .f-card__add { pointer-events: none; }

/* Stat tile */
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-5); display: grid; gap: 6px; }
.stat__label { font-size: var(--fs-sm); color: var(--text-secondary); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat__value { font-size: clamp(1.4rem, 1.1rem + .9vw, 1.85rem); font-weight: 800; font-family: var(--font-display); letter-spacing: -.02em; }
.stat__delta { font-size: var(--fs-xs); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.stat__delta svg { width: 14px; height: 14px; flex: none; }
.stat__delta.up { color: var(--success); }
.stat__delta.down { color: var(--danger); }
.stat__icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }

/* ============ Forms ============ */
.field { display: grid; gap: 7px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 650; color: var(--text-primary); }
.hint { font-size: var(--fs-xs); color: var(--text-muted); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; font-size: var(--fs-base); transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input, .select, .textarea { color: var(--text-primary); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.textarea { min-height: 104px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.input-group .input { padding-left: 42px; }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
.error-text { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.checkbox, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-base); }
.checkbox input, .radio input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--border-strong);
  transition: background var(--dur) var(--ease); pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--dur) var(--ease); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--primary-ring); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); overflow: hidden; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; color: var(--primary-dark); font-weight: 800; font-size: 1rem; }
.qty button:hover { background: var(--primary-soft); }
.qty output, .qty .qty__val { min-width: 30px; text-align: center; font-weight: 700; font-size: var(--fs-base); }

/* Segmented control */
.segment { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--radius-pill); gap: 3px; }
.segment button { padding: 8px 16px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 650; color: var(--text-secondary); }
.segment button.is-active { background: #fff; color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* Big choice cards (dine-in / takeaway, payment methods) */
.choice-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.choice { display: grid; gap: 8px; padding: var(--sp-5); border: 2px solid var(--border); border-radius: var(--radius-md);
  background: #fff; cursor: pointer; text-align: left; transition: all var(--dur) var(--ease); position: relative; }
.choice:hover { border-color: var(--border-strong); }
.choice.is-active { border-color: var(--primary); background: var(--primary-softer); box-shadow: 0 0 0 4px var(--primary-ring); }
.choice__icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: grid; place-items: center;
  background: var(--surface); color: var(--primary-dark); }
.choice.is-active .choice__icon { background: #fff; }
.choice h4 { font-size: var(--fs-md); }
.choice p { font-size: var(--fs-sm); }

/* ============ Time slots ============ */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.slot { display: grid; gap: 3px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; text-align: left; cursor: pointer; transition: all var(--dur-fast) var(--ease); }
.slot strong { font-size: var(--fs-md); font-weight: 750; }
.slot small { font-size: var(--fs-xs); color: var(--success); font-weight: 650; }
.slot:hover:not(.is-full) { border-color: var(--primary); background: var(--primary-softer); }
.slot.is-almost small { color: var(--warning); }
.slot.is-full { opacity: .55; cursor: not-allowed; background: var(--surface); }
.slot.is-full small { color: var(--text-muted); }
.slot.is-selected { border-color: var(--primary); background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-ring); }
.slot.is-selected small { color: rgba(255,255,255,.85); }
.slot-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-secondary); }
.slot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.slot-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ============ Tabs / accordion / dropdown ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 16px; font-weight: 650; color: var(--text-secondary); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--dur-fast) var(--ease); }
.tab:hover { color: var(--text-primary); }
.tab.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }
.tab-panel[hidden] { display: none; }

.accordion { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.accordion + .accordion { margin-top: 12px; }
.accordion__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); font-weight: 700; text-align: left; }
.accordion__btn svg { width: 20px; height: 20px; flex: none; transition: transform var(--dur) var(--ease); color: var(--text-secondary); }
.accordion.is-open .accordion__btn svg { transform: rotate(180deg); }
.accordion__panel { padding: 0 var(--sp-5) var(--sp-5); color: var(--text-secondary); }

.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 6px; z-index: var(--z-sticky);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all var(--dur) var(--ease); }
.dropdown.is-open .dropdown__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown__menu a, .dropdown__menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px;
  border-radius: var(--radius-xs); font-size: var(--fs-base); font-weight: 600; text-align: left; }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface); }
.dropdown__menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ============ Modal / drawer / bottom sheet ============ */
.overlay { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(2px); z-index: var(--z-modal);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur); }
.overlay.is-open { opacity: 1; visibility: visible; }
.modal { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); display: grid; place-items: center; padding: var(--sp-4);
  pointer-events: none; }
.modal__panel { width: min(560px, 100%); max-height: min(86vh, 900px); overflow-y: auto; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); transform: translateY(14px) scale(.98); opacity: 0;
  transition: all var(--dur) var(--ease); pointer-events: auto; }
.modal.is-open .modal__panel { transform: none; opacity: 1; }
.modal.is-open { pointer-events: auto; }
.modal--wide .modal__panel { width: min(880px, 100%); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-5); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 2; }
.modal__body { padding: var(--sp-5); }
.modal__foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); display: flex; gap: 10px;
  justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
.modal__close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); flex: none; }
.modal__close:hover { background: var(--surface-2); }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; z-index: calc(var(--z-modal) + 1);
  transform: translateX(102%); transition: transform var(--dur) var(--ease); display: flex; flex-direction: column; box-shadow: var(--shadow-xl); }
.drawer.is-open { transform: none; }
.drawer__head { padding: var(--sp-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.drawer__foot { padding: var(--sp-4) var(--sp-5); border-top: 1px solid var(--border); background: var(--surface); }

/* ============ Toasts ============ */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: var(--z-toast); display: grid; gap: 10px; width: min(360px, calc(100vw - 36px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border);
  border-left: 4px solid var(--info); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  animation: toast-in var(--dur) var(--ease); }
.toast.is-out { animation: toast-out var(--dur) var(--ease) forwards; }
.toast__icon { width: 22px; height: 22px; flex: none; color: var(--info); }
.toast__body { display: grid; gap: 2px; font-size: var(--fs-sm); }
.toast__body strong { font-size: var(--fs-base); }
.toast--success { border-left-color: var(--success); } .toast--success .toast__icon { color: var(--success); }
.toast--error   { border-left-color: var(--danger); }  .toast--error .toast__icon { color: var(--danger); }
.toast--warning { border-left-color: var(--warning); } .toast--warning .toast__icon { color: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.table { min-width: 720px; font-size: var(--fs-base); }
.table th { text-align: left; padding: 13px 16px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-secondary); background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; font-weight: 700; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--primary-softer); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-toolbar { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-4); }
.table-toolbar .input-group { flex: 1; min-width: 220px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-4); flex-wrap: wrap; }
.pagination__pages { display: flex; gap: 6px; }
.pagination__pages button { min-width: 36px; height: 36px; border-radius: var(--radius-xs); font-weight: 650; color: var(--text-secondary); }
.pagination__pages button:hover { background: var(--surface); }
.pagination__pages button.is-active { background: var(--text-primary); color: #fff; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex: none; }
.avatar-initials { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary-dark); font-weight: 750; font-size: var(--fs-sm); }

/* ============ Skeletons, empty & error states ============ */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #f3f5f8 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.skeleton-card { height: 292px; border-radius: var(--radius-lg); }
.skeleton-line { height: 12px; }
.skeleton-row { height: 56px; margin-bottom: 8px; }

.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: clamp(36px, 6vw, 72px) var(--sp-5);
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state__icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.empty-state h3 { font-size: var(--fs-lg); }
.empty-state p { max-width: 46ch; }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); font-size: var(--fs-base);
  background: var(--info-soft); color: #1e40af; border: 1px solid rgba(37,99,235,.18); }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert strong { color: inherit; display: block; }
.alert-success { background: var(--success-soft); color: #14532d; border-color: rgba(22,163,74,.2); }
.alert-warning { background: var(--warning-soft); color: #92400e; border-color: rgba(245,158,11,.25); }
.alert-danger  { background: var(--danger-soft); color: #991b1b; border-color: rgba(220,38,38,.2); }

/* ============ Progress / meters / timeline ============ */
.meter { height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width var(--dur-slow) var(--ease); }
.meter.is-warning > span { background: var(--warning); }
.meter.is-danger > span { background: var(--danger); }
.meter.is-success > span { background: var(--success); }

.timeline { display: grid; gap: 0; }
.timeline__item { display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-4); padding-bottom: var(--sp-5); position: relative; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before { content: ''; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--border); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  color: var(--text-muted); z-index: 1; }
.timeline__dot svg { width: 15px; height: 15px; }
.timeline__item.is-done .timeline__dot { background: var(--success); color: #fff; }
.timeline__item.is-done::before { background: var(--success); }
.timeline__item.is-current .timeline__dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--primary-ring); }
.timeline__label { font-weight: 700; }
.timeline__time { font-size: var(--fs-xs); color: var(--text-muted); }
.timeline__item.is-todo .timeline__label { color: var(--text-muted); font-weight: 600; }

/* ============ Charts (pure CSS/JS, no libraries) ============ */
.chart { display: flex; align-items: flex-end; gap: clamp(4px, 1.2vw, 14px); height: 220px; padding-top: var(--sp-4); }
.chart__bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; height: 100%; position: relative; }
.chart__bar i { width: 100%; max-width: 46px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  display: block; transition: height var(--dur-slow) var(--ease); }
.chart__bar span { font-size: var(--fs-xs); color: var(--text-secondary); white-space: nowrap; }
.chart__bar b { position: absolute; top: -4px; font-size: var(--fs-xs); font-weight: 700; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.chart__bar:hover b { opacity: 1; }
.chart__bar.is-muted i { background: var(--surface-2); }
.chart-line { position: relative; height: 220px; }
.chart-line svg { width: 100%; height: 100%; overflow: visible; }
.chart-legend { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--text-secondary); }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.donut { display: grid; place-items: center; position: relative; width: 176px; height: 176px; border-radius: 50%; }
.donut::after { content: ''; position: absolute; inset: 26px; background: #fff; border-radius: 50%; }
.donut__label { position: relative; z-index: 1; text-align: center; }
.donut__label strong { display: block; font-size: 1.4rem; font-family: var(--font-display); }
.bar-list { display: grid; gap: var(--sp-4); }
.bar-list__row { display: grid; gap: 7px; }
.bar-list__top { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-sm); }
.bar-list__top strong { font-weight: 650; }

/* ============ Misc ============ */
.divider { height: 1px; background: var(--border); border: 0; margin-block: var(--sp-5); }
.divider-dashed { border-top: 1px dashed var(--border); background: none; }
.kbd { font-family: var(--font-mono); font-size: var(--fs-xs); background: var(--surface-2); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; }
.pin-display { display: flex; gap: 10px; }
.pin-display span { width: 48px; height: 58px; display: grid; place-items: center; border-radius: var(--radius-sm);
  background: var(--text-primary); color: #fff; font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono); }
.qr-box { width: 168px; height: 168px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); }
.qr-box svg { width: 100%; height: 100%; }
.notice-dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid #fff; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: var(--radius-pill); display: grid; place-items: center;
  color: var(--text-secondary); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
.icon-btn:hover { background: var(--surface); color: var(--text-primary); }
.icon-btn svg { width: 20px; height: 20px; }
.count-bubble { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.scroll-x { display: flex; gap: var(--sp-4); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.scroll-x > * { flex: 0 0 clamp(240px, 74vw, 300px); scroll-snap-align: start; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.fade-in { animation: fadeIn var(--dur-slow) var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } }
.pop { animation: pop .35s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); position: relative; flex: none; }
.pulse-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--success);
  opacity: .5; animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { to { transform: scale(1.7); opacity: 0; } }
.step-dots { display: flex; align-items: center; gap: 6px; }
.step-dots i { height: 6px; width: 26px; border-radius: 3px; background: var(--border); display: block; transition: background var(--dur) var(--ease); }
.step-dots i.is-done { background: var(--success); }
.step-dots i.is-active { background: var(--primary); }

/* Dark surfaces: <strong> must not fall back to the light-theme ink colour */
.prep-next strong, .pass-card strong, .band-dark strong, .cta-band strong,
.home-hero-strip strong, .site-footer strong, .auth__aside strong,
.dash-side strong, .hero-float strong, .cart-fab strong, .scan-box strong { color: inherit; }
