:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f5f7ff;
  --text: #181c2a;
  --muted: #667085;
  --line: #e4e7ef;
  --primary: #3588fc;
  --primary-light: #5ca0fd;
  --primary-dark: #2a6ed0;
  --primary-darker: #1f57b5;
  --primary-soft: #e8f1ff;
  --primary-border: #c5dafd;
  --primary-border-hover: #9ec2fc;
  --success: #0f9d7a;
  --error: #d14343;
  --page-max-width: 1180px;
  --page-padding-x: 24px;
  --header-min-height: 92px;
  --header-logo-width: 55px;
  --header-logo-aspect: 62 / 104;
  --header-mobile-bar-min-height: 80px;
  --header-mobile-logo-width: 48px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Instrument Sans", "Poppins", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.page-sticky-footer {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body.page-sticky-footer > main {
  flex: 1 1 auto;
  width: 100%;
  align-content: center;
  align-items: start;
}

body.page-sticky-footer .site-footer {
  flex-shrink: 0;
  margin-top: 0;
}

.app-header {
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
  padding: 0;
}

.app-header-inner {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  min-height: var(--header-min-height);
  padding: 0 20px 0 0;
}

.header-brand {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  margin: 0;
}

.header-brand:hover .brand-title-main {
  color: #0f172a;
}

.header-logo {
  position: relative;
  width: var(--header-logo-width);
  min-height: var(--header-min-height);
  flex-shrink: 0;
  align-self: stretch;
  overflow: hidden;
  background-color: var(--primary);
  background-image: url("/assets/fraian.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  border-right: 1px solid var(--primary-dark);
  margin: 0;
  padding: 0;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.header-logo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--primary);
  pointer-events: none;
}

.header-identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 18px;
  min-width: 0;
}

.header-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 5px;
  background: #e8edf4;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  width: max-content;
  max-width: min(calc(100vw - 48px), var(--page-max-width));
  transform: translate(-50%, -50%);
}

.nav-link {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-link:hover {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.65);
}

.nav-link.is-active {
  color: var(--primary-dark);
  font-weight: 600;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.nav-link-muted {
  color: #64748b;
}

.header-aside {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-height: 1px;
  padding-right: 12px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-width: 88px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
}

.lang-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.lang-switch[data-active-locale="en"] .lang-switch__thumb {
  transform: translateX(100%);
}

.lang-switch__btn {
  position: relative;
  z-index: 1;
  border: 0;
  margin: 0;
  padding: 7px 0;
  min-width: 40px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 0.18s ease;
}

.lang-switch__btn:hover {
  color: var(--primary-darker);
}

.lang-switch__btn.is-active {
  color: var(--primary-darker);
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 999px;
}

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 8px 0 0;
  padding: 0;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.header-menu-toggle:hover {
  background: var(--primary-soft);
  border-color: var(--primary-border-hover);
  color: var(--primary-darker);
}

.header-menu-toggle-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: background 0.15s ease;
}

.header-menu-toggle-icon::before,
.header-menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, top 0.2s ease;
}

.header-menu-toggle-icon::before {
  top: -6px;
}

.header-menu-toggle-icon::after {
  top: 6px;
}

.app-header-inner.is-nav-open .header-menu-toggle-icon {
  background: transparent;
}

.app-header-inner.is-nav-open .header-menu-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.app-header-inner.is-nav-open .header-menu-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.btn-header-logout {
  border: 2px solid #94a3b8;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 650;
  font-family: inherit;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-header-logout:hover {
  background: var(--primary-soft);
  border-color: var(--primary-dark);
  color: var(--primary-darker);
}

.brand-title {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.brand-title-main {
  color: #111b31;
}

.brand-title-accent {
  color: var(--primary);
}

.brand-byline-inline {
  margin-left: 6px;
  color: #61728f;
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  vertical-align: sub;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.layout {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--page-padding-x);
  display: grid;
  gap: 20px;
}

.layout-narrow {
  max-width: 640px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(20, 22, 35, 0.06);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

h2 {
  margin: 0;
  font-size: 1.1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.dashboard-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 22, 35, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 12px 32px rgba(53, 136, 252, 0.1);
}

.dashboard-card-accent {
  height: 3px;
  background: var(--primary);
}

.dashboard-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 20px;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}

.dashboard-card-summary {
  margin: 0;
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-card-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.dashboard-card-footer {
  margin-top: auto;
  padding-top: 14px;
}

.dashboard-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--muted);
  gap: 6px;
}

input,
textarea {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
}

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

.login-panel {
  padding-top: 14px;
}

.login-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.login-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.login-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.login-tab-panel {
  display: none;
}

.login-tab-panel.is-active {
  display: block;
}

.access-form {
  display: grid;
  gap: 12px;
}

.access-form .btn {
  margin-top: 4px;
}

.span-2 {
  grid-column: span 2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 650;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

a.btn:hover,
a.btn:focus,
a.btn:active {
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary-darker);
  color: #fff;
  box-shadow: 0 1px 0 var(--primary-darker);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-darker);
  color: #fff;
}

