:root {
  color-scheme: dark;
  --bg: #090b0d;
  --surface: #121518;
  --surface-raised: #171b1f;
  --line: #30363c;
  --line-soft: #252b30;
  --text: #f4f5f7;
  --muted: #9da5ad;
  --accent: #e1e5e9;
  --ok: #4ac784;
  --bad: #ff7272;
  /* Operational accent (sage) is the identity colour; brass is a second, deliberately used
     accent reserved for warnings and the one or two moments that should read as instrument-panel
     rather than plain UI (azimuth ring, pending states). They are not interchangeable. */
  --op: #8fb28f;
  --op-strong: #b7d8b4;
  --op-ink: #0c130e;
  --brass: #d7a94a;
  --brass-strong: #f0c876;

  --font-display: "Big Shoulders Text", Arial Narrow, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 18% -10%, rgba(52, 72, 62, .22), transparent 42%),
    radial-gradient(circle at 82% 0%, rgba(40, 48, 56, .35), transparent 36%),
    radial-gradient(circle at 50% -20%, #14191d 0, var(--bg) 42%);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
}
body.public-portal {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 12% -8%, rgba(76, 112, 91, .30), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(54, 67, 76, .30), transparent 32%),
    linear-gradient(180deg, #0c100e 0%, var(--bg) 58%);
  position: relative;
}
body.public-portal::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 72px 0 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(142, 166, 151, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(142, 166, 151, .12) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
  pointer-events: none;
}

header, .site-header {
  height: 76px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background:
    linear-gradient(90deg, rgba(28,34,38,.35), transparent 42%),
    rgba(7, 9, 11, .96);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  display: block;
  width: 174px;
  height: 48px;
  object-fit: contain;
}
.brand span {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
}


nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

main { width: min(100% - 48px, 1280px); margin: 0 auto; padding: 38px 0 64px; animation: page-content-enter .32s ease-out both; }
@keyframes page-content-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.narrow { max-width: 430px; margin: 9vh auto; }
.admin-login-card h1 { margin-top: 6px; }
.admin-login-form { display: grid; gap: 4px; margin-top: 18px; }
.admin-login-form label { margin-top: 12px; }
.admin-login-form label:first-child { margin-top: 0; }
.admin-login-code { font-family: var(--font-mono); letter-spacing: .28em; text-align: center; }
.admin-login-submit { width: 100%; margin-top: 18px; }
.key-access-note { margin-top: 12px; }
.key-access-note form { margin-top: 8px; }

/* Small margin utilities: a handful of one-off inline `style="margin-top:..."` values kept
   reappearing across pages instead of using a shared scale — these replace them. */
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-neg-sm { margin-top: -8px; }
.filter-row { margin-bottom: 16px; }
.copy-status-note { display: inline-block; min-height: 1.25rem; margin-left: 6px; }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.heading-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.heading-actions form { margin: 0; }
.eyebrow {
  margin: 0 0 6px;
  color: #858e96;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
}
.status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px rgba(74,199,132,.5); }

