:root {
  --black: #0b0c0a;
  --ground: #0e100d;
  --surface: #141613;
  --surface-raised: #191c17;
  --surface-active: #20231e;
  --ink: #f4f6f0;
  --muted: #92998d;
  --muted-strong: #b6bcb1;
  --line: #292d26;
  --line-strong: #3b4137;
  --primary: #c6ff4a;
  --primary-hover: #d5ff79;
  --primary-soft: rgba(198, 255, 74, .09);
  --green: #c6ff4a;
  --green-soft: rgba(198, 255, 74, .09);
  --amber: #f5b942;
  --amber-soft: rgba(245, 185, 66, .1);
  --red: #ff5c66;
  --red-soft: rgba(255, 92, 102, .1);
  --font: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "PingFang SC", "Microsoft YaHei", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; background: var(--black); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
a { color: var(--primary-hover); }
::selection { background: var(--primary); color: var(--black); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { border: 2px solid var(--black); background: var(--line-strong); }

.eyebrow,
.section-index {
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Login */
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, .72fr);
  background: var(--black);
}
.login-brand {
  position: relative;
  min-height: 100vh;
  padding: clamp(30px, 4.4vw, 68px);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent calc(100% - 1px), var(--line) calc(100% - 1px)),
    var(--black);
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--black);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.brand-mark.small {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
}
.login-brand-head { display: flex; align-items: center; gap: 14px; }
.login-brand-head strong, .login-brand-head span { display: block; }
.login-brand-head strong { font-size: 13px; letter-spacing: .02em; }
.login-brand-head span { margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.login-hero { margin: auto 0; padding: clamp(62px, 9vh, 118px) 0; }
.login-brand .eyebrow { margin: 0 0 22px; }
.login-brand h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(56px, 6.6vw, 108px);
  font-weight: 700;
  line-height: .88;
  letter-spacing: -.075em;
}
.login-brand h1 span { color: var(--primary); }
.login-intro {
  max-width: 610px;
  margin: 34px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.8;
}
.boundary-list { margin: 0; border-top: 1px solid var(--line-strong); }
.boundary-list div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.boundary-list dt { color: var(--primary); font-weight: 700; }
.boundary-list dd { margin: 0; display: grid; grid-template-columns: minmax(120px, .5fr) 1fr; gap: 22px; line-height: 1.5; }
.boundary-list dd strong { color: var(--ink); font-size: 11px; }
.boundary-list dd span { color: var(--muted); font-size: 11px; }
.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 72px);
  background: var(--ground);
}
.login-card {
  width: min(100%, 430px);
  margin: 0;
  padding: clamp(28px, 3.2vw, 42px);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.login-card-status { min-height: 34px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); color: var(--muted-strong); font-size: 10px; letter-spacing: .06em; }
