:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #101010;
  --panel-2: #181818;
  --text: #f6f3ee;
  --muted: #b8b3aa;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #42a82a;
  --accent-strong: #7ed95c;
  --accent-soft: rgba(66, 168, 42, 0.2);
  --accent-line: rgba(126, 217, 92, 0.34);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, rgba(48, 144, 24, 0.18), transparent 22%, transparent 78%, rgba(126, 217, 92, 0.1)),
    #050505;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(5, 5, 5, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
}

.nav-cta {
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid var(--accent-line);
  border-radius: 4px;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 132px clamp(22px, 7vw, 96px) 80px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) contrast(1.04) brightness(0.6);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(48, 144, 24, 0.18) 0%, rgba(5, 5, 5, 0) 36%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.54) 46%, rgba(5, 5, 5, 0.18) 100%),
    linear-gradient(0deg, #050505 0%, rgba(5, 5, 5, 0) 42%);
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(180px, 300px);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  width: min(1120px, 100%);
}

.hero-text {
  min-width: 0;
}

.hero-logo-card {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: min(28vw, 290px);
  min-width: 190px;
  justify-self: end;
}

.hero-logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 52px rgba(0, 0, 0, 0.62));
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--accent-strong);
  color: #090909;
  box-shadow: 0 0 0 1px rgba(126, 217, 92, 0.22), 0 18px 50px rgba(66, 168, 42, 0.22);
}

.button.ghost {
  border: 1px solid var(--accent-line);
  color: var(--text);
}

.button.danger {
  border: 1px solid rgba(255, 130, 110, 0.55);
  background: rgba(150, 35, 24, 0.22);
  color: #ffd4cc;
}

.button.danger:hover {
  background: rgba(190, 52, 36, 0.32);
}

.form-card span,
.feature-grid span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.section,
.forms-grid,
.forms-note {
  padding: 92px clamp(22px, 7vw, 96px);
}

.section-heading {
  max-width: 760px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4.4rem);
  line-height: 1;
  text-wrap: balance;
}

h3 {
  margin: 18px 0 12px;
  font-size: 1.28rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 48px;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature-grid article {
  min-height: 280px;
  padding: 30px;
  background: var(--panel);
  border-top: 3px solid transparent;
}

.feature-grid article:hover {
  border-top-color: var(--accent);
}

.feature-grid p,
.form-card p,
.forms-hero p,
.forms-note p {
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.forms-hero {
  padding: 148px clamp(22px, 7vw, 96px) 56px;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.94), rgba(5, 5, 5, 0.62)),
    linear-gradient(90deg, rgba(48, 144, 24, 0.2), rgba(5, 5, 5, 0) 42%),
    url("/assets/forms-bg.png?v=20260717-deploy2") center / cover;
}

.forms-hero h1 {
  max-width: 10ch;
}