.card {
  background: linear-gradient(180deg, #15191c 0, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 34px rgba(0,0,0,.12);
}

/* Item cards in a browsable grid get a lift on hover -- signals "this is one entry among many",
   unlike plain .card section panels which just hold content and stay still. */
.workspace-card, .user-card, .correction-card, .catalog-item, .request-card,
.feedback-card, .metric-link {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.workspace-card:hover, .user-card:hover, .correction-card:hover, .catalog-item:hover, .request-card:hover,
.feedback-card:hover, .metric-link:hover {
  transform: translateY(-3px);
  border-color: #3f4c43;
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { margin: 0 0 2px; }
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  margin-left: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11px;
  vertical-align: 2px;
}

h1, h2, h3 { margin: 0 0 16px; line-height: 1.15; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.005em; }
h2 { font-size: 19px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.error { color: var(--bad); }
.nowrap { white-space: nowrap; }
.block { display: block; margin-top: 4px; }
.release-form { display: grid; grid-template-columns: minmax(180px, .45fr) minmax(280px, 1fr); gap: 14px; align-items: end; }
.release-form > div { min-width: 0; }
.release-notes { grid-column: 1 / -1; }
.release-modules { grid-column: 1 / -1; margin: 2px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.release-modules legend { padding: 0 7px; color: var(--muted); font-size: 13px; }
.module-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.release-submit { grid-column: 1 / -1; justify-self: start; width: auto; max-width: 100%; }
.release-form input[type="file"] { padding: 4px; color: var(--muted); }
.release-form input[type="file"]::file-selector-button {
  height: 30px;
  margin-right: 10px;
  border: 1px solid #555f67;
  border-radius: 5px;
  background: #242a2f;
  color: var(--text);
  padding: 0 11px;
  cursor: pointer;
}
.release-form input[type="file"]::file-selector-button:hover { background: #30373d; border-color: #737e87; }
.releases-table { table-layout: fixed; min-width: 1100px; }
.releases-table th:nth-child(1) { width: 14%; }
.releases-table th:nth-child(2) { width: 18%; }
.releases-table th:nth-child(3) { width: 13%; }
.releases-table th:nth-child(4) { width: 8%; }
.releases-table th:nth-child(5) { width: 12%; }
.releases-table th:nth-child(6) { width: 15%; }
.releases-table th:nth-child(7) { width: 160px; }
.releases-table td { overflow: hidden; }
.releases-table td.actions { overflow: visible; }
.releases-table td.actions .inline { display: block; margin: 0 0 6px; }
.releases-table td.actions .inline:last-child { margin-bottom: 0; }
.releases-table td.actions button { width: 100%; }
.release-hash { display: block; overflow: hidden; color: #cbd1d5; font-family: var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.releases-table form.inline { margin: 0; }
.ballistics-library-table td.actions { overflow: visible; }
.ballistics-library-table td.actions .inline { display: block; margin: 0 0 6px; }
.ballistics-library-table td.actions .inline:last-child { margin-bottom: 0; }
.ballistics-library-table td.actions button { width: 100%; }
.shotmobile-table td.actions { overflow: visible; min-width: 150px; }
.shotmobile-table td.actions .inline { display: block; width: 100%; margin: 0 0 6px; }
.shotmobile-table td.actions .inline:last-child { margin-bottom: 0; }
.shotmobile-table td.actions .button, .shotmobile-table td.actions summary.button { width: 100%; }
.shotmobile-table td.actions details.workspace-delete { position: relative; width: 100%; margin-top: 0; }
.shotmobile-table td.actions .delete-confirmation {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: 0;
  width: min(300px, 80vw);
  margin-top: 0;
}
.shotmobile-table .user-login { display: block; margin-bottom: 4px; }
.updates-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}
.updates-top-grid > .card { margin-bottom: 0; min-width: 0; }
.updates-top-grid .release-form { grid-template-columns: 1fr; }
.updates-top-grid .module-options { grid-template-columns: 1fr 1fr; }
.canary-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.canary-form > div { flex: 1; min-width: 220px; }
.canary-form select { width: 100%; }
.feedback-grid { display: grid; gap: 16px; }
.feedback-card { margin: 0; }
.feedback-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.feedback-head h2 { margin: 9px 0 0; }
.feedback-head time, .feedback-meta { color: var(--muted); font-size: 12px; }
.feedback-message { white-space: pre-wrap; line-height: 1.55; }
.feedback-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.feedback-images a { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #0d1012; }
.feedback-images img { display: block; width: 100%; height: 110px; object-fit: cover; }
.feedback-images span { display: block; overflow: hidden; padding: 7px 9px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.feedback-review { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 9px; align-items: end; padding-top: 15px; border-top: 1px solid var(--line-soft); }
.feedback-review textarea { min-height: 62px; }

.feedback-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  align-items: start;
}
.feedback-card-compact {
  padding: 14px 15px 15px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}
.feedback-card-compact .feedback-head { gap: 10px; margin-bottom: 8px; }
.feedback-card-compact .feedback-head-main h2 { margin: 6px 0 4px; font-size: 16px; }
.feedback-card-compact .feedback-message {
  margin: 0 0 10px;
  max-height: 7.5em;
  overflow: auto;
  font-size: 13px;
  line-height: 1.45;
}
.feedback-card-compact .feedback-images {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.feedback-thumb {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1012;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}
.feedback-thumb img { display: block; width: 100%; height: 78px; object-fit: cover; }
.feedback-thumb span {
  display: block;
  overflow: hidden;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.feedback-card-compact .feedback-review {
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 12px;
}
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback-actions button { flex: 1; min-width: 140px; }

.feedback-lightbox[hidden] { display: none !important; }
.feedback-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.feedback-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(3px);
}
.feedback-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101316;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.feedback-lightbox-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.feedback-lightbox-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171b1f;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.feedback-lightbox-panel img {
  display: block;
  width: 100%;
  max-height: calc(88vh - 84px);
  object-fit: contain;
  border-radius: 8px;
  background: #07090b;
}
body.lightbox-open { overflow: hidden; }
.result-times { display: grid; gap: 4px; color: var(--muted); font-size: 12px; text-align: right; }
.result-details { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; margin: 18px 0 0; }
.result-details div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 8px; background: #0d1012; }
.result-details dt { margin-bottom: 4px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; }
.result-details dd { margin: 0; font-family: var(--font-mono); overflow-wrap: anywhere; }
.result-comment { margin-top: 12px; padding: 12px; border-left: 2px solid #7e888f; background: #0d1012; }
.result-comment p { margin: 6px 0 0; white-space: pre-wrap; }

.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.grow { flex: 1; min-width: 180px; }

label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
input, select {
  width: 100%;
  height: 40px;
  background: #0d1012;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  outline: none;
}
input:focus, select:focus { border-color: #69737b; box-shadow: 0 0 0 2px rgba(105,115,123,.14); }
input::placeholder { color: #6f777e; }
textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  background: #0d1012;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  outline: none;
  font: inherit;
}
textarea:focus { border-color: #69737b; box-shadow: 0 0 0 2px rgba(105,115,123,.14); }
textarea::placeholder { color: #6f777e; }

button, .button {
  min-height: 40px;
  border: 1px solid #555f67;
  border-radius: 7px;
  background: #242a2f;
  color: #fff;
  padding: 0 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, transform .1s ease, box-shadow .14s ease;
}
button:hover, .button:hover { background: #30373d; border-color: #737e87; }
button:active, .button:active { transform: translateY(1px) scale(.98); }
button:disabled { opacity: .45; cursor: default; background: #20252a; border-color: #3e464d; transform: none; }
button.primary, .button.primary {
  background: linear-gradient(180deg, var(--op-strong), var(--op));
  border-color: var(--op);
  color: var(--op-ink);
  font-weight: 700;
}
button.primary:hover, .button.primary:hover { background: linear-gradient(180deg, #c8e4c6, var(--op-strong)); border-color: var(--op-strong); }
button.secondary, .button.secondary { background: #181c20; border-color: #3d454c; }
button.compact { min-height: 36px; padding: 0 12px; }
.danger { border-color: #7e3b3b; background: #281718; color: #ffd7d7; }
.danger:hover { border-color: #b15353; background: #3a2021; }

button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--op-strong);
  outline-offset: 2px;
}

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: auto; }
th, td { text-align: left; border-bottom: 1px solid var(--line-soft); padding: 13px 10px; vertical-align: middle; }
th { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 12px;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #7e858b; }
.pill.active { color: #b8e9cc; border-color: #28533b; background: #102019; }
.pill.active .pill-dot { background: var(--ok); }
.pill.blocked { color: #d6a5a5; border-color: #573232; background: #211313; }
.pill.blocked .pill-dot { background: var(--bad); }
.pill.archived { color: #d8c69a; border-color: #564a2f; background: #1c1911; }
.pill.archived .pill-dot { background: #c9b98e; }

form.inline { display: inline-flex; gap: 7px; margin: 6px 0 0; }
.role-name { color: var(--muted); font-size: 12px; margin-bottom: 1px; }
.owner-badge {
  display: inline-block;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #3d5a45;
  background: #14241a;
  color: #b8e9cc;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.password-form { display: flex; align-items: center; gap: 7px; }
.password-form input { width: 170px; }

.message {
  border: 1px solid #254936;
  border-left: 3px solid var(--ok);
  border-radius: 6px;
  padding: 11px 14px;
  background: #101c16;
  color: #cfe8d5;
  margin-bottom: 16px;
}
.message-ok {
  border-color: #254936;
  border-left-color: var(--ok);
  background: #142018;
  color: #d5f0de;
  font-weight: 600;
}
.message-error {
  border-color: #5d3030;
  border-left-color: var(--bad);
  background: #211313;
}

.notice, .empty-state {
  border: 1px dashed #384047;
  border-radius: 10px;
  background: #101316;
  color: var(--muted);
  padding: 22px;
  text-align: center;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111518;
}
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 20px; font-weight: 600; }
.metric-link { color: var(--text); text-decoration: none; }
.metric-link:hover { background: #14181b; color: var(--text); }
.metric-warn { color: var(--brass); }

.create-workspace-control { position: relative; flex: 0 0 auto; }
.create-workspace-control > summary { list-style: none; cursor: pointer; }
.create-workspace-control > summary::-webkit-details-marker { display: none; }
.create-workspace-form {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 80vw);
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  align-items: end;
}
@media (max-width: 640px) {
  .create-workspace-form { position: static; width: 100%; margin-top: 10px; box-shadow: none; }
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.workspace-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, #171b1f 0, #111417 75%);
}
.workspace-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.workspace-card h2 { margin: 12px 0 4px; font-size: 22px; }
.workspace-owner { color: var(--muted); font-size: 12px; }
.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0 15px;
}
.workspace-metrics div {
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0d1012;
}
.workspace-metrics span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.workspace-metrics strong { font-size: 18px; }
.workspace-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.inline-form { display: inline; margin: 0; }
.workspace-delete { min-width: 0; }
.workspace-delete > summary { list-style: none; user-select: none; }
.workspace-delete > summary::-webkit-details-marker { display: none; }
.workspace-delete[open] { flex: 1 1 100%; }
.delete-confirmation {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid #693838;
  border-radius: 9px;
  background: #1b1112;
}
.delete-confirmation > strong { display: block; color: #ffd4d4; }
.delete-confirmation > p { margin: 8px 0 14px; color: #c6a9a9; font-size: 12px; line-height: 1.55; }
.delete-confirmation form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 8px 10px; align-items: end; }
.delete-confirmation label { grid-column: 1 / 3; margin: 0; }
.delete-actions { display: flex; }

.user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.user-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0f1215;
}
.user-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.user-card-head > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.user-login { font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.user-last-login { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; font-size: 12px; }
.user-last-login span { color: var(--muted); }
.user-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.password-form { flex: 1; justify-content: flex-end; }
.password-form input { width: min(100%, 180px); }

.catalog-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.catalog-category {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0d1012;
}
.catalog-category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.catalog-category-heading h3 { margin: 0; font-size: 17px; }
.catalog-category-heading > span { color: var(--muted); font-size: 12px; }
.catalog-list { display: grid; gap: 8px; margin-top: 10px; }
.catalog-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #2b3237;
  border-radius: 8px;
  background: #13171a;
}
.catalog-item.archived { opacity: .78; }
.catalog-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.catalog-item-head > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.catalog-item-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-charge-type { color: var(--muted); font-size: 11px; }
.record-state {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
}
.record-state.active { color: #b8e9cc; border-color: #28533b; background: #102019; }
.record-state.archived { color: #d8c69a; border-color: #564a2f; background: #1c1911; }
.catalog-batches { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.catalog-batches-label, .catalog-no-batches { color: var(--muted); font-size: 10px; }
.batch-chip {
  padding: 3px 7px;
  border: 1px solid #374047;
  border-radius: 10px;
  background: #0d1012;
  color: #d8dde1;
  font-size: 10px;
}
.batch-chip.archived { color: #c9b98e; border-color: #51472f; }
.catalog-empty { margin: 12px 2px 2px; color: var(--muted); font-size: 12px; }

.correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.correction-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0e1114;
}
.correction-title { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.correction-title span { color: #747d84; }
.correction-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; margin-top: 5px; }
.correction-card dl {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}
.correction-card dl div { min-width: 0; padding: 8px; border-radius: 6px; background: #15191c; }
.correction-card dt { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em; margin-bottom: 4px; }
.correction-card dd { font-family: var(--font-mono); }
.correction-card dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.correction-comment { margin: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); white-space: pre-wrap; color: #d9dde0; }

.public-portal .site-header {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom-color: rgba(115, 129, 121, .28);
  background: rgba(7, 10, 9, .78);
  box-shadow: 0 12px 40px rgba(0,0,0,.16);
  backdrop-filter: blur(18px) saturate(120%);
}
.public-portal .brand { gap: 16px; }
.public-portal .brand img { width: 158px; height: 42px; }
.public-portal .brand span { border-left-color: #354039; color: #89958e; }
.public-portal main { width: min(100% - 40px, 1120px); padding: 52px 0 72px; }
.portal-entry { width: min(100%, 900px); margin: 0 auto; position: relative; }
.portal-entry::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 104px;
  left: 50%;
  width: min(92vw, 760px);
  height: 420px;
  border-radius: 50%;
  background: rgba(95, 140, 113, .12);
  filter: blur(110px);
  transform: translateX(-50%);
  pointer-events: none;
}
/* Azimuth ring behind the login hero, back by request: rebuilt as plain SVG (not the earlier
   CSS conic-gradient/mask version) so the tick geometry is real and mil labels can sit exactly
   on the major ticks. The whole dial (face, ticks, labels) turns together as one disc, slowly
   and deliberately -- not fast enough to read as a loading spinner. Ticks are literally
   traverse-correction geometry (тисячні, 6000 per circle), not a decorative compass. */
.portal-azimuth {
  position: absolute;
  z-index: -1;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 130vw);
  height: min(860px, 130vw);
  pointer-events: none;
}
.portal-azimuth svg { width: 100%; height: 100%; overflow: visible; }
.portal-azimuth-face { fill: none; stroke: var(--line-soft); }
.portal-azimuth-tick { stroke: var(--line-soft); stroke-width: 1; }
.portal-azimuth-tick.is-major { stroke: #4a564c; stroke-width: 1.6; }
.portal-azimuth-label {
  fill: #5c665f;
  font-family: var(--font-mono);
  font-size: 15px;
  text-anchor: middle;
  dominant-baseline: middle;
  /* Orbits with the ring (inherits its rotation) but spins back at the same rate around its own
     position so the digits themselves always stay level instead of tilting as they travel. */
  animation: portal-azimuth-counter-spin 90s linear infinite;
}
.portal-azimuth-hub { fill: var(--brass); }
.portal-azimuth-ring {
  transform-origin: 400px 400px;
  animation: portal-azimuth-spin 90s linear infinite;
}
@keyframes portal-azimuth-spin { to { transform: rotate(360deg); } }
@keyframes portal-azimuth-counter-spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .portal-azimuth-ring, .portal-azimuth-label {
    animation-duration: 90s !important;
    animation-iteration-count: infinite !important;
  }
}
@media (max-width: 640px) {
  .portal-azimuth { display: none; }
}

.portal-entry-copy { max-width: 720px; margin: 0 auto 28px; text-align: center; position: relative; z-index: 1; }
.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #98a79e;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
}
.portal-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fa482;
  box-shadow: 0 0 0 4px rgba(111, 164, 130, .1), 0 0 14px rgba(111, 164, 130, .45);
  animation: portal-status-pulse 2.8s ease-in-out infinite;
}
@keyframes portal-status-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(111, 164, 130, .08), 0 0 12px rgba(111, 164, 130, .34); }
  50% { box-shadow: 0 0 0 6px rgba(111, 164, 130, .02), 0 0 18px rgba(111, 164, 130, .58); }
}
.portal-entry-copy h1 {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: clamp(42px, 6.5vw, 72px);
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.portal-entry-copy > p {
  max-width: 620px;
  margin: 0 auto;
  color: #aab3ae;
  font-size: 16px;
  line-height: 1.55;
}
.portal-access-card {
  overflow: hidden;
  border: 1px solid #303a35;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(96, 129, 108, .10), transparent 34%),
    linear-gradient(145deg, rgba(25, 31, 28, .94), rgba(12, 16, 14, .98) 42%),
    #101413;
  box-shadow: 0 36px 110px rgba(0, 0, 0, .46), inset 0 1px rgba(255,255,255,.045);
  backdrop-filter: blur(16px);
}
.portal-message { margin: 18px 18px 0; }
.portal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid #29312d;
  background: rgba(7, 10, 10, .48);
}
.portal-tab {
  min-height: 46px;
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  color: #8f9993;
  font-size: 14px;
  font-weight: 650;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.portal-tab:hover { border-color: transparent; background: rgba(255,255,255,.035); color: #e8ece9; }
.portal-tab.is-active {
  border-color: #35423b;
  background: linear-gradient(180deg, #202823, #1a211d);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.035);
  position: relative;
}
.portal-tab.is-active::after {
  content: "";
  position: absolute;
  right: 28%;
  bottom: 5px;
  left: 28%;
  height: 2px;
  border-radius: 2px;
  background: #91ad9c;
  box-shadow: 0 0 12px rgba(145, 173, 156, .48);
}
.portal-view { display: none; padding: 32px clamp(24px, 5vw, 48px) 34px; }
.portal-view.is-active { display: block; animation: portal-view-enter .22s ease-out both; }
@keyframes portal-view-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
.portal-login-view { width: min(100%, 560px); margin: 0 auto; }
.portal-view-heading { margin-bottom: 26px; text-align: center; }
.portal-view-heading h2 { margin: 0 0 9px; font-size: 27px; letter-spacing: -.025em; }
.portal-view-heading > p:not(.eyebrow) { margin: 0; color: #929c96; font-size: 13px; line-height: 1.5; }
.portal-login-form { display: grid; }
.portal-login-form label, .portal-registration-form label { margin-top: 14px; }
.portal-access-card input {
  height: 48px;
  border-color: #313a35;
  border-radius: 9px;
  background: #0b0f0e;
  padding: 0 14px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.portal-access-card input:hover { border-color: #414d46; }
.portal-access-card input:focus {
  border-color: #71877a;
  background: #0d1210;
  box-shadow: 0 0 0 3px rgba(113, 135, 122, .13);
}
.portal-label-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 14px; }
.portal-label-row label { margin: 0; }
.portal-label-row span { color: #6f7a74; font-size: 10.5px; }
.portal-code-input { font-family: var(--font-mono); font-size: 17px !important; letter-spacing: .18em; }
.portal-access-card .portal-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border-color: var(--op);
  background: linear-gradient(180deg, var(--op-strong), var(--op));
  color: var(--op-ink);
  font-weight: 750;
  box-shadow: 0 10px 30px rgba(95, 132, 109, .16);
}
.portal-access-card .portal-submit:hover {
  border-color: #eef6f1;
  background: linear-gradient(180deg, #edf4f0, #becdc4);
}
.portal-view-switch { margin: 20px 0 0; color: #7f8983; font-size: 12px; text-align: center; }
.portal-inline-action {
  min-height: 0;
  height: auto;
  margin-left: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: #c7d6cd;
  font-size: inherit;
  font-weight: 650;
}
.portal-inline-action:hover { border: 0; background: none; color: #fff; }
.portal-android-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid #2f3b35;
  border-radius: 11px;
  background: rgba(10, 15, 12, .62);
  color: #dbe3de;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.portal-android-entry:hover { border-color: #4b6054; background: #111a15; transform: translateY(-1px); }
.portal-android-symbol,
.android-app-mark {
  display: grid;
  place-items: center;
  border: 1px solid #587064;
  border-radius: 10px;
  background: linear-gradient(145deg, #22382b, #14231a);
  color: #c8e0d0;
  font-weight: 800;
}
.portal-android-symbol svg,
.android-app-mark svg { width: 55%; height: 55%; }
.portal-android-symbol { width: 34px; height: 34px; font-size: 13px; }
.portal-android-entry p { display: grid; gap: 2px; margin: 0; }
.portal-android-entry strong { font-size: 12.5px; }
.portal-android-entry small { color: #849189; font-size: 10.5px; line-height: 1.35; }
.portal-android-entry b { color: #849b8d; font-size: 16px; }
.portal-request-view { padding-top: 28px; }
.portal-registration-form { display: grid; gap: 14px; }
.portal-access-policy {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: -4px 0 16px;
  padding: 13px 15px;
  border: 1px solid rgba(87, 114, 98, .65);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(38, 61, 48, .42), rgba(14, 21, 17, .60));
}
.portal-policy-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid #5f806b;
  border-radius: 50%;
  background: #17271d;
  color: #b9d3c2;
  font-size: 13px;
}
.portal-access-policy p { display: grid; gap: 3px; margin: 0; }
.portal-access-policy strong { color: #e8eee9; font-size: 12.5px; }
.portal-access-policy small { color: #91a298; font-size: 11px; line-height: 1.45; }
.portal-form-section {
  padding: 18px 20px 20px;
  border: 1px solid #29322d;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(14, 20, 16, .72), rgba(8, 12, 10, .62));
  box-shadow: inset 0 1px rgba(255,255,255,.018);
}
.portal-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.portal-section-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #3c4b42;
  border-radius: 50%;
  color: #95a69c;
  font-size: 9px;
}
.portal-section-title strong { color: #e6ebe8; font-size: 13px; }
.portal-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-option {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0 !important;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0f0d;
  cursor: pointer;
}
.portal-access-card .check-option { flex: 1; min-width: 150px; }
.portal-access-card .check-option:hover { border-color: #46534b; background: #101612; }
.check-option input { width: 17px; height: 17px; margin: 0; accent-color: #829b8c; }
.check-option span { color: #e6e9eb; font-size: 13px; }
.form-note { margin: 10px 0 0; color: #7f878e; font-size: 11px; line-height: 1.5; }
.portal-registration-form .form-note { margin-top: -3px; text-align: center; }
.portal-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 16px;
  border: 1px solid rgba(51, 62, 56, .72);
  border-radius: 13px;
  background: rgba(11, 16, 13, .68);
  box-shadow: 0 16px 50px rgba(0,0,0,.14);
  backdrop-filter: blur(12px);
}
.portal-trust > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px 18px; }
.portal-trust > div + div { border-left: 1px solid #28312c; }
.portal-trust > div > span { color: #657169; font: 10px var(--font-mono); }
.portal-trust p { display: grid; gap: 2px; margin: 0; min-width: 0; }
.portal-trust strong { color: #dfe5e1; font-size: 12px; }
.portal-trust small { overflow: hidden; color: #7f8983; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .public-portal main { width: min(100% - 24px, 1120px); padding-top: 32px; }
  .portal-entry-copy { margin-bottom: 22px; }
  .portal-entry-copy h1 { font-size: clamp(32px, 10vw, 44px); }
  .portal-entry-copy > p { font-size: 14px; }
  .portal-tabs { padding: 6px; }
  .portal-tab { min-height: 43px; font-size: 13px; }
  .portal-view { padding: 26px 18px 28px; }
  .portal-view-heading h2 { font-size: 23px; }
  .portal-two { grid-template-columns: 1fr; gap: 0; }
  .portal-form-section { padding: 16px; }
  .portal-label-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .portal-trust { grid-template-columns: 1fr; }
  .portal-trust > div + div { border-top: 1px solid #28312c; border-left: 0; }
  .portal-trust small { white-space: normal; }
}
.request-grid { display: grid; gap: 12px; }
.request-card { padding: 18px; border: 1px solid var(--line-soft); border-radius: 10px; background: #0f1215; }
.request-head { display: flex; justify-content: space-between; gap: 20px; }
.request-head h3 { margin: 0 0 4px; font-size: 18px; }
.request-head strong { color: #b7c0c7; font-size: 13px; }
.request-head time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.request-contacts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 12px; }
.request-account-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #35433b;
  border-radius: 9px;
  background: #101813;
}
.request-account-note strong { flex: 0 0 auto; color: #d9e5dd; font-size: 12px; }
.request-account-note span { color: #89978f; font-size: 11.5px; line-height: 1.45; }
.android-access-shell { width: min(100%, 760px); margin: 0 auto; }
.android-back-link { display: inline-flex; margin-bottom: 16px; color: #8d9992; font-size: 12px; }
.android-access-card {
  overflow: hidden;
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid #303c35;
  border-radius: 22px;
  background:
    radial-gradient(circle at 12% 0%, rgba(83, 128, 99, .18), transparent 38%),
    linear-gradient(145deg, rgba(24, 31, 27, .96), rgba(10, 14, 12, .99));
  box-shadow: 0 36px 110px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.035);
  backdrop-filter: blur(16px);
}
.android-access-intro { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.android-app-mark { flex: 0 0 58px; width: 58px; height: 58px; border-radius: 16px; font-size: 22px; box-shadow: 0 14px 32px rgba(32,70,44,.22); }
.android-access-intro h1 { margin: 5px 0 7px; font-size: clamp(28px, 5vw, 38px); letter-spacing: -.035em; }
.android-access-intro > div:last-child > p:last-child { margin: 0; color: #98a49d; font-size: 13px; line-height: 1.5; }
.android-message { margin-bottom: 18px; }
.android-access-form { display: grid; gap: 14px; }
.android-access-form label { margin-bottom: 7px; }
.android-access-form input { height: 50px; border-color: #334039; border-radius: 10px; background: #0a0f0c; }
.android-access-form input:focus { border-color: #718d7b; box-shadow: 0 0 0 3px rgba(113,141,123,.13); }
.android-primary-action { width: 100%; min-height: 50px; margin-top: 6px; }
.android-flow-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #29332e;
}
.android-flow-note > span { color: #66746c; font: 10px var(--font-mono); }
.android-flow-note p { display: grid; gap: 3px; margin: 0; }
.android-flow-note strong { color: #d8e0db; font-size: 12px; }
.android-flow-note small { color: #7f8c84; font-size: 10.5px; line-height: 1.4; }
.android-account-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid #303c35;
  border-radius: 10px;
  background: #0d1410;
  font-size: 12px;
}
.android-account-line span { color: #849088; }
.android-ready-panel { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid #3a5143; border-radius: 12px; background: #111d16; }
.android-ready-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #254431; color: #c9e5d3; }
.android-ready-panel strong { color: #eaf0ec; }
.android-ready-panel p { margin: 4px 0 0; color: #91a098; font-size: 11px; }
.android-download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid #303a35;
  border-radius: 13px;
  background: rgba(8, 12, 10, .72);
}
.android-download-panel h2 { margin: 4px 0 6px; font-size: 22px; }
.android-download-panel > div > p:last-child { margin: 0; color: #87938c; font-size: 11px; }
.android-download-panel .button { flex: 0 0 auto; min-width: 190px; }
.android-logout-form { display: flex; justify-content: center; margin-top: 18px; }
.android-security-strip { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 14px 18px; border: 1px solid rgba(48,60,53,.7); border-radius: 12px; background: rgba(10,14,12,.58); }
.android-security-strip span { color: #809187; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.android-security-strip p { margin: 0; color: #758078; font-size: 10.5px; line-height: 1.45; }
.message-warning { border-color: #665b35; background: #211d12; color: #e2d39c; }
.approval-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.3fr);
  gap: 10px;
  align-items: end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.approval-note { grid-column: 1 / 3; }
.activation-shell { display: grid; place-items: center; min-height: calc(100vh - 190px); }
.activation-card {
  width: min(100%, 620px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(24,28,32,.98), rgba(12,15,17,.99));
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
}
.activation-card h1 { margin: 8px 0 12px; font-size: 32px; }
.activation-form { margin-top: 22px; }
.activation-form label { margin-top: 13px; }
.totp-steps { padding-left: 1.2rem; margin: 0 0 1rem; }
.totp-qr-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 6px 0 18px;
  padding: 18px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(36, 46, 42, .35), transparent 55%),
    rgba(10, 12, 14, .92);
}
.totp-qr-frame {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #3a444c;
  background: #f4f5f7;
  box-shadow: inset 0 0 0 1px rgba(18, 21, 24, .06);
}
.totp-qr-image {
  display: block;
  width: 220px;
  height: 220px;
  image-rendering: pixelated;
}
.totp-qr-caption {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
  text-align: center;
}
.totp-manual {
  margin: 0 0 4px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(8, 10, 12, .55);
  padding: 0 14px 2px;
}
.totp-manual summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  color: var(--accent);
  font-size: 13px;
  user-select: none;
}
.totp-manual summary::-webkit-details-marker { display: none; }
.totp-manual summary::before {
  content: "▸";
  display: inline-block;
  width: 1.1em;
  color: #7f878e;
  transition: transform .15s ease;
}
.totp-manual[open] summary::before { transform: rotate(90deg); }
.totp-manual .form-note { margin-top: 0; }
.totp-secret {
  margin: 8px 0 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .04em;
  word-break: break-all;
  user-select: all;
}
.download-client { margin: 22px 8px 0 0; }
.reject-form { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.reject-form input { max-width: 360px; }

@media (max-width: 1000px) {
  .updates-top-grid { grid-template-columns: 1fr; }
  .release-form, .feedback-review { grid-template-columns: 1fr; }
  .release-notes { grid-column: 1; }
  .module-options { grid-template-columns: 1fr 1fr; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .workspace-grid, .user-grid, .correction-grid, .catalog-columns { grid-template-columns: 1fr; }
  .result-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-form { grid-template-columns: 1fr 1fr; }
  .approval-note { grid-column: 1 / 3; }
}

@media (max-width: 620px) {
  .module-options { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  header, .site-header { height: auto; min-height: 68px; padding: 10px 18px; }
  .brand img { width: 138px; height: 40px; }
  .brand span { display: none; }
  main { width: min(100% - 28px, 1280px); padding: 24px 0 48px; }
  .card { padding: 16px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }
  .user-card-actions, .password-form { align-items: stretch; flex-direction: column; }
  .password-form input { width: 100%; }
  .correction-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav { gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  .public-portal main { width: min(100% - 24px, 1440px); }
  .portal-two, .approval-form { grid-template-columns: 1fr; }
  .approval-note { grid-column: 1; }
  .reject-form { flex-direction: column; }
  .reject-form input { max-width: none; }
  .request-account-note { align-items: flex-start; flex-direction: column; gap: 4px; }
  .android-access-card { padding: 22px 18px; border-radius: 17px; }
  .android-access-intro { align-items: flex-start; }
  .android-app-mark { flex-basis: 48px; width: 48px; height: 48px; border-radius: 13px; }
  .android-download-panel, .android-security-strip { align-items: stretch; flex-direction: column; }
  .android-download-panel .button { width: 100%; min-width: 0; }
  .delete-confirmation form { grid-template-columns: 1fr; }
  .delete-confirmation label { grid-column: 1; }
  .delete-actions button { width: 100%; }
  .result-details { grid-template-columns: 1fr; }
  .result-times { text-align: left; }
  .feedback-grid-compact { grid-template-columns: 1fr; }
}

/* Authenticated application shell */
body.app-authenticated {
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% -8%, rgba(54, 78, 65, .18), transparent 34%),
    linear-gradient(145deg, #0a0e0c, #080b0a 58%, #0b0e10);
}
.app-frame { position: relative; display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  padding: 22px 16px 16px;
  border-right: 1px solid #27312c;
  background:
    radial-gradient(circle at 0 0, rgba(55, 83, 67, .16), transparent 34%),
    rgba(7, 11, 9, .96);
  box-shadow: 18px 0 60px rgba(0,0,0,.16);
  backdrop-filter: blur(18px);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px 18px; border-bottom: 1px solid #27302c; }
.sidebar-brand img { width: 134px; height: 39px; object-fit: contain; }
.sidebar-brand span { padding-left: 10px; border-left: 1px solid #344038; color: #758078; font-family: var(--font-mono); font-size: 8px; font-weight: 500; letter-spacing: .14em; }
.sidebar-nav { display: grid; grid-template-columns: 1fr; justify-content: normal; flex: 1 1 auto; gap: 16px; min-width: 0; min-height: 0; margin-top: 18px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { width: 0; height: 0; }
.sidebar-group { display: grid; gap: 4px; }
.sidebar-group-label { margin: 0 5px 7px; color: #5f6a63; font-family: var(--font-mono); font-size: 8.5px; font-weight: 500; letter-spacing: .16em; }
.sidebar-link {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  padding: 5px 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #929d96;
  font-size: 12px;
  font-weight: 620;
  transition: color .14s ease, background .14s ease, border-color .14s ease, transform .14s ease;
}
.sidebar-link i { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: #56625b; }
.sidebar-link i svg { width: 100%; height: 100%; }
.sidebar-link span { min-width: 0; overflow-wrap: anywhere; }
.sidebar-link:hover { border-color: #2b3730; background: rgba(255,255,255,.026); color: #e2e9e4; transform: translateX(2px); }
.sidebar-link.is-active {
  border-color: #3d5145;
  background: linear-gradient(90deg, rgba(42, 69, 52, .62), rgba(25, 36, 30, .62));
  color: #f0f5f1;
  box-shadow: inset 3px 0 var(--op), 0 8px 24px rgba(0,0,0,.13);
}
.sidebar-link.is-active i { color: var(--op-strong); }
.sidebar-profile {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  margin-top: auto;
  padding: 13px 10px 2px;
  border-top: 1px solid #28312d;
}
.sidebar-avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #45564c; border-radius: 11px; background: #17221c; color: #d8e5dc; font-size: 13px; font-weight: 800; }
.sidebar-profile p { display: grid; gap: 2px; min-width: 0; margin: 0; }
.sidebar-profile strong { overflow: hidden; color: #e4e9e6; font-size: 12px; text-overflow: ellipsis; }
.sidebar-profile small { overflow: hidden; color: #6f7b74; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile form { margin: 0; }
.sidebar-profile button { display: grid; place-items: center; width: 30px; min-height: 30px; padding: 0; border-color: transparent; background: transparent; color: #78847d; font-size: 15px; }
.sidebar-profile button svg { width: 17px; height: 17px; }
.sidebar-profile button:hover { border-color: #3a4640; background: #141a17; color: #fff; }
.app-stage { min-width: 0; }
.app-mobile-header { display: none; }
.app-main { width: min(100% - 64px, 1240px); margin: 0 auto; padding: 44px 0 72px; animation: page-content-enter .32s ease-out both; }

/* First page after sign-in */
.dashboard-home { display: grid; gap: 18px; }
.dashboard-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 4px; }
.dashboard-page-head h1 { margin: 5px 0 8px; font-size: clamp(30px, 4vw, 43px); letter-spacing: -.04em; }
.dashboard-page-head > div > p:last-child { margin: 0; color: #89958e; font-size: 13px; }
.system-online { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid #33443a; border-radius: 999px; background: #101914; color: #91a99a; font-size: 10px; white-space: nowrap; }
.system-online i { width: 6px; height: 6px; border-radius: 50%; background: #6fba88; box-shadow: 0 0 10px rgba(111,186,136,.62); animation: system-online-pulse 2.6s ease-in-out infinite; }
@keyframes system-online-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.client-access-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #303b35;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 10%, rgba(91, 131, 107, .16), transparent 36%),
    linear-gradient(145deg, rgba(25,32,28,.98), rgba(10,14,12,.99));
  box-shadow: 0 32px 100px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.035);
}
.client-access-hero.is-android { border-color: #35423a; background: radial-gradient(circle at 88% 8%, rgba(71,129,89,.22), transparent 36%), linear-gradient(145deg,#18221c,#0a0f0c 65%); }
.client-access-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(32px, 6vw, 64px); }
.client-role-line { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; padding: 7px 10px; border: 1px solid #3a4840; border-radius: 999px; background: rgba(8,13,10,.48); color: #9aaba0; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }
.client-platform-dot { width: 6px; height: 6px; border-radius: 50%; background: #76aa88; box-shadow: 0 0 10px rgba(118,170,136,.52); }
.client-access-copy h2 { margin: 7px 0 14px; font-size: clamp(38px, 6vw, 62px); letter-spacing: -.055em; }
.client-access-copy > p:not(.eyebrow) { max-width: 610px; margin: 0; color: #9ba69f; font-size: 14px; line-height: 1.65; }
.client-version-line { display: flex; align-items: center; gap: 10px; margin-top: 30px; color: #717d76; font-size: 10.5px; }
.client-version-line strong { color: #bdc9c1; font-size: 10px; letter-spacing: .12em; }
.client-version-line strong::after { content: ""; display: inline-block; width: 1px; height: 12px; margin-left: 10px; background: #354038; vertical-align: middle; }
.client-download-action { min-width: 260px; min-height: 50px; margin-top: 12px; }
.client-access-visual { position: relative; display: grid; place-content: center; justify-items: center; overflow: hidden; border-left: 1px solid rgba(52,64,57,.66); background: linear-gradient(145deg,rgba(22,31,26,.55),rgba(7,11,9,.35)); }
.client-visual-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(83,142,104,.18); filter: blur(70px); }
.client-device { position: relative; z-index: 1; display: grid; place-items: center; border: 1px solid #53665b; background: linear-gradient(145deg,#1d2b23,#0c130f); box-shadow: 0 32px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.06); transform: perspective(700px) rotateY(-8deg) rotateX(3deg); }
.client-device.desktop { width: 224px; height: 138px; border-radius: 12px; }
.client-device.desktop::before { content: ""; position: absolute; bottom: -25px; width: 70px; height: 25px; border-top: 18px solid #26352d; border-right: 10px solid transparent; border-left: 10px solid transparent; }
.client-device.desktop::after { content: ""; position: absolute; bottom: -31px; width: 122px; height: 7px; border-radius: 6px; background: #39473f; }
.client-device.phone { width: 132px; height: 242px; border-radius: 24px; }
.client-device.phone::before { content: ""; position: absolute; top: 8px; width: 38px; height: 4px; border-radius: 4px; background: #526259; }
.client-device i { position: absolute; inset: 13px; border-radius: 7px; background: radial-gradient(circle at 50% 24%,rgba(83,135,101,.24),transparent 44%),#0a100c; }
.client-device.phone i { border-radius: 15px; }
.client-device-logo { position: relative; z-index: 1; width: 68%; filter: drop-shadow(0 0 22px rgba(144,190,160,.4)); }
.client-access-visual > small { position: relative; z-index: 1; margin-top: 42px; color: #617068; font: 8.5px var(--font-mono); letter-spacing: .18em; }
.admin-quick-section { margin-top: 8px; }
.dashboard-section-head h2 { margin: 5px 0 14px; font-size: 23px; }
.admin-quick-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.admin-quick-grid > a { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 88px; padding: 16px; border: 1px solid #2d3732; border-radius: 12px; background: linear-gradient(145deg,#121815,#0d110f); color: #e0e7e2; transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.admin-quick-grid > a:hover { border-color: #46584e; background: #141c17; transform: translateY(-2px); }
.quick-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #3b4941; border-radius: 9px; color: #819087; font: 9px var(--font-mono); }
.admin-quick-grid p { display: grid; gap: 3px; margin: 0; }
.admin-quick-grid strong { font-size: 12.5px; }
.admin-quick-grid small { color: #748078; font-size: 9.5px; }
.admin-quick-grid b { color: #91a198; font-size: 13px; }
.workspace-admin-action { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 17px 20px; border: 1px solid #35443b; border-radius: 12px; background: #111914; color: #e6ece8; }
.workspace-admin-action > span { color: #789084; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.workspace-admin-action p { display: grid; gap: 3px; margin: 0; }
.workspace-admin-action small { color: #7e8b83; font-size: 10px; }
.password-settings-card { overflow: hidden; border: 1px solid #2d3732; border-radius: 13px; background: rgba(12,17,14,.72); }
.password-settings-card > summary { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.password-settings-card > summary::-webkit-details-marker { display: none; }
.password-summary-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #39463f; border-radius: 10px; color: #87948c; letter-spacing: .08em; }
.password-settings-card summary p { display: grid; gap: 3px; margin: 0; }
.password-settings-card summary strong { color: #dfe6e1; font-size: 12.5px; }
.password-settings-card summary small { color: #758078; font-size: 10px; }
.password-settings-card summary b { color: #9caaa2; font-size: 10.5px; }
.password-settings-card[open] > summary { border-bottom: 1px solid #29332e; }
.password-settings-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 12px; align-items: end; padding: 18px; }
.password-settings-form label { margin-bottom: 6px; }
.password-settings-form input { height: 44px; background: #090e0b; }
.password-settings-form button { min-height: 44px; white-space: nowrap; }
.dashboard-security-note { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 5px; color: #6f7b74; font-size: 10px; }
.dashboard-security-note p { margin: 0; }

@media (max-width: 1100px) {
  .app-frame { grid-template-columns: 226px minmax(0,1fr); }
  .app-main { width: min(100% - 40px,1240px); }
  .client-access-hero { grid-template-columns: minmax(0,1fr) 280px; }
  .password-settings-form { grid-template-columns: 1fr 1fr; }
  .password-settings-form button { width: 100%; }
}
@media (max-width: 900px) {
  .app-frame { display: block; }
  .app-sidebar { position: static; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; width: 100%; height: auto; padding: 9px 12px; border-right: 0; border-bottom: 1px solid #2b3530; }
  .sidebar-brand { min-height: 0; padding: 0 12px 0 0; border: 0; }
  .sidebar-brand img { width: 112px; height: 36px; }
  .sidebar-brand span, .sidebar-group-label, .sidebar-profile p, .sidebar-avatar { display: none; }
  .sidebar-nav { display: flex; gap: 6px; margin: 0; overflow-x: auto; }
  .sidebar-group { display: flex; gap: 4px; }
  .sidebar-link { display: flex; min-height: 36px; padding: 5px 10px; white-space: nowrap; }
  .sidebar-link i { display: none; }
  .sidebar-link:hover { transform: none; }
  .sidebar-profile { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0 0 0 8px; border: 0; }
  .sidebar-preview-form { top: calc(100% + 8px); bottom: auto; left: auto; right: 0; width: 220px; }
  .app-mobile-header { display: none; }
  .app-main { width: min(100% - 28px,1240px); padding-top: 28px; }
  .client-access-hero { grid-template-columns: 1fr; }
  .client-access-visual { min-height: 280px; border-top: 1px solid rgba(52,64,57,.66); border-left: 0; }
  .admin-quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .dashboard-page-head { align-items: flex-start; flex-direction: column; }
  .client-access-copy { padding: 28px 22px 34px; }
  .client-access-copy h2 { font-size: 38px; }
  .client-download-action { width: 100%; min-width: 0; }
  .client-access-visual { min-height: 250px; }
  .client-device.desktop { width: 190px; height: 118px; }
  .password-settings-card > summary { grid-template-columns: 38px minmax(0,1fr); }
  .password-settings-card summary b { display: none; }
  .password-settings-form { grid-template-columns: 1fr; }
  .workspace-admin-action { grid-template-columns: 1fr auto; }
  .workspace-admin-action > span { grid-column: 1 / 3; }
}

/* Two-stage account verification */
.responsible-link-panel { margin: 0 0 1.25rem; padding: 1.25rem; display: grid; gap: 1rem; border: 1px solid rgba(104,211,145,.28); border-radius: 20px; background: linear-gradient(135deg,rgba(31,76,54,.38),rgba(14,18,20,.94)); box-shadow: 0 22px 60px rgba(0,0,0,.22); }
.responsible-link-panel h2 { margin: .1rem 0 .35rem; }
.responsible-link-panel p { margin: 0; color: var(--muted); }
.responsible-link-actions { display: grid; grid-template-columns: minmax(240px,1fr) auto auto; gap: .65rem; }
.responsible-link-actions input { min-width: 0; font-family: var(--font-mono); }
.request-card-awaiting { border-color: rgba(204,168,90,.24); }
.request-stage-actions { display: flex; gap: .7rem; align-items: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.request-stage-actions .reject-form { flex: 1 1 420px; margin: 0; }
.responsible-confirmed-badge { display: inline-flex; width: fit-content; margin-top: .85rem; padding: .45rem .7rem; border: 1px solid rgba(104,211,145,.25); border-radius: 999px; color: #bceccc; background: rgba(43,99,66,.18); font-size: .82rem; font-weight: 700; }
.responsible-confirm-page { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 3rem 1rem; }
.responsible-confirm-card { width: min(680px,100%); padding: clamp(1.5rem,5vw,3.5rem); border: 1px solid rgba(150,168,175,.2); border-radius: 28px; background: radial-gradient(circle at 100% 0,rgba(78,128,105,.16),transparent 42%),#101416; box-shadow: 0 34px 90px rgba(0,0,0,.38); }
.responsible-confirm-card h1 { margin: .35rem 0 .75rem; font-size: clamp(2rem,6vw,3.5rem); letter-spacing: -.045em; }
.responsible-confirm-card > p:not(.eyebrow):not(.form-note) { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.responsible-confirm-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 1.4rem; border: 1px solid rgba(139,168,154,.3); border-radius: 18px; color: #d8ebdf; background: rgba(75,119,96,.18); font-weight: 800; }
.responsible-confirm-icon.is-success { color: #a8e9be; border-color: rgba(104,211,145,.35); }
.responsible-confirm-icon.is-invalid { color: #efaca5; border-color: rgba(222,104,91,.32); }
.responsible-request-summary { display: grid; gap: 0; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.responsible-request-summary div { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.responsible-request-summary div:last-child { border-bottom: 0; }
.responsible-request-summary dt { color: var(--muted); }
.responsible-request-summary dd { margin: 0; font-weight: 700; }
.responsible-confirm-button { width: 100%; min-height: 54px; }
.responsible-confirm-note { margin-top: 1.4rem; padding: 1rem; border-radius: 14px; color: #b9c6c9; background: rgba(255,255,255,.035); line-height: 1.55; }
@media (max-width: 760px) {
  .responsible-link-actions { grid-template-columns: 1fr; }
  .responsible-request-summary div { grid-template-columns: 1fr; gap: .25rem; }
}

/* Unified authenticated experience: global preview, responsive navigation and mobile cards */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }
.app-authenticated { background: radial-gradient(circle at 75% -10%, rgba(49,86,67,.18), transparent 34%), #080b0a; }
.app-sidebar { overflow-x: hidden; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-width: 0; }
.sidebar-close { display: none; width: 38px; min-height: 38px; padding: 0; border-color: #36423c; background: #131917; font-size: 22px; }
.sidebar-preview-control > summary {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #78847d;
  cursor: pointer;
  list-style: none;
}
.sidebar-preview-control > summary::-webkit-details-marker { display: none; }
.sidebar-preview-control > summary:hover { background: #141a17; color: #fff; }
.sidebar-preview-control[open] > summary { background: #141a17; color: #fff; }
.sidebar-preview-control > summary i, .sidebar-preview-control > summary svg { width: 17px; height: 17px; }
.sidebar-preview-form {
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  left: 8px;
  right: 8px;
  display: grid;
  gap: 3px;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #2b342f;
  border-radius: 10px;
  background: rgba(13,16,14,.96);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
}
.sidebar-preview-form label { color: #6b7670; font-size: 8px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-preview-form select { width: 100%; min-width: 0; min-height: 30px; padding: 4px 26px 4px 8px; border-color: #354039; background-color: #0d1210; font-size: 10px; text-overflow: ellipsis; }
.global-preview-banner { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px max(22px,calc((100vw - 258px - 1240px)/2 + 32px)); border-bottom: 1px solid #5d5031; background: rgba(31,27,16,.96); box-shadow: 0 10px 30px rgba(0,0,0,.22); backdrop-filter: blur(16px); }
.global-preview-banner > span { color: #d0ae62; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.global-preview-banner > strong { color: #f0e3bc; font-size: 12px; }
.global-preview-banner > small { overflow: hidden; color: #a89d7e; text-overflow: ellipsis; white-space: nowrap; }
.global-preview-banner form { margin: 0; }
.global-preview-banner button { min-height: 34px; padding: 6px 11px; border-color: #77633b; background: transparent; color: #dfc984; font-size: 10px; }
.sidebar-backdrop { display: none; }
.mobile-menu-button { display: grid; gap: 4px; width: 42px; min-height: 42px; padding: 11px; border-color: #39463f; background: #111713; }
.mobile-menu-button i { display: block; width: 100%; height: 1px; background: #c7d2ca; }

.app-main > .page-heading:first-child, .dashboard-page-head { margin-bottom: 24px; }
.page-heading { gap: 20px; padding: 0 0 22px; border-bottom: 1px solid rgba(66,79,72,.56); }
.page-heading h1, .dashboard-page-head h1 { font-size: clamp(30px,4vw,48px); letter-spacing: -.045em; }
.page-heading .muted { max-width: 760px; line-height: 1.65; }
.heading-actions { align-items: center; flex-wrap: wrap; }
.heading-actions > *, .heading-actions form { min-width: 0; }
.card { padding: clamp(18px,2.2vw,28px); border-color: #2e3933; border-radius: 18px; background: linear-gradient(150deg,rgba(20,26,23,.98),rgba(12,16,14,.98)); box-shadow: 0 18px 55px rgba(0,0,0,.16); }
.section-heading { gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin-top: 3px; font-size: clamp(20px,2.4vw,28px); letter-spacing: -.025em; }
.metric { min-width: 0; border-radius: 15px; background: linear-gradient(145deg,#131a17,#0e1311); }
.workspace-card, .user-card, .request-card, .result-card, .feedback-card { min-width: 0; border-radius: 16px; box-shadow: 0 14px 36px rgba(0,0,0,.12); }
.button, button { min-height: 42px; border-radius: 10px; }
input, select, textarea { min-height: 42px; border-radius: 10px; }
textarea { min-height: 92px; }
.table-wrap { max-width: 100%; border: 1px solid #2d3732; border-radius: 14px; }
.table-wrap table { margin: 0; }
.releases-table { min-width: 0; table-layout: auto; }
.release-hash, code { overflow-wrap: anywhere; word-break: break-word; }
.responsible-profile-card { background: radial-gradient(circle at 100% 0,rgba(64,111,81,.16),transparent 38%),linear-gradient(145deg,#141b17,#0d1210); }
.responsible-profile-form, .assign-responsible-form { display: grid; grid-template-columns: minmax(180px,1fr) minmax(210px,1fr) auto; gap: 12px; align-items: end; }
.responsible-profile-form > div, .assign-responsible-form > div { min-width: 0; }
.assign-responsible-form { grid-template-columns: minmax(240px,1fr) auto; margin-top: 14px; padding: 14px; border: 1px solid #333e38; border-radius: 12px; background: rgba(255,255,255,.018); }
.responsible-status { display: inline-flex; align-items: center; padding: 7px 10px; border: 1px solid rgba(99,184,129,.28); border-radius: 999px; background: rgba(55,116,76,.13); color: #a9d9b9; font-size: 10px; font-weight: 800; }
.responsible-status.is-incomplete { border-color: rgba(203,164,82,.3); color: #d4b66f; background: rgba(120,86,34,.12); }
.deletion-request-form { display: grid; grid-template-columns: minmax(180px,1fr) auto; gap: 8px; width: 100%; padding-top: 8px; border-top: 1px solid #2d3732; }
.deletion-requests-card { border-color: rgba(170,87,76,.28); background: radial-gradient(circle at 100% 0,rgba(128,54,46,.13),transparent 36%),linear-gradient(145deg,#181514,#100f0e); }
.deletion-review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.deletion-review-actions form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; min-width: 0; }
.account-module-summary { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #2b3530; }
.account-module-summary > span { color: #76827b; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.account-module-summary > div { display: flex; flex-wrap: wrap; gap: 6px; }
.module-badge { display: inline-flex; padding: 5px 8px; border: 1px solid #38483f; border-radius: 999px; background: rgba(62,104,78,.13); color: #b6cabd; font-size: 9px; font-weight: 700; }
.account-settings-panel { margin: 8px 0 4px; border: 1px solid #334039; border-radius: 13px; background: rgba(255,255,255,.018); }
.account-settings-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; }
.account-settings-panel > summary::-webkit-details-marker { display: none; }
.account-settings-panel > summary strong { font-size: 12px; }
.account-settings-panel > summary span { color: #748078; font-size: 10px; }
.account-settings-form { display: grid; gap: 14px; padding: 0 14px 14px; border-top: 1px solid #2d3832; }
.account-phone-field { padding-top: 14px; }
.account-settings-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.account-settings-form legend { margin-bottom: 9px; color: #8b978f; font-size: 10px; font-weight: 800; }
.account-module-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.account-module-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 42px; padding: 9px 10px; border: 1px solid #303b35; border-radius: 10px; background: #0e1311; color: #c4cec7; font-size: 10px; }
.account-module-option input { flex: 0 0 auto; width: 17px; min-height: 17px; accent-color: #719e81; }
.responsible-confirmed-badge.is-direct { border-color: rgba(105,151,190,.3); background: rgba(49,88,121,.15); color: #b6d3e8; }
.server-account-grid { margin-top: 18px; }
.server-account-card { align-content: start; }
.account-delete-control { width: 100%; margin-top: 10px; }
.account-delete-control > summary { width: 100%; justify-content: center; }
.protected-account-note { display: grid; gap: 4px; margin-top: 10px; padding: 12px; border: 1px solid #3a4034; border-radius: 11px; background: rgba(107,91,47,.09); }
.protected-account-note strong { color: #d4c28f; font-size: 10px; }
.protected-account-note span { color: #877f69; font-size: 9.5px; line-height: 1.5; }

@media (max-width: 1100px) {
  .global-preview-banner { padding-inline: 20px; }
  .result-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .app-frame { display: block; min-height: 100vh; }
  .app-stage { width: 100%; }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 100; display: flex; flex-direction: column; width: min(92vw,310px); max-width: 100%; height: 100dvh; padding: 14px 14px 12px; overflow: hidden; border-right: 1px solid #354039; border-bottom: 0; background: rgba(10,14,12,.985); box-shadow: 28px 0 70px rgba(0,0,0,.48); transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-brand-row { flex: 0 0 auto; padding: 0 2px 12px; border-bottom: 1px solid #29332e; }
  .sidebar-brand { display: flex; flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 0; border: 0; }
  .sidebar-brand img { width: 122px; height: 38px; }
  .sidebar-brand span { display: block; }
  .sidebar-close { display: inline-grid; place-items: center; flex: 0 0 auto; }
  .sidebar-nav { display: grid; grid-template-columns: 1fr; justify-content: normal; flex: 1 1 auto; gap: 14px; min-width: 0; min-height: 0; margin-top: 14px; padding-right: 2px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .sidebar-group { display: grid; min-width: 0; gap: 3px; }
  .sidebar-group-label { display: block; }
  .sidebar-link { display: grid; grid-template-columns: 27px minmax(0,1fr); min-width: 0; min-height: 40px; padding: 7px 5px; white-space: normal; }
  .sidebar-link i { display: grid; }
  .sidebar-profile { display: grid; flex: 0 0 auto; margin-top: 10px; padding: 11px 4px 0; border-top: 1px solid #29332e; }
  .sidebar-profile p { display: grid; }
  .sidebar-avatar { display: grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: rgba(0,0,0,.62); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-open .sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .app-mobile-header { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 62px; padding: 9px 14px; border-bottom: 1px solid #2d3732; background: rgba(9,13,11,.94); backdrop-filter: blur(18px); }
  .app-mobile-header a { display: flex; justify-content: center; }
  .app-mobile-header img { width: 118px; height: 36px; object-fit: contain; }
  .app-mobile-header > span { max-width: 120px; overflow: hidden; color: #849087; font-size: 9px; font-weight: 800; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
  .global-preview-banner { position: relative; top: auto; grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; padding: 10px 14px; }
  .global-preview-banner > span { grid-column: 1; }
  .global-preview-banner > strong { grid-column: 1; }
  .global-preview-banner > small { display: none; }
  .global-preview-banner form { grid-column: 2; grid-row: 1 / 3; }
  .app-main { width: min(100% - 28px,1240px); padding: 26px 0 56px; }
}

@media (max-width: 700px) {
  .app-main { width: min(100% - 22px,1240px); padding-top: 20px; }
  .page-heading, .dashboard-page-head { align-items: stretch; flex-direction: column; padding-bottom: 18px; }
  .page-heading h1, .dashboard-page-head h1 { font-size: clamp(28px,10vw,39px); }
  .heading-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .heading-actions > *, .heading-actions form, .heading-actions .button, .heading-actions button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading .heading-actions { width: 100%; }
  .card { padding: 17px; border-radius: 15px; }
  .metric-grid, .admin-quick-grid, .workspace-grid, .user-grid, .catalog-columns, .correction-grid, .result-details { grid-template-columns: 1fr; }
  .release-form, .feedback-review, .approval-form, .responsible-profile-form, .assign-responsible-form, .deletion-request-form, .deletion-review-actions, .deletion-review-actions form { grid-template-columns: 1fr; }
  .release-form button, .feedback-review button, .approval-form button, .responsible-profile-form button, .assign-responsible-form button { width: 100%; }
  .user-card-actions, .request-stage-actions, .delete-actions { align-items: stretch; flex-direction: column; }
  .user-card-actions > *, .user-card-actions form, .request-stage-actions > *, .request-stage-actions form { width: 100%; }
  .password-form input, .password-form button { width: 100%; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .table-wrap table, .table-wrap tbody { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tbody { display: grid; gap: 12px; }
  .table-wrap tbody tr { display: grid; gap: 0; width: 100%; padding: 7px 13px; border: 1px solid #303a35; border-radius: 14px; background: linear-gradient(145deg,#131916,#0e1210); }
  .table-wrap tbody td { display: grid; grid-template-columns: minmax(92px,.42fr) minmax(0,1fr); align-items: start; gap: 12px; width: 100% !important; min-width: 0; padding: 10px 0; border-bottom: 1px solid #29322e; overflow-wrap: anywhere; text-align: left; white-space: normal; }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td::before { content: attr(data-label); color: #748078; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
  .table-wrap tbody td.actions { display: grid; }
  .table-wrap tbody td.actions form, .table-wrap tbody td.actions button { width: 100%; }
  .account-module-options { grid-template-columns: 1fr; }
  .account-settings-panel > summary { align-items: flex-start; flex-direction: column; }
  .client-access-copy h2 { overflow-wrap: anywhere; }
}

@media (max-width: 430px) {
  .app-mobile-header { grid-template-columns: 42px minmax(0,1fr); }
  .app-mobile-header > span { display: none; }
  .app-mobile-header a { justify-content: flex-end; }
  .app-main { width: min(100% - 18px,1240px); }
  .card { padding: 15px; }
  .table-wrap tbody td { grid-template-columns: 1fr; gap: 5px; }
  .portal-access-card { padding-inline: 14px; }
}

/* Comfort pass: live password-match hint, safer wrapping on dense action rows, copy buttons. */
.password-match-hint { display: block; margin-top: 6px; font-size: 12px; min-height: 15px; }
.password-match-hint.is-match { color: var(--ok); }
.password-match-hint.is-mismatch { color: var(--bad); }

.user-card-actions { flex-wrap: wrap; }
.user-card-actions form { flex-wrap: wrap; }

.mono { font-family: var(--font-mono); }
.copy-value-button { font-family: var(--font-mono); font-size: 11px; }
.code-with-copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.code-with-copy code { overflow: hidden; text-overflow: ellipsis; }

button:disabled, .button:disabled { opacity: .6; cursor: progress; }

.result-details div:hover { border-top-color: var(--line); border-right-color: var(--line); border-bottom-color: var(--line); }

/* Readability + scannability pass: base line-height and light visual grouping for the
   densest field grid (FireResults) so related values read as one glance, not ten. Card
   hover feedback lives in one place now -- see the .workspace-card/.user-card/... block
   near .card above; a second, weaker hover rule used to sit here and silently win the
   cascade over it because it came later in the file. */
body { line-height: 1.5; }

.result-details div:nth-child(-n+4) { border-left: 2px solid #334d61; }
.result-details div:nth-child(n+5):nth-child(-n+6) { border-left: 2px solid #4a5a3d; }
.result-details div:nth-child(n+7) { border-left: 2px solid #5c4b2e; }
