@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ink: #071526;
  --ink-2: #04101f;
  --panel: #102b52;
  --brand-blue: #17489a;
  --electric-blue: #4c8dff;
  --sky: #9fc7ff;
  --ice: #f4f8ff;
  --steel: #d7e4f7;
  --copper: #ff8a3d;
  --signal: #f6d84b;
  --porcelain: #f7fbff;
  --muted: #9fb2cf;
  --line: rgba(213, 229, 255, 0.2);
  --shadow-premium: 0 24px 80px rgba(7, 21, 38, 0.28);
  --shadow-glow: 0 0 48px rgba(76, 141, 255, 0.28);
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--porcelain);
  background: var(--ink);
  max-width: 100%;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

:focus-visible {
  outline: 3px solid rgba(159, 199, 255, 0.9);
  outline-offset: 3px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9999;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--signal);
  color: var(--ink);
  font-weight: 800;
}

.container {
  width: 100%;
  max-width: 92rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 2.4vw, 2.5rem);
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.public-body {
  min-height: 100vh;
  background: var(--ink);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  padding-top: 1rem;
}

.site-nav {
  position: relative;
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(159, 199, 255, 0.25);
  border-radius: 2rem;
  background: #071526;
  padding: 0.75rem 1rem;
  box-shadow: 0 22px 70px rgba(4, 16, 31, 0.58);
}

.brand-link {
  display: inline-flex;
  flex: 0 0 auto;
  height: clamp(3.5rem, 4.4vw, 4rem);
  width: auto;
  aspect-ratio: 5.63 / 1;
  align-items: flex-start;
  min-width: 0;
  overflow: hidden;
}

.brand-link img {
  width: 109.5%;
  max-width: none;
  height: auto;
  transform: translate(-4.6%, -10%);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.menu-toggle {
  display: none;
  min-width: 3rem;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.hero {
  min-height: min(100vh, 58rem);
  padding: 8rem 0 3.5rem;
}

.page-hero {
  padding: 8.25rem 0 2rem;
}

.hero::before,
.page-hero::before,
.login-page::before,
.admin-bg {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(76, 141, 255, 0.34), transparent 34%),
    radial-gradient(circle at 16% 14%, rgba(159, 199, 255, 0.22), transparent 30%),
    linear-gradient(130deg, #071526 0%, #102b52 48%, #061121 100%);
}

.hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(to top, rgba(7, 21, 38, 1), rgba(7, 21, 38, 0));
}

.hero-grid,
.page-hero-inner,
.section-inner {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(24rem, 0.78fr);
  gap: clamp(2rem, 4vw, 3.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(159, 199, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: 5.5rem;
  line-height: 0.92;
  font-weight: 600;
}

.page-hero h1 {
  max-width: 82rem;
  font-size: 5.75rem;
  line-height: 0.96;
}

.gradient-text {
  display: block;
  background: none;
  color: var(--sky);
  -webkit-text-fill-color: var(--sky);
  forced-color-adjust: none;
}

.lead {
  max-width: 64rem;
  margin: 1.75rem 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.2rem;
  line-height: 1.7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.btn-primary,
.btn-secondary,
.admin-button {
  max-width: 100%;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.btn-primary {
  border: 0;
  background: var(--brand-blue);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover,
.admin-button.primary:hover {
  transform: translateY(-2px);
  background: var(--electric-blue);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-secondary:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
}

.control-panel,
.glass-section {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-premium);
  backdrop-filter: blur(18px);
}

.control-panel {
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel-head > h2 {
  flex: 1;
  min-width: 0;
}

.panel-title {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill {
  background: var(--signal);
  color: var(--ink);
}

.chip {
  border: 1px solid rgba(23, 72, 154, 0.15);
  color: var(--brand-blue);
}

.service-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.service-tab {
  width: 100%;
  min-height: 4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.75rem;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
  text-align: left;
}

.service-tab > span:last-child {
  min-width: 0;
  line-height: 1.3;
}

.service-tab.is-active,
.service-tab:hover {
  border-color: rgba(159, 199, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

.service-tab .icon-wrap,
.card-icon,
.info-icon,
.contact-icon,
.admin-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: linear-gradient(135deg, var(--brand-blue), var(--electric-blue));
}

.service-tab .icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
}

.service-live {
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.75rem;
  background: #071d38;
  padding: 1.5rem;
}

.service-live[hidden] {
  display: none;
}

.preview-login {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.25rem;
  border: 1px solid rgba(159, 199, 255, 0.28);
  border-radius: 0.75rem;
  background: rgba(159, 199, 255, 0.1);
  padding: 1rem;
}

.preview-login p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
  line-height: 1.55;
}

.service-live h3,
.service-card h3,
.info-card h3,
.admin-card h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
}

.check-list {
  display: grid;
  gap: 0.8rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  line-height: 1.55;
}

.check-list .icon {
  color: var(--signal);
  margin-top: 0.1rem;
}

.section-dark,
.contact-section {
  background: var(--ink);
  padding: 3rem 0;
}

.section-light {
  background: var(--ice);
  color: var(--ink);
  padding: 3rem 0;
}

.section-header {
  max-width: 72rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.05;
}

.section-header p {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.section-light .section-header p {
  color: rgba(7, 21, 38, 0.68);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.service-card,
.info-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 2rem;
  box-shadow: var(--shadow-premium);
}

.service-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--porcelain);
  color: var(--ink);
  padding: 1.75rem;
  scroll-margin-top: 8rem;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue), var(--electric-blue), var(--signal));
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.card-icon,
.info-icon,
.contact-icon,
.admin-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
}

.service-card p,
.info-card p {
  color: rgba(7, 21, 38, 0.68);
  line-height: 1.65;
}

.info-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: white;
  padding: 1.5rem;
}

.info-card p {
  color: rgba(255, 255, 255, 0.68);
}

.text-panel {
  margin-top: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.06);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: var(--shadow-premium);
}