.forms-hero p {
  max-width: 680px;
  font-size: 1.08rem;
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.form-card {
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: 24px;
  background: linear-gradient(180deg, var(--panel), rgba(20, 34, 18, 0.78));
  border: 1px solid var(--accent-line);
  border-radius: 6px;
}

.form-card h2 {
  margin-top: 22px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.form-card p {
  flex: 1;
}

.forms-note {
  padding-top: 0;
}

.forms-note h2 {
  font-size: 1.6rem;
}

.footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px clamp(22px, 7vw, 96px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer img {
  width: 32px;
  height: 32px;
}

.footer p {
  margin-right: auto;
}

.footer a {
  color: var(--text);
  text-decoration: none;
}


.about-page {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 140px clamp(22px, 7vw, 96px) 86px;
  background:
    linear-gradient(90deg, rgba(48, 144, 24, 0.12), transparent 34%),
    #050505;
}

.about-content {
  width: min(980px, 100%);
}

.about-content h1 {
  max-width: 11ch;
}

.about-copy {
  display: grid;
  gap: 24px;
  max-width: 760px;
  margin-top: 38px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.62;
}

.about-copy p {
  margin: 0;
}
@media (max-width: 980px) {
  .feature-grid,
  .forms-grid {
    grid-template-columns: 1fr;
  }

  .forms-grid {
    padding-top: 40px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px;
    padding: 12px 18px;
  }

  .brand span {
    max-width: 170px;
    font-size: 0.72rem;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: rgba(12, 12, 12, 0.98);
    border: 1px solid var(--line);
    border-radius: 6px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px;
  }

  .hero {
    min-height: 92svh;
    padding: 110px 20px 44px;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.78), rgba(5, 5, 5, 0.86)),
      linear-gradient(0deg, #050505 0%, rgba(5, 5, 5, 0) 34%);
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-logo-card {
    width: min(58vw, 220px);
    min-width: 0;
    justify-self: start;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.15rem, 9.6vw, 3.55rem);
    line-height: 1.12;
    text-wrap: pretty;
  }

  h2 {
    font-size: clamp(1.8rem, 8vw, 2.75rem);
    line-height: 1.1;
  }

  .section,
  .forms-grid,
  .forms-note,
  .about-page {
    padding: 64px 20px;
  }

  .feature-grid article,
  .form-card {
    min-height: auto;
  }

  .forms-hero {
    padding: 120px 20px 44px;
  }

  .about-content h1 {
    max-width: 100%;
  }

  .about-copy {
    margin-top: 28px;
    font-size: 1.05rem;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer p {
    margin: 0;
  }
}
@media (max-width: 420px) {
  h1 {
    font-size: clamp(2rem, 9vw, 2.65rem);
    line-height: 1.16;
  }

  .hero-copy,
  .forms-hero p {
    font-size: 0.98rem;
  }

  .actions {
    gap: 10px;
  }

  .hero-logo-card {
    width: min(52vw, 170px);
  }

  .button {
    width: 100%;
  }
}
body.modal-open {
  overflow: hidden;
}

.upload-modal[hidden] {
  display: none;
}

.admin-login-screen[hidden],
.admin-dashboard[hidden],
.policy-detail-modal[hidden],
.notification-pane[hidden] {
  display: none !important;
}

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.upload-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.upload-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: clamp(24px, 5vw, 38px);
  background: #0d0d0d;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-dialog h2 {
  font-size: clamp(2rem, 7vw, 3.4rem);
}

.upload-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 1.5rem;
  cursor: pointer;
}

.upload-form,
.admin-login-form,
.policy-editor form,
.admin-upload-form,
.form-manager form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.upload-form label,
.admin-login-form label,
.policy-editor label,
.admin-upload-form label,
.form-manager label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.upload-form input,
.admin-login-form input,
.policy-editor input,
.admin-upload-form input,
.form-manager input,
.form-manager textarea,
.table-search {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.form-status[data-tone="error"] {
  color: #ffb4a8;
}

.form-status[data-tone="success"] {
  color: var(--accent-strong);
}

.admin-body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 18% 0%, rgba(126, 217, 92, 0.13), transparent 34%),
    linear-gradient(135deg, #050605 0%, #0b0d0b 52%, #050505 100%);
}

.admin-login-screen {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(32px, 5vw, 62px);
  min-height: 100svh;
  padding: clamp(20px, 4vw, 44px);
}

.admin-login-wrap {
  display: grid;
  align-content: center;
  width: min(640px, 100%);
  min-height: 68svh;
}

.admin-login-wrap h1 {
  max-width: none;
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 9vw, 6.2rem);
}

.admin-login-wrap > p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.admin-card {
  background: rgba(16, 17, 16, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.32);
}

.admin-login-form {
  width: min(460px, 100%);
  padding: 24px;
}

.admin-dashboard {
  min-height: 100svh;
}

