/*
 * Voccacia — "Parcours restaurateur" styles.
 * Ported from the Claude Design prototype (v-* classes). Aliases the existing
 * shadcn HSL tokens (globals.css). The prototype simulated mobile via a fixed
 * device frame; here the mobile reflow is driven by real viewport media queries.
 */

:root {
  --pri: hsl(var(--primary));
  --pri-fg: hsl(var(--primary-foreground));
  --mut: hsl(var(--muted));
  --mutfg: hsl(var(--muted-foreground));
  --bd: hsl(var(--border));
  --fg: hsl(var(--foreground));
  --pri-soft: hsl(var(--primary) / 0.1);
}

/* ---------- Onboarding ---------- */
.v-onb { display: flex; flex-direction: column; min-height: 100vh; background: #f6f8fb; }
.v-onb-head { flex: 0 0 auto; padding: 18px 28px 12px; max-width: 820px; margin: 0 auto; width: 100%; }
.v-wordmark { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.v-logo-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 0 3px var(--pri-soft); flex: 0 0 auto; }
.v-onb-step { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; font-size: 13px; color: var(--mutfg); font-weight: 600; }
.v-onb-scroll { flex: 1; min-height: 0; overflow: auto; padding: 6px 28px 18px; }
.v-onb-foot { flex: 0 0 auto; display: flex; justify-content: space-between; gap: 10px; padding: 14px 28px; border-top: 1px solid var(--bd); background: #fff; }
.v-onb-foot > * { max-width: 820px; }

/* Auth / inscription */
.v-auth { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; width: 100%; min-height: 100vh; background: #f6f8fb; }
.v-auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--bd); border-radius: 16px; padding: 32px 30px; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06); }
.v-auth-card h1 { font-size: 23px; letter-spacing: -0.02em; margin: 18px 0 6px; }
.v-auth-sub { color: var(--mutfg); font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; }
.v-stack { display: flex; flex-direction: column; gap: 14px; }
.v-auth-foot { margin-top: 16px; font-size: 13px; color: var(--mutfg); text-align: center; }
.v-auth-legal { margin-top: 14px; font-size: 11.5px; color: var(--mutfg); text-align: center; line-height: 1.5; }

