/* ==========================================================================
   منصة توثيق أقسام تشغيل المدينة — Official operations documentation portal
   ========================================================================== */

:root {
  --paper: #F4F0E7;
  --paper-deep: #EDE7DA;
  --surface: #FFFDF8;
  --surface-soft: #FAF7EF;
  --ink: #17211C;
  --ink-soft: #4C574F;
  --muted: #6B746E;
  --green: #0E3B2E;
  --green-2: #155440;
  --green-3: #1F6A50;
  --green-tint: rgba(14, 59, 46, .07);
  --gold: #AC8A4C;
  --gold-strong: #8D6C31;
  --gold-soft: rgba(172, 138, 76, .32);
  --gold-tint: rgba(172, 138, 76, .11);
  --border: #DDD5C6;
  --border-strong: #C9BEA9;
  --danger: #8A332E;
  --danger-soft: rgba(138, 51, 46, .09);
  --amber: #A66A1E;
  --amber-soft: rgba(166, 106, 30, .11);
  --complete: #2E6B4F;
  --complete-soft: rgba(46, 107, 79, .10);
  --radius: 4px;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --shadow-soft: 0 10px 30px rgba(14, 59, 46, .07);
  --shadow-lift: 0 18px 44px rgba(14, 59, 46, .12);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection { background: var(--gold-soft); }

img, svg { display: block; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

h1, h2, h3, h4, p, ol, ul { margin: 0; }

ol, ul { padding: 0; list-style: none; }

[hidden], .hidden { display: none !important; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.whatsapp-glyph { fill: currentColor; stroke: none; }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.page-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(14, 59, 46, .022) 0 1px, transparent 1px 118px),
    repeating-linear-gradient(0deg, rgba(14, 59, 46, .018) 0 1px, transparent 1px 118px),
    radial-gradient(1100px 600px at 88% -12%, rgba(172, 138, 76, .12), transparent 62%);
}

.top-strip,
.site-header,
.app,
.site-footer { position: relative; z-index: 1; }

.skip-link {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Top strip
   -------------------------------------------------------------------------- */

.top-strip {
  background: var(--green);
  color: rgba(255, 253, 248, .76);
  font-size: 11.5px;
  line-height: 1.6;
  border-bottom: 1px solid rgba(172, 138, 76, .45);
}

.top-strip-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding-block: 5px;
}

.strip-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.strip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.strip-spacer { flex: 1; }
.strip-ref { color: #D9C08A; font-family: var(--font-body); }
.strip-item.strip-desktop { color: rgba(255, 253, 248, .58); }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.site-header { background: rgba(244, 240, 231, .94); }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 24px 20px;
}

.brand { display: flex; align-items: center; gap: 18px; min-width: 0; }

.brand-mark-wrap {
  display: grid;
  place-items: center;
  width: 76px;
  height: auto;
  aspect-ratio: 220 / 146;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  overflow: visible;
}

.brand-logo { width: 100%; height: auto; object-fit: contain; display: block; }
.brand-mark { width: 100%; height: auto; color: currentColor; object-fit: contain; }

.brand-copy { display: flex; flex-direction: column; min-width: 0; }

.brand-kicker {
  color: var(--gold-strong);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
}

.brand-title {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.3vw, 25px);
  font-weight: 600;
  line-height: 1.55;
  color: var(--green);
}

.brand-sub {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  margin-top: 1px;
}

.masthead-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}
.session-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--complete); flex: 0 0 auto; }
.session-role { color: var(--muted); font-size: 9.5px; border-inline-start: 1px solid var(--border); padding-inline-start: 6px; }

.masthead-rule .container {
  border-top: 1px solid var(--gold);
  position: relative;
}
.masthead-rule .container::after {
  content: "";
  display: block;
  border-top: 1px solid var(--gold-soft);
  margin-top: 3px;
}

/* --------------------------------------------------------------------------
   Buttons & common controls
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 17px; height: 17px; }

.btn-primary { background: var(--green); border-color: var(--green); color: #FFFDF8; }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); }

.btn-outline { border-color: var(--border-strong); color: var(--green); background: var(--surface); }
.btn-outline:hover { border-color: var(--green); background: var(--green-tint); }

.btn-quiet { color: var(--ink-soft); }
.btn-quiet:hover { color: var(--green); background: var(--green-tint); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #732824; border-color: #732824; }

.btn-ivory { background: #FFFDF8; border-color: #FFFDF8; color: var(--green); }
.btn-ivory:hover { background: #F1EBDD; border-color: #F1EBDD; }

.btn-hero-ghost { border-color: rgba(255, 253, 248, .32); color: #FFFDF8; }
.btn-hero-ghost:hover { border-color: var(--gold); background: rgba(255, 253, 248, .08); }

.btn-sm { min-height: 34px; padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  transition: color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--green); background: var(--green-tint); border-color: var(--border); }
.icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); border-color: rgba(138, 51, 46, .25); }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--green-2);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.link-btn:hover { color: var(--green); }
.link-btn .icon { width: 15px; height: 15px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-strong);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold);
  flex: 0 0 auto;
}

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

.app { padding-block: 30px 64px; min-height: 62vh; scroll-margin-top: 20px; }
.app:focus { outline: none; }

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--green);
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 253, 248, .045) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-45deg, rgba(255, 253, 248, .045) 0 1px, transparent 1px 30px),
    radial-gradient(900px 420px at 8% -20%, rgba(172, 138, 76, .22), transparent 60%);
  border: 1px solid #0A2E24;
  color: #FFFDF8;
  padding: clamp(18px, 2.4vw, 26px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(18px, 3vw, 32px);
  align-items: center;
  animation: heroIn .5s var(--ease) both;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -70px;
  inset-block-end: -110px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(172, 138, 76, .18);
  transform: rotate(45deg);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.hero .eyebrow { color: #D9C08A; }
.hero .eyebrow::before { background: var(--gold); }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  line-height: 1.45;
  margin-top: 8px;
}
.hero-lead {
  color: rgba(255, 253, 248, .72);
  font-size: 13.5px;
  line-height: 1.8;
  margin-top: 6px;
  max-width: 640px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-actions .btn { min-height: 34px; padding: 5px 11px; gap: 6px; font-size: 12px; }
.hero-actions .btn .icon { width: 15px; height: 15px; }

.hero-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 253, 248, .16);
  position: relative;
  z-index: 1;
}
.hero-kpi { padding-inline: 14px; border-inline-start: 1px solid rgba(255, 253, 248, .13); }
.hero-kpi:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hero-kpi-value {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 600;
  line-height: 1.35;
  color: #FFFDF8;
}
.hero-kpi-value small { font-size: 12px; font-weight: 400; color: rgba(255, 253, 248, .58); margin-inline-start: 4px; }
.hero-kpi-label { color: rgba(255, 253, 248, .58); font-size: 10.5px; line-height: 1.5; }

.hero-seal-wrap { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; }
.hero-seal-label { color: rgba(255, 253, 248, .58); font-size: 10.5px; }
.hero .seal { --seal-size: 112px; }

/* Official completion seal */
.seal {
  --p: 0;
  --seal-size: 156px;
  width: var(--seal-size);
  height: var(--seal-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 253, 248, .16) 0);
  transform: rotate(-2.5deg);
  animation: sealIn .65s var(--ease) both;
  flex: 0 0 auto;
}
.seal::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--gold);
}
.seal::after {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  border: 1px dashed var(--gold-soft);
  pointer-events: none;
}
.seal-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--green);
  line-height: 1.3;
  padding: 20px;
}
.seal-percent {
  font-family: var(--font-display);
  font-size: calc(var(--seal-size) * .215);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}