.admin-dashboard-nav {
  position: sticky;
  top: 0;
  display: flex;
  z-index: 20;
  align-items: center;
  gap: 22px;
  padding: 16px clamp(18px, 4vw, 44px);
  background: rgba(7, 8, 7, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.admin-top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.admin-top-nav a,
.admin-top-nav button {
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  cursor: pointer;
  font: inherit;
}

.form-manager textarea {
  resize: vertical;
  min-height: 108px;
}

.admin-top-nav a:hover,
.admin-top-nav a[aria-current="page"],
.admin-top-nav button:hover,
.admin-top-nav button[aria-current="page"] {
  color: var(--text);
  background: rgba(126, 217, 92, 0.1);
}

.admin-signout {
  flex: 0 0 auto;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
}

.notification-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.notification-button i {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: #ff3128;
  border: 2px solid #070807;
  border-radius: 999px;
}

.notification-pane {
  position: fixed;
  top: 78px;
  right: clamp(16px, 4vw, 44px);
  z-index: 55;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100svh - 104px);
  overflow: auto;
  padding: 18px;
  background:
    radial-gradient(circle at 85% 0%, rgba(126, 217, 92, 0.14), transparent 32%),
    rgba(13, 15, 13, 0.98);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notification-pane-header {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 46px;
}

.notification-pane-header .eyebrow {
  margin-bottom: 8px;
}

.notification-pane-header h2 {
  font-size: 1.8rem;
}

.notification-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.notification-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.notification-item:hover,
.notification-item:focus {
  border-color: var(--accent-line);
  outline: none;
}

.notification-item.is-unread {
  background: rgba(126, 217, 92, 0.08);
  border-left-color: #ff3128;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-item strong {
  line-height: 1.35;
}

.admin-main {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px);
}

.admin-topbar h1 {
  max-width: none;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.admin-topbar,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-topbar {
  margin-bottom: 24px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-stat-card {
  display: grid;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(126, 217, 92, 0.06));
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-stat-card span,
.mini-chart b {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stat-card strong {
  font-size: clamp(2.2rem, 5vw, 3.3rem);
  line-height: 0.9;
}

.stat-bar {
  align-self: end;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.stat-bar i {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  border-radius: inherit;
  transition: width 220ms ease;
}

.stat-bar.quiet i {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.45), var(--accent));
}

.mini-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 64px;
}

.mini-chart span {
  display: grid;
  align-items: end;
  gap: 6px;
  min-width: 0;
  height: 64px;
}

.mini-chart i {
  display: block;
  height: var(--bar-height);
  min-height: 8px;
  background: linear-gradient(180deg, var(--accent-strong), rgba(126, 217, 92, 0.24));
  border-radius: 4px 4px 2px 2px;
}

.mini-chart b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 0.68rem;
}

.policy-editor {
  margin-bottom: 18px;
  padding: 20px;
}

.form-manager {
  margin-bottom: 18px;
  padding: 20px;
}

.policy-editor form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  margin-top: 0;
}

.form-manager form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  margin-top: 0;
}

.policy-editor input[type="hidden"],
.form-manager input[type="hidden"] {
  display: none;
}

.form-manager-wide,
.form-manager .form-status {
  grid-column: 1 / -1;
}

.toggle-label {
  align-self: end;
  display: flex !important;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.toggle-label input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent-strong);
}

.admin-form-actions {
  display: flex;
  gap: 10px;
}

.table-card {
  overflow: hidden;
}

.table-toolbar {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar h2 {
  font-size: 1.45rem;
  line-height: 1.1;
}

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

.table-search {
  max-width: 320px;
}

.policy-table {
  display: grid;
}

.managed-form-list {
  display: grid;
}

.managed-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.managed-form-row:last-child {
  border-bottom: 0;
}

.managed-form-meta {
  min-width: 0;
}

.managed-form-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.managed-form-meta strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.08rem;
}

.managed-form-meta p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.managed-form-meta a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
}

