/* ==========================================================================
   Giko Engineering — Internal Management System
   Shared styles. Palette + type per brand brief.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

:root {
  --navy:  #053f7a;
  --blue:  #0066cc;
  --gold:  #ffd700;
  --ink:   #1e1e1e;
  --light: #f9f9f9;
  --edge:  #353434;

  /* Derived neutrals for light surfaces (kept off the loud brand border). */
  --hair:  #e4e7ec;
  --hair-2:#eef1f4;
  --muted: #5b6672;
  --paper: #ffffff;

  --heading-font: 'Barlow Condensed', sans-serif;
  --body-font: 'Barlow', sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    linear-gradient(var(--light), var(--light));
  background-color: var(--light);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h {
  font-family: var(--heading-font);
  letter-spacing: .01em;
  margin: 0;
}

/* Small tracked eyebrow / label — the "spec sheet" voice. */
.eyebrow {
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 600;
  font-size: .72rem;
  color: var(--muted);
}

/* Serial / asset-tag numbers. Monospaced tabular feel = the signature. */
.serial {
  font-family: 'Barlow', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  font-weight: 600;
}

/* ---- Layout shell -------------------------------------------------------- */

.layout { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 50;
  transform: translateX(0);
  transition: transform .22s ease;
}
.sidebar__brand {
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.brandmark {
  display: flex; align-items: center; gap: 12px;
}
.brandmark__tag {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
}
.brandmark__name {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.brandmark__sub {
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

.nav { padding: 14px 12px; overflow-y: auto; flex: 1; }
.nav__group {
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: 14px 12px 8px;
  font-family: var(--heading-font);
  font-weight: 600;
}
.nav__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,.78);
  font-weight: 500;
  font-size: .93rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.nav__link svg { width: 19px; height: 19px; flex: none; opacity: .9; }
.nav__link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav__link.is-active {
  background: rgba(255,255,255,.10);
  color: #fff;
  border-left-color: var(--gold);
}
.nav__link.is-soon { opacity: .5; cursor: default; }
.nav__link.is-soon:hover { background: transparent; color: rgba(255,255,255,.78); }
.nav__soon {
  margin-left: auto;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 3px;
  padding: 1px 5px;
  color: rgba(255,255,255,.7);
}
.sidebar__logout {
  margin: 0 12px 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  font-weight: 500;
  font-size: .93rem;
  transition: background .15s ease, color .15s ease;
}
.sidebar__logout:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}
.sidebar__logout svg {
  width: 18px; height: 18px; flex: none;
}
.sidebar__foot {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex; align-items: center; gap: 11px;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--heading-font); font-weight: 700; font-size: .95rem;
  flex: none;
}

.scrim {
  position: fixed; inset: 0;
  background: rgba(5,15,30,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.main {
  margin-left: 264px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(249,249,249,.85);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--hair);
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
}
.topbar__title { font-size: 1.55rem; font-weight: 600; line-height: 1; text-transform: uppercase; }
.hamburger {
  display: none;
  background: #fff; border: 1px solid var(--hair);
  width: 40px; height: 40px; border-radius: 7px;
  align-items: center; justify-content: center; cursor: pointer;
}
.hamburger svg { width: 20px; height: 20px; }

.content { padding: 26px; max-width: 1200px; width: 100%; }

/* ---- Cards / panels ------------------------------------------------------ */

.card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 10px;
}
.card--accent { border-top: 3px solid var(--gold); }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hair);
}
.panel-head h2 { font-size: 1.2rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Stat tiles ---------------------------------------------------------- */

.stat {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--navy);
}
.stat--gold::before { background: var(--gold); }
.stat--blue::before { background: var(--blue); }
.stat__num {
  font-family: var(--heading-font);
  font-weight: 700; font-size: 2.1rem; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; color: var(--muted); margin-top: 6px; }