.seal-percent span { font-size: .55em; font-weight: 500; }
.seal-caption {
  font-size: calc(var(--seal-size) * .076);
  color: var(--muted);
  margin-top: 2px;
  font-weight: 500;
}
.seal-code {
  display: block;
  margin-top: 4px;
  color: #75561F;
  font-family: var(--font-body);
  font-size: calc(var(--seal-size) * .066);
  letter-spacing: .08em;
}
.seal.is-complete { background: conic-gradient(var(--complete) calc(var(--p) * 1%), rgba(255, 253, 248, .16) 0); }
.seal.is-complete .seal-percent { color: var(--complete); }

/* Mini seal */
.mini-seal {
  --p: 0;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--seal-color, var(--green)) calc(var(--p) * 1%), var(--border) 0);
  transform: rotate(-2deg);
}
.mini-seal::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px dashed var(--gold-soft);
}
.mini-seal span {
  position: relative;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

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

.dash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
}
.dash-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 600;
  line-height: 1.55;
  color: var(--green);
  margin-top: 7px;
}
.dash-lead { color: var(--muted); font-size: 13.5px; margin-top: 5px; max-width: 660px; }
.dash-head-meta { color: var(--ink-soft); font-size: 12px; text-align: end; flex: 0 0 auto; }
.dash-head-meta strong { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 600; }

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 18px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.search-field { position: relative; flex: 1 1 280px; max-width: 400px; }
.search-field .icon {
  position: absolute;
  inset-inline-start: 13px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 17px;
  height: 17px;
  pointer-events: none;
}
.search-field input {
  width: 100%;
  height: 40px;
  padding: 8px 40px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-size: 13.5px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.search-field input::placeholder { color: #989E99; }
.search-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(172, 138, 76, .16);
}

.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: all .16s var(--ease);
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--green); background: var(--surface); }
.filter-btn.is-active { background: var(--green); border-color: var(--green); color: #FFFDF8; }
.filter-btn .count { font-size: 10.5px; margin-inline-start: 3px; }

.toolbar-spacer { flex: 1; }

.view-switch {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
}
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: all .16s var(--ease);
}
.view-btn .icon { width: 15px; height: 15px; }
.view-btn + .view-btn { border-inline-start: 1px solid var(--border); }
.view-btn:hover { color: var(--green); background: var(--green-tint); }
.view-btn.is-active { background: var(--green); color: #FFFDF8; }

.sort-field { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sort-field select {
  height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px 14px;
  color: var(--ink-soft);
  font-size: 12px;
}
.results-meta strong { color: var(--ink-soft); font-weight: 600; }

/* Department cards */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dept-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px 15px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
  animation: cardIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.dept-card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s var(--ease);
}
.dept-card:hover,
.dept-card:focus-visible {
  border-color: var(--green);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
  outline: none;
}
.dept-card:hover::before,
.dept-card:focus-visible::before { transform: scaleX(1); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-index {
  font-family: var(--font-display);
  font-size: 11px;
  color: #75561F;
  border: 1px solid var(--gold-soft);
  padding: 2px 7px;
  line-height: 1.6;
  background: var(--gold-tint);
}

.status-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.status-stamp::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-stamp.is-complete { color: var(--complete); background: var(--complete-soft); }
.status-stamp.is-progress { color: var(--amber); background: var(--amber-soft); }
.status-stamp.is-ready { color: var(--gold-strong); background: var(--gold-tint); }
.status-stamp.is-empty { color: var(--muted); background: rgba(107, 116, 110, .06); }

.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--green);
  min-height: 3.1em;
}
.card-manager {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11.5px;
  min-height: 20px;
}
.card-manager .icon { width: 14px; height: 14px; color: var(--gold-strong); }
.card-manager.is-empty { color: var(--muted); font-style: normal; }

