/* Karigar: the K'S brand palette (navy, gold, ivory). Cormorant Garamond for headings, Inter for everything else:
   a restrained, jeweller-house register. Square-ish controls (4-6px radius), hairline borders, no bouncing. */
:root {
  --navy: #071b35;
  --navy-2: #0c284b;
  --ink: #102033;
  --gold: #b99754;
  --gold-soft: #d8c08b;
  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --line: #e5ded1;
  --muted: #5a6472;
  --bad: #a6402f;
  --good: #2f7d4f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d9d2c4; border-radius: 4px; background: #fff; font-size: 15px;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px rgba(7, 27, 53, .12); }
textarea { resize: vertical; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span { font-weight: 600; font-size: 14px; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.error { color: var(--bad); background: #fbefec; border: 1px solid #f0d5ce; border-radius: 6px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  background: var(--navy); color: var(--paper); border: 0; border-radius: 4px; font-weight: 600; font-size: 15px; letter-spacing: .01em; cursor: pointer; text-decoration: none;
}
.primary:hover:not(:disabled) { background: var(--navy-2); }
.primary:disabled { opacity: .6; cursor: default; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--navy); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; cursor: pointer; }
.remove { flex: none; width: 32px; height: 32px; border-radius: 4px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.remove:hover { color: var(--bad); border-color: currentColor; }

/* ---------- hero: design sheets on a navy desk, Indian left and Western right, the order in the middle ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--paper);
  min-height: min(780px, 94vh); display: grid; grid-template-rows: auto 1fr;
  background: linear-gradient(180deg, #08203f 0%, var(--navy) 100%);
  border-bottom: 1px solid rgba(185, 151, 84, .5);
}
.hero-top { position: relative; z-index: 2; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; width: 100%; max-width: 1160px; margin: 0 auto; padding: 22px 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.mark { font: 600 30px/1 var(--serif); color: var(--navy); text-decoration: none; letter-spacing: .02em; }
.hero .mark { color: var(--gold-soft); }
.by { color: var(--muted); font-size: 13px; letter-spacing: .02em; }
.hero .by { color: #aebbd0; }
.hero-copy { position: relative; z-index: 2; align-self: center; justify-self: center; max-width: 680px; text-align: center; padding: 56px 20px 64px; }
.hero-copy h1 { font: 500 clamp(40px, 5.4vw, 66px)/1.05 var(--serif); margin: 0 0 18px; color: #fff; }
.hero-copy p { font-size: 16px; line-height: 1.7; margin: 0 auto 28px; max-width: 34em; color: #c6d1de; }
.hero-cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 30px; border-radius: 4px;
  background: var(--gold); color: var(--navy); font-weight: 600; text-decoration: none; font-size: 15px; letter-spacing: .01em;
}
.assurances { list-style: none; margin: 44px 0 0; padding: 22px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; grid-template-columns: repeat(3, 1fr); text-align: left; }
.assurances li { padding: 0 18px; border-left: 1px solid rgba(185, 151, 84, .4); display: grid; gap: 3px; }
.assurances li:first-child { border-left: 0; padding-left: 0; }
.assurances strong { color: #fff; font-size: 14px; font-weight: 600; }
.assurances span { color: #9fb0c4; font-size: 13px; line-height: 1.5; }
.hero-cta:hover { background: var(--gold-soft); }
.hero-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* design sheets scattered on the desk: Indian on the left, Western on the right */
.floats { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fb {
  position: absolute; width: var(--w); left: var(--x); top: var(--y);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .38), 0 2px 4px rgba(0, 0, 0, .25);
  opacity: 0; animation: arrive 1.4s ease-out var(--in) forwards, drift var(--t) ease-in-out calc(var(--in) + 1.4s) infinite;
  --w: 190px; --r: 0deg; --t: 18s; --in: 0s;
}
.fb.west { left: auto; right: var(--x); }
.f-peacock   { --x: -1%; --y: 13%;  --r: -7deg; --in: .05s; --t: 19s; }
.f-kundan    { --x: 9%;  --y: 33%; --r: 5deg;  --in: .2s;  --t: 17s; }
.f-paisley   { --x: -2%; --y: 62%; --r: 4deg;  --in: .35s; --t: 21s; }
.f-chandbali { --x: 9%;  --y: 80%; --r: -4deg; --in: .5s;  --t: 18s; }
.f-sunburst  { --x: -1%; --y: 11%;  --r: 6deg;  --in: .1s;  --t: 20s; }
.f-bow       { --x: 9%;  --y: 33%; --r: -5deg; --in: .25s; --t: 17s; }
.f-cameo     { --x: -2%; --y: 62%; --r: -3deg; --in: .4s;  --t: 19s; }
.f-dragonfly { --x: 9%;  --y: 80%; --r: 7deg;  --in: .55s; --t: 22s; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) rotate(var(--r)); } to { opacity: .93; transform: translateY(0) rotate(var(--r)); } }
@keyframes drift { 0%, 100% { opacity: .93; transform: translateY(0) rotate(var(--r)); } 50% { opacity: .93; transform: translateY(-5px) rotate(calc(var(--r) + .6deg)); } }

main { max-width: 1160px; margin: 0 auto; padding: 0 20px 64px; scroll-margin-top: 12px; }
.order { padding-top: 12px; }
#order { scroll-margin-top: 8px; }

@media (max-width: 1200px) {
  .fb { --w: 158px; }
  .f-kundan, .f-chandbali, .f-bow, .f-dragonfly { --x: 6%; }
}
/* phones: the Indian sheets peek in above the headline, the Western ones below it */
@media (max-width: 760px) {
  .hero { min-height: 0; }
  .hero-copy { padding: 150px 16px 164px; }
  .hero-copy p { font-size: 15px; }
  .assurances { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .assurances li, .assurances li:first-child { border-left: 2px solid rgba(185, 151, 84, .5); padding: 0 0 0 12px; }
  .fb { --w: min(24vw, 100px); }
  .fb.in { --y: 70px; }
  .fb.west { top: auto; bottom: -18px; --y: auto; }
  .f-peacock { --x: 1%; }  .f-kundan { --x: 25%; } .f-paisley { --x: 50%; } .f-chandbali { --x: 75%; }
  .f-sunburst { --x: 1%; } .f-bow { --x: 25%; }    .f-cameo { --x: 50%; }   .f-dragonfly { --x: 75%; }
}
@media (prefers-reduced-motion: reduce) { .fb { animation: none; opacity: .93; transform: rotate(var(--r)); } }

/* ---------- the form: steps on the left, ticket on the right ---------- */
.order { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 56px; align-items: start; }
.order > .step, .order > .send { grid-column: 1; }
.step { padding: 30px 0; border-top: 1px solid var(--line); }
.step h2 { display: flex; align-items: center; gap: 12px; font: 600 19px/1.2 var(--sans); color: var(--navy); margin: 0 0 18px; letter-spacing: -.01em; }
.step h2 .n { font: 600 12px/1 var(--sans); color: #8a6b2e; border: 1px solid var(--gold); width: 28px; height: 28px; border-radius: 4px; display: inline-grid; place-items: center; flex: none; }
.step h2 .opt { font: 400 13px var(--sans); color: var(--muted); }
.step h3 { font-size: 14px; font-weight: 600; margin: 20px 0 10px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 15px; border: 1px solid #d9d2c4; border-radius: 4px; background: #fff; font-weight: 500; font-size: 14px; cursor: pointer; }
.chip small { color: var(--muted); font-weight: 400; font-size: 13px; }
.chip .sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(7, 27, 53, .15); flex: none; }
.chip input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--paper); }
.chip input:checked + span small { color: var(--gold-soft); }
.chip input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }
.custom-size { max-width: 260px; }
.size-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; align-items: start; }
.size-layout .chips { flex-direction: column; align-items: stretch; }
.size-layout .chip span { width: 100%; justify-content: space-between; }
.scale { margin: 0; border-radius: 6px; overflow: hidden; background: #262f3c; }
.scale svg { display: block; width: 100%; height: auto; }
.scale figcaption { padding: 10px 14px 12px; font-size: 12.5px; line-height: 1.5; color: #c9d3df; border-top: 1px solid rgba(255, 255, 255, .08); }

/* design cards */
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.design-wrap { position: relative; }
.design { position: relative; display: grid; gap: 4px; padding: 0 0 12px; border: 1px solid #ddd6c8; border-radius: 6px; background: #fff; cursor: pointer; height: 100%; overflow: hidden; }
.design input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.design .pic { aspect-ratio: 1; border-radius: 0; overflow: hidden; background: var(--ivory); display: grid; place-items: center; color: var(--gold); }
.design .pic img { width: 100%; height: 100%; object-fit: cover; }
.design .pic svg { width: 56%; }
.design .dname { font-weight: 600; font-size: 14px; margin-top: 8px; padding: 0 12px; }
.design .ddesc { color: var(--muted); font-size: 12.5px; line-height: 1.45; padding: 0 12px; }
.design:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.design:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.design:has(input:checked) .dname { color: var(--navy); }
.design.own .pic { border-bottom: 1px dashed var(--gold-soft); background: #faf8f3; }
.zoom { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 4px; border: 0; background: rgba(255, 253, 248, .92); color: var(--navy); font-size: 16px; cursor: zoom-in; box-shadow: 0 1px 4px rgba(7, 27, 53, .2); }

/* stones */
.stone { display: flex; gap: 10px; align-items: end; padding: 4px 0 14px; border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.stone .field { flex: 2; margin-top: 0; }
.stone .field.narrow { flex: 1; }
.stone .remove { margin-bottom: 6px; }

/* photos */
.drop { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 26px 16px; border: 1px dashed #c9b27e; border-radius: 6px; background: #fff; cursor: pointer; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { color: var(--navy); font-size: 15px; }
.drop span { color: var(--muted); font-size: 14px; max-width: 30em; }
.drop.over, .drop:focus-within { border-color: var(--navy); background: #fff; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 14px; }
.thumb { margin: 0; display: grid; gap: 6px; }
.thumb .open { padding: 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--paper); }
.thumb .open img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-cover .open { border: 2px solid var(--navy); }
.thumb figcaption { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.thumb .link-btn { font-size: 13px; }
.badge { background: var(--navy); color: var(--paper); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 3px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.grid2 .field { margin-top: 14px; }

.send { padding: 28px 0 0; border-top: 1px solid var(--line); }
.send .primary { width: 100%; max-width: 360px; }

/* ---------- the job ticket ---------- */
.ticket { grid-column: 2; grid-row: 1 / span 20; position: sticky; top: 24px; padding-top: 28px; }
.tag {
  position: relative; background: var(--navy); color: var(--paper); padding: 26px 24px 24px; border-radius: 6px;
  border-top: 3px solid var(--gold);
}
.tag-label { margin: 0 0 18px; font-size: 13px; color: #9fb0c4; font-weight: 500; }
.disc { position: relative; width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; border: 1.5px dashed rgba(216, 192, 139, .55); transition: background .35s ease, border-color .35s ease; }
.disc.set { border: 0; background: var(--finish); box-shadow: 0 6px 16px rgba(0, 0, 0, .35), inset 0 -3px 6px rgba(0, 0, 0, .18); }
.disc span { position: absolute; inset: 16px; border-radius: 50%; background: center / cover no-repeat; opacity: 0; transition: opacity .3s ease; }
.disc.has-img span { opacity: 1; box-shadow: 0 0 0 2px rgba(0, 0, 0, .18); }
.disc.stones::after {
  content: ""; position: absolute; top: 4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .8), 52px 52px 0 0 #fff, -52px 52px 0 0 #fff, 0 104px 0 0 #fff;
}
.tag-title { font: 600 26px/1.15 var(--serif); text-align: center; margin: 0 0 18px; color: var(--paper); }
.tag dl { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0; font-size: 13.5px; border-top: 1px solid rgba(185, 151, 84, .35); }
.tag dt { color: #9fb0c4; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.tag dd { margin: 0; padding: 9px 0 9px 12px; text-align: right; overflow-wrap: anywhere; border-bottom: 1px solid rgba(255, 255, 255, .07); }

/* ---------- order received ---------- */
.done { max-width: 620px; padding: 56px 0; outline: none; }
.done h1 { font: 500 clamp(38px, 5vw, 56px)/1.05 var(--serif); color: var(--navy); margin: 6px 0 14px; }
.done p { font-size: 18px; margin: 0 0 24px; }
.done-no { font-weight: 600; color: var(--muted); font-size: 15px !important; margin: 0 !important; }
.summary { white-space: pre-wrap; font: 14px/1.6 var(--sans); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; margin: 28px 0 18px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(4, 14, 28, .92); display: grid; place-items: center; padding: 48px 56px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 96px); border-radius: 6px; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 10px; top: 50%; margin-top: -22px; }
.lb-next { right: 10px; top: 50%; margin-top: -22px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }

@media (max-width: 900px) {
  .order { grid-template-columns: minmax(0, 1fr); }
  .size-layout { grid-template-columns: 1fr; }
  .ticket { grid-column: 1; grid-row: auto; position: static; padding: 28px 0 0; border-top: 1px solid var(--line); }
  .tag { max-width: 360px; margin: 0 auto; }
  .send { border-top: 0; }
  .send .primary { max-width: none; }
}
@media (max-width: 560px) {
  main { padding-left: 16px; padding-right: 16px; }
  .designs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .stone { flex-wrap: wrap; }
  .stone .field { flex: 1 1 100%; }
  .stone .field.narrow { flex: 1 1 35%; }
  .lightbox { padding: 56px 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ================= admin: three panes, like Product Development ================= */
.admin { background: var(--ivory); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--navy); }
.login { width: min(380px, 100%); background: var(--paper); border-radius: 6px; border-top: 3px solid var(--gold); padding: 32px 26px; display: grid; gap: 4px; }
.login .mark { text-align: center; font-size: 40px; }
.login p { text-align: center; color: var(--muted); margin: 0 0 6px; }
.login .primary { margin-top: 18px; }

.app { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.bar { flex: none; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: var(--navy); color: var(--paper); }
.bar .mark { color: var(--gold-soft); font-size: 26px; }
.bar-title { color: #c9d3df; font-size: 14px; }
.bar .grow { flex: 1; }
.bar .ghost { background: none; border: 1px solid rgba(255, 255, 255, .25); color: #fff; padding: 7px 14px; border-radius: 4px; cursor: pointer; font-size: 14px; text-decoration: none; }
.bar .ghost:hover { background: rgba(255, 255, 255, .1); }
.tabs { flex: none; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px; }
.tabs nav { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs nav button { border: 0; background: none; padding: 9px 14px; border-radius: 6px; color: var(--muted); font-weight: 600; cursor: pointer; }
.tabs nav button.active { background: #eaf0f8; color: var(--navy); }
.scroll { flex: 1; min-height: 0; overflow: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 24px 20px 64px; }
.wrap h1 { font: 600 34px/1.1 var(--serif); color: var(--navy); margin: 0 0 16px; }

.three-pane { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 330px; }
.pane { min-height: 0; overflow: auto; }
.left-pane { background: #f3eee4; border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.log-pane { background: #f9f6ef; border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.middle-pane { background: var(--paper); }
.pane-head { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 16px 10px; }
.pane-head strong { font: 600 17px/1 var(--sans); color: var(--navy); }
.list-tools { display: grid; gap: 8px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.list-tools input, .list-tools select { padding: 9px 11px; font-size: 14px; background: #fff; }
.order-list { flex: 1; overflow: auto; padding: 8px; }
.list-empty { padding: 12px 8px; }
.order-card { width: 100%; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 10px; border: 0; border-left: 3px solid transparent; border-radius: 6px; background: none; cursor: pointer; color: var(--ink); }
.order-card:hover { background: rgba(255, 255, 255, .7); }
.order-card.active { background: #fff; border-left-color: var(--gold); box-shadow: 0 3px 14px rgba(7, 27, 53, .07); }
.oc-thumb { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; background: #e8e0d3; }
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oc-meta { display: grid; gap: 2px; min-width: 0; }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.oc-top strong { color: var(--navy); font-size: 14px; }
.oc-name { font-size: 13px; font-weight: 600; }
.oc-sub, .oc-date { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pane-empty { height: 100%; display: grid; place-content: center; text-align: center; padding: 20px; }
.serif { font: 400 30px/1.1 var(--serif); color: var(--navy); margin: 0 0 6px; }
.detail { padding: 24px 28px 48px; display: grid; gap: 16px; max-width: 920px; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.detail-header h1 { display: flex; align-items: center; gap: 12px; font: 600 34px/1 var(--serif); color: var(--navy); margin: 0 0 6px; }
.detail-header p { margin: 0; color: var(--muted); font-size: 14px; }
.stage-control { display: flex; gap: 8px; align-items: center; }
.stage-control select { width: auto; padding: 9px 11px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 4px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 18px; left: 8%; right: 8%; height: 1px; background: var(--line); }
.timeline .step { padding: 0; border: 0; position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.timeline .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #f2eee7; border: 1px solid #dbd2c4; color: var(--muted); }
.timeline .done .dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.timeline .current .dot { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: 0 0 0 5px rgba(185, 151, 84, .16); }
.timeline .step-name { font-size: 12px; color: var(--muted); }
.timeline .current .step-name, .timeline .done .step-name { color: var(--navy); font-weight: 600; }
.cancelled { margin: 0; padding: 12px 14px; border-radius: 8px; background: #f3e9e6; color: #7c3a2c; font-size: 14px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; }
.hero-image { min-height: 240px; border-radius: 6px; overflow: hidden; background: #f0ebe1; display: grid; place-items: center; }
.hero-image .open { width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.hero-image img { width: 100%; height: 100%; max-height: 320px; object-fit: contain; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px; }
.card h3 { font: 600 16px/1.2 var(--sans); color: var(--navy); margin: 0; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.facts dl { margin: 0; }
.facts dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0ebe1; font-size: 14px; }
.facts dl > div:last-child { border: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--navy); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-note p { margin: 8px 0 0; white-space: pre-wrap; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.photo-group + .photo-group { margin-top: 16px; }
.photo-group h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.photo-group .thumbs { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

.contact { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.contact a { text-decoration: none; }
.log { list-style: none; margin: 0; padding: 14px; flex: 1; overflow: auto; display: grid; align-content: start; gap: 10px; }
.msg div { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.msg span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg.note div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.msg.event { padding-left: 12px; border-left: 2px solid var(--gold-soft); }
.msg.event div { color: var(--muted); font-size: 13px; }
.composer { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: var(--paper); }
.composer textarea { font-size: 14px; }

.btn { display: inline-flex; align-items: center; border: 1px solid #d9d2c4; background: #fff; padding: 8px 14px; border-radius: 4px; font-weight: 600; font-size: 13px; color: var(--navy); cursor: pointer; }
.btn:hover:not(:disabled) { border-color: var(--navy); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.danger { color: var(--bad); }
.btn.solid { background: var(--navy); color: var(--paper); border-color: var(--navy); }
.btn.solid:hover:not(:disabled) { background: var(--navy-2); }

.pill { display: inline-block; padding: 3px 8px; border-radius: 3px; font: 600 11px/1.4 var(--sans); white-space: nowrap; background: var(--ivory); color: var(--ink); border: 1px solid var(--line); }
.pill.new { background: #fdf3dc; border-color: #ecd9a6; color: #6b4d0e; }
.pill.quoted { background: #e7eef8; border-color: #c8d6ea; color: #1d3a5c; }
.pill.confirmed, .pill.in_making { background: #e5f1ea; border-color: #c4dece; color: #245c3b; }
.pill.ready, .pill.delivered { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.pill.cancelled { background: #f3e9e6; border-color: #e5d0ca; color: #7c3a2c; }

/* designs / sizes / settings */
.cards { display: grid; gap: 14px; }
.card.off { opacity: .7; }
.card-head { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: end; }
.card-head .field { margin-top: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
.check input { width: 18px; height: 18px; }
.upload-btn { position: relative; overflow: hidden; }
.upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.metal-row { display: grid; grid-template-columns: 1fr 2fr 2fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.metal-row .field { margin-top: 0; }
.size-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.size-row .field { margin-top: 0; }
.section { margin-bottom: 30px; }
.section h2 { font: 600 18px/1.2 var(--sans); color: var(--navy); margin: 0 0 4px; }
.section > p { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.saved { color: var(--good); font-size: 14px; font-weight: 600; }

@media (max-width: 1200px) {
  .three-pane { grid-template-columns: 270px minmax(0, 1fr) 290px; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .app { height: auto; min-height: 100vh; overflow: visible; }
  .three-pane { display: block; }
  .left-pane { max-height: 380px; border-right: 0; border-bottom: 1px solid var(--line); }
  .log-pane { border-left: 0; border-top: 1px solid var(--line); max-height: 640px; }
  .pane { overflow: visible; }
  .order-list, .log { overflow: auto; }
  .bar-title { display: none; }
}
@media (max-width: 700px) {
  .detail { padding: 18px 16px 32px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .timeline::before { display: none; }
  .card-head, .metal-row, .size-row { grid-template-columns: 1fr; }
  .bar { padding: 0 12px; gap: 8px; }
  .bar a.ghost { display: none; }
}