.login-card-status i { width: 7px; height: 7px; background: var(--primary); }
.login-portal-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface-raised); }
.login-portal-identity span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.login-portal-identity strong { color: var(--primary); font-size: 13px; }
.form-title { margin: 34px 0 30px; padding-top: 18px; border-top: 1px solid var(--primary); }
.form-title span { color: var(--muted); font-size: 11px; }
.form-title h2 { margin: 10px 0 0; font-size: 27px; letter-spacing: -.045em; }
.form-title p { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.login-audit-note { margin: 18px 0 0; color: var(--muted); font-size: 9px; text-align: center; }

.portal-entry-layout { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: var(--ground); }
.portal-entry-card { width: min(920px, 100%); padding: clamp(30px, 5vw, 64px); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.portal-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.portal-entry-head .sidebar-brand { padding: 0; }
.portal-entry-copy { margin: 50px 0 30px; }
.portal-entry-copy h1 { margin: 10px 0 12px; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.055em; }
.portal-entry-copy p { max-width: 650px; color: var(--muted-strong); line-height: 1.8; }
.portal-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portal-entry-option { display: grid; gap: 18px; min-height: 210px; padding: 28px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.portal-entry-option:hover, .portal-entry-option:focus-visible { transform: translateY(-3px); border-color: var(--primary); background: var(--surface-raised); outline: none; }
.portal-entry-option span { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.portal-entry-option strong { font-size: 26px; }
.portal-entry-option p { margin: 0; color: var(--muted); line-height: 1.7; }
.portal-entry-option b { margin-top: auto; font-size: 12px; }

/* Controls */
label { display: block; margin-bottom: 22px; }
label > span { display: block; margin-bottom: 8px; color: var(--muted-strong); font-size: 11px; font-weight: 700; }
label small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.55; }
input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--black);
  color: var(--ink);
  outline: none;
  padding: 11px 13px;
  transition: border-color .16s, background-color .16s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #63695f; }
input:hover, textarea:hover, select:hover { border-color: #50574a; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); background: #0c0e0b; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
input:disabled, textarea:disabled, select:disabled { background: var(--surface-active); color: var(--muted); }
input[type="file"] { padding: 8px; }
input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  color: var(--ink);
}
.form-error { min-height: 19px; margin: 2px 0 14px; color: var(--red); font-size: 11px; line-height: 1.5; }
.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 0;
  padding: 9px 16px;
  font-weight: 700;
  transition: background-color .16s, border-color .16s, color .16s;
}
.button.primary { border-color: var(--primary); background: var(--primary); color: var(--black); }
.button.primary:hover { border-color: var(--primary-hover); background: var(--primary-hover); color: var(--black); }
.button.quiet { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.button.quiet:hover { border-color: var(--muted-strong); background: var(--surface-active); }
.button.danger { border-color: var(--red); background: var(--red); color: #fff; }
.button.danger:hover { background: #ff737c; }
.button.full { width: 100%; }
.link-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--primary-hover);
}

/* Application frame */
.app-layout { min-height: 100vh; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--black);
  color: var(--ink);
}
.sidebar-brand {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
}
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { font-size: 14px; }
.sidebar-brand small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.main-nav {
  min-height: 0;
  padding: 18px 11px;
  display: grid;
  gap: 2px;
  overflow-y: auto;
}
.main-nav button {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 650;
}
.main-nav button span { color: #5e655a; font-size: 9px; letter-spacing: .08em; }
.main-nav button:hover { background: var(--surface); color: var(--ink); }
.main-nav button.active { border-left-color: var(--primary); background: var(--primary-soft); color: var(--ink); }
.main-nav button.active span { color: var(--primary-hover); }
.sidebar-foot {
  margin-top: auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
.sidebar-foot .link-button { color: var(--muted-strong); font-size: 11px; }
.role-badge { border: 1px solid var(--line-strong); padding: 5px 7px; color: var(--muted-strong); font-size: 9px; letter-spacing: .08em; }

.workspace { min-width: 0; padding: 0 clamp(20px, 3vw, 52px) 72px; background: var(--ground); }
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(14, 16, 13, .96);
}
.workspace-header h1 { margin: 5px 0 0; font-size: 26px; letter-spacing: -.045em; }
.workspace-header .eyebrow { margin: 0; }
.header-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; }
.system-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.system-chip i, .health-band-head i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--green); }
.panel { padding-top: 28px; }
.panel-head {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}
.panel-head > div:first-child { display: grid; grid-template-columns: 40px minmax(0, auto); gap: 5px 14px; }
.panel-head .section-index { grid-row: 1 / span 2; padding-top: 7px; }
.panel-head h2 { margin: 0; font-size: 27px; letter-spacing: -.045em; }
.panel-head p { grid-column: 2; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.head-actions { display: flex !important; grid-template-columns: none !important; gap: 9px !important; }

/* Overview health rail */
.health-band-head {
  min-height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--black);
  color: var(--muted);
  font-size: 10px;
}
.health-band-head > div { display: flex; align-items: center; gap: 9px; }
.health-band-head strong { color: var(--ink); font-size: 11px; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--primary);
  background: var(--black);
}
.metric {
  min-height: 162px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.metric:last-child { border-right: 0; }
.metric:hover { background: var(--surface-raised); }
.metric span { color: var(--muted); font-size: 10px; }
.metric strong { font-size: clamp(40px, 4.5vw, 68px); font-weight: 520; line-height: 1; letter-spacing: -.08em; }
.metric:first-child strong { color: var(--primary-hover); }
.metric small { color: var(--muted); font-size: 10px; line-height: 1.5; }

/* Shared cards */
.overview-columns, .split-sections { margin-top: 22px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.section-card { border: 1px solid var(--line); background: var(--surface); }
.packager-release-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 17px; }
.packager-release-form label { min-width: 0; margin: 0; }
.card-head {
  min-height: 64px;
  padding: 15px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--black);
}
.card-head > div { display: flex; align-items: center; gap: 13px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }
.card-head small { color: var(--muted); font-size: 10px; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { display: grid; gap: 6px; padding: 16px 17px; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list strong { font-size: 12px; }
.plain-list span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.activity-list, .record-list { min-height: 180px; }
.activity-row, .record-row {
  padding: 14px 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  border-bottom: 1px solid var(--line);
}
.activity-row:last-child, .record-row:last-child { border-bottom: 0; }
.activity-row:hover, .record-row:hover { background: var(--surface-raised); }
.activity-row strong, .record-row strong { min-width: 0; font-size: 12px; }
.activity-row > span, .record-row > span { color: var(--muted); font-size: 10px; }
.activity-row small, .record-row small { grid-column: 1 / -1; color: var(--muted); line-height: 1.5; }
.record-actions { display: inline-flex; flex-wrap: wrap; gap: 7px; margin-left: 8px; }

/* Data tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.table-wrap.borderless { border: 0; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td {
  padding: 14px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .14s; }
tbody tr:hover { background: var(--surface-raised); }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--black);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
td { color: var(--muted-strong); font-size: 11px; line-height: 1.55; }
td strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 12px; }
td > button:not(.button) { border: 0; border-bottom: 1px solid currentColor; padding: 1px 0; background: transparent; color: var(--primary-hover); font-size: 10px; }
.subtle { display: block; color: var(--muted); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); padding: 4px 7px; color: var(--muted-strong); font-size: 9px; }
.tag-domain { border-color: rgba(198, 255, 74, .42); background: var(--primary-soft); color: var(--primary-hover); }
.tag-ip { border-color: rgba(50, 213, 131, .42); background: var(--green-soft); color: #83e9b5; }
.status { display: inline-flex; align-items: center; gap: 7px; border: 1px solid currentColor; padding: 4px 7px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: currentColor; }
.status-active, .status-success, .status-published, .status-online, .status-replied { color: var(--green); }
.status-queued, .status-running, .status-draft, .status-reserved, .status-in_progress { color: var(--primary-hover); }
.status-suspended, .status-disabled, .status-expired, .status-offline, .status-cancelled, .status-closed { color: var(--muted); }
.status-revoked, .status-failed, .status-cancel_requested { color: var(--red); }
.status-beta, .status-open { color: var(--amber); }
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.row-actions button, .card-actions button {
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 5px 8px;
  background: var(--black);
  color: var(--muted-strong);
  font-size: 9px;
}
.row-actions button:hover, .card-actions button:hover { border-color: var(--primary); color: var(--ink); }
.row-actions button.danger-text, .danger-text { border-color: rgba(255, 92, 102, .48); color: var(--red); }
.progress { width: 130px; height: 6px; margin: 6px 0; border: 0; appearance: none; background: var(--line); }
.progress::-webkit-progress-bar { background: var(--line); }
.progress::-webkit-progress-value { background: var(--primary); }
.progress::-moz-progress-bar { background: var(--primary); }
.empty { margin: 0; padding: 64px 20px; color: var(--muted); text-align: center; font-size: 11px; }

/* Project and node cards */
.project-grid, .node-grid { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 14px; }
.project-service-codes { margin-top: 22px; }
.project-service-codes .card-head > div { display: grid; gap: 4px; }
.project-service-codes .card-head p { margin: 0; color: var(--muted); font-size: 10px; }
.project-service-codes code { color: var(--ink); font: 10px/1.5 var(--font); }
.project-card, .node-card {
  min-height: 270px;
  padding: 19px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .16s, background-color .16s;
}
.project-card:hover, .node-card:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.project-card header, .node-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-card h3, .node-card h3 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.04em; }
.project-card dl, .node-card dl { margin: 27px 0 0; display: grid; gap: 11px; }
.project-card dl div, .node-card dl div { display: grid; grid-template-columns: 88px 1fr; gap: 9px; font-size: 10px; line-height: 1.5; }
.project-card dt, .node-card dt { color: var(--muted); }
.project-card dd, .node-card dd { margin: 0; color: var(--muted-strong); overflow-wrap: anywhere; }
.card-actions { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 7px; }
.mother-sections { grid-template-columns: minmax(0, 1.6fr) minmax(300px, .4fr); }
.mother-packages-card { min-width: 0; }
.mother-packages-card table { min-width: 880px; }
.update-board {
  min-height: 360px;
  padding: clamp(28px, 6vw, 78px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--primary);
  background: var(--black);
  color: var(--ink);
}
.update-board h2 { max-width: 800px; margin: 18px 0 8px; font-size: clamp(32px, 5vw, 66px); letter-spacing: -.07em; }
.update-board p { max-width: 760px; color: var(--muted); line-height: 1.7; }
.boundary-note { padding: 17px; border-left: 3px solid var(--primary); background: var(--primary-soft); }
.boundary-note strong { display: block; margin-bottom: 7px; font-size: 12px; }
.boundary-note p { margin: 0; color: var(--muted-strong); font-size: 10px; line-height: 1.65; }

.quota-customer-summary {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}
.quota-customer-summary span { display: block; color: var(--muted); font-size: 10px; }
.quota-customer-summary strong { display: block; margin: 5px 0; font-size: 18px; }
.quota-customer-summary p { margin: 0; color: var(--muted-strong); font-size: 10px; line-height: 1.55; }
.quota-increase-grid { display: grid; gap: 12px; margin-bottom: 17px; }
.quota-increase-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); }
.quota-increase-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quota-increase-card > header strong { font-size: 13px; }
.quota-increase-card > header span { color: var(--primary); font-size: 10px; font-variant-numeric: tabular-nums; }
.quota-increase-card dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 12px; border: 1px solid var(--line); }
.quota-increase-card dl div { padding: 9px 11px; }
.quota-increase-card dl div + div { border-left: 1px solid var(--line); }
.quota-increase-card dt { color: var(--muted); font-size: 9px; }
.quota-increase-card dd { margin: 4px 0 0; color: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.quota-increase-card label { margin-bottom: 0; }
.quota-increase-card input[readonly] { cursor: not-allowed; opacity: .58; }
.quota-preview { min-height: 17px; margin: 7px 0 0; color: var(--muted-strong); font-size: 9px; }
.quota-topup-action { border-color: color-mix(in srgb, var(--primary) 55%, var(--line-strong)) !important; color: var(--primary) !important; }

/* Customer support */
.support-workspace {
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(300px, 35%) minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
}
.support-ticket-list { max-height: 720px; overflow-y: auto; border-right: 1px solid var(--line); }
.support-ticket {
  width: 100%;
  padding: 17px;
  display: grid;
  gap: 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.support-ticket:hover { background: var(--surface-raised); }
.support-ticket.active { box-shadow: inset 3px 0 var(--primary); background: var(--primary-soft); }
.support-ticket-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.support-ticket-top strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket > span:not(.support-ticket-top), .support-ticket small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.support-conversation { min-width: 0; display: flex; flex-direction: column; }
.support-conversation-head {
  min-height: 78px;
  padding: 15px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--black);
}
.support-conversation-head span { color: var(--muted); font-size: 10px; }
.support-conversation-head h3 { margin: 6px 0 0; font-size: 17px; }
.support-message-list { min-height: 340px; max-height: 480px; padding: 22px; overflow-y: auto; }
.support-message { max-width: 78%; margin: 0 0 18px; }
.support-message.customer { margin-left: auto; }
.support-message header { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 9px; }
.support-message p { margin: 0; padding: 13px 15px; border: 1px solid var(--line); background: var(--black); font-size: 11px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.support-message.customer p { border-color: rgba(198, 255, 74, .38); background: var(--primary-soft); }
.support-reply { margin-top: auto; padding: 17px 19px; border-top: 1px solid var(--line); background: var(--black); }
.support-reply > label { margin: 0; }
.support-reply-actions { margin-top: 12px; display: flex; align-items: flex-end; justify-content: flex-end; gap: 9px; }
.support-reply-actions label { width: 150px; margin: 0 auto 0 0; }
.support-reply-actions label span { margin-bottom: 5px; }

/* Dialogs */
dialog {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
}
dialog[open] { animation: modal-in .18s ease-out; }
dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(3px); }
.drawer {
  width: min(640px, 94vw);
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0 0 0 auto;
  border-width: 0 0 0 1px;
}
.drawer[open] { animation: drawer-in .22s ease-out; }
.drawer form, .drawer > section { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.drawer header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--black);
}
.drawer header h2 { margin: 5px 0 0; font-size: 23px; letter-spacing: -.045em; }
.drawer header button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted-strong);
}
.drawer header button:hover { border-color: var(--red); color: var(--red); }
.drawer header svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.drawer-body { overflow-y: auto; padding: 25px 22px; }
.drawer footer { padding: 15px 22px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: var(--black); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.check-grid label { margin: 0; padding: 12px; display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); }
.check-grid label:last-child { border-right: 0; }
.check-grid input, .check-row input { width: auto; min-height: auto; accent-color: var(--primary); }
.check-row label { display: flex; align-items: center; gap: 9px; }
.check-row label span { margin: 0; }
.modal { width: min(520px, calc(100vw - 32px)); }
.modal-body { padding: 28px; }
.modal-body h2 { margin: 14px 0 8px; font-size: 26px; letter-spacing: -.045em; }
.modal-body p { color: var(--muted); line-height: 1.65; }
.modal-actions { margin-top: 24px; padding-top: 17px; display: flex; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); }
.secret-value {
  display: block;
  margin: 22px 0;
  padding: 16px;
  border: 1px solid var(--primary);
  background: var(--black);
  color: var(--primary-hover);
  font: 12px/1.7 var(--font);
  overflow-wrap: anywhere;
}
.result-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font-size: 21px; font-weight: 800; }
.result-mark.error { border-color: var(--red); color: var(--red); }