.card-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-block: 2px 4px;
}
.dept-card .mini-seal { width: 52px; height: 52px; }
.dept-card .mini-seal span { font-size: 12px; }
.card-progress-info { flex: 1; min-width: 0; }
.progress-line { height: 4px; background: var(--paper-deep); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-line span { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .35s var(--ease); }
.progress-line.is-complete span { background: var(--complete); }
.progress-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--muted); }
.progress-caption b { font-family: var(--font-display); font-size: 13px; color: var(--ink); font-weight: 600; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
  margin-inline: -15px;
  padding: 9px 15px;
  color: var(--muted);
  font-size: 10.5px;
}
.card-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}
.card-open .icon { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.dept-card:hover .card-open .icon { transform: translateX(-4px); }

/* Registry / ledger view */
.ledger-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.ledger { width: 100%; border-collapse: collapse; min-width: 860px; }
.ledger thead th {
  text-align: right;
  padding: 12px 14px;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--border-strong);
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.ledger tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.ledger tbody tr { cursor: pointer; transition: background .16s var(--ease); }
.ledger tbody tr:hover { background: var(--gold-tint); }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger .num { font-family: var(--font-display); font-size: 11px; color: var(--gold-strong); }
.ledger .dept-name { font-weight: 600; color: var(--green); }
.ledger .manager-cell { color: var(--muted); font-size: 12.5px; }
.ledger .muted-cell { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ledger-progress { display: flex; align-items: center; gap: 9px; min-width: 140px; }
.ledger-progress .progress-line { flex: 1; margin-top: 0; min-width: 60px; }
.ledger-progress b { font-size: 11.5px; font-weight: 600; width: 34px; text-align: end; }
.ledger .row-arrow { color: var(--gold-strong); }
.ledger .row-arrow .icon { width: 16px; height: 16px; }

/* Empty state */
.empty-state {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 60px 24px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
}
.empty-state .icon { width: 30px; height: 30px; color: var(--gold); }
.empty-state h3 { font-family: var(--font-display); font-size: 16px; color: var(--ink-soft); }
.empty-state p { font-size: 13px; max-width: 420px; }

/* Heatmap */
.heatmap-panel {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  padding: 22px 24px 24px;
  display: none;
}
body.admin-on .heatmap-panel { display: block; animation: sectionIn .35s var(--ease) both; }
.heatmap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.heatmap-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--green); }
.heatmap-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.heat-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border: 1px solid var(--border); border-radius: 1px; }
.legend-swatch.lv0 { background: #ECE7DB; }
.legend-swatch.lv1 { background: rgba(166, 106, 30, .2); }
.legend-swatch.lv2 { background: rgba(46, 107, 79, .22); }
.legend-swatch.lv3 { background: var(--complete); }

.heatmap-wrap { margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.heatmap-table { border-collapse: collapse; min-width: 760px; width: 100%; table-layout: fixed; }
.heatmap-table th,
.heatmap-table td { border: 1px solid var(--border); }
.heatmap-table thead th {
  padding: 7px 4px;
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper-deep);
  line-height: 1.5;
  text-align: center;
}
.heatmap-table thead th:first-child { width: 190px; text-align: right; padding-inline-start: 10px; }
.heatmap-table tbody th {
  padding: 7px 10px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  position: sticky;
  inset-inline-start: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
  z-index: 2;
}
.heat-cell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: filter .16s var(--ease), box-shadow .16s var(--ease);
}
.heat-cell:hover { filter: brightness(.93); box-shadow: inset 0 0 0 2px var(--gold); }
.heat-cell.lv0 { background-image: repeating-linear-gradient(45deg, rgba(107, 116, 110, .09) 0 1px, transparent 1px 6px); color: var(--muted); }
.heat-cell.lv1 { background: rgba(166, 106, 30, .18); color: #7A4C12; }
.heat-cell.lv2 { background: rgba(46, 107, 79, .20); color: #23543D; }
.heat-cell.lv3 { background: var(--complete); color: #fff; }

/* --------------------------------------------------------------------------
   Dossier
   -------------------------------------------------------------------------- */

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}
.crumbs a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { color: var(--gold); }
.crumbs .current { color: var(--ink-soft); }

.dossier-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  animation: sectionIn .35s var(--ease) both;
}
.dossier-head::before {
  content: "";
  position: absolute;
  inset-block-start: -3px;
  inset-inline-start: 32px;
  width: 72px;
  height: 3px;
  background: var(--gold);
  z-index: 2;
}
.dossier-head.has-photo {
  padding-top: calc(clamp(22px, 3vw, 32px) + 132px);
  overflow: hidden;
}
.dossier-photo {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 132px;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(8, 36, 27, .12) 0%, rgba(14, 59, 46, .34) 48%, rgba(255, 253, 248, .97) 100%),
    var(--dept-photo, url("images/city-operations-building.png"));
  background-size: cover, cover;
  background-position: center, var(--dept-position, center 56%);
  background-repeat: no-repeat;
}
.dossier-photo[data-dept="parks"] {
  --dept-photo: url("images/dept-parks.jpg");
  --dept-position: center 64%;
}
.dossier-photo[data-dept="power"] {
  --dept-photo: url("images/dept-power.jpg");
  --dept-position: center 64%;
}
.dossier-photo::after {
  content: "";
  position: absolute;
  inset-inline: clamp(20px, 3vw, 32px);
  inset-block-end: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dossier-photo span {
  position: absolute;
  inset-inline-start: clamp(20px, 3vw, 32px);
  inset-block-end: 18px;
  padding: 2px 8px;
  border: 1px solid rgba(217, 192, 138, .55);
  background: rgba(8, 36, 27, .55);
  color: #FFFDF8;
  font-size: 10px;
  line-height: 1.6;
}
.dossier-head.has-photo > div:not(.dossier-photo) { position: relative; z-index: 1; }
.dossier-head .eyebrow { margin-bottom: 3px; }
.dossier-title {
  font-family: var(--font-display);
  font-size: clamp(23px, 3vw, 33px);
  font-weight: 600;
  line-height: 1.55;
  color: var(--green);
}
.dossier-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.dossier-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.dossier-meta .icon { width: 14px; height: 14px; color: var(--gold-strong); }
.dossier-meta .code { font-family: var(--font-body); letter-spacing: .06em; color: var(--gold-strong); font-size: 11.5px; }
.dossier-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }

