:root {
  color-scheme: light;
  --bg: #0b1020;
  --bg-soft: #f3f7ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-muted: rgba(247, 249, 253, 0.92);
  --line: rgba(132, 149, 181, 0.22);
  --line-strong: rgba(132, 149, 181, 0.42);
  --text: #0f172a;
  --muted: #5b6780;
  --muted-strong: #334155;
  --accent: #387500;
  --accent-strong: #2d5f00;
  --accent-soft: rgba(56, 117, 0, 0.12);
  --accent-soft-strong: rgba(119, 188, 101, 0.18);
  --accent-bright: #77bc65;
  --accent-green: #00a933;
  --success: #0f9f6e;
  --warning: #d97706;
  --danger: #cf334a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 117, 0, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(0, 169, 51, 0.12), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 46%, #f7faff 100%);
}

a { color: inherit; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4, .metric-value { font-family: Roboto, "Helvetica Neue", Arial, sans-serif; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  background: rgba(8, 15, 32, 0.92);
  color: #f8fbff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: grid;
  gap: 6px;
}

.brand-logo-panel {
  width: 188px;
  max-width: 100%;
}

.brand-logo {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18));
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 700;
  color: #ffffff;
}

.brand .eyebrow {
  color: rgba(226, 232, 240, 0.82);
}


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

.sidebar .eyebrow,
.sidebar p,
.sidebar .sidebar-foot {
  color: rgba(226, 232, 240, 0.72);
}

.sidebar-section {
  display: grid;
  gap: 10px;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-legal a {
  color: rgba(241, 245, 249, 0.82);
  text-decoration: none;
}

.sidebar-legal a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: rgba(241, 245, 249, 0.86);
  border: 1px solid transparent;
  background: transparent;
  transition: 140ms ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-foot {
  font-size: 13px;
}

.main-shell {
  position: relative;
  isolation: isolate;
  padding: 28px;
  display: grid;
  gap: 22px;
  overflow: hidden;
}

.main-shell::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: min(64vw, 760px);
  aspect-ratio: 1;
  background: url("/static/assets/portal-bg-360.png") top right / contain no-repeat;
  opacity: 0.13;
  pointer-events: none;
  z-index: -1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar h1 {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.topbar-copy {
  max-width: 780px;
}

.topbar-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.topbar-copy p:empty {
  display: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-chip {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  text-align: right;
  min-width: 180px;
}

.user-chip strong {
  display: block;
  font-size: 14px;
}

.user-chip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.page {
  display: grid;
  gap: 22px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-header h2 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.card.soft {
  background: var(--surface-muted);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title h3,
.card-title h2 {
  margin: 0;
}

.metric-card {
  display: grid;
  gap: 12px;
}

.metric-card.highlight {
  background:
    linear-gradient(180deg, rgba(56, 117, 0, 0.12), rgba(255, 255, 255, 0.92)),
    var(--surface-strong);
  border-color: rgba(56, 117, 0, 0.18);
}

.metric-value {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 100%);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.hero-card {
  display: grid;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(56, 117, 0, 0.96), rgba(119, 188, 101, 0.88)),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.08));
  color: white;
}

.hero-card .eyebrow,
.hero-card p {
  color: rgba(255, 255, 255, 0.82);
}

.project-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  text-decoration: none;
  padding: 11px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--line);
  color: var(--muted-strong);
  font-weight: 600;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 14px 28px rgba(56, 117, 0, 0.22);
}

.project-card {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 14px;
}

.project-card:hover {
  transform: translateY(-1px);
  transition: 120ms ease;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-actions .primary-link,
.project-actions .secondary {
  min-height: 44px;
}

.project-actions a {
  text-decoration: none;
}

.tag,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted-strong);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.success { color: var(--success); background: rgba(15, 159, 110, 0.1); border-color: rgba(15, 159, 110, 0.16); }
.status-badge.warning { color: var(--warning); background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.16); }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.stack { display: grid; gap: 14px; }
.narrow { max-width: 460px; margin: 48px auto; }

label { display: grid; gap: 8px; color: var(--muted-strong); font-weight: 600; }

.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.help-popover {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(56, 117, 0, 0.12);
  border: 1px solid rgba(56, 117, 0, 0.28);
  color: var(--accent-strong);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  cursor: help;
}

.help-popover-content {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: min(300px, 78vw);
  transform: translateX(-50%) translateY(4px);
  padding: 12px 13px;
  border-radius: 8px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 20;
}

.help-popover:hover .help-popover-content,
.help-popover:focus .help-popover-content,
.help-popover:focus-within .help-popover-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

