:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #101722;
  --muted: #566270;
  --line: #d9dee6;
  --navy: #082a60;
  --navy-2: #0e3a78;
  --steel: #666d76;
  --cyan: #1e9fb8;
  --orange: #f28c28;
  --radius: 8px;
  --shadow: 0 18px 44px rgba(8, 42, 96, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

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

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

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(8, 42, 96, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(8, 42, 96, 0.06);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-logo {
  width: 286px;
  height: 68px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  gap: 6px;
}

.nav a {
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  background: rgba(8, 42, 96, 0.07);
  color: var(--navy);
}

.nav a[aria-current="page"] {
  background: rgba(8, 42, 96, 0.1);
  color: var(--navy);
}

.header-cta {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 0 14px;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--navy-2);
}

.menu-toggle {
  display: none;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  padding: 0 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(6, 24, 52, 0.96), rgba(8, 42, 96, 0.78), rgba(8, 42, 96, 0.58)),
    url("/workbench-signal.svg"),
    linear-gradient(135deg, #07172d, #0b3778);
  background-position: center;
  background-size: cover;
}

.hero-content {
  max-width: 760px;
  padding: 76px 0 118px;
}

.eyebrow {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 0.96;
}

h2 {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 21px;
}

.hero-copy {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.65;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-badges span {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 10px;
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}

.button:hover {
  background: var(--navy-2);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.button.light {
  border-color: var(--navy);
  background: #fff;
  color: var(--navy);
}

.button.light:hover {
  background: #eef3f8;
}

.section {
  padding: 82px 0;
}

.section.dark {
  background: var(--navy);
  color: #fff;
}

.section.dark h2,
.section.dark h3 {
  color: #fff;
}

.section.dark .lead,
.section.dark p {
  color: rgba(255, 255, 255, 0.72);
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 10px 26px rgba(8, 42, 96, 0.06);
}

.card h3::before {
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--orange);
  content: "";
}

.dark .card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.card p,
.list li {
  color: var(--muted);
  line-height: 1.6;
}

.dark .card p,
.dark .list li {
  color: rgba(255, 255, 255, 0.72);
}

.list {
  display: grid;
  gap: 10px;
  padding-left: 19px;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 28px;
  box-shadow: var(--shadow);
}

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.error {
  color: #b42318;
  font-size: 13px;
}

.success {
  border: 1px solid #a6d8bd;
  border-radius: 8px;
  background: #edf9f1;
  padding: 12px;
  color: #15562d;
}

.notice {
  border-left: 4px solid var(--orange);
  background: #fff8ef;
  padding: 14px 16px;
  color: #5a3713;
}

.footer {
  background: #08111f;
  color: rgba(255, 255, 255, 0.76);
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
}

.footer a {
  color: #fff;
}

.footer-logo {
  display: block;
  width: 220px;
  height: 52px;
  margin-bottom: 14px;
  object-fit: cover;
  object-position: center;
}

.copyright {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

.legal {
  max-width: 860px;
}

.legal h2 {
  margin-top: 28px;
  font-size: 26px;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
  background:
    linear-gradient(90deg, rgba(6, 24, 52, 0.94), rgba(8, 42, 96, 0.76)),
    url("/workbench-signal.svg"),
    #07172d;
  background-size: cover;
}

.error-card {
  width: min(720px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 34px;
  box-shadow: var(--shadow);
}

.error-card h1 {
  color: var(--ink);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(6, 24, 52, 0.94), rgba(8, 42, 96, 0.76)),
    url("/admin-workbench-bg.png"),
    #07172d;
  background-size: cover;
  background-position: center;
}

.admin-login-card {
  display: grid;
  gap: 14px;
  width: min(420px, calc(100% - 32px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 28px;
  box-shadow: var(--shadow);
}

.admin-login-card img {
  width: 230px;
  height: 64px;
  object-fit: cover;
}

.admin-login-card h1 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.admin-login-card label,
.admin-form label,
.admin-upload label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.admin-login-card input,
.admin-form input,
.admin-form textarea,
.admin-upload input {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #eef2f6;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: #071c3d;
  color: #fff;
  padding: 18px 14px;
}

.admin-logo {
  display: block;
  margin-bottom: 18px;
}

.admin-logo img {
  width: 190px;
  height: 54px;
  object-fit: cover;
}

.admin-nav {
  display: grid;
  gap: 5px;
}

.admin-nav a,
.admin-logout {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
  text-align: left;
}

.admin-nav a:hover,
.admin-nav a[aria-current="page"],
.admin-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-logout {
  width: 100%;
  margin-top: 18px;
  cursor: pointer;
}

.admin-version {
  margin: 18px 12px 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 800;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-page-head {
  margin-bottom: 20px;
}

.admin-page-head h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.1;
}

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

.admin-kpi,
.admin-card,
.admin-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(8, 42, 96, 0.06);
}

.admin-kpi {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.admin-kpi span,
.admin-kpi small,
.admin-muted {
  color: var(--muted);
}

.admin-kpi strong {
  color: var(--navy);
  font-size: 28px;
  line-height: 1.1;
}

.admin-card {
  margin-bottom: 18px;
  padding: 20px;
  overflow-x: auto;
}

.admin-card h2 {
  font-size: 22px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 13px;
}

.status,
.status-select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 9px;
}

.status.new {
  color: #b45309;
}

.status.in_progress {
  color: #0b63a7;
}

.status.done {
  color: #157347;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-detail {
  padding: 16px;
}

.admin-detail p {
  color: var(--muted);
  line-height: 1.55;
}

.admin-form {
  display: grid;
  gap: 14px;
  max-width: 880px;
}

.admin-checkbox {
  display: flex;
  align-items: center;
}

.admin-checkbox input {
  width: auto;
}

.admin-upload {
  display: flex;
  align-items: end;
  gap: 14px;
}

.admin-message {
  margin-bottom: 18px;
}

.media-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) 150px 150px auto;
  gap: 14px;
  align-items: end;
}

.media-toolbar label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.media-toolbar input,
.media-toolbar select {
  width: 100%;
  border: 1px solid #cfd8e5;
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  color: var(--ink);
}

.media-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 24px;
}

.media-empty p {
  color: var(--muted);
}

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

.media-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(8, 42, 96, 0.06);
}