.dossier-seal-col { display: grid; justify-items: center; gap: 8px; }
.dossier-seal-col .seal { --seal-size: 136px; }
.dossier-seal-col .seal-percent { font-size: 29px; }
.dossier-seal-caption { color: var(--muted); font-size: 11px; }

.submitted-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--complete-soft);
  border: 1px solid rgba(46, 107, 79, .35);
  border-inline-start: 3px solid var(--complete);
  color: #23543D;
  font-size: 12.5px;
}
.readonly-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--gold-tint);
  border: 1px solid var(--gold-soft);
  border-inline-start: 3px solid var(--gold);
  color: #75561F;
  font-size: 12.5px;
  line-height: 1.8;
}
.readonly-banner .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.readonly-note { color: #5F6B63; font-size: 11px; }

.supervisor-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-inline-start: 3px solid var(--gold);
  color: var(--ink-soft);
}
.supervisor-note > .icon { width: 20px; height: 20px; color: var(--gold-strong); flex: 0 0 auto; margin-top: 2px; }
.supervisor-note strong { display: block; font-family: var(--font-display); font-size: 13px; color: var(--green); }
.supervisor-note span { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.8; }

.updates-panel {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  padding: 18px 20px;
}
.updates-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.updates-head h3 { font-family: var(--font-display); font-size: 17px; color: var(--green); margin-top: 2px; }
.updates-head-actions { display: flex; align-items: center; gap: 6px; }
.updates-count { color: var(--muted); font-size: 10.5px; border: 1px solid var(--border); padding: 2px 7px; }
.updates-new-count { color: var(--complete); background: var(--complete-soft); border: 1px solid rgba(46, 107, 79, .3); font-size: 10px; font-weight: 600; padding: 2px 7px; }
.updates-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.update-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: right;
  cursor: pointer;
  transition: background .16s var(--ease);
}
.update-item:hover { background: var(--gold-tint); }
.update-item.is-new { background: rgba(46, 107, 79, .07); }
.update-item.is-new:hover { background: rgba(46, 107, 79, .11); }
.update-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; margin-top: 7px; }
.update-item.is-new .update-dot { background: var(--complete); }
.update-item > div { flex: 1; min-width: 0; }
.update-item p { color: var(--ink-soft); font-size: 11.5px; line-height: 1.7; }
.update-item span { color: var(--muted); font-size: 10px; }
.update-new {
  align-self: center;
  margin-inline-start: auto;
  padding: 1px 6px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #FFFDF8;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.updates-empty { grid-column: 1 / -1; padding: 18px 0 6px; color: var(--muted); font-size: 11.5px; text-align: center; }
.submitted-banner .icon { width: 20px; height: 20px; color: var(--complete); }
.submitted-banner .ref { font-weight: 600; letter-spacing: .03em; }
.submitted-banner .spacer { flex: 1; }

.dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.dossier-main { min-width: 0; }

.dossier-index {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  padding: 18px 16px 16px;
  animation: sectionIn .4s var(--ease) both;
}
.index-eyebrow { color: var(--gold-strong); font-size: 10.5px; font-weight: 600; }
.index-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--green); margin-top: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.index-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.index-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-inline-start: 2px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  text-align: right;
  font-size: 11.5px;
  line-height: 1.5;
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.index-item:hover { background: var(--green-tint); color: var(--green); }
.index-item.is-active { background: var(--green-tint); border-inline-start-color: var(--green); color: var(--green); font-weight: 600; }
.index-num { font-family: var(--font-display); font-size: 9.5px; color: #75561F; width: 20px; flex: 0 0 auto; }
.index-label { flex: 1; line-height: 1.5; white-space: normal; }
.index-label-short { display: none; }
.index-pct { color: var(--ink-soft); font-size: 10px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.index-item.is-active .index-pct { color: var(--green-2); }
.index-item.is-na .index-pct { color: #75561F; }
.index-state { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: 0 0 auto; }
.index-state.is-complete { background: var(--complete); }
.index-state.is-partial { background: var(--amber); }
.index-item.is-na .index-state { background: var(--gold); }
.index-foot { border-top: 1px dashed var(--border-strong); margin-top: 12px; padding-top: 12px; }
.save-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10.5px; min-height: 18px; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--complete); flex: 0 0 auto; }
.save-status.is-saving .save-dot { background: var(--amber); animation: pulse 1s infinite; }
.save-time { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.index-foot .btn { margin-top: 10px; }

/* Document sections */
.doc-section {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-soft);
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 18px;
  scroll-margin-top: 12px;
  animation: sectionIn .35s var(--ease) both;
}
.sec-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.sec-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--gold-soft);
  background: var(--gold-tint);
  color: #75561F;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.sec-heading { flex: 1; min-width: 0; }