button,
.secondary,
.primary-link {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button,
.primary-link {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(56, 117, 0, 0.24);
}

.secondary {
  background: rgba(255,255,255,0.72);
  color: var(--muted-strong);
  border: 1px solid var(--line);
}

.error {
  color: var(--danger);
  background: rgba(207, 51, 74, 0.08);
  border-color: rgba(207, 51, 74, 0.16);
}

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

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}

th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(132, 149, 181, 0.14);
}

thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(248, 251, 255, 0.94);
}

tbody tr:hover td {
  background: rgba(56, 117, 0, 0.05);
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.surface-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.info-rail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 18px;
}

.mini-stat-list {
  display: grid;
  gap: 12px;
}

.mini-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
}

.mini-stat strong {
  font-size: 14px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 13px;
}

.section-stack {
  display: grid;
  gap: 18px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--line-strong);
}

.timeline-dot.done { background: var(--success); box-shadow: 0 0 0 6px rgba(15, 159, 110, 0.14); }

.document-list {
  display: grid;
  gap: 12px;
}

.document-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
}

.document-row strong {
  display: block;
  margin-bottom: 4px;
}

.concept-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.concept-sidebar {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
}

.concept-search span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.concept-toc {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.concept-toc-item {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: var(--muted-strong);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.concept-toc-item:hover {
  background: rgba(56, 117, 0, 0.08);
  border-color: var(--line);
}

.concept-toc-item.depth-1 { padding-left: 24px; }
.concept-toc-item.depth-2 { padding-left: 36px; }
.concept-toc-item.depth-3 { padding-left: 48px; }

.concept-number {
  color: var(--muted);
  min-width: 42px;
  font-weight: 700;
}

.concept-content {
  display: grid;
  gap: 18px;
}

.concept-chapter {
  scroll-margin-top: 24px;
  position: relative;
}

.concept-chapter.active-chapter {
  border-color: rgba(56, 117, 0, 0.28);
  box-shadow: 0 20px 50px rgba(56, 117, 0, 0.12);
}

.concept-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.concept-html {
  display: grid;
  gap: 14px;
  line-height: 1.7;
  color: var(--muted-strong);
}

.concept-html h1,
.concept-html h2,
.concept-html h3,
.concept-html h4 {
  color: var(--text);
}

.concept-html img,
.concept-html svg,
.concept-html table {
  max-width: 100%;
}

.concept-html table {
  display: block;
  overflow-x: auto;
}

.concept-visual-placeholder {
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(56,117,0,0.06), rgba(56,117,0,0.02));
  color: var(--muted);
  font-weight: 600;
}

.concept-rail-card {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
}

.concept-outline {
  display: grid;
  gap: 10px;
}

.outline-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
}

.outline-item strong {
  display: block;
  margin-bottom: 4px;
}

.outline-item span {
  color: var(--muted);
  font-size: 13px;
}

.chapter-kicker {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(56, 117, 0, 0.08);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.concept-toc-item.active {
  background: rgba(56, 117, 0, 0.12);
  border-color: rgba(56, 117, 0, 0.18);
  color: var(--accent-strong);
}

.sticky-actions {
  position: sticky;
  bottom: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: flex;
  gap: 10px;
  color: var(--muted-strong);
}

.is-hidden { display: none !important; }

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }
}

@media (max-width: 980px) {
  .grid.two,
  .grid.three,
  .split-panel,
  .concept-layout,
  .surface-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .concept-sidebar {
    position: static;
  }

  .info-rail,
  .concept-rail-card {
    position: static;
  }
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-stack {
  display: grid;
  gap: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  color: var(--muted-strong);
}

.check-row input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  accent-color: var(--accent);
}

.check-row.compact {
  gap: 8px;
  font-size: 13px;
}

.permission-box,
.permission-form {
  display: grid;
  gap: 10px;
}

.permission-form {
  min-width: 220px;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 13px;
}

.consent-box {
  border-color: rgba(56, 117, 0, 0.24);
}

.no-shadow {
  box-shadow: none;
  backdrop-filter: none;
}

.success-panel {
  border-color: rgba(15, 159, 110, 0.24);
  background: rgba(240, 253, 244, 0.86);
}

@media (max-width: 760px) {
  .form-grid.two-cols {
    grid-template-columns: 1fr;
  }
}

/* PORTAL CLEANUP 2026-05-07 */
:root {
  --bg-soft: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  --radius: 8px;
  --radius-sm: 6px;
}

body {
  background: #f5f7fb;
}

.main-shell {
  gap: 18px;
}

.topbar h1 {
  letter-spacing: 0;
}