.text-panel p {
  max-width: 76rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.1rem;
  line-height: 1.75;
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  border-radius: 2rem;
  background: linear-gradient(135deg, var(--brand-blue), var(--panel), var(--ink));
  color: white;
  padding: clamp(1.5rem, 5vw, 2.5rem);
  box-shadow: var(--shadow-premium);
}

.cta-panel h2 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.08;
}

.cta-panel p {
  max-width: 56rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.contact-box {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.06);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-premium);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-admin-access {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
}

.contact-admin-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(159, 199, 255, 0.28);
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.contact-admin-link svg {
  width: 1rem;
  height: 1rem;
}

.contact-admin-link:hover {
  border-color: rgba(159, 199, 255, 0.65);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.contact-item {
  min-height: 7rem;
  display: flex;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
}

.contact-item small,
.meta-label {
  display: block;
  color: var(--sky);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-item strong {
  display: block;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.legal-list {
  display: grid;
  gap: 1rem;
  max-width: 64rem;
  margin: 0;
}

.legal-row {
  border-bottom: 1px solid rgba(7, 21, 38, 0.1);
  padding-bottom: 1rem;
}

.legal-row dt {
  color: var(--brand-blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.legal-row dd {
  margin: 0.25rem 0 0;
  color: rgba(7, 21, 38, 0.74);
  line-height: 1.6;
}

.site-footer {
  background: var(--porcelain);
  color: var(--ink);
  padding: 3rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.8fr 0.9fr 0.8fr;
  gap: 2rem;
  border-top: 1px solid rgba(7, 21, 38, 0.1);
  padding-top: 2.5rem;
}

.footer-brand p,
.site-footer a,
.footer-bottom {
  color: rgba(7, 21, 38, 0.64);
}

.site-footer h2 {
  margin: 0;
  color: var(--brand-blue);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.site-footer ul {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(7, 21, 38, 0.1);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
}

.login-page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--ink-2);
  color: white;
  padding: 1.5rem;
}

.login-page::after,
.admin-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.15;
  background-image:
    linear-gradient(to right, rgba(159, 199, 255, 0.24) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(159, 199, 255, 0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.login-grid {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 3rem);
  min-height: calc(100dvh - 3rem);
  display: grid;
  align-items: center;
  grid-template-columns: 0.92fr 1fr;
  gap: 2rem;
  width: min(100%, 72rem);
  margin: 0 auto;
}

.login-copy h1 {
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.08;
}

.login-copy p {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.1rem;
  line-height: 1.7;
}

.login-card {
  width: min(100%, 28rem);
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.login-card img {
  width: 15rem;
}

.login-grid-single {
  grid-template-columns: minmax(0, 28rem);
  justify-content: center;
}

.two-factor-code-input,
.security-code-field input {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0;
}

.two-factor-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.two-factor-switch a,
.link-button {
  border: 0;
  background: transparent;
  color: var(--sky);
  padding: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.login-back-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 1rem 0 0.75rem;
  border: 1px solid rgba(159, 199, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  padding: 0.62rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.login-back-link:hover,
.login-back-link:focus-visible {
  border-color: rgba(159, 199, 255, 0.58);
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.field label {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.field {
  min-width: 0;
}

.field input,
.field textarea,
.field select,
.search-input {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(4, 16, 31, 0.78);
  color: white;
  padding: 0.75rem;
  outline: none;
}

.field select {
  appearance: auto;
}

.field small {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  line-height: 1.5;
}

.login-card .field input {
  background: white;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.search-input:focus {
  border-color: rgba(159, 199, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(159, 199, 255, 0.25);
}

.field input[aria-invalid="true"] {
  border-color: rgba(255, 138, 61, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.16);
}

.field-error {
  display: block;
  margin-top: 0.45rem;
  color: #ffd0b0;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.alert {
  border: 1px solid rgba(255, 138, 61, 0.32);
  border-radius: 0.65rem;
  background: rgba(255, 138, 61, 0.12);
  padding: 0.8rem;
  color: white;
  font-weight: 700;
}

.alert-success {
  border-color: rgba(88, 214, 141, 0.35);
  background: rgba(88, 214, 141, 0.12);
}

.error-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.admin-body {
  min-height: 100vh;
  background: var(--ink-2);
  color: white;
}

.admin-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.admin-bg {
  position: fixed;
  z-index: 0;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 18rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 17, 33, 0.95);
  padding: 1.25rem 1rem;
  box-shadow: 20px 0 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.admin-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-brand img {
  width: 13rem;
}

.admin-brand span {
  display: block;
  margin-top: 0.5rem;
  color: rgba(159, 199, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-sidebar-close {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.5rem;
}

.admin-nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 2rem;
}

.admin-nav a,
.admin-logout {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.9rem;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.admin-nav a:hover,
.admin-nav a.active {
  border-color: rgba(159, 199, 255, 0.35);
  background: rgba(159, 199, 255, 0.12);
  color: white;
}

.admin-user-box {
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  padding-top: 1rem;
}

.admin-user-box > p {
  margin: 0;
}

.admin-user-label {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

.admin-user-email {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.admin-logout {
  width: 100%;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
  cursor: pointer;
}

.admin-logout-form {
  margin: 0;
}

.admin-logout:hover {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.12);
  color: white;
}

.admin-overlay {
  display: none;
}

.admin-topbar {
  display: none;
}

.admin-topbar-brand,
.admin-topbar-actions,
.admin-topbar-user {
  min-width: 0;
}

.admin-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding-left: 18rem;
  min-width: 0;
}

.admin-content {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: 2rem 1rem;
  min-width: 0;
}

.admin-page {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.admin-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.5rem;
  min-width: 0;
}

.admin-page-header > div {
  min-width: 0;
}

.admin-page-header h1 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.5rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.admin-page-header p {
  max-width: 48rem;
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.admin-button {
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: white;
}

.admin-button.primary {
  background: linear-gradient(90deg, var(--brand-blue), var(--electric-blue));
  box-shadow: var(--shadow-glow);
}

.admin-button.secondary {
  border-color: rgba(159, 199, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.admin-button.ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
}

.admin-button.danger {
  border-color: rgba(255, 119, 119, 0.5);
  background: #a82f3b;
  color: white;
}

.admin-button.danger:hover,
.admin-button.danger:focus-visible {
  border-color: rgba(255, 255, 255, 0.7);
  background: #c23b47;
}

.admin-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

.admin-card,
.form-section,
.table-panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11.5rem, 100%), 1fr));
  gap: 1rem;
}

.stat-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 1rem;
}

.stat-card strong {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 2rem;
}

.stat-card > div {
  min-width: 0;
}

.stat-card p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.placeholder-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
}

.workorder-table {
  min-width: 62rem;
}

.placeholder-table th,
.placeholder-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem;
  text-align: left;
}

.placeholder-table th {
  color: var(--sky);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.placeholder-table td {
  color: rgba(255, 255, 255, 0.72);
}

.empty-table-cell {
  padding: 1.5rem !important;
  color: rgba(255, 255, 255, 0.58) !important;
  text-align: center !important;
}

.compact-button {
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.5rem;
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
}

.pdf-actions-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pdf-actions-card p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.pdf-actions-card small {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.5);
}

.pdf-actions form {
  margin: 0;
}

.email-log-table {
  min-width: 58rem;
}

.email-status-sent {
  border-color: rgba(88, 214, 141, 0.35);
  background: rgba(88, 214, 141, 0.12);
  color: #b9ffd4;
}

.email-status-failed {
  border-color: rgba(255, 138, 61, 0.35);
  background: rgba(255, 138, 61, 0.12);
  color: #ffd0b0;
}

.email-status-pending {
  border-color: rgba(255, 224, 74, 0.35);
  background: rgba(255, 224, 74, 0.12);
  color: #ffe97a;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  border: 1px solid rgba(159, 199, 255, 0.25);
  border-radius: 0.6rem;
  background: rgba(159, 199, 255, 0.1);
  padding: 0.35rem 0.65rem;
  color: var(--sky);
  font-size: 0.75rem;
  font-weight: 900;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.detail-summary strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0;
}

.detail-grid div {
  min-width: 0;
  border: 1px solid rgba(159, 199, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(4, 16, 31, 0.32);
  padding: 0.9rem;
}

.detail-grid dt {
  color: var(--sky);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.pre-line {
  white-space: normal;
}

.form-grid-admin {
  display: grid;
  gap: 1.25rem;
}

.form-section {
  margin: 0;
}

.form-section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.08rem, 3vw, 1.25rem);
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.form-section legend {
  padding: 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.form-section-desc {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  min-width: 0;
}

.customer-autocomplete-field {
  position: relative;
  z-index: 1;
}

.customer-autocomplete-field:focus-within {
  z-index: 100;
}

.customer-suggestions {
  position: absolute;
  z-index: 101;
  top: calc(100% + 0.35rem);
  right: 0;
  left: 0;
  max-height: min(21rem, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(159, 199, 255, 0.36);
  border-radius: 0.65rem;
  background: #071526;
  padding: 0.35rem;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.48);
  isolation: isolate;
}

.customer-suggestions[hidden] {
  display: none;
}

.customer-suggestions button {
  display: grid;
  width: 100%;
  min-height: 3rem;
  gap: 0.2rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: white;
  padding: 0.65rem 0.75rem;
  text-align: left;
  cursor: pointer;
}

.customer-suggestions button + button {
  margin-top: 0.25rem;
  border-top-color: rgba(159, 199, 255, 0.14);
}

.customer-suggestions button:hover,
.customer-suggestions button:focus-visible,
.customer-suggestions button.is-active {
  border-color: rgba(159, 199, 255, 0.3);
  background: rgba(54, 127, 236, 0.22);
  outline: none;
}

.customer-suggestions strong,
.customer-suggestions span {
  display: block;
  overflow-wrap: anywhere;
}

.customer-suggestions span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  line-height: 1.4;
}

.full-span {
  grid-column: 1 / -1;
}

.signature-box {
  display: grid;
  place-items: center;
  min-height: 12rem;
  border: 1px dashed rgba(159, 199, 255, 0.35);
  border-radius: 0.75rem;
  background: rgba(159, 199, 255, 0.06);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.signature-pad {
  position: relative;
  margin-top: 1.25rem;
  border: 1px solid rgba(159, 199, 255, 0.35);
  border-radius: 0.75rem;
  background: #ffffff !important;
  color-scheme: light !important;
  forced-color-adjust: none;
  box-shadow: inset 0 0 0 1px rgba(7, 21, 38, 0.06);
  overflow: hidden;
}

.signature-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.signature-lock-toggle {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
}

.signature-lock-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.9);
  color: #000000;
  pointer-events: none;
}

.signature-lock-overlay-icon {
  width: 2.5rem;
  height: 2.5rem;
}

.signature-lock-overlay strong {
  font-size: 1rem;
}

.signature-pad.is-locked .signature-lock-overlay {
  display: grid;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: clamp(13rem, 28vw, 18.75rem);
  background: #ffffff !important;
  color-scheme: light !important;
  forced-color-adjust: none;
  filter: none !important;
  mix-blend-mode: normal;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad.is-locked .signature-canvas {
  cursor: not-allowed;
  opacity: 1;
  pointer-events: none;
  touch-action: pan-y;
}

.signature-hint {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.85rem;
  border-top: 1px solid rgba(7, 21, 38, 0.18);
  padding-top: 0.65rem;
  color: rgba(7, 21, 38, 0.52);
  font-size: 0.86rem;
  font-weight: 800;
  pointer-events: none;
}

.signature-preview {
  margin-top: 1rem;
  border: 1px solid rgba(159, 199, 255, 0.22);
  border-radius: 0.75rem;
  background: #f7fbff;
  padding: 0.75rem;
}

.signature-preview img {
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}

.customer-grid,
.settings-grid {
  display: grid;
  gap: 1rem;
}

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

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

.settings-form,
.settings-card,
.customer-card,
.customer-details,
.legal-content {
  display: grid;
  gap: 1rem;
}

.settings-card {
  align-content: start;
}

.settings-card textarea {
  min-height: 7rem;
  resize: vertical;
}

.settings-save-bar {
  position: sticky;
  z-index: 20;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  border: 1px solid rgba(159, 199, 255, 0.28);
  border-radius: 0.75rem;
  background: rgba(5, 20, 39, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  padding: 1rem;
}

.settings-save-bar div {
  display: grid;
  gap: 0.25rem;
}

.settings-save-bar span,
.customer-details dt,
.privacy-meta,
.legal-note {
  color: rgba(255, 255, 255, 0.66);
}

.customer-live-grid {
  margin-top: 1rem;
}

.customer-results-summary {
  margin: 0.9rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 750;
}

.customer-edit-panel {
  scroll-margin-top: 5.5rem;
}

.customer-edit-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-card {
  align-content: start;
  grid-template-rows: auto 1fr auto;
  scroll-margin-top: 5.5rem;
}

.customer-card .panel-head > div {
  min-width: 0;
}

.customer-last-used {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.84rem;
  line-height: 1.5;
}

.customer-last-used time {
  font-variant-numeric: tabular-nums;
}

.customer-edit-button {
  width: 100%;
  align-self: end;
}

.customer-import-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.customer-import-panel h2,
.customer-import-panel p {
  margin: 0;
}

.customer-import-panel p {
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.35rem;
}

.admin-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(159, 199, 255, 0.16);
  padding-top: 1rem;
}

.pagination-status {
  flex: 1 0 100%;
  order: -1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
}

.pagination-pages {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.pagination-page {
  min-width: 2.75rem;
  min-height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(159, 199, 255, 0.25);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  transition: background 180ms ease, border-color 180ms ease;
}

.pagination-page:hover,
.pagination-page:focus-visible,
.pagination-page.is-current {
  border-color: rgba(159, 199, 255, 0.7);
  background: rgba(54, 127, 236, 0.28);
}

.pagination-page.is-current {
  box-shadow: 0 0 0 2px rgba(159, 199, 255, 0.16);
}

.pagination-ellipsis {
  min-width: 1.25rem;
  color: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.admin-button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.customer-card h2,
.customer-card p,
.customer-details {
  margin: 0;
}

.customer-details div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.35fr) minmax(0, 1fr);
  gap: 0.75rem;
  border-top: 1px solid rgba(159, 199, 255, 0.14);
  padding-top: 0.7rem;
}

.customer-details dt {
  font-weight: 700;
}

.customer-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  border: 1px dashed rgba(159, 199, 255, 0.3);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
}

.legal-content {
  max-width: 72rem;
}

.legal-content article {
  border-bottom: 1px solid rgba(8, 31, 58, 0.14);
  padding-bottom: 1.5rem;
}

.legal-content h2,
.legal-content h3 {
  color: #071526;
}

.legal-content h3 {
  margin-top: 1.25rem;
  font-size: 1.05rem;
}

.legal-content p,
.legal-note,
.privacy-meta {
  max-width: 88ch;
  line-height: 1.75;
}

.legal-note {
  color: #29415f;
}

@media (max-width: 720px) {
  .settings-save-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .settings-save-bar .admin-button {
    width: 100%;
  }

  .customer-details div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

.legal-content a {
  color: #1559bd;
  font-weight: 700;
}

.legal-review-note {
  border: 1px solid rgba(21, 89, 189, 0.22);
  border-radius: 0.75rem;
  background: #eef6ff;
  padding: 1.25rem;
}

.security-page > .alert {
  margin: 0;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.security-setup-box {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.totp-setup-grid {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  align-items: center;
  gap: 1.25rem;
}

.totp-qr-panel,
.totp-manual-panel {
  min-width: 0;
}

.totp-qr-panel {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(159, 199, 255, 0.2);
  border-radius: 0.75rem;
  background: rgba(4, 16, 31, 0.36);
  padding: 1rem;
  text-align: center;
}

.totp-qr-panel > p,
.totp-manual-panel > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.totp-qr {
  display: grid;
  width: 232px;
  max-width: 100%;
  min-height: 232px;
  place-items: center;
  border-radius: 0.55rem;
  background: white;
  padding: 8px;
  color: var(--ink);
  overflow: hidden;
}

.totp-qr img,
.totp-qr canvas {
  display: block;
  width: 216px;
  max-width: 100%;
  height: auto;
}

.security-setup-box > p,
.security-setup-box details,
.recovery-codes-card .panel-head p {
  color: rgba(255, 255, 255, 0.66);
  line-height: 1.55;
}

.totp-secret,
.otpauth-url,
.recovery-code-grid code {
  display: block;
  border: 1px solid rgba(159, 199, 255, 0.25);
  border-radius: 0.55rem;
  background: rgba(4, 16, 31, 0.56);
  color: #d7e9ff;
  padding: 0.75rem;
  overflow-wrap: anywhere;
}

.totp-secret {
  width: fit-content;
  max-width: 100%;
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-weight: 900;
  letter-spacing: 0;
}

.security-code-field {
  max-width: 20rem;
}

.recovery-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.recovery-code-grid code {
  text-align: center;
  font-weight: 900;
}

.factor-mode-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 700;
}

.factor-mode-option input {
  width: 1.1rem;
  height: 1.1rem;
}

.danger-card {
  border-color: rgba(255, 138, 61, 0.24);
}

.user-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.user-account-card {
  align-self: start;
}

.user-account-head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.user-avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(159, 199, 255, 0.28);
  border-radius: 0.65rem;
  background: rgba(54, 127, 236, 0.18);
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
}

.user-account-identity {
  min-width: 0;
}

.user-account-identity h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.user-account-identity p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.62);
  overflow-wrap: anywhere;
}

.user-account-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.user-account-meta div {
  min-width: 0;
  border: 1px solid rgba(159, 199, 255, 0.13);
  border-radius: 0.55rem;
  background: rgba(4, 16, 31, 0.3);
  padding: 0.75rem;
}

.user-account-meta dt {
  color: var(--sky);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-account-meta dd {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.user-account-actions {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
}

.user-account-actions summary {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--sky);
  font-weight: 800;
  cursor: pointer;
}

.user-action-stack {
  display: grid;
  gap: 1rem;
  margin-top: 0.75rem;
}

.user-action-stack form {
  border: 1px solid rgba(159, 199, 255, 0.14);
  border-radius: 0.65rem;
  background: rgba(4, 16, 31, 0.28);
  padding: 1rem;
}

.user-action-stack h3,
.user-action-stack p {
  margin: 0;
}

.user-action-stack p {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.55;
}

.user-danger-action {
  border-color: rgba(255, 138, 61, 0.25) !important;
}

.workorder-view-tabs,
.table-actions,
.delete-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.table-actions form,
.delete-confirm-actions form {
  margin: 0;
}

.delete-confirm-card {
  max-width: 58rem;
}

.delete-confirm-actions {
  justify-content: flex-end;
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.deleted-workorder-alert {
  border-color: rgba(255, 119, 119, 0.38);
  background: rgba(168, 47, 59, 0.18);
}

@media (max-width: 1024px) {
  .hero h1,
  .page-hero h1 {
    font-size: 4.5rem;
  }

  .page-hero h1,
  .lead,
  .section-header {
    max-width: 58rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    inset: calc(100% + 0.75rem) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    border: 1px solid rgba(159, 199, 255, 0.35);
    border-radius: 1.5rem;
    background: #04101f;
    padding: 0.75rem;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
  }

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

  .nav-links a {
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    padding: 0 1rem;
  }

  .hero-grid,
  .contact-box,
  .login-grid,
  .admin-two-col {
    grid-template-columns: 1fr;
  }

  .three-cols,
  .stats-grid,
  .customer-grid,
  .settings-grid,
  .user-account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .admin-sidebar {
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .admin-menu-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, 0.62);
  }

  .admin-menu-open .admin-overlay {
    display: block;
  }

  .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(6, 17, 33, 0.92);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(18px);
  }

  .admin-topbar-brand img {
    width: clamp(8.75rem, 38vw, 11.8rem);
  }

  .admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .admin-topbar-user {
    display: grid;
    max-width: 42vw;
    text-align: right;
    font-size: 0.75rem;
  }

  .admin-topbar-user strong,
  .admin-topbar-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-topbar-user strong {
    color: white;
  }

  .admin-topbar-user span {
    color: rgba(255, 255, 255, 0.48);
  }

  .admin-menu-button {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(159, 199, 255, 0.25);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    color: white;
  }

  .admin-main {
    padding-left: 0;
  }
}

@media (max-width: 820px) {
  .hero,
  .page-hero {
    padding-top: 7.5rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 3.5rem;
    line-height: 0.96;
  }

  .lead {
    font-size: 1.1rem;
  }

  .section-header h2,
  .cta-panel h2 {
    font-size: 2.5rem;
  }

  .button-row,
  .cta-panel,
  .footer-bottom,
  .admin-page-header,
  .search-row {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .contact-admin-access {
    justify-content: stretch;
  }

  .contact-admin-link {
    width: 100%;
  }

  .admin-content {
    padding: 1.5rem 1rem;
  }

  .admin-page {
    gap: 1.25rem;
  }

  .admin-page-header {
    gap: 0.85rem;
    padding-bottom: 1.25rem;
  }

  .admin-page-header h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .admin-page-header p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .admin-page-header .admin-button,
  .admin-actions .admin-button,
  .search-row .admin-button {
    width: 100%;
  }

  .contact-grid,
  .two-cols,
  .three-cols,
  .stats-grid,
  .customer-grid,
  .settings-grid,
  .security-grid,
  .user-account-grid,
  .totp-setup-grid,
  .field-grid,
  .detail-grid,
  .detail-summary {
    grid-template-columns: 1fr;
  }

  .stat-card,
  .admin-card,
  .form-section,
  .table-panel {
    padding: 1rem;
  }

  .admin-actions {
    flex-direction: column;
  }

  .workorder-view-tabs,
  .delete-confirm-actions {
    align-items: stretch;
  }

  .delete-confirm-actions {
    flex-direction: column;
  }

  .workorder-view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workorder-view-tabs .admin-button,
  .delete-confirm-actions .admin-button {
    width: 100%;
  }

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

  .customer-import-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-import-panel .admin-button {
    width: 100%;
  }

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

  .admin-pagination .admin-button {
    width: 100%;
  }

  .pagination-pages {
    width: 100%;
  }

  .responsive-admin-table {
    display: block;
    min-width: 0;
  }

  .responsive-admin-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .responsive-admin-table tbody,
  .responsive-admin-table tr,
  .responsive-admin-table td {
    display: block;
    width: 100%;
  }

  .responsive-admin-table tr {
    margin-top: 0.8rem;
    border: 1px solid rgba(159, 199, 255, 0.18);
    border-radius: 0.65rem;
    background: rgba(4, 16, 31, 0.22);
    padding: 0.2rem 0.85rem;
  }

  .responsive-admin-table tr:first-child {
    margin-top: 0;
  }

  .responsive-admin-table td {
    display: grid;
    grid-template-columns: minmax(7.25rem, 0.75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    overflow-wrap: anywhere;
  }

  .responsive-admin-table td::before {
    content: attr(data-label);
    color: var(--sky);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .responsive-admin-table .empty-table-cell {
    display: block;
    border-bottom: 0;
    padding: 1.25rem 0 !important;
  }

  .responsive-admin-table .empty-table-cell::before {
    content: none;
  }

  .responsive-admin-table .table-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .responsive-admin-table .table-actions form {
    width: 100%;
  }

  .responsive-admin-table .table-actions .admin-button {
    width: 100%;
  }

  .customer-details,
  .detail-grid,
  .detail-summary {
    min-width: 0;
  }

  .pdf-actions-card {
    align-items: stretch;
    flex-direction: column;
  }

  .signature-box {
    min-height: 10rem;
  }

  .login-copy {
    display: none;
  }

  .login-page {
    padding: 1rem;
  }

  .login-grid {
    min-height: auto;
    align-items: start;
    padding-block: 0.5rem 1rem;
  }

  .login-card {
    margin-block: 0;
  }

  .recovery-code-grid {
    grid-template-columns: 1fr;
  }

  .user-account-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-nav {
    gap: 0.375rem;
    padding-inline: 0.5rem;
  }

  .brand-link {
    width: min(68vw, 16.5rem, calc(100% - 3.125rem));
    height: auto;
  }

  .menu-toggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 2.75rem;
  }

  .lead {
    font-size: 1.05rem;
  }

  .section-header h2,
  .cta-panel h2 {
    font-size: 2rem;
  }

  .admin-topbar {
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
  }

  .admin-topbar-user {
    display: none;
  }

  .admin-content {
    padding: 1.25rem 0.875rem;
  }

  .admin-page-header h1 {
    font-size: 2.25rem;
  }

  .stat-card strong {
    font-size: 1.75rem;
  }

  .user-account-head {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .user-account-head > .status-pill {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .workorder-view-tabs {
    grid-template-columns: 1fr;
  }

  .responsive-admin-table td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

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

.cookie-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: 60rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(16, 43, 82, 0.97);
  border: 1px solid rgba(76, 141, 255, 0.35);
  border-radius: 16px;
  box-shadow: var(--shadow-premium);
  color: var(--porcelain);
}

.cookie-notice[hidden] {
  display: none;
}

.cookie-notice-text {
  margin: 0;
  flex: 1 1 280px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--steel);
}

.cookie-notice-text a {
  color: var(--sky);
  text-decoration: underline;
}

.cookie-notice-accept {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 0.62rem 1.3rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--electric-blue);
  transition: background-color 0.15s ease;
}

.cookie-notice-accept:hover {
  background: var(--sky);
}

.cookie-notice-accept:focus-visible {
  outline: 2px solid var(--porcelain);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .cookie-notice {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  .cookie-notice-accept {
    width: 100%;
  }
}

/* PWA and compact-admin safeguards. These rules only affect narrow screens. */
.signature-canvas {
  color-scheme: light;
  forced-color-adjust: none;
  background: #ffffff !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  filter: none !important;
}

.signature-pad .signature-canvas,
.signature-pad.is-locked .signature-canvas {
  background: #ffffff !important;
  color: #000000 !important;
  opacity: 1 !important;
}

@media (max-width: 820px) {
  html,
  .admin-body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .admin-body {
    min-height: 100dvh;
  }

  .admin-menu-open {
    overflow: hidden;
  }

  .admin-sidebar {
    width: min(20rem, calc(100vw - 1.25rem));
    max-width: calc(100vw - 1.25rem);
    min-height: 100dvh;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
  }

  .admin-topbar {
    padding-top: calc(0.7rem + env(safe-area-inset-top));
    padding-right: max(0.875rem, env(safe-area-inset-right));
    padding-left: max(0.875rem, env(safe-area-inset-left));
  }

  .admin-content {
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
  }

  .admin-topbar-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .admin-topbar-brand img {
    width: min(13.5rem, calc(100vw - 5.25rem));
    max-width: 100%;
  }

  .admin-menu-button {
    width: 3rem;
    height: 3rem;
    flex-basis: 3rem;
  }

  .field input,
  .field textarea,
  .field select,
  .search-input {
    min-height: 3rem;
    font-size: 1rem;
  }

  .field textarea {
    min-height: 7.5rem;
  }

  .customer-suggestions {
    max-height: min(17rem, 44dvh);
    overflow-y: auto;
  }

  .signature-section-header {
    align-items: stretch;
  }

  .signature-lock-toggle {
    justify-content: center;
  }

  .signature-canvas {
    height: clamp(13rem, 44vw, 17.5rem);
  }

  .table-wrap {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .admin-content {
    padding-right: max(0.875rem, env(safe-area-inset-right));
    padding-left: max(0.875rem, env(safe-area-inset-left));
  }

  .admin-topbar-brand img {
    width: min(14rem, calc(100vw - 4.9rem));
  }

  .signature-section-header .signature-lock-toggle {
    width: 100%;
  }

  .signature-canvas {
    height: 13rem;
  }
}

@media (max-width: 820px) {
  .admin-page-actions,
  .admin-page-actions form {
    width: 100%;
  }

  .admin-page-actions .admin-button {
    width: 100%;
  }
}