.sec-kicker { color: var(--gold-strong); font-size: 10.5px; font-weight: 600; line-height: 1.5; }
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.6;
  color: var(--green);
}
.sec-desc { color: var(--muted); font-size: 12px; line-height: 1.75; margin-top: 3px; max-width: 620px; }
.sec-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  white-space: nowrap;
}
.sec-state .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.sec-state.is-complete { color: var(--complete); border-color: rgba(46, 107, 79, .35); background: var(--complete-soft); }
.sec-state.is-complete .dot { background: var(--complete); }
.sec-state.is-partial { color: var(--amber); border-color: rgba(166, 106, 30, .3); background: var(--amber-soft); }
.sec-state.is-partial .dot { background: var(--amber); }
.sec-state.is-na { color: var(--gold-strong); border-color: var(--gold-soft); background: var(--gold-tint); }
.sec-state.is-na .dot { background: var(--gold); }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { min-width: 0; }
.field.is-full { grid-column: 1 / -1; }

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.field-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.req { color: var(--gold-strong); font-size: 13px; line-height: 1; }
.field-help { color: var(--muted); font-size: 11.5px; line-height: 1.7; margin-bottom: 7px; }
.field-control { position: relative; }

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: #FFFEFA;
  color: var(--ink);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.7;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.input { height: 43px; }
.textarea { min-height: 92px; resize: vertical; }
.input::placeholder,
.textarea::placeholder { color: #7C837D; }
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(172, 138, 76, .15);
  background: #fff;
}
.input:disabled,
.textarea:disabled,
.select:disabled {
  background: #F3EFE6;
  color: var(--ink-soft);
  cursor: not-allowed;
}

.field.is-na .input,
.field.is-na .textarea {
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(172, 138, 76, .10) 8px 9px);
  border-color: var(--gold-soft);
  color: var(--gold-strong);
  opacity: .85;
}
.field.is-na .field-label { color: var(--muted); }

.na-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  transition: all .16s var(--ease);
}
.na-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 1px;
}
.na-toggle:hover { border-color: var(--gold); color: var(--gold-strong); background: var(--gold-tint); }
.na-toggle.is-active { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-strong); }
.na-toggle.is-active::before { background: var(--gold); border-color: var(--gold); }

.char-count {
  display: block;
  text-align: left;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 2px;
  opacity: 0;
  transition: opacity .16s var(--ease);
}
.date-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.field.is-na .date-hint { display: none; }
.field:focus-within .char-count { opacity: 1; }

.locked-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 43px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.locked-field .icon { width: 14px; height: 14px; color: var(--gold-strong); }

.sec-na-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--gold-soft);
  border-inline-start: 3px solid var(--gold);
  background: var(--gold-tint);
  color: var(--gold-strong);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}
.sec-na-note .icon { width: 20px; height: 20px; flex: 0 0 auto; }

.section-na-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.section-na-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: all .16s var(--ease);
}
.section-na-toggle:hover { border-color: var(--gold); color: var(--gold-strong); background: var(--gold-tint); }
.section-na-toggle.is-active { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-strong); font-weight: 600; }

/* Segmented controls */
.choice-block { margin-top: 2px; }
.choice-label { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  overflow: hidden;
  background: #FFFEFA;
}
.choice {
  min-height: 36px;
  padding: 6px 13px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.choice + .choice { border-inline-start: 1px solid var(--border); }
.choice:hover { background: var(--green-tint); color: var(--green); }
.choice.is-active { background: var(--green); color: #FFFDF8; font-weight: 600; }
.choice[data-tone="high"].is-active { background: var(--danger); }
.choice[data-tone="medium"].is-active { background: var(--amber); }
.choice[data-tone="low"].is-active { background: var(--complete); }
.segmented:disabled,
.choice:disabled { opacity: .55; cursor: not-allowed; }

.other-wrap { margin-top: 8px; display: none; }
.other-wrap.is-visible { display: block; }
.other-wrap .input { height: 38px; font-size: 13px; }

/* Repeatable entries */
.entries { display: flex; flex-direction: column; gap: 12px; }
.entries-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}
.entries-summary b { color: var(--ink-soft); font-weight: 600; }
.entry-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  transition: border-color .16s var(--ease);
}
.entry-card:hover { border-color: var(--border-strong); }
.entry-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(237, 231, 218, .5);
  border-bottom: 1px solid var(--border);
}
.entry-index {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #75561F;
  font-size: 10px;
  flex: 0 0 auto;
}
.entry-index b { font-family: var(--font-display); font-size: 12px; font-weight: 600; }
.entry-title-preview {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-title-preview.is-empty { color: var(--muted); font-weight: 400; }
.entry-actions { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; }
.entry-actions .icon-btn { width: 28px; height: 28px; }
.entry-actions .icon-btn .icon { width: 15px; height: 15px; }
.entry-actions .collapse-btn .icon { transition: transform .2s var(--ease); }
.entry-card.is-collapsed .collapse-btn .icon { transform: rotate(-90deg); }
.entry-body { padding: 16px; }
.entry-card.is-collapsed .entry-body { display: none; }
.entry-body .field-grid { gap: 14px 18px; }
.entry-body .textarea { min-height: 78px; }

.add-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px dashed var(--gold-soft);
  border-radius: 3px;
  background: transparent;
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
  transition: all .18s var(--ease);
}
.add-entry:hover { border-color: var(--gold); background: var(--gold-tint); }
.add-entry .icon { width: 16px; height: 16px; }

/* Attachments */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 3px;
  background: var(--surface-soft);
  text-align: center;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.dropzone:hover,