@keyframes drawer-in {
  from { transform: translateX(26px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes modal-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid, .node-grid { grid-template-columns: repeat(2, minmax(250px, 1fr)); }
  .overview-columns, .split-sections { grid-template-columns: 1fr; }
  .header-meta > span:not(.system-chip) { display: none; }
}

@media (max-width: 820px) {
  .portal-entry-layout { padding: 18px; }
  .portal-entry-card { padding: 28px 22px; }
  .portal-entry-copy { margin: 36px 0 24px; }
  .portal-entry-grid { grid-template-columns: 1fr; }
  .portal-entry-option { min-height: 170px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-brand { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-hero { padding: 62px 0 18px; }
  .login-brand h1 { font-size: clamp(52px, 13vw, 84px); }
  .boundary-list { display: none; }
  .login-panel { min-height: auto; padding: 34px 20px 54px; }
  .login-card { width: min(100%, 520px); justify-self: center; }
  .app-layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { min-height: 68px; padding: 0 16px; }
  .main-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--line-strong);
    background: rgba(11, 12, 10, .98);
  }
  .main-nav button {
    width: auto;
    min-width: 102px;
    min-height: 64px;
    grid-template-columns: 1fr;
    gap: 4px;
    justify-items: center;
    border-left: 0;
    border-top: 2px solid transparent;
    padding: 8px 12px;
    text-align: center;
  }
  .main-nav button.active { border-top-color: var(--primary); }
  .sidebar-foot { position: absolute; top: 15px; right: 14px; margin: 0; padding: 0; border: 0; gap: 12px; }
  .role-badge { display: none; }
  .workspace { padding: 0 14px 104px; }
  .workspace-header { min-height: 78px; }
  .workspace-header h1 { font-size: 22px; }
  .panel-head { align-items: flex-end; }
  .panel-head h2 { font-size: 23px; }
  .project-grid, .node-grid { grid-template-columns: 1fr; }
  .mother-sections { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-brand { padding: 26px 22px 32px; }
  .brand-mark { width: 46px; height: 46px; }
  .login-hero { padding: 48px 0 8px; }
  .login-brand .eyebrow { margin-bottom: 18px; }
  .login-brand h1 { font-size: clamp(42px, 13vw, 64px); }
  .login-intro { margin-top: 24px; font-size: 12px; }
  .login-panel { padding: 24px 14px 38px; }
  .login-card { padding: 22px 18px; }
  .form-title { margin-top: 28px; }
  .workspace-header { gap: 12px; }
  .workspace-header .eyebrow { display: none; }
  .workspace-header h1 { margin: 0; }
  .system-chip { display: none; }
  .header-meta { margin-left: auto; }
  .panel { padding-top: 22px; }
  .panel-head { display: grid; min-height: auto; }
  .panel-head > div:first-child { grid-template-columns: 32px minmax(0, 1fr); }
  .panel-head p { font-size: 11px; }
  .panel-head > .button { width: 100%; }
  .head-actions { width: 100%; }
  .head-actions > * { flex: 1; }
  .health-band-head { padding: 0 12px; }
  .health-band-head > span { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 132px; padding: 14px; }
  .metric strong { font-size: 42px; }
  .overview-columns, .split-sections { gap: 14px; }
  .support-workspace { grid-template-columns: 1fr; }
  .support-ticket-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .support-message { max-width: 92%; }
  .support-reply-actions { align-items: stretch; flex-direction: column; }
  .support-reply-actions label, .support-reply-actions .button { width: 100%; }
  .table-wrap, .table-wrap.borderless { overflow: visible; border: 0; background: transparent; }
  table { min-width: 0; display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tbody tr { display: block; border: 1px solid var(--line); background: var(--surface); }
  tbody tr:hover { background: var(--surface); }
  tbody td {
    min-height: 43px;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 11px 12px;
  }
  tbody td:last-child { border-bottom: 0; }
  tbody td::before { content: attr(data-label); color: var(--muted); font-size: 9px; letter-spacing: .06em; }
  .row-actions { gap: 6px; }
  .field-pair { grid-template-columns: 1fr; gap: 0; }
  .packager-release-form { grid-template-columns: 1fr; }
  .packager-release-form .button { width: 100%; }
  .check-grid { grid-template-columns: 1fr; }
  .check-grid label { border-right: 0; border-bottom: 1px solid var(--line); }
  .check-grid label:last-child { border-bottom: 0; }
  .drawer { width: 100vw; }
  .drawer header, .drawer footer { padding-left: 16px; padding-right: 16px; }
  .drawer-body { padding: 22px 16px; }
  .drawer footer .button { flex: 1; }
  .modal-body { padding: 22px; }
  .modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .modal-actions .button { width: 100%; }
}

@media (max-width: 390px) {
  .workspace { padding-left: 10px; padding-right: 10px; }
  .sidebar-brand { padding-left: 12px; }
  .sidebar-brand small { display: none; }
  .metric strong { font-size: 38px; }
  .card-head { padding: 13px; }
  .activity-row, .record-row { padding: 13px; }
}