.policy-row {
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.policy-row:hover,
.policy-row:focus {
  background: rgba(126, 217, 92, 0.055);
  outline: none;
}

.policy-row:last-child {
  border-bottom: 0;
}

.policy-summary {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.35fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}

.policy-summary span,
.file-row span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.policy-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
}

.policy-summary div {
  min-width: 0;
}

.row-actions,
.file-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.row-actions span {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--accent-strong);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.row-actions button,
.file-actions button,
.file-actions a {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: 0.86rem;
}

.row-actions button:hover,
.file-actions button:hover,
.file-actions a:hover {
  border-color: var(--accent-line);
}

.policy-files {
  display: grid;
  gap: 8px;
  padding: 0 20px 18px 20px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.file-row strong {
  display: block;
  margin-bottom: 5px;
}

.empty-state,
.empty-files {
  color: var(--muted);
}

.empty-state {
  padding: 28px 20px;
}

.empty-files {
  padding: 12px 0 0;
}

.policy-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.policy-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.policy-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(840px, calc(100svh - 36px));
  overflow: auto;
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(circle at 92% 6%, rgba(126, 217, 92, 0.14), transparent 28%),
    #0d0f0d;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.policy-detail-dialog h2 {
  max-width: none;
  font-size: clamp(2rem, 6vw, 3.6rem);
}

.policy-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
  margin-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.policy-detail-form input[type="hidden"] {
  display: none;
}

.policy-detail-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.policy-detail-form input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.policy-detail-form .form-status {
  grid-column: 1 / -1;
}

.attachment-section {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.vehicle-info-card {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(126, 217, 92, 0.09), rgba(255, 255, 255, 0.045)),
    #101210;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
}

.vehicle-info-card[hidden] {
  display: none !important;
}

.vehicle-info-media {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.vehicle-info-media img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.vehicle-info-content {
  min-width: 0;
}

.vehicle-info-content .eyebrow {
  margin-bottom: 8px;
}

.vehicle-info-content h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.12;
}

.vehicle-info-content dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 18px 0 0;
}

.vehicle-info-content dl div {
  min-width: 0;
}

.vehicle-info-content dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-info-content dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 800;
}

.attachment-section h3 {
  font-size: 1.35rem;
}

.attachment-section p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 0;
  padding: 14px;
  background: rgba(126, 217, 92, 0.055);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-upload-form .form-status {
  grid-column: 1 / -1;
}

.admin-drop-zone {
  min-height: 92px;
  padding: 16px;
  border: 1px dashed var(--accent-line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.admin-drop-zone small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: none;
}

.admin-drop-zone.is-dragging {
  background: rgba(126, 217, 92, 0.12);
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px rgba(126, 217, 92, 0.12);
}

.attachment-list {
  display: grid;
  gap: 10px;
}

.attachment-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attachment-preview {
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(126, 217, 92, 0.08);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.attachment-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-icon {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.attachment-meta {
  min-width: 0;
}

.attachment-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.attachment-meta span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .admin-dashboard-nav {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 14px;
  }

  .admin-dashboard-nav .brand {
    width: 100%;
  }

  .admin-top-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .admin-signout {
    margin-left: auto;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .policy-editor form,
  .form-manager form,
  .policy-summary,
  .managed-form-row,
  .policy-detail-form,
  .vehicle-info-card,
  .attachment-card,
  .admin-upload-form {
    grid-template-columns: 1fr;
  }

  .admin-topbar,
  .table-toolbar,
  .file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .table-search {
    max-width: none;
  }

  .row-actions,
  .file-actions {
    justify-content: flex-start;
  }

  .attachment-preview {
    width: 100%;
    max-width: 160px;
  }

  .vehicle-info-media img {
    max-height: 220px;
  }
}

@media (max-width: 560px) {
  .admin-login-screen {
    padding: 18px;
  }

  .admin-login-wrap {
    min-height: 72svh;
  }

  .admin-login-wrap h1 {
    font-size: clamp(2.4rem, 16vw, 4.1rem);
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

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