.dropzone.is-dragging { border-color: var(--gold); background: var(--gold-tint); }
.dropzone .icon { width: 26px; height: 26px; color: var(--gold-strong); }
.dropzone-title { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.dropzone-sub { color: var(--muted); font-size: 11px; line-height: 1.7; }
.dropzone .btn { margin-top: 6px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.attachment-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
}
.attachment-type {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--gold-soft);
  background: var(--gold-tint);
  color: var(--gold-strong);
}
.attachment-type .icon { width: 15px; height: 15px; }
.attachment-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.attachment-meta { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.attachment-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.attachment-item .icon-btn { width: 28px; height: 28px; }
.attachment-item .icon-btn .icon { width: 14px; height: 14px; }
.attachment-actions a.icon-btn { color: var(--ink-soft); }
.attachment-actions a.icon-btn:hover { color: var(--green); }
.attachment-note { color: var(--muted); font-size: 10.5px; margin-top: 8px; display: flex; align-items: center; gap: 5px; line-height: 1.7; }
.attachment-note .icon { width: 13px; height: 13px; flex: 0 0 auto; }

/* Attachment preview */
.attachment-preview-dialog {
  width: min(1180px, calc(100% - 28px));
  max-width: 1180px;
  max-height: 92vh;
  height: min(900px, 92vh);
  display: none;
  flex-direction: column;
}
.attachment-preview-dialog[open] { display: flex; }
.attachment-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.attachment-preview-head h2 {
  max-width: 720px;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.attachment-preview-meta { margin-top: 3px; color: var(--muted); font-size: 11px; }
.attachment-preview-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.attachment-preview-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  background: #EAE5DA;
}
.attachment-preview-image {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 150px);
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
}
.attachment-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  background: #fff;
}
.attachment-preview-loading,
.attachment-preview-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 220px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}
.attachment-preview-message .icon { width: 22px; height: 22px; color: var(--gold-strong); }
.preview-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gold-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.docx-preview-host { width: 100%; display: flex; flex-direction: column; align-items: center; }
.docx-preview-host .docx-wrapper { background: transparent; padding: 0; }
.docx-preview-host .docx { margin: 0 auto 14px; box-shadow: 0 8px 24px rgba(14, 59, 46, .12); }
.pptx-preview-host { width: 100%; display: flex; justify-content: center; min-height: 200px; }
.pptx-preview-host > * { max-width: 100%; }

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

dialog {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(10, 30, 23, .3);
  max-width: 700px;
  width: calc(100% - 32px);
  max-height: 88vh;
  overflow: hidden;
}
.sheet-dialog[open] { display: flex; flex-direction: column; }
.sheet-dialog .dialog-head { flex: 0 0 auto; }
dialog::backdrop {
  background: rgba(10, 30, 23, .55);
  backdrop-filter: blur(2px);
}
dialog[open] { animation: dialogIn .25s var(--ease) both; }

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px 14px;
  border-bottom: 1px solid var(--border);
}
.dialog-head h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--green);
  margin-top: 3px;
}
.dialog-body { padding: 20px 28px 26px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.dialog-lead { color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.instruction-list { display: flex; flex-direction: column; gap: 0; margin-top: 16px; border-top: 1px solid var(--border); }
.instruction-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.instruction-list p { font-size: 13px; line-height: 1.85; color: var(--ink-soft); }
.inst-num {
  font-family: var(--font-display);
  font-size: 10px;
  color: #75561F;
  border: 1px solid var(--gold-soft);
  background: var(--gold-tint);
  padding: 2px 6px;
  line-height: 1.6;
  flex: 0 0 auto;
  margin-top: 3px;
}
.dialog-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--green-tint);
  border-inline-start: 2px solid var(--green);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}
