/* ServerDove Management
   Type: IBM Plex Sans + IBM Plex Mono. Identifiers, SKUs and quantities are
   always monospaced so they can be scanned down a column.
   Colour carries the lock ladder: green available, amber parts sold,
   red server sold. Nothing else in the interface uses those three hues. */

:root {
  /* Brand purple sampled from the ServerDove mark */
  --brand: #431E9F;
  --brand-dark: #35187E;
  --brand-soft: #EEEAFA;

  --nav: #1B1042;
  --nav-2: #2A1C60;
  --nav-line: #3B2A79;

  --text: #1A1830;
  --muted: #6A6880;
  --faint: #9694AC;

  --canvas: #EFEFF5;
  --surface: #FFFFFF;
  --line: #E0DEEA;
  --line-soft: #EDECF4;

  --accent: #431E9F;
  --accent-dark: #35187E;
  --accent-soft: #EEEAFA;

  --live: #0B7350;
  --live-soft: #E3F4EC;
  --warn: #8F5300;
  --warn-soft: #FBF0DE;
  --stop: #9E252B;
  --stop-soft: #FAE8E8;

  /* Density. The interface is meant to be read as a dense operational
     screen, not a marketing page - more rows and more fields per viewport,
     because detail keeps being added. Tune here rather than rule by rule. */
  --pad-card: 13px;
  --pad-cell: 8px 12px;
  --gap: 11px;

  --sidebar-w: 212px;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(27, 16, 66, .07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, Segoe UI, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 19px; }
h2 { font-size: 13.5px; }
h3 { font-size: 13px; }
p { margin: 0; }
a { color: var(--accent); }

.mono, .code {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-variant-ligatures: none;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

.muted { color: var(--muted); }

/* ---------- Shell ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 14px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--nav-line);
}
.sidebar .brand .mark { width: 34px; height: 34px; border-radius: 7px; flex: none; display: block; }
.login .brand .mark { width: 40px; height: 40px; border-radius: 8px; flex: none; display: block; }
.sidebar .brand b { display: block; font-size: 14px; font-weight: 600; }
.sidebar .brand span { display: block; font-size: 11px; color: #A79FC8; }

.nav { padding: 10px 9px; flex: 1; }
.nav .eyebrow { color: #8E85B4; padding: 0 8px 8px; }
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  margin-bottom: 1px;
  border-radius: 6px;
  color: #CFC9E4;
  text-decoration: none;
  font-size: 12.5px;
  transition: background .12s, color .12s;
}
.nav a:hover { background: var(--nav-2); color: #fff; }
.nav a.on { background: var(--nav-2); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav a .count {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: #9F97C2;
  background: rgba(255, 255, 255, .07);
  padding: 1px 6px;
  border-radius: 20px;
}

.who { border-top: 1px solid var(--nav-line); padding: 11px 13px; }
.who .name { font-size: 13px; font-weight: 600; }
.who .role { font-size: 11px; color: #9F97C2; text-transform: capitalize; }
.who form { margin-top: 10px; }
.who button {
  width: 100%;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--nav-line);
  color: #CFC9E4;
  font-size: 12.5px;
  padding: 7px;
}
.who button:hover { background: var(--nav-2); color: #fff; }

.main { padding: 18px 22px 44px; max-width: 1560px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.page-head .sub { color: var(--muted); margin-top: 3px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.card > .card-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.card > .card-body { padding: 14px; }
.card > .card-body.tight { padding: 0; }

/* ---------- Buttons ---------- */

button, .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
button:hover, .button:hover { background: var(--accent-dark); }
.button.ghost, button.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}
.button.ghost:hover, button.ghost:hover { background: #F7F6FB; border-color: #C6C0DC; }
.button.quiet, button.quiet { background: transparent; color: var(--accent); }
.button.quiet:hover, button.quiet:hover { background: var(--accent-soft); }
.button.danger, button.danger { background: transparent; color: var(--stop); border-color: #E7C4C6; }
.button.danger:hover, button.danger:hover { background: var(--stop-soft); }
.button.small, button.small { padding: 4px 9px; font-size: 11.5px; }
button:disabled { opacity: .45; cursor: not-allowed; }

/* The hidden attribute is display:none from the browser stylesheet, which any
   explicit display beats - and the rule above sets inline-flex on every
   button. Without this, hiding a button by setting [hidden] does nothing.
   The same trap was already worked around for .overlay further down. */
button[hidden], .button[hidden] { display: none !important; }
button:focus-visible, .button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Forms ---------- */

label { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
input, select, textarea {
  width: 100%;
  height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { height: auto; min-height: 62px; padding: 7px 9px; resize: vertical; }
.field-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; align-items: start; }
.form-card { max-width: 920px; }
.field-grid .wide { grid-column: span 2; }
.field-grid .full { grid-column: 1 / -1; }

.notice { padding: 8px 12px; border-radius: 6px; font-size: 12.5px; margin-bottom: 11px; }
.notice.bad { background: var(--stop-soft); color: var(--stop); }
.notice.good { background: var(--live-soft); color: var(--live); }
.notice.info { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: #F8F7FB;
  white-space: nowrap;
}
td { padding: var(--pad-cell); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FBFAFD; }
td.num { font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.row-empty td { color: var(--muted); text-align: center; padding: 22px; }
.row-empty:hover td { background: transparent; }

/* ---------- Status ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.pill:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live { background: var(--live-soft); color: var(--live); }
.pill.partial { background: var(--warn-soft); color: var(--warn); }
.pill.sold { background: var(--stop-soft); color: var(--stop); }
.pill.draft { background: #EEEDF4; color: var(--muted); }

.tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #EEEDF4;
  color: #565270;
}
.tag.optional { background: var(--warn-soft); color: var(--warn); }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); margin-bottom: 12px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 11px 13px;
}
.stat .eyebrow { margin-bottom: 6px; }
.stat b { font-family: "IBM Plex Mono", monospace; font-size: 23px; font-weight: 600; line-height: 1; display: block; }
.stat .foot { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.stat.is-live b { color: var(--live); }
.stat.is-warn b { color: var(--warn); }
.stat.is-stop b { color: var(--stop); }

/* ---------- Rack strip: the state of a machine, read left to right ---------- */

.rack { display: flex; gap: 3px; align-items: stretch; }
.rack .unit {
  flex: 1 1 0;
  min-width: 44px;
  border-radius: 4px;
  border: 1px solid;
  padding: 5px 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  line-height: 1.35;
  overflow: hidden;
}
.rack .unit .r { font-weight: 600; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.rack .unit .q { opacity: .75; }
.rack .unit.on { background: var(--live-soft); border-color: #B6DFCB; color: var(--live); }
.rack .unit.off { background: var(--stop-soft); border-color: #EFC9CB; color: var(--stop); }
.rack .unit.lead { flex: 0 0 118px; }
.rack-empty { color: var(--faint); font-size: 12.5px; font-style: italic; }
.rack-key { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.rack-key span { display: inline-flex; align-items: center; gap: 6px; }
.rack-key i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid; display: inline-block; }
.rack-key i.on { background: var(--live-soft); border-color: #B6DFCB; }
.rack-key i.off { background: var(--stop-soft); border-color: #EFC9CB; }

/* ---------- Dashboard ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }

.attn { padding: 9px 14px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 11px; align-items: flex-start; }
.attn:last-child { border-bottom: 0; }
.attn .bar { width: 3px; align-self: stretch; border-radius: 3px; flex: none; background: var(--line); }
.attn.p0 .bar { background: var(--stop); }
.attn.p1 .bar { background: var(--warn); }
.attn.p2 .bar { background: var(--accent); }
.attn .grow { flex: 1; min-width: 0; }
.attn .title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.attn .why { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 14px; border-bottom: 1px solid var(--line-soft); display: flex; gap: 9px; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--faint); }
.feed .dot.stop { background: var(--stop); }
.feed .dot.warn { background: var(--warn); }
.feed .dot.live { background: var(--live); }
.feed .ev { font-size: 13px; font-weight: 600; }
.feed .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.empty { padding: 26px 18px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; font-size: 14px; }

/* ---------- Configuration builder ---------- */

.builder { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.sticky { position: sticky; top: 18px; }

.slot { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 7px; }
.slot:last-child { margin-bottom: 0; }
.slot.done { border-color: #BFE2D0; background: #FBFEFC; }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.slot-head .lhs { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.slot .mark { width: 9px; height: 9px; border-radius: 50%; background: #CFCBDE; flex: none; }
.slot.done .mark { background: var(--live); }
.slot .fill { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--muted); }
.slot.done .fill { color: var(--live); }
.slot .linked { margin: 11px 0 0; display: grid; gap: 6px; }
.slot .linked div { background: #F8F7FC; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; }
.slot .linked small { display: block; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 11.5px; margin-top: 2px; }

.ring { width: 132px; height: 132px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--accent) calc(var(--percent) * 1%), #E6E4EF 0); }
.ring:before { content: ""; position: absolute; width: 100px; height: 100px; background: var(--surface); border-radius: 50%; }
.ring span { position: relative; font-family: "IBM Plex Mono", monospace; font-size: 26px; font-weight: 600; }
.meter { height: 6px; background: #E6E4EF; border-radius: 20px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 20px; }

.kv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line-soft); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.kv > div { background: var(--surface); padding: 13px 16px; }
.kv .eyebrow { margin-bottom: 5px; }
.kv b { font-size: 14px; font-weight: 600; }

/* ---------- Search ---------- */

.searchbar { display: flex; gap: 8px; }
.searchbar input { flex: 1; }
.results { display: grid; gap: 6px; margin-top: 12px; }
.result {
  display: block; width: 100%; text-align: left;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
  font-weight: 400;
}
.result:hover { background: var(--accent-soft); border-color: var(--accent); }
.result b { display: block; font-size: 12.5px; font-weight: 600; }
.result span { display: block; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.overlay { position: fixed; inset: 0; background: rgba(27, 16, 66, .55); z-index: 60; display: grid; place-items: center; padding: 24px; }
.overlay[hidden] { display: none; }
.dialog { background: var(--surface); border-radius: 12px; width: min(760px, 100%); max-height: 84vh; overflow: auto; box-shadow: 0 18px 50px rgba(27, 16, 66, .28); }
.dialog .card-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line-soft); padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.dialog .card-body { padding: 18px; }

/* ---------- Login ---------- */

.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--nav); padding: 24px; }
.login { width: 100%; max-width: 372px; }
.login .brand { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; color: #fff; }
.login .brand b { display: block; font-size: 15px; }
.login .brand span { display: block; font-size: 11.5px; color: #A79FC8; }
.login .card { margin: 0; }
.login .card-body { padding: 22px; }
.login .field { margin-bottom: 14px; }
.login button { width: 100%; justify-content: center; padding: 10px; }
.login .foot { text-align: center; color: #8E85B4; font-size: 12px; margin-top: 16px; }

/* ---------- Responsive: desktop-first, still usable on a tablet ---------- */

@media (max-width: 1100px) {
  .split, .builder { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; }
  .sidebar .brand { border-bottom: 0; }
  .nav { display: flex; gap: 4px; padding: 0 12px; flex: 1; overflow-x: auto; }
  .nav .eyebrow { display: none; }
  .nav a { margin: 0; white-space: nowrap; }
  .who { border-top: 0; display: flex; align-items: center; gap: 12px; }
  .who form { margin: 0; }
  .main { padding: 18px 16px 40px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-grid .wide { grid-column: auto; }
  .table-scroll { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Picker states */
.result .clash { display: block; font-size: 11.5px; font-style: normal; color: var(--stop); margin-top: 4px; }
.result.blocked { background: #FBFAFC; border-style: dashed; cursor: not-allowed; opacity: .8; }
.result.blocked:hover { background: #FBFAFC; border-color: var(--line); }
.result:disabled { cursor: not-allowed; }

/* Part icons in the rack strip and role tags */
.part-icon { display: block; flex: none; opacity: .85; }
.rack .unit { display: flex; flex-direction: column; justify-content: space-between; gap: 3px; }
.rack .unit .top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.rack .unit .top .q { font-size: 12px; font-weight: 600; opacity: 1; }
.rack .unit .r { font-size: 9.5px; letter-spacing: .04em; opacity: .8; }
.tag.with-icon { display: inline-flex; align-items: center; gap: 5px; }
.tag.with-icon .part-icon { opacity: .7; }
.result .shared { display: block; font-size: 11.5px; font-style: normal; color: var(--muted); margin-top: 4px; }

/* ---------- Supplier photos ---------- */

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; }
.thumb { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.thumb img { display: block; width: 100%; height: 104px; object-fit: cover; background: #F3F1F8; }
.thumb figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; font-size: 11.5px; border-top: 1px solid var(--line-soft);
}
.thumb figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.uploader { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.uploader input[type=file] { flex: 1; min-width: 220px; height: auto; padding: 7px 10px; }

.checkline { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); font-size: 12.5px; margin: 0; }
.checkline input[type=checkbox] { width: 16px; height: 16px; flex: none; }

input[type=file] { padding: 7px 10px; height: auto; font-size: 13px; }

/* ---------- Sectioned forms: label left, fields right ---------- */

.form-section { border-top: 1px solid var(--line-soft); padding: 14px 0; }
.form-section:first-of-type { border-top: 0; padding-top: 4px; }
.form-section:last-of-type { padding-bottom: 4px; }
.form-section > h3 {
  font-size: 14px; font-weight: 600; margin: 0 0 3px;
}
.form-section > .section-note { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }

.form-row { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 9px; }
.form-row:last-child { margin-bottom: 0; }
.form-row > .row-label { padding-top: 7px; }
.form-row > .row-label label { margin-bottom: 2px; }
.form-row > .row-label .req { color: var(--stop); }
.form-row > .row-label .foot { margin-top: 0; }
.form-row .row-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.form-row .row-fields.one { grid-template-columns: minmax(0, 1fr); }
.form-row .row-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-row .row-fields .span2 { grid-column: span 2; }

/* Currency sits inside the field, as in Zoho */
.money { display: flex; }
.money .unit {
  display: flex; align-items: center; padding: 0 11px;
  border: 1px solid var(--line); border-right: 0;
  border-radius: 6px 0 0 6px; background: #F5F3FA;
  font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.money input { border-radius: 0 6px 6px 0; }

.dim-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: center; }
.dim-group .unit { font-size: 12.5px; color: var(--muted); }

/* ---------- Drag and drop photos ---------- */

.dropzone {
  border: 1.5px dashed #C6C0DC; border-radius: var(--radius);
  background: #FBFAFD; padding: 18px 16px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { display: none; }
.dropzone .dz-title { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.dropzone .dz-hint { font-size: 12px; color: var(--muted); }
.dz-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.dz-list span {
  font-size: 11.5px; background: var(--accent-soft); color: var(--accent-dark);
  padding: 4px 9px; border-radius: 20px;
}

@media (max-width: 900px) {
  .form-row { grid-template-columns: 1fr; }
  .form-row > .row-label { padding-top: 0; }
  .form-row .row-fields, .form-row .row-fields.three { grid-template-columns: 1fr; }
}

/* ---------- Nav: add action ---------- */

.nav a .plus {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px;
  font-size: 14px; line-height: 1; font-weight: 600;
  color: #CFC9E4; background: rgba(255, 255, 255, .09);
}
.nav a:hover .plus, .nav a.on .plus { background: var(--accent); color: #fff; }

/* ---------- Form header: fields left, photos right ---------- */

.form-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-head .photo-panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #FBFAFD; padding: 12px;
}
.form-head .photo-panel > h3 { font-size: 13px; font-weight: 600; margin: 0 0 3px; }
.form-head .photo-panel > .section-note { margin: 0 0 12px; }
.form-head .form-section:first-of-type { padding-top: 0; }
.form-head .form-row { grid-template-columns: 120px minmax(0, 1fr); }
.form-head .form-row .row-fields { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 1100px) {
  .form-head { grid-template-columns: 1fr; }
}

/* ---------- Profile ---------- */

.avatar, .avatar-lg {
  border-radius: 50%; object-fit: cover; flex: none; display: block;
  background: var(--accent-soft);
}
.avatar { width: 30px; height: 30px; }
.avatar-lg { width: 76px; height: 76px; }
.avatar.initials, .avatar-lg.initials {
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--accent-dark); letter-spacing: .02em;
}
.avatar.initials { font-size: 11.5px; background: rgba(255,255,255,.12); color: #E7E3F5; }
.avatar-lg.initials { font-size: 25px; }

.who .ident { display: flex; align-items: center; gap: 9px; text-decoration: none; color: inherit; }
.who .ident:hover .name { color: #fff; }
.who .ident .grow { min-width: 0; }
.who .ident .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar-edit { display: flex; gap: 16px; align-items: flex-start; }
.avatar-edit .grow { flex: 1; min-width: 0; }

/* ---------- Numbered instructions ---------- */

.steps { margin: 10px 0 0; padding-left: 20px; }
.steps li { margin-bottom: 7px; font-size: 12.5px; line-height: 1.5; }
.steps .mono { font-size: 11.5px; background: #F5F3FA; padding: 2px 5px; border-radius: 4px; }

/* A row that is both a destination and an action. The two are siblings: an
   anchor inside an anchor is invalid and browsers unnest it, which breaks the
   + silently. "Add product" is a thing you do, not a place you go, so it sits
   on the row rather than claiming one of its own. */
.nav-row { display: flex; align-items: stretch; gap: 4px; margin-bottom: 1px; }
.nav-row > a:first-child { flex: 1; min-width: 0; margin-bottom: 0; }
.nav-row > a.plus {
  flex: none; width: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; font-weight: 600;
  color: #CFC9E4; background: rgba(255, 255, 255, .07); text-decoration: none;
}
.nav-row > a.plus:hover { background: var(--accent); color: #fff; }
.nav .count.warn { background: var(--warn-soft); color: var(--warn); }

/* Editing a part in place. Sized to sit inside a table row without making it
   taller than the rows around it. */
select.inline, input.inline {
  height: 26px; padding: 2px 6px; font-size: 12px; border-radius: 5px;
}
input.inline.qty { width: 62px; text-align: right; font-family: "IBM Plex Mono", monospace; }

/* Row actions sit on one line. The generic .actions wraps, which in a narrow
   last column stacked Save above Remove and put the destructive button under
   a routine one. */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.row-actions form { display: inline-flex; }
tr.dirty { background: var(--accent-soft); }
tr.dirty td { border-bottom-color: var(--accent); }