/* Step content */
.v-step { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; }
.v-section { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.v-section h3 { font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.v-section p { font-size: 13px; color: var(--mutfg); margin: 4px 0 0; line-height: 1.5; max-width: 60ch; }
.v-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.v-field { display: flex; flex-direction: column; gap: 6px; }
.v-field-label { font-size: 12.5px; font-weight: 600; color: var(--fg); }
.v-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--bd); border-radius: 9px; padding: 9px 12px; background: #fff; min-height: 40px; }
.v-input-icon { color: var(--mutfg); display: flex; }
.v-input-val { font-size: 13.5px; }
.v-input-ph { font-size: 13.5px; color: var(--mutfg); }
.v-textarea { display: block; border: 1px solid var(--bd); border-radius: 9px; padding: 11px 13px; background: #fff; font-size: 13.5px; line-height: 1.55; color: var(--fg); }

.v-ph { background: repeating-linear-gradient(45deg, #f1f4f8, #f1f4f8 9px, #e8edf3 9px, #e8edf3 18px); border: 1px dashed #c8d2de; display: flex; align-items: center; justify-content: center; }
.v-ph span { font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: #8a97a8; background: #fff; padding: 3px 9px; border-radius: 6px; letter-spacing: 0.02em; }

/* Toggle / Switch */
.v-switch { width: 40px; height: 23px; border-radius: 99px; background: #d3dae3; border: 0; cursor: pointer; position: relative; flex: 0 0 auto; transition: background 0.15s; }
.v-switch.on { background: var(--pri); }
.v-knob { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; }
.v-switch.on .v-knob { left: 19px; }

/* Horaires */
.v-hours { display: flex; flex-direction: column; }
.v-hour-row { display: grid; grid-template-columns: 1fr auto 40px; align-items: center; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--bd); }
.v-hour-row:last-child { border-bottom: 0; }
.v-hour-row.off .v-hour-day { color: var(--mutfg); }
.v-hour-day { font-size: 14px; font-weight: 600; }
.v-hour-times { display: flex; align-items: center; gap: 8px; }
.v-chip { background: var(--mut); border-radius: 7px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.v-dash { color: var(--mutfg); }

/* Menu */
.v-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.v-menu-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.v-menu-cat-head h4 { font-size: 14px; margin: 0; }
.v-menu-items { display: flex; flex-direction: column; gap: 8px; }
.v-menu-item { display: flex; justify-content: space-between; font-size: 13.5px; }
.v-price { font-weight: 600; color: var(--mutfg); }
.v-btn-ico { display: inline-flex; margin-right: 6px; }

/* Assistant */
.v-callout { display: flex; align-items: center; gap: 13px; background: var(--pri-soft); border: 1px solid hsl(var(--primary) / 0.25); border-radius: 12px; padding: 13px 16px; }
.v-callout-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--pri); color: var(--pri-fg); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.v-callout-label { font-size: 12px; color: var(--mutfg); font-weight: 600; }
.v-callout-num { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.v-callout > :last-child { margin-left: auto; }
.v-caps-title { font-size: 14px; margin: 0 0 12px; }
.v-caps { display: flex; flex-direction: column; }
.v-cap-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--bd); }
.v-cap-row:last-child { border-bottom: 0; }
.v-cap-label { font-size: 13.5px; }
.v-handoff { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--bd); font-size: 12.5px; color: var(--mutfg); }
.v-handoff svg { color: var(--pri); flex: 0 0 auto; }

/* ---------- App shell (ops) ---------- */
.v-shell { display: flex; min-height: 100vh; width: 100%; background: #f4f6f9; }
.v-side { flex: 0 0 220px; border-right: 1px solid var(--bd); background: #fbfcfe; display: flex; flex-direction: column; padding: 16px 12px; position: sticky; top: 0; height: 100vh; }
.v-side-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; padding: 6px 8px 14px; }
.v-nav { display: flex; flex-direction: column; gap: 3px; }
.v-nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; border: 0; background: transparent; color: var(--mutfg); font-size: 13.5px; font-weight: 600; cursor: pointer; width: 100%; text-align: left; text-decoration: none; }
.v-nav-item svg { flex: 0 0 auto; }
.v-nav-item:hover { background: var(--mut); color: var(--fg); }
.v-nav-item.on { background: var(--pri-soft); color: var(--pri); }
.v-nav-badge { margin-left: auto; background: var(--mut); color: var(--mutfg); font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.v-nav-item.on .v-nav-badge { background: var(--pri); color: var(--pri-fg); }
/* Realtime "new orders" counter — always reads as urgent, even on the active item. */
.v-nav-badge.v-badge-alert,
.v-nav-item.on .v-nav-badge.v-badge-alert { background: #dc2626; color: #fff; }
.v-side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--bd); }
.v-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--pri); color: var(--pri-fg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.v-side-foot .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.v-side-foot .rl { font-size: 11.5px; color: var(--mutfg); }

.v-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v-topbar { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--bd); background: #fff; position: sticky; top: 0; z-index: 10; }
.v-topbar h2 { font-size: 18px; letter-spacing: -0.01em; margin: 0; }
.v-topbar .sub { font-size: 12.5px; color: var(--mutfg); margin-top: 2px; }
.v-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.v-icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--bd); background: #fff; color: var(--mutfg); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.v-icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--pri); }
.v-content { flex: 1; min-height: 0; background: #f4f6f9; }
.v-page { padding: 22px; display: flex; flex-direction: column; gap: 18px; max-width: 1180px; margin: 0 auto; width: 100%; }

/* Bottom nav (mobile only) */
.v-botnav { display: none; }

/* KPIs */
.v-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.v-kpi-label { font-size: 12.5px; color: var(--mutfg); font-weight: 600; }
.v-kpi-value { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0; }
.v-kpi-foot { display: flex; align-items: center; justify-content: space-between; }
.v-kpi-sub { font-size: 11.5px; color: var(--mutfg); }
.v-trend { font-size: 11.5px; font-weight: 700; color: hsl(142 60% 38%); background: hsl(142 60% 38% / 0.1); border-radius: 99px; padding: 2px 7px; }

.v-dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.v-activity { display: flex; flex-direction: column; }
.v-activity-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--bd); }
.v-activity-row:last-child { border-bottom: 0; }
.v-activity-time { font-size: 12.5px; color: var(--mutfg); font-variant-numeric: tabular-nums; }
.v-activity-txt { font-size: 13.5px; }
.v-assist-status { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.v-pulse { width: 11px; height: 11px; border-radius: 50%; background: hsl(142 65% 45%); box-shadow: 0 0 0 4px hsl(142 65% 45% / 0.18); flex: 0 0 auto; }
.v-assist-on { font-weight: 700; font-size: 14px; }
.v-assist-num { font-size: 12.5px; color: var(--mutfg); }
.v-assist-mini { display: flex; flex-direction: column; gap: 9px; padding: 13px; background: var(--mut); border-radius: 11px; }
.v-mini-row { display: flex; justify-content: space-between; font-size: 13px; }
.v-mini-row b { font-weight: 700; }

/* Appels */
.v-appels-centre { display: grid; grid-template-columns: 1fr 1.1fr; gap: 16px; align-items: start; }
.v-voice-wrap { display: flex; justify-content: center; }
.v-cockpit { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.v-calls { display: flex; flex-direction: column; gap: 6px; }
.v-call-row { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border: 1px solid var(--bd); border-radius: 11px; background: #fff; cursor: pointer; text-align: left; width: 100%; }
.v-call-row:hover { background: var(--mut); }
.v-call-row.active { border-color: var(--pri); background: var(--pri-soft); }
.v-call-row.missed { opacity: 0.7; }
.v-call-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--mut); color: var(--mutfg); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.v-call-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.v-call-from { font-size: 13.5px; font-weight: 600; }
.v-call-sub { font-size: 11.5px; color: var(--mutfg); }
.v-transcript { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.v-msg { display: flex; flex-direction: column; gap: 3px; max-width: 88%; }
.v-msg.ai { align-self: flex-start; }
.v-msg.user { align-self: flex-end; align-items: flex-end; }
.v-msg-who { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--mutfg); }
.v-msg-text { font-size: 13.5px; line-height: 1.5; padding: 9px 13px; border-radius: 13px; background: var(--mut); }
.v-msg.ai .v-msg-text { background: var(--pri-soft); color: var(--fg); border-top-left-radius: 4px; }
.v-msg.user .v-msg-text { background: var(--mut); border-top-right-radius: 4px; }
.v-vocc-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; margin-right: 5px; opacity: 0.85; }

/* Kanban / commandes */
.v-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; align-items: start; }
.v-kcol-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--mutfg); text-transform: uppercase; letter-spacing: 0.04em; padding: 0 4px 10px; }
.v-kcount { background: var(--mut); border-radius: 99px; padding: 1px 8px; font-size: 11px; }
.v-kcol-body { display: flex; flex-direction: column; gap: 10px; }
.v-order { display: flex; flex-direction: column; gap: 9px; background: #fff; border: 1px solid var(--bd); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; width: 100%; }
.v-order:hover { border-color: var(--pri); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07); }
.v-order-top { display: flex; align-items: center; justify-content: space-between; }
.v-order-id { font-weight: 700; font-size: 14px; }
.v-order-items { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: var(--mutfg); }
.v-order-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 3px; }
.v-order-meta { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mutfg); }
.v-order-total { font-weight: 700; font-size: 14px; }
.v-order-action { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 2px; font-size: 12.5px; font-weight: 700; color: var(--pri); background: var(--pri-soft); border-radius: 8px; padding: 7px; border: 0; cursor: pointer; }
.v-kempty { font-size: 13px; color: #c2cbd6; text-align: center; padding: 14px 0; }
.v-order-list { display: flex; flex-direction: column; }
.v-order-listrow { display: grid; grid-template-columns: auto auto 1fr auto auto auto; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--bd); background: transparent; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; text-align: left; width: 100%; }
.v-order-listrow:hover { background: var(--mut); }
.v-order-listitems { font-size: 13px; color: var(--mutfg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-order-listtime { font-size: 12.5px; color: var(--mutfg); font-variant-numeric: tabular-nums; }

/* Réservations */
.v-resa { display: flex; flex-direction: column; }
.v-resa-row { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 16px; padding: 13px 4px; border-bottom: 1px solid var(--bd); }
.v-resa-row:last-child { border-bottom: 0; }
.v-resa-time { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.v-resa-time svg, .v-resa-people svg { color: var(--mutfg); }
.v-resa-people { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; }
.v-resa-name { display: flex; flex-direction: column; gap: 2px; }
.v-resa-name b { font-size: 14px; }
.v-resa-note { font-size: 12px; color: var(--mutfg); }

/* Réglages */
.v-settings { display: flex; flex-direction: column; gap: 10px; }
.v-setting-row { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--bd); border-radius: 12px; }
.v-setting-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--mut); color: var(--pri); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.v-setting-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.v-setting-meta b { font-size: 14px; }
.v-setting-meta span { font-size: 12.5px; color: var(--mutfg); }

/* Modal order detail */
.v-modal-items { display: flex; flex-direction: column; gap: 9px; margin: 6px 0 14px; }
.v-modal-line { display: flex; justify-content: space-between; font-size: 14px; }
.v-modal-line.total { font-weight: 700; border-top: 1px solid var(--bd); padding-top: 11px; margin-top: 4px; }
.v-modal-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.v-modal-actions { display: flex; gap: 10px; margin-top: 18px; }

/* State helpers (loading / empty / error) */
.v-state { padding: 40px 0; text-align: center; color: var(--mutfg); font-size: 14px; }

/* Menu (carte + disponibilité) — each dish row is one big tap target (>=44px) */
.v-dish-rows { display: flex; flex-direction: column; }
.v-dish-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--fg); }
.v-dish-row + .v-dish-row { border-top: 1px solid var(--bd); }
.v-dish-row:hover { background: var(--pri-soft); }
.v-dish-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v-dish-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-dish-desc { font-size: 12.5px; color: var(--mutfg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-dish-row.off .v-dish-main, .v-dish-row.off .v-price { opacity: 0.45; }
.v-dish-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }


/* Save banner (Réglages) — colours are set inline per success/error */
.v-banner { padding: 11px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }

/* Reservation row action buttons */
.v-resa-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Mobile reflow (real viewport) ---------- */
@media (max-width: 860px) {
  .v-side { display: none; }
  .v-botnav {
    display: flex; position: sticky; bottom: 0; z-index: 10;
    border-top: 1px solid var(--bd); background: #fff; padding: 6px 4px 10px;
  }
  .v-botnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    border: 0; background: transparent; color: var(--mutfg); font-size: 10.5px;
    font-weight: 600; cursor: pointer; padding: 5px 2px; text-decoration: none;
  }
  .v-botnav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--mutfg); font-size: 10.5px; font-weight: 600; padding: 5px 2px; text-decoration: none; }
  .v-bot-badge { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 15px; height: 15px; line-height: 15px; padding: 0 3px; border-radius: 99px; background: #dc2626; color: #fff; font-size: 9px; font-weight: 700; text-align: center; }
  .v-botnav .on { color: var(--pri); }
  .v-page { padding: 16px; }
  .v-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .v-kpi-value { font-size: 23px; }
  .v-dash-grid { grid-template-columns: 1fr; }
  .v-kanban { grid-template-columns: 1fr; gap: 18px; }
  .v-appels-centre, .v-cockpit { grid-template-columns: 1fr; }
  .v-grid2, .v-menu { grid-template-columns: 1fr; }
  .v-resa-row { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 7px; align-items: center; }
  .v-resa-name { flex: 1 1 120px; }
  .v-order-listrow { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 6px; }
  .v-order-listitems { flex: 1 1 100%; order: 3; }
  .v-section { flex-wrap: wrap; }
}