.dialog-note .icon { width: 18px; height: 18px; color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.dialog-actions {
  position: sticky;
  bottom: -4px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-block: 10px 4px;
  background: var(--surface);
}

/* Review dialog */
.review-summary {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}
.review-summary .mini-seal { width: 72px; height: 72px; }
.review-summary .mini-seal span { font-size: 15px; }
.review-summary h3 { font-family: var(--font-display); font-size: 16px; color: var(--green); line-height: 1.6; }
.review-summary p { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.review-summary .status-stamp { margin-top: 6px; }
.review-section-list { margin-top: 16px; border-top: 1px solid var(--border); }
.review-sec {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.review-sec .state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); flex: 0 0 auto; }
.review-sec.is-complete .state-dot { background: var(--complete); }
.review-sec.is-partial .state-dot { background: var(--amber); }
.review-sec.is-na .state-dot { background: var(--gold); }
.review-sec .sec-name { flex: 1; color: var(--ink-soft); }
.review-sec .sec-pct { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.review-sec button {
  margin-inline-start: 4px;
  border: 0;
  background: none;
  color: var(--gold-strong);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.review-missing {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(166, 106, 30, .35);
  background: var(--amber-soft);
  color: #7A4C12;
  font-size: 12px;
  line-height: 1.8;
}
.review-missing strong { display: block; margin-bottom: 3px; }
.review-missing ul { margin-top: 5px; }
.review-missing li { display: flex; gap: 6px; align-items: baseline; }
.review-missing li::before { content: "•"; color: var(--amber); }
.review-ok {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(46, 107, 79, .35);
  background: var(--complete-soft);
  color: #23543D;
  font-size: 12px;
  line-height: 1.8;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.review-ok .icon { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 2px; }
.review-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-soft);
  cursor: pointer;
}
.review-confirm input { margin-top: 5px; accent-color: var(--green); width: 15px; height: 15px; }
.review-actions {
  position: sticky;
  bottom: -4px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 12px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Confirm dialog */
.confirm-dialog { max-width: 430px; padding: 26px; text-align: center; border-top: 3px solid var(--danger); }
.confirm-dialog[open] { display: block; }
.confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--danger-soft);
  color: var(--danger);
}
.confirm-icon .icon { width: 22px; height: 22px; }
.confirm-dialog h2 { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.confirm-dialog p { color: var(--muted); font-size: 12.5px; line-height: 1.8; margin-top: 6px; }
.confirm-note {
  max-width: 360px;
  margin: 10px auto 0;
  padding: 8px 11px;
  border: 1px solid var(--gold-soft);
  border-inline-start: 3px solid var(--gold);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
  text-align: start;
}
.confirm-actions { display: flex; justify-content: center; gap: 9px; margin-top: 12px; }

/* Toast */
.toast-region {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100% - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px;
  background: var(--green);
  color: #FFFDF8;
  border: 1px solid rgba(172, 138, 76, .55);
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(10, 30, 23, .25);
  font-size: 12.5px;
  line-height: 1.6;
  animation: toastIn .25s var(--ease) both;
}
.toast .icon { width: 16px; height: 16px; color: #D9C08A; }
.toast.is-error { background: var(--danger); border-color: rgba(255, 255, 255, .3); }
.toast.is-error .icon { color: #fff; }
.toast.is-leaving { animation: toastOut .2s var(--ease) both; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--paper-deep);
  padding-block: 24px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 13px; }
.footer-logo { width: 50px; height: auto; aspect-ratio: 220 / 146; object-fit: contain; background: transparent; border: 0; }
.footer-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--green); line-height: 1.6; }
.footer-sub { color: var(--ink-soft); font-size: 11px; line-height: 1.7; }
.footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.footer-partner img { display: block; width: auto; height: 40px; max-width: 160px; object-fit: contain; opacity: .92; }
.footer-note { color: var(--ink-soft); font-size: 10.5px; }

/* --------------------------------------------------------------------------
   Support
   -------------------------------------------------------------------------- */

.support-float {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(217, 192, 138, .6);
  border-radius: 50%;
  background: var(--green);
  color: #FFFDF8;
  box-shadow: 0 8px 24px rgba(14, 59, 46, .24);
  text-decoration: none;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.support-float:hover { background: #155C45; transform: translateY(-2px); }
.support-float:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.support-float .icon { width: 19px; height: 19px; }
.support-float-label {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 50%;
  transform: translateY(50%);
  width: max-content;
  max-width: 250px;
  padding: 7px 10px;
  border: 1px solid var(--gold-soft);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
  text-align: start;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(14, 59, 46, .12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s var(--ease), visibility .18s var(--ease);
}
.support-float:hover .support-float-label,
.support-float:focus-visible .support-float-label { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes heroIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sealIn {
  from { opacity: 0; transform: rotate(-2.5deg) scale(.92); }
  to { opacity: 1; transform: rotate(-2.5deg) scale(1); }
}
@keyframes stampPress {
  0% { opacity: 0; transform: rotate(-2.5deg) scale(1.5); }
  65% { opacity: 1; transform: rotate(-2.5deg) scale(.97); }
  100% { opacity: 1; transform: rotate(-2.5deg) scale(1); }
}
.seal.just-stamped { animation: stampPress .55s var(--ease) both; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

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

@media (max-width: 1100px) {
  .dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; }
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .hero-kpi:nth-child(3) { padding-inline-start: 0; border-inline-start: 0; }
}

@media (max-width: 960px) {
  .dossier-layout { grid-template-columns: minmax(0, 1fr); }
  .dossier-index {
    position: static;
    order: -1;
    padding: 14px 16px;
  }
  .index-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
    margin-top: 8px;
    scrollbar-width: thin;
  }
  .index-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 168px;
    border: 1px solid var(--border);
    border-inline-start-width: 1px;
    border-radius: 2px;
    padding: 7px 9px;
  }
  .index-item.is-active { border-color: var(--green); }
  .index-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .index-foot .btn { margin-top: 0; margin-inline-start: auto; }
  .index-title { border-bottom: 0; padding-bottom: 0; }
}

@media (max-width: 760px) {
  .strip-item.strip-desktop { display: none; }
  .top-strip-inner { justify-content: space-between; gap: 10px; }
  .strip-spacer { display: none; }
  .masthead { align-items: flex-start; flex-direction: column; gap: 14px; padding-block: 18px 16px; }
  .brand-mark-wrap { width: 60px; height: auto; padding: 0; }
  .brand { gap: 13px; }
  .masthead-actions { width: 100%; }
  .masthead-actions .btn { flex: 1; }
  .session-chip { flex: 1 1 100%; justify-content: center; }
  .updates-list { grid-template-columns: minmax(0, 1fr); }
  .app { padding-block: 20px 48px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 14px; }
  .hero .seal { --seal-size: 96px; }
  .hero-seal-wrap { justify-items: start; grid-auto-flow: column; align-items: center; justify-content: start; gap: 16px; }
  .hero-seal-label { max-width: 120px; line-height: 1.6; }
  .seal { --seal-size: 118px; }
  .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-kpi { padding-inline: 12px; }
  .hero-kpi:nth-child(odd) { padding-inline-start: 0; border-inline-start: 0; }
  .hero-kpi:nth-child(n+3) { padding-top: 12px; border-top: 1px solid rgba(255,253,248,.12); }
  .dash-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .dash-head-meta { text-align: start; }
  .toolbar { gap: 10px; }
  .search-field { flex: 1 1 100%; max-width: none; }
  .filter-group { flex: 1 1 100%; }
  .view-switch { flex: 1; }
  .view-btn { flex: 1; justify-content: center; }
  .sort-field { flex: 1 1 100%; justify-content: space-between; }
  .dept-grid { grid-template-columns: minmax(0, 1fr); }
  .dossier-head { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dossier-head.has-photo { padding-top: calc(20px + 104px); }
  .dossier-photo { height: 104px; }
  .dossier-photo span { inset-block-end: 12px; font-size: 9px; }
  .dossier-seal-col { justify-items: start; grid-auto-flow: column; align-items: center; gap: 14px; }
  .dossier-seal-col .seal { --seal-size: 104px; }
  .dossier-seal-col .seal-percent { font-size: 22px; }
  .dossier-actions { margin-top: 14px; }
  .dossier-actions .btn { flex: 1 1 auto; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .sec-head { flex-wrap: wrap; }
  .sec-heading { flex: 1 1 calc(100% - 58px); }
  .sec-state { order: 3; flex-basis: 100%; margin: 7px 0 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-actions { align-items: flex-start; }
  .submitted-banner .spacer { display: none; }
  .submitted-banner { align-items: flex-start; }
  .submitted-banner .btn { width: 100%; }
}

@media (max-width: 480px) {
  .container { padding-inline: 14px; }
  .brand-title { font-size: 18px; }
  .brand-sub { font-size: 11.5px; }
  .brand-kicker { font-size: 10.5px; }
  .hero-title { font-size: 24px; }
  .hero-lead { font-size: 13px; }
  .hero-actions .btn { flex: 1; }
  .hero-kpi-value { font-size: 22px; }
  .hero-kpi-label { font-size: 10.5px; }
  .dash-title { font-size: 23px; }
  .card-title { min-height: 0; }
  .filter-btn { flex: 1; text-align: center; }
  .doc-section { padding: 18px 16px; }
  .sec-head { gap: 10px; }
  .sec-num { width: 38px; height: 38px; font-size: 11px; }
  .sec-title { font-size: 16px; }
  .sec-state { margin: 7px 0 0; }
  .entry-head { flex-wrap: wrap; }
  .entry-title-preview { flex-basis: calc(100% - 70px); }
  .entry-actions { width: 100%; justify-content: flex-end; }
  .segmented { width: 100%; }
  .choice { flex: 1; padding-inline: 8px; }
  .dialog-head { padding: 18px 18px 12px; }
  .dialog-body { padding: 16px 18px 22px; }
  .dialog-head h2 { font-size: 18px; }
  .review-summary { align-items: flex-start; gap: 12px; }
  .review-summary .mini-seal { width: 60px; height: 60px; }
  .review-summary .mini-seal span { font-size: 12px; }
  .confirm-dialog { padding: 22px 18px; }
  .strip-item { font-size: 10.5px; }
  .footer-note { line-height: 1.7; }
  .support-float { left: 14px; bottom: 14px; width: 40px; height: 40px; }
  .support-float-label { display: none; }
}

@media (max-width: 760px) {
  .index-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .index-item { width: 100%; min-width: 0; }
  .index-label-full { display: none; }
  .index-label-short { display: inline; }
  .attachment-preview-dialog {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .attachment-preview-head { padding: 14px; gap: 10px; }
  .attachment-preview-head h2 { font-size: 14px; }
  .attachment-preview-body { padding: 10px; }
  .attachment-preview-frame { min-height: 0; height: 100%; }
  .attachment-preview-image { max-height: none; }
  .attachment-meta { white-space: normal; }
  .attachment-item { padding: 7px 8px; gap: 7px; }
}

/* --------------------------------------------------------------------------
   Print — official A4 document
   -------------------------------------------------------------------------- */

.print-area { display: none; }

@page { size: A4; margin: 16mm 14mm; }

@media print {
  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10.5pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .page-texture,
  .top-strip,
  .site-header,
  .app,
  .site-footer,
  dialog,
  .toast-region,
  .support-float,
  .skip-link { display: none !important; }

  .print-area { display: block !important; }

  .print-doc { font-family: var(--font-body); color: #111; }
  .print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 2px solid #0E3B2E;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }
  .print-header-main { display: flex; align-items: center; gap: 12px; }
  .print-mark { width: 54px; height: 40px; object-fit: contain; background: #F9F6EF; border: 1px solid #C9BEA9; }
  .print-header h1 { font-family: var(--font-display); font-size: 15pt; color: #0E3B2E; line-height: 1.5; margin: 0; }
  .print-header p { font-size: 8.5pt; color: #555; margin: 1px 0 0; }
  .print-ref { text-align: left; font-size: 8pt; color: #555; line-height: 1.7; }
  .print-ref b { display: block; color: #0E3B2E; font-size: 9pt; }
  .print-dept-title { font-family: var(--font-display); font-size: 16pt; color: #0E3B2E; margin: 12px 0 2px; line-height: 1.5; }
  .print-dept-sub { font-size: 9pt; color: #555; margin-bottom: 10px; }
  .print-meta { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  .print-meta th, .print-meta td { border: 1px solid #C9BEA9; padding: 5px 8px; font-size: 8.5pt; text-align: right; vertical-align: top; }
  .print-meta th { background: #F1EBDD; color: #0E3B2E; width: 22%; font-weight: 600; }
  .print-section { margin-top: 12px; break-inside: avoid; }
  .print-section h2 {
    font-family: var(--font-display);
    font-size: 11pt;
    color: #0E3B2E;
    border-bottom: 1px solid #AC8A4C;
    padding-bottom: 3px;
    margin: 0 0 6px;
    line-height: 1.6;
  }
  .print-field { display: grid; grid-template-columns: 32% 1fr; gap: 4px; border-bottom: 1px dotted #D5CDBE; padding: 3px 0; font-size: 9pt; line-height: 1.7; }
  .print-field dt { color: #555; font-weight: 600; }
  .print-field dd { margin: 0; color: #111; }
  .print-field dd.is-na { color: #8D6C31; font-style: italic; }
  .print-table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 8pt; }
  .print-table th, .print-table td { border: 1px solid #C9BEA9; padding: 4px 6px; text-align: right; vertical-align: top; line-height: 1.6; }
  .print-table th { background: #F1EBDD; color: #0E3B2E; font-weight: 600; }
  .print-stamp {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    border: 2px solid #2E6B4F;
    color: #2E6B4F;
    font-family: var(--font-display);
    font-size: 9pt;
    transform: rotate(-2deg);
  }
  .print-footer { margin-top: 16px; border-top: 1px solid #C9BEA9; padding-top: 6px; font-size: 7.5pt; color: #666; display: flex; justify-content: space-between; gap: 12px; }
  .print-list { margin: 0; padding: 0 14px 0 0; font-size: 9pt; line-height: 1.7; }
  .print-list li { margin-bottom: 2px; }
  .print-empty { color: #888; font-style: italic; font-size: 8.5pt; }
}