.btn-primary:active {
  background: var(--primary-darker);
  box-shadow: none;
}

.btn-secondary {
  background: #fff;
  border-color: var(--primary-dark);
  color: var(--primary-darker);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  border-color: var(--primary-darker);
  color: var(--primary-darker);
}

.btn-secondary:active {
  background: #dce9ff;
  border-color: var(--primary-darker);
}

.status {
  min-height: 22px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.status.ok {
  color: var(--success);
}

.status.error {
  color: var(--error);
}

.job-actions {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.job-log-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  padding: 8px 10px;
}

.job-log-details > summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.job-log {
  margin: 10px 0 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fbfcff;
  color: #344054;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

/* Landing page */
.landing-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  gap: 20px;
}

.landing-section.panel {
  padding: 24px;
}

.landing-section-title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 650;
}

.landing-section-title--standalone {
  padding: 0 4px;
}

.landing-hero {
  padding: 28px 24px;
}

.landing-eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  font-weight: 600;
}

.landing-hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.2;
  max-width: 800px;
}

.landing-hero-lead {
  margin: 0 0 12px;
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 720px;
  font-weight: 500;
}

.landing-hero-text {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 720px;
}

.landing-hero-link {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.landing-hero-link a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.landing-hero-link a:hover {
  text-decoration: underline;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  align-items: start;
}

.landing-two-col p {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.landing-two-col a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.landing-two-col a:hover {
  text-decoration: underline;
}

.landing-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.landing-list li + li {
  margin-top: 6px;
}

.landing-program p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.landing-program p:last-child {
  margin-bottom: 0;
}

.landing-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.landing-capability-num {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
}

.landing-feature-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.landing-feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.landing-method p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.landing-method p:last-child {
  margin-bottom: 0;
}

.landing-audience-grid {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px 16px;
}

.landing-audience-grid li {
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.landing-subtitle {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.landing-platform .landing-two-col article .btn {
  margin-top: 12px;
}

.site-footer {
  margin-top: 48px;
  padding: 40px 24px 32px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer-grid {
  max-width: var(--page-max-width);
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 32px;
}

.site-footer-block {
  min-width: 0;
}

.site-footer-heading {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.site-footer-meta {
  margin: 0 0 6px;
  line-height: 1.5;
}

.site-footer-legal-nav,
.site-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.site-footer a {
  color: var(--primary-darker);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.site-footer-copy {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  background: var(--primary-soft);
  border-top: 1px solid var(--primary-border);
  box-shadow: 0 -8px 28px rgba(20, 22, 35, 0.12);
}

.cookie-consent__message {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cookie-consent__policy {
  white-space: nowrap;
}

@media (min-width: 768px) {
  .cookie-consent {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
  }

  .cookie-consent__message {
    flex: 1;
    padding-right: 16px;
  }
}

/* Legal pages */
.legal-page {
  padding: 28px 32px 36px;
}

.legal-page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.legal-page-header h1 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  font-weight: 650;
  color: var(--text);
}

.legal-page-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
}

.legal-section {
  margin-bottom: 28px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--text);
}

.legal-section h3 {
  margin: 20px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: #2b3551;
}

.legal-section p {
  margin: 0 0 12px;
  line-height: 1.65;
  color: var(--text);
}

.legal-section ul {
  margin: 0 0 14px;
  padding-left: 1.35rem;
  line-height: 1.65;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section a {
  color: var(--primary-darker);
  font-weight: 600;
  text-decoration: none;
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

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

.legal-table th {
  background: var(--surface-soft);
  font-weight: 650;
  color: var(--text);
}

.legal-table code {
  font-size: 0.82rem;
  background: var(--surface-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .legal-page {
    padding: 22px 20px 28px;
  }
}

@media (max-width: 900px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .landing-two-col {
    grid-template-columns: 1fr;
  }

  .app-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(var(--header-mobile-bar-min-height), auto) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0;
  }

  .app-header-inner:has(.header-aside:not([aria-hidden="true"])) {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand toggle aside"
      "nav nav nav";
  }

  .header-brand {
    grid-area: brand;
    border-bottom: none;
    min-height: var(--header-mobile-bar-min-height);
    align-self: stretch;
  }

  .header-menu-toggle {
    display: inline-flex;
    grid-area: toggle;
    align-self: center;
  }

  .header-aside {
    grid-area: aside;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 12px 0 0;
    align-self: center;
  }

  .lang-switch__track {
    min-width: 80px;
  }

  .lang-switch__btn {
    min-width: 36px;
    padding: 6px 0;
    font-size: 0.68rem;
  }

  .header-aside[aria-hidden="true"] {
    display: none;
  }

  .header-logo {
    width: var(--header-mobile-logo-width);
    min-height: var(--header-mobile-bar-min-height);
    height: 100%;
    aspect-ratio: var(--header-logo-aspect);
    background-size: cover;
    background-position: center top;
  }

  .header-identity {
    padding: 10px 12px 10px 14px;
    min-height: var(--header-mobile-bar-min-height);
    justify-content: center;
  }

  .brand-title {
    font-size: 1.35rem;
  }

  .brand-byline-inline {
    display: block;
    margin: 2px 0 0;
    font-size: 0.68rem;
    vertical-align: baseline;
  }

  .header-nav {
    grid-area: nav;
    display: none;
    position: static;
    transform: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 10px 12px 14px;
    background: #ffffff;
    border: none;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: inset 0 8px 12px -10px rgba(15, 23, 42, 0.12);
  }

  .app-header-inner.is-nav-open .header-nav {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.92rem;
    text-align: center;
    border-radius: 10px;
  }

  .nav-link.is-active {
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }

  .btn-header-logout {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .brand-byline-inline {
    display: none;
  }

  .brand-title {
    font-size: 1.22rem;
  }

  .header-identity {
    padding: 8px 10px 8px 12px;
  }
}

/* Shared dashboard styles */
.dashboard-page > header {
  background: var(--primary-soft);
  padding: 20px 28px;
  border-bottom: 1px solid var(--primary-border);
}

.dashboard-page > header h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 650;
}

.dashboard-page > header .sub {
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.dashboard-page main {
  padding: 20px 28px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.dashboard-page .kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-page .kpi {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(20, 22, 35, 0.06);
}

.dashboard-page .kpi .label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-page .kpi .value {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 4px;
}

.dashboard-page section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(20, 22, 35, 0.06);
}

.dashboard-page section h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2b3551;
}

.dashboard-page .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-page .chart-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}

.dashboard-page .chart-wrap.tall {
  height: 320px;
}

.dashboard-page .zone-svg {
  width: 100%;
  max-width: 420px;
  height: 220px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.dashboard-page .zone-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

.dashboard-page #leaflet-map {
  height: 360px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.dashboard-page .media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.dashboard-page .media-row label {
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-page .media-row select {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 220px;
}

.dashboard-page .media-row button {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.dashboard-page .media-row input[type="range"] {
  accent-color: var(--primary);
}

.dashboard-page video {
  max-height: 420px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #000;
}

.dashboard-page .links a {
  color: var(--primary);
  margin-right: 14px;
  font-size: 0.9rem;
}

.dashboard-page details pre {
  background: #0e1116;
  color: #e6edf3;
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.78rem;
  white-space: pre-wrap;
}

.dashboard-page .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  margin-left: 8px;
  vertical-align: middle;
}

.dashboard-page .badge-mid {
  background: #4d3f1e;
  color: #f5d76e;
}

.dashboard-page .hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

@media (max-width: 960px) {
  .dashboard-page .grid-2 {
    grid-template-columns: 1fr;
  }
}