/* ---- Badges -------------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--heading-font);
  text-transform: uppercase; letter-spacing: .08em;
  font-weight: 600; font-size: .74rem;
  padding: 3px 9px; border-radius: 4px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--active   { color: var(--blue);  background: #e8f1fc; border-color: #cfe2f8; }
.badge--planning { color: #8a6d00; background: #fff6cc; border-color: #f2e08a; }
.badge--completed{ color: #1a7f4b; background: #e6f5ec; border-color: #c4e8d3; }
.badge--hold     { color: #64707c; background: #eef1f4; border-color: #dde3e9; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--heading-font);
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  font-size: .92rem;
  padding: 9px 16px; border-radius: 7px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; line-height: 1;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--gold); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.btn--primary:hover { background: #ffcf00; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: #043563; }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--hair); }
.btn--ghost:hover { border-color: #c8d0da; background: #fbfcfd; }
.btn--danger { background: #b83232; color: #fff; }
.btn--danger:hover { background: #9d2a2a; }
button, [role="button"], .btn { cursor: pointer; }
button:disabled, .btn:disabled { cursor: not-allowed; opacity: .65; }
.btn.is-busy { cursor: progress; opacity: .85; }
.btn__spin { font-size: 1.1em; display: inline-flex; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--hair); }
.pager[hidden] { display: none; }
.pager__info { font-size: .82rem; color: var(--muted); }
.pager__nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager__nav .btn { min-width: 34px; }
.pager__gap { color: var(--muted); padding: 0 2px; }
.btn--sm { font-size: .8rem; padding: 6px 11px; }

/* ---- Inputs -------------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field > label {
  display: block; margin-bottom: 6px;
  font-family: var(--heading-font);
  text-transform: uppercase; letter-spacing: .09em;
  font-weight: 600; font-size: .78rem; color: var(--ink);
}
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.req { color: var(--blue); }

.input, .select, .textarea {
  width: 100%;
  font-family: var(--body-font); font-size: .95rem; color: var(--ink);
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 7px;
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { resize: vertical; min-height: 92px; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  /* border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,102,204,.14); */
}

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

.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left;
  font-family: var(--heading-font);
  text-transform: uppercase; letter-spacing: .1em;
  font-size: .72rem; font-weight: 600; color: var(--muted);
  padding: 11px 16px;
  border-bottom: 1px solid var(--hair);
  background: #fafbfc;
  white-space: nowrap;
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--hair-2); vertical-align: middle; font-size: .93rem; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #f6f9fd; }
.table tbody tr:last-child td { border-bottom: none; }
.row-link { color: inherit; text-decoration: none; display: block; }

/* Progress meter */
.meter { height: 7px; border-radius: 999px; background: var(--hair); overflow: hidden; min-width: 90px; }
.meter > span { display: block; height: 100%; background: var(--navy); border-radius: inherit; }
.meter.is-full > span { background: #1a7f4b; }

/* Team stack */
.stack { display: flex; }
.stack .avatar { width: 28px; height: 28px; font-size: .74rem; border: 2px solid #fff; margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }

/* Client chip */
.client {
  display: inline-flex; align-items: center; gap: 9px;
}
.client__logo {
  width: 30px; height: 30px; border-radius: 5px; flex: none;
  display: grid; place-items: center;
  font-family: var(--heading-font); font-weight: 700; font-size: .8rem;
  background: var(--navy); color: #fff;
}

/* ---- Detail / spec sheet ------------------------------------------------- */

.nameplate {
  background: linear-gradient(180deg, var(--navy), #043260);
  color: #fff;
  border-radius: 12px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.nameplate::after {
  /* corner rivets — a subtle nod to a stamped asset plate */
  content: ""; position: absolute; inset: 8px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; pointer-events: none;
}
.nameplate__serial {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--navy);
  padding: 4px 10px; border-radius: 4px;
  font-weight: 700; letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
}
.spec-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; overflow: hidden; margin-top: 18px;
}
.spec-grid > div { background: rgba(255,255,255,.03); padding: 12px 14px; }
.spec-grid dt { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); font-family: var(--heading-font); font-weight: 600; }
.spec-grid dd { margin: 5px 0 0; font-weight: 600; font-size: .98rem; }

/* Phase timeline */
.phase { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair-2); }
.phase:last-child { border-bottom: none; }
.phase__dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--hair); background: #fff;
  font-size: .7rem; font-weight: 700; color: var(--muted);
}
.phase.is-done .phase__dot { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.phase.is-active .phase__dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.phase__name { font-weight: 600; font-size: .98rem; }
.phase__meta { font-size: .8rem; color: var(--muted); margin-top: 2px; }

/* Mini list rows (linked docs/reports/equipment previews) */
.mini { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hair-2); }
.mini:last-child { border-bottom: none; }
.mini__ic { width: 34px; height: 34px; border-radius: 7px; background: #eef2f7; color: var(--navy); display: grid; place-items: center; flex: none; }
.mini__ic svg { width: 17px; height: 17px; }

/* Tabs (detail page) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--hair); overflow-x: auto; }
.tab {
  font-family: var(--heading-font); font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  font-size: .88rem; color: var(--muted);
  padding: 12px 14px; border-bottom: 2px solid transparent; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--navy); border-bottom-color: var(--gold); }
.tabpane { display: none; }
.tabpane.is-active { display: block; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; border-radius: 8px;
  padding: 12px 18px; font-weight: 500; box-shadow: 0 10px 30px rgba(5,20,40,.28);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 80;
  display: flex; align-items: center; gap: 10px; border-left: 3px solid var(--gold);
}
.toast.is-open { opacity: 1; transform: translateX(-50%) translateY(0); }

/* pill / tag chips */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef2f7; color: var(--navy);
  border: 1px solid var(--hair);
  border-radius: 999px; padding: 4px 11px; font-size: .82rem; font-weight: 500;
}
.tag button { background: none; border: none; cursor: pointer; color: var(--muted); line-height: 1; font-size: 1rem; padding: 0; }
.tag button:hover { color: var(--blue); }