.card,
.user-chip,
.tab,
input,
select,
textarea,
button,
.secondary,
.primary-link,
.table-wrap,
.document-row,
.mini-stat,
.status-badge,
.tag {
  border-radius: 8px;
}

.compact-header {
  align-items: flex-start;
}

.compact-header h2 {
  letter-spacing: 0;
}

.compact-card {
  padding: 18px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-strip > div,
.note-strip {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.summary-strip strong {
  font-size: 18px;
}

.project-list,
.people-workbench {
  display: grid;
  gap: 16px;
}

.people-workbench {
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
}

.project-card-head,
.section-heading,
.table-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.project-card-head h3,
.section-heading h3 {
  margin: 4px 0 0;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.area-link {
  display: grid;
  gap: 5px;
  padding: 14px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.area-link:hover,
.area-link.emphasis {
  border-color: rgba(56, 117, 0, 0.28);
  background: rgba(56, 117, 0, 0.07);
}

.area-link span {
  color: var(--muted);
  font-size: 13px;
}

.compact-meta {
  margin-top: 14px;
}

.permission-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 10px;
  background: var(--surface-muted);
}

.permission-panel legend {
  padding: 0 6px;
  color: var(--muted-strong);
  font-weight: 700;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-actions.vertical {
  display: grid;
}

.compact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(15, 159, 110, 0.24);
  border-radius: 8px;
  padding: 16px;
}

.note-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-strong);
}

@media (max-width: 980px) {
  .people-workbench,
  .compact-panel {
    grid-template-columns: 1fr;
  }
}


.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}

.admin-layout.wide {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.admin-side {
  display: grid;
  gap: 16px;
}

.rights-table-wrap table {
  min-width: 820px;
}

.rights-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .admin-layout,
  .admin-layout.wide {
    grid-template-columns: 1fr;
  }
}

.rights-list {
  display: grid;
  gap: 8px;
}

.rights-header,
.rights-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(5, minmax(74px, 0.45fr)) 104px;
  gap: 10px;
  align-items: center;
}

.rights-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0 10px 4px;
}

.rights-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 10px;
}

.rights-row label {
  justify-items: start;
}

.rights-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

@media (max-width: 860px) {
  .rights-header {
    display: none;
  }

  .rights-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.optional-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-muted);
}

.optional-fields summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--muted-strong);
}

.optional-fields[open] {
  display: grid;
  gap: 12px;
}

.minimal-entry-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f8fbff;
}

.minimal-entry form {
  margin: 0;
}

.entry-flow {
  width: min(1180px, calc(100vw - 36px));
  display: grid;
  gap: 28px;
  padding: 34px 0;
}

.entry-flow-header {
  text-align: center;
}

.entry-flow-header h1 {
  margin: 8px 0 8px;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.05;
}

.entry-flow-header p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.entry-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.entry-step {
  position: relative;
  min-height: 248px;
  padding: 38px 22px 22px;
  border: 1px solid rgba(132, 149, 181, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.step-number {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.step-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
}

.entry-step h2 {
  margin: 0 0 12px;
  font-size: 19px;
  line-height: 1.15;
}

.entry-step p {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.step-blue .step-number { background: #2563eb; }
.step-blue h2 { color: #1d4ed8; }
.step-blue .step-icon { background: rgba(37, 99, 235, 0.1); color: #2563eb; }

.step-green .step-number { background: #16a34a; }
.step-green h2 { color: #16a34a; }
.step-green .step-icon { background: rgba(22, 163, 74, 0.11); color: #16a34a; }

.step-orange .step-number { background: #f59e0b; }
.step-orange h2 { color: #ea8500; }
.step-orange .step-icon { background: rgba(245, 158, 11, 0.13); color: #ea8500; }

.entry-action {
  display: flex;
  justify-content: center;
  margin: 0;
}

.entry-action button {
  min-width: 220px;
}

@media (max-width: 980px) {
  .entry-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 28px;
  }
}

@media (max-width: 620px) {
  .entry-flow {
    width: min(100vw - 28px, 460px);
    padding: 24px 0;
  }

  .entry-flow-header h1 {
    font-size: 28px;
  }

  .entry-steps {
    grid-template-columns: 1fr;
  }
}

.address-street {
  grid-column: 1 / -1;
}

.address-locality {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.postal-code-field input {
  text-align: center;
}

@media (max-width: 760px) {
  .address-locality {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }
}

.consent-text {
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
  line-height: 1.55;
}

.consent-text h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}

.consent-text p {
  margin: 0;
  white-space: pre-line;
}