.media-card-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  color: var(--navy);
  font-weight: 800;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

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

.pdf-icon {
  display: grid;
  width: 72px;
  height: 92px;
  place-items: center;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  font-weight: 900;
}

.media-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.media-card-body h3 {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.media-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.media-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.media-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.media-actions button,
.media-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
  padding: 0 10px;
  text-align: center;
}

.media-actions .danger {
  border-color: #f1b5ad;
  color: #b42318;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(5, 16, 32, 0.9);
  color: #fff;
}

.lightbox-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 16, 32, 0.96);
  padding: 12px 18px;
}

.lightbox-toolbar div {
  display: flex;
  gap: 8px;
}

.lightbox-toolbar button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 800;
  padding: 8px 10px;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: transparent;
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 28px;
}

.lightbox-stage img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  transform-origin: center;
  transition: transform 140ms ease;
}

.system-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.system-list div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.system-list dt {
  color: var(--muted);
  font-weight: 800;
}

.system-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) and (min-width: 861px) {
  .brand-logo {
    width: 236px;
    height: 56px;
  }

  .header-inner {
    gap: 12px;
  }

  .nav a {
    padding: 8px;
    font-size: 13px;
  }

  .header-cta {
    padding: 0 12px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    min-height: 68px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 194px;
    height: 46px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
  }

  .header-cta {
    min-height: 38px;
    order: 3;
    width: 100%;
  }

  .nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }

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

  .nav a {
    padding: 11px 12px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding: 64px 0 92px;
  }

  .grid.three,
  .grid.two,
  .service-grid,
  .split,
  .footer-grid,
  .admin-shell,
  .admin-kpis,
  .admin-detail-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-upload {
    display: grid;
  }

  .media-toolbar,
  .media-card-grid,
  .media-meta {
    grid-template-columns: 1fr;
  }

  .system-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
