:root {
  --navy: #0b1f3a;
  --navy-2: #13294b;
  --sky: #0ea5e9;
  --sky-2: #38bdf8;
  --sky-soft: #e0f2fe;
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --ok: #10b981;
  --warn: #f59e0b;
  --err: #ef4444;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ───── Topbar ───── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 24px 12px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 20px -10px rgba(11, 31, 58, .6);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--sky), #2563eb);
  display: grid; place-items: center; color: #fff;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.big { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 8px; }
.brand-mark.big svg { width: 40px; height: 40px; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -.4px; line-height: 1; }
.brand-name span { color: var(--sky-2); }
.brand-sub { font-size: 12.5px; color: #94a3b8; margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: inherit;
}
.icon-btn:active { transform: scale(.96); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--sky-soft); color: #0369a1;
  white-space: nowrap;
}
.chip-ghost { background: rgba(255, 255, 255, .1); color: #cbd5e1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 500; font-size: 12px; }

/* ───── Layout ───── */
.wrap { max-width: 920px; margin: 0 auto; padding: 24px 20px 0; display: grid; gap: 18px; }
.spacer { height: 120px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px 24px;
  border: 1px solid rgba(226, 232, 240, .7);
}
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.card-head > div { flex: 1; }
.card-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.2px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.step {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 15px;
  transition: background .2s;
}
.card.complete .step { background: var(--ok); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ───── Fields ───── */
.field { display: block; margin-bottom: 18px; }
.label {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 8px;
}
.label em { color: var(--err); font-style: normal; }
.label.small { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.counter { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 12px; }

input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=password], textarea, .readonly {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--ink);
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
  min-height: 50px;
}
input:focus, textarea:focus {
  border-color: var(--sky);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .15);
}
textarea { resize: vertical; line-height: 1.5; min-height: 120px; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
.readonly { background: #f1f5f9; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; }
.invalid { border-color: var(--err) !important; box-shadow: 0 0 0 4px rgba(239, 68, 68, .12) !important; }

.time-wrap { position: relative; }
.time-wrap input { padding-right: 116px; }
.now-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; border-radius: 9px;
  padding: 8px 10px; font-size: 13px; font-weight: 600;
  background: var(--sky-soft); color: #0369a1;
}
.now-btn:active { transform: translateY(-50%) scale(.96); }

/* ───── Combo client ───── */
.combo { position: relative; }
.combo input { padding-left: 44px; padding-right: 44px; }
.combo-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.combo-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: #e2e8f0; color: var(--ink-2); font-size: 20px; line-height: 1;
}
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, .25);
  max-height: 340px; overflow: auto; -webkit-overflow-scrolling: touch;
}
.combo-list li {
  padding: 12px 12px; border-radius: 10px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.combo-list li.active, .combo-list li:hover { background: #f1f5f9; }
.combo-list li .mini-av {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--sky-soft); color: #0369a1;
}
.combo-list li b { font-weight: 600; display: block; }
.combo-list li small { color: var(--muted); font-size: 12.5px; }
.combo-list li mark { background: #fef08a; color: inherit; border-radius: 3px; }
.combo-list .empty { color: var(--muted); justify-content: center; cursor: default; }

.client-card {
  display: grid; grid-template-columns: auto 1fr 1.1fr; gap: 16px; align-items: center;
  margin: -4px 0 20px; padding: 16px;
  border-radius: 14px; background: linear-gradient(135deg, #f0f9ff, #f8fafc);
  border: 1px solid #bae6fd;
}
@media (max-width: 720px) { .client-card { grid-template-columns: auto 1fr; } .client-email { grid-column: 1 / -1; } }
.client-avatar {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  background: var(--navy); color: #fff;
}
.client-name { font-weight: 700; font-size: 16px; }
.client-addr { color: var(--muted); font-size: 13.5px; margin-top: 3px; line-height: 1.4; }
.client-email input { background: #fff; min-height: 44px; padding: 10px 12px; font-size: 15px; }

/* ───── Pills ───── */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: 15px;
  transition: all .15s;
  min-height: 50px;
}
.pill .av {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.pill[aria-checked=true] { border-color: var(--navy); background: var(--navy); color: #fff; box-shadow: 0 6px 16px -8px rgba(11, 31, 58, .6); }
.pill:active { transform: scale(.97); }

/* ───── Duration strip ───── */
.duration {
  display: flex; align-items: stretch;
  border-radius: 14px; overflow: hidden;
  background: var(--navy); color: #fff;
}
.duration-item { flex: 1; padding: 14px 18px; }
.duration-sep { width: 1px; background: rgba(255, 255, 255, .1); }
.duration-k { display: block; font-size: 12px; color: #94a3b8; font-weight: 500; }
.duration-v { display: block; font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.duration-v.accent { color: var(--sky-2); }
@media (max-width: 560px) { .duration { flex-direction: column; } .duration-sep { width: auto; height: 1px; } }

/* ───── Photos ───── */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo-add {
  aspect-ratio: 1; border-radius: 14px;
  border: 2px dashed var(--line-2); background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-2); font-weight: 600; font-size: 14px; text-align: center; padding: 10px;
  cursor: pointer; transition: all .15s;
}
.photo-add svg { width: 34px; height: 34px; color: var(--sky); }
.photo-add:active { transform: scale(.98); background: var(--sky-soft); border-color: var(--sky); }
.photo-add.alt svg { color: var(--muted); }
.photo {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
  background: #e2e8f0; box-shadow: var(--shadow);
  animation: pop .25s ease-out;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .rm {
  position: absolute; top: 8px; right: 8px;
  width: 34px; height: 34px; border-radius: 10px; border: 0;
  background: rgba(15, 23, 42, .7); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(6px);
}
.photo .rm svg { width: 18px; height: 18px; }
.photo .num {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(15, 23, 42, .7); color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
}
.photo.loading::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #e2e8f0, #f1f5f9, #e2e8f0);
  background-size: 200% 100%; animation: shimmer 1s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pop { from { transform: scale(.9); opacity: 0; } }

/* ───── Segmented ───── */
.segmented {
  display: inline-grid; grid-template-columns: 1fr 1fr;
  background: #f1f5f9; border-radius: 14px; padding: 5px; gap: 4px;
  min-width: 260px;
}
.segmented button {
  border: 0; background: transparent; border-radius: 10px;
  padding: 12px 26px; font-weight: 600; font-size: 15px; color: var(--muted);
  transition: all .15s;
}
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15, 23, 42, .1); }
.segmented button[data-val=yes].on { background: var(--warn); color: #fff; }
.reveal { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.reveal > * { overflow: hidden; }
.reveal.open { grid-template-rows: 1fr; }
.reveal.open .field { margin-top: 18px; margin-bottom: 0; }

/* ───── Tarif ───── */
.tariff {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px; border-radius: 14px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #e2e8f0;
}
.tariff svg { color: var(--sky-2); margin-top: 1px; }
.tariff p { margin: 0; font-size: 14px; line-height: 1.55; }
.tariff b { color: #fff; }

/* ───── Signature ───── */
.sig-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sig-head .label { margin: 0; }
.link-btn { border: 0; background: none; color: var(--sky); font-weight: 600; font-size: 14px; padding: 6px 4px; }
.sig-pad {
  position: relative; height: 240px; border-radius: 14px;
  background: #fff; border: 1.5px dashed var(--line-2);
  touch-action: none; overflow: hidden;
  -webkit-user-select: none; user-select: none;
}
.sig-pad.signed { border-style: solid; border-color: var(--ok); }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.sig-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #94a3b8; font-size: 15px; pointer-events: none;
}
.sig-line { position: absolute; left: 32px; right: 32px; bottom: 56px; border-bottom: 1.5px solid var(--line); pointer-events: none; }

/* ───── Action bar ───── */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; align-items: center; gap: 20px; justify-content: space-between;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.progress { flex: 1; max-width: 420px; }
.progress-bar { height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sky), var(--ok)); border-radius: 99px; transition: width .3s; }
#progressText { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px;
  padding: 15px 24px; min-height: 54px;
  font-weight: 700; font-size: 16px;
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--sky), #2563eb); color: #fff; box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7); }
.btn-primary:disabled { background: #cbd5e1; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #f1f5f9; color: var(--ink); }
.btn.wide { width: 100%; }

/* ───── Sheet ───── */
.sheet { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); animation: fade .2s; }
.sheet-panel {
  position: relative; width: 100%; max-width: 760px; max-height: 92vh;
  background: #fff; border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: #cbd5e1; margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 8px; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-head .icon-btn { background: #f1f5f9; color: var(--ink); }
.review { overflow: auto; padding: 8px 24px 16px; }
.review dl { display: grid; grid-template-columns: 170px 1fr; gap: 0; margin: 0; }
.review dt, .review dd { padding: 11px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: 14.5px; }
.review dt { color: var(--muted); }
.review dd { font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.review .thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.review .thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.review .sig-img { max-height: 70px; background: #f8fafc; border-radius: 8px; padding: 4px; }
.review .total {
  margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: #f0f9ff;
  display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-2);
}
.review .total b { font-size: 20px; color: var(--navy); }
.sheet-actions { display: flex; gap: 12px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }
.sheet-actions .btn-primary { flex: 1; }
@media (max-width: 560px) { .review dl { grid-template-columns: 1fr; } .review dt { border: 0; padding-bottom: 0; } }

/* ───── Overlay ───── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(11, 31, 58, .72); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
  animation: fade .2s;
}
.overlay-card {
  width: 100%; max-width: 420px; background: #fff; border-radius: 24px;
  padding: 32px 28px; text-align: center;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4);
  animation: pop .25s ease-out;
}
.overlay-card h3 { margin: 12px 0 8px; font-size: 21px; }
.overlay-card p { color: var(--muted); margin: 0 0 18px; line-height: 1.5; font-size: 14.5px; }
.overlay.pin { background: linear-gradient(160deg, var(--navy), #1e3a8a); }
.overlay.pin input { text-align: center; font-size: 22px; letter-spacing: 6px; margin-bottom: 14px; }
.pin-err { color: var(--err) !important; font-weight: 600; margin: -6px 0 12px !important; }

.spinner {
  width: 54px; height: 54px; margin: 0 auto; border-radius: 50%;
  border: 5px solid var(--sky-soft); border-top-color: var(--sky);
  animation: spin .8s linear infinite;
}
.steps { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 10px; }
.steps li {
  display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--muted);
  padding: 10px 14px; border-radius: 12px; background: #f8fafc;
}
.steps li::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-2);
}
.steps li.run { color: var(--ink); background: var(--sky-soft); }
.steps li.run::before { border-color: var(--sky); border-top-color: transparent; animation: spin .7s linear infinite; }
.steps li.ok { color: var(--ink); }
.steps li.ok::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--ok); }

.done-ico {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  background: #d1fae5; color: var(--ok); display: grid; place-items: center;
}
.done-ico svg { width: 38px; height: 38px; stroke-width: 3; }
.done-ico.err { background: #fee2e2; color: var(--err); }
.warn-list { text-align: left; margin: 0 0 18px; padding: 12px 14px 12px 32px; background: #fffbeb; border-radius: 12px; color: #92400e; font-size: 13.5px; }
.warn-list:empty { display: none; }
.row-btns { display: flex; gap: 10px; }
.row-btns .btn { flex: 1; }

/* ───── Toast ───── */
.toast {
  position: fixed; left: 50%; bottom: 110px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-size: 14.5px; font-weight: 500; max-width: calc(100vw - 32px);
  transition: all .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--err); }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .topbar { padding-left: 16px; padding-right: 16px; }
  .chip-ghost { display: none; }
  .wrap { padding: 16px 12px 0; }
  .card { padding: 18px 16px 20px; }
  .actionbar { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .actionbar .btn { padding: 14px 16px; font-size: 15px; }
}

/* ───── Sélecteur d'heure 24h ───── */
input.time24 { cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .5px; caret-color: transparent; }
.tp { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px; }
.tp-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); animation: fade .15s; }
.tp-panel {
  position: relative; width: 100%; max-width: 420px;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); animation: pop .2s ease-out;
}
.tp-head { background: var(--navy); color: #94a3b8; padding: 16px 20px 18px; font-size: 13px; font-weight: 600; }
.tp-display { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: #fff; font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-seg { border: 0; background: transparent; color: #64748b; font: inherit; padding: 0 8px; border-radius: 12px; line-height: 1.15; }
.tp-seg.on { color: #fff; background: rgba(255, 255, 255, .1); }
.tp-grid { display: grid; gap: 8px; padding: 18px 18px 6px; }
.tp-hours { grid-template-columns: repeat(6, 1fr); }
.tp-mins { grid-template-columns: repeat(4, 1fr); }
.tp-grid button {
  border: 1.5px solid var(--line); background: #f8fafc; border-radius: 12px;
  min-height: 48px; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums;
}
.tp-grid button.day { background: #fff; }
.tp-grid button.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.tp-grid button:active { transform: scale(.96); }
.tp-fine { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 18px 0; }
.tp-fine button { border: 0; background: var(--sky-soft); color: #0369a1; border-radius: 12px; min-height: 44px; font-weight: 700; }
.tp-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 16px 18px 18px; }
@media (max-width: 380px) { .tp-hours { grid-template-columns: repeat(4, 1fr); } }

/* ───── Nouveau client ───── */
.label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.label-row .label { margin: 0; }
.new-client-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid #bae6fd; background: var(--sky-soft); color: #0369a1;
  border-radius: 10px; padding: 7px 12px; font-size: 13.5px; font-weight: 700;
}
.new-client-btn svg { width: 16px; height: 16px; stroke-width: 2.6; }
.new-client-btn:active { transform: scale(.97); }
.combo-list li.create { color: #0369a1; font-weight: 600; }
.combo-list li.create .mini-av { background: #0369a1; color: #fff; }

.sheet-sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.nc-panel { max-width: 820px; }
.nc-body { overflow: auto; padding: 4px 24px 8px; display: grid; gap: 14px; }
.nc-block { border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 2px; }
.nc-block h3 { margin: 0 0 14px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grid-zip { display: grid; grid-template-columns: 130px 1fr 190px; gap: 16px; }
@media (max-width: 560px) { .grid-zip { grid-template-columns: 1fr 2fr; } .grid-zip .field:last-child { grid-column: 1 / -1; } }

.vat-wrap, .phone-wrap { position: relative; display: flex; align-items: stretch; }
.vat-prefix {
  display: grid; place-items: center; padding: 0 12px;
  background: #e2e8f0; color: var(--ink-2); font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px;
}
.vat-wrap input, .phone-wrap input { border-radius: 0 12px 12px 0; }
.vat-wrap input { padding-right: 140px; font-variant-numeric: tabular-nums; letter-spacing: .5px; font-weight: 600; }
.vat-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 9px; padding: 9px 12px;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px;
}
.vat-btn svg { width: 16px; height: 16px; }
.vat-btn[disabled] { opacity: .6; }
.vat-btn.loading svg { animation: spin .8s linear infinite; }

.bce-result {
  display: flex; gap: 12px; align-items: flex-start;
  margin: -6px 0 16px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45;
}
.bce-result.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.bce-result.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.bce-result.load { background: #f1f5f9; color: var(--muted); }
.bce-result b { color: inherit; }
.bce-result svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.bce-result small { display: block; opacity: .8; }

.filled { background: #f0fdf4 !important; border-color: #86efac !important; transition: background 1.2s; }

.nc-fixed { background: #f8fafc; }
.fixed-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; }
.fixed-chips span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8;
}
.fixed-chips span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.nc-warn { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fffbeb; color: #92400e; font-size: 13.5px; }
.nc-warn button { border: 0; background: none; color: #0369a1; font-weight: 700; text-decoration: underline; padding: 0; }
.nc-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fef2f2; color: #991b1b; font-size: 13.5px; font-weight: 600; }

.label .opt { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 4px; }

select#ncCountry {
  width: 100%; min-height: 50px; font: inherit; font-size: 16px; color: var(--ink);
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 40px 13px 14px;
  -webkit-appearance: none; appearance: none; outline: none;
}
select#ncCountry:focus { border-color: var(--sky); background-color: #fff; box-shadow: 0 0 0 4px rgba(14, 165, 233, .15); }