/* ---- Team picker (create form) ------------------------------------------ */

.results {
  max-height: 320px; overflow-y: auto;
  border: 1px solid var(--hair); border-radius: 8px; background: #fff;
}
.result { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--hair-2); }
.result:last-child { border-bottom: none; }
.result__body { flex: 1; min-width: 0; }
.result__name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result__role { color: var(--muted); font-size: .82rem; }
.result__skills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.result__empty { padding: 20px; text-align: center; color: var(--muted); font-size: .9rem; }

.eng {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--heading-font); text-transform: uppercase; letter-spacing: .07em;
  font-weight: 600; font-size: .66rem; padding: 2px 7px; border-radius: 4px; white-space: nowrap;
}
.eng::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.eng--busy { color: #8a6d00; background: #fff6cc; border: 1px solid #f2e08a; }
.eng--free { color: #1a7f4b; background: #e6f5ec; border: 1px solid #c4e8d3; }

.sel-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 13px; border: 1px solid var(--hair); border-radius: 8px; margin-bottom: 10px;
}
.sel-row__body { flex: 1; min-width: 0; }
.sel-row .roles { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--navy); color: #fff; border-radius: 999px;
  padding: 3px 10px; font-size: .78rem; font-weight: 500;
}
.role-chip button { background: none; border: none; color: rgba(255,255,255,.75); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; }
.role-chip button:hover { color: #fff; }
.role-add {
  font-family: var(--body-font); font-size: .8rem; color: var(--navy);
  border: 1px dashed #b9c4d2; background: #fff; border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.role-add:focus { outline: none; border-color: var(--blue); }

.divider { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* utilities */
/* ---- Access-model choice cards (register document) ---------------------- */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  border: 1px solid var(--hair); border-radius: 9px; padding: 14px;
  cursor: pointer; display: flex; gap: 11px; align-items: flex-start;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.choice:hover { border-color: #c8d0da; }
.choice.is-on { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,204,.12); background: #fbfdff; }
.choice input { margin-top: 3px; accent-color: var(--blue); }
.choice__t { font-weight: 600; }
.choice__d { font-size: .82rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ---- Activity timeline (document detail) -------------------------------- */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 5px; bottom: 5px; width: 2px; background: var(--hair); }
.tl { position: relative; padding-bottom: 16px; }
.tl:last-child { padding-bottom: 0; }
.tl::before {
  content: ""; position: absolute; left: -19px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--navy); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--hair);
}
.tl:first-child::before { background: var(--gold); }

/* ---- Multi-value combobox (tag input) ----------------------------------- */
.combo { position: relative; }
.combo__field {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  border: 1px solid var(--hair); border-radius: 7px; padding: 6px 8px; background: #fff; min-height: 44px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.combo__field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,204,.14); }
.combo__field input {
  flex: 1; min-width: 130px; border: none; outline: none; background: transparent;
  font-family: var(--body-font); font-size: .95rem; color: var(--ink); padding: 4px 2px;
}
.combo__menu {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 5px);
  background: #fff; border: 1px solid var(--hair); border-radius: 8px;
  box-shadow: 0 14px 34px rgba(5,20,40,.14); max-height: 240px; overflow-y: auto;
}
.combo__menu[hidden] { display: none; }
.combo__opt { padding: 9px 12px; cursor: pointer; font-size: .93rem; display: flex; align-items: center; gap: 8px; }
.combo__opt:hover, .combo__opt.is-hl { background: #f2f7fd; }
.combo__opt small { color: var(--muted); }
.combo__new { color: var(--blue); font-weight: 600; }
.combo__empty { padding: 11px 12px; color: var(--muted); font-size: .88rem; }

/* Colored tag chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 6px;
  padding: 3px 9px; font-size: .82rem; font-weight: 500; line-height: 1.35; white-space: nowrap;
}
.chip button { background: none; border: none; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0; opacity: .8; }
.chip button:hover { opacity: 1; }
.chip.is-covered { opacity: .6; border: 1px dashed currentColor; }
.chip--navy  { background: var(--navy); color: #fff; }             .chip--navy button  { color: #fff; }
.chip--blue  { background: #e2eefb; color: #05468f; border: 1px solid #c4ddf7; } .chip--blue button { color: #05468f; }
.chip--gold  { background: #fff2b8; color: #7a5c00; border: 1px solid #f0d878; } .chip--gold button { color: #7a5c00; }
.chip--green { background: #dcf2e6; color: #14663c; border: 1px solid #bce4cd; } .chip--green button { color: #14663c; }
.chip--slate { background: #e8ecf1; color: #3c4753; border: 1px solid #d5dce4; } .chip--slate button { color: #3c4753; }

/* ---- Modal -------------------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(5,15,30,.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px;
  z-index: 90; overflow-y: auto; opacity: 0; transition: opacity .16s ease;
}
.modal-overlay.is-open { opacity: 1; }
.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 60px rgba(5,20,40,.32); overflow: hidden;
  transform: translateY(10px); transition: transform .18s ease; margin: auto 0;
}
.modal-overlay.is-open .modal { transform: translateY(0); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--hair); }
.modal__head h2 { font-size: 1.25rem; text-transform: uppercase; }
.modal__x { background: none; border: none; cursor: pointer; color: var(--muted); width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; }
.modal__x:hover { background: var(--light); color: var(--ink); }
.modal__body { padding: 18px 20px; max-height: 62vh; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--hair); display: flex; justify-content: flex-end; gap: 10px; }

/* Role chooser (inline, in team modal) */
.role-opts { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.role-opt {
  font-family: var(--body-font); font-size: .82rem; cursor: pointer;
  border: 1px solid var(--hair); background: #fff; border-radius: 999px; padding: 5px 12px; color: var(--ink);
}
.role-opt.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Storage selector (segmented) */
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button {
  font-family: var(--heading-font); text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
  font-size: .84rem; padding: 9px 16px; border: none; background: #fff; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button + button { border-left: 1px solid var(--hair); }
.seg button.is-on { background: var(--navy); color: #fff; }
.seg button svg { width: 16px; height: 16px; }

.muted { color: var(--muted); }
.link { color: var(--blue); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .sidebar.is-open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .content { padding: 18px 15px; }
  .topbar { padding: 12px 15px; }
  .topbar__title { font-size: 1.3rem; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  /* Collapse inline grids (inline styles need !important to override) */
  .stat-grid { grid-template-columns: 1fr 1fr !important; }
  .two-col   { grid-template-columns: 1fr !important; }
  .grid-3    { grid-template-columns: 1fr !important; }
  .stat__num { font-size: 1.7rem; }
}

@media (max-width: 450px) {
  .spec-grid { grid-template-columns: 1fr; }
}

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

/* ---- client share (read-only) page ---- */
.share-wrap { min-height: 100vh; background: var(--light, #f9f9f9); }
.share-head { background: linear-gradient(135deg, #053f7a, #0a5aa8); padding: 40px 24px 34px; }
.share-head .brandmark__tag { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.share-body { max-width: 820px; margin: -18px auto 0; padding: 0 20px 60px; }
.share-card { background: #fff; border: 1px solid var(--hair, #e7e9ee); border-radius: 14px; padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 6px 22px rgba(5,63,122,.06); }
.share-report { padding: 16px 0; border-top: 1px solid var(--hair, #eef0f4); }
.share-report:first-of-type { border-top: 0; padding-top: 4px; }

.tip-t { border-bottom: 1px dotted currentColor; cursor: help; }
.tip {
  position: fixed; z-index: 120; max-width: 300px;
  background: var(--navy); color: #fff;
  font-size: .78rem; line-height: 1.4; white-space: pre-line;
  padding: 7px 11px; border-radius: 6px;
  box-shadow: 0 6px 18px rgba(5,15,30,.25);
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.tip.is-open { opacity: 1; }

.rtab { padding: 10px 16px; margin-bottom: -1px; border: none; border-bottom: 2px solid transparent; background: none; font-weight: 600; font-size: .9rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.rtab:hover { color: var(--ink); }
.rtab.is-on { color: var(--navy); border-bottom-color: var(--gold); }
