:root {
  --ink: #111827;
  --muted: #5c6270;
  --line: #d9dde6;
  --surface: rgba(255, 255, 255, .94);
  --c5: #2b284f;
  --guardian: #8d1d49;
  --gold: #d2ac2d;
  --wash: #f4f6f8;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  background: var(--wash);
  color: var(--ink);
  min-height: 100vh;
  margin: 0;
  position: relative;
}

body::before {
  background-image: linear-gradient(90deg, rgba(244, 246, 248, .94), rgba(244, 246, 248, .72)), url("/images/Guardianes911.png");
  background-position: center calc(50% + 24px);
  background-repeat: no-repeat;
  background-size: min(1100px, 82vw) auto;
  content: "";
  inset: 0;
  opacity: .88;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  color: var(--c5);
  font-weight: 800;
}

.nav-link {
  color: var(--ink);
  font-weight: 700;
}

.button-link {
  background: transparent;
  border: 0;
}

.login-pill {
  background: var(--c5);
  border-radius: 999px;
  color: #fff;
  padding-left: 16px;
  padding-right: 16px;
}

.login-pill:hover {
  color: #fff;
}

.app-shell {
  padding-bottom: 40px;
  padding-top: 24px;
}

.institutional-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 22px 0;
}

.footer-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.footer-row a {
  color: #8b93a3;
  font-size: .82rem;
  text-decoration: none;
}

.admin-shell {
  display: grid;
  gap: 0;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: calc(100vh - 67px);
}

.admin-sidebar {
  background: linear-gradient(180deg, #201d3f, #111827);
  border-right: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  min-height: calc(100vh - 67px);
  padding: 18px;
  position: sticky;
  top: 0;
}

.admin-sidebar-brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
}

.admin-sidebar-brand > span {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  display: flex;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.admin-sidebar-brand strong,
.admin-sidebar-brand small {
  display: block;
}

.admin-sidebar-brand strong {
  font-size: .98rem;
  line-height: 1.1;
}

.admin-sidebar-brand small {
  color: rgba(255, 255, 255, .68);
  margin-top: 3px;
}

.admin-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, .82);
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 11px 12px;
  text-decoration: none;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}

.admin-nav span {
  color: var(--gold);
  font-size: .74rem;
  font-weight: 900;
}

.admin-nav strong {
  font-size: .95rem;
  overflow-wrap: anywhere;
}

.admin-content {
  min-width: 0;
  padding: 22px;
}

.admin-footer {
  display: none;
}

.btn-primary {
  background: var(--guardian);
  border-color: var(--guardian);
}

.btn-primary:hover {
  background: #74183c;
  border-color: #74183c;
}

.institutional-panel,
.form-surface,
.table-surface,
.side-panel,
.feature-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(17, 24, 39, .08);
}

.hero {
  align-items: center;
  background-image: linear-gradient(135deg, rgba(43, 40, 79, .96), rgba(141, 29, 73, .88));
  color: #fff;
  display: grid;
  min-height: 520px;
  overflow: hidden;
  padding: clamp(28px, 6vw, 76px);
  position: relative;
}

.public-hero {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(10, 14, 28, .88) 0%, rgba(20, 24, 40, .56) 35%, rgba(20, 24, 40, .18) 72%, rgba(20, 24, 40, .34) 100%),
    url("/images/portada.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  background-color: #0a0e1c;
  box-shadow: 0 26px 70px rgba(43, 40, 79, .18);
  color: #fff;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  margin-left: calc(50% - 50vw);
  margin-top: -24px;
  min-height: calc(100vh - 67px);
  overflow: hidden;
  padding: clamp(24px, 5vw, 64px);
  position: relative;
  width: 100vw;
}

.public-hero::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
  content: "";
  height: 42%;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
}

.public-hero-copy {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.public-hero h1 {
  font-size: clamp(2.7rem, 5.4vw, 5.6rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .95;
  margin-bottom: 16px;
  max-width: 920px;
}

.public-hero .lead {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1.08rem, 1.5vw, 1.35rem);
  max-width: 760px;
}

.hero-proof {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  color: var(--ink);
  padding: 18px;
  position: relative;
  z-index: 1;
}

.hero-proof span {
  color: var(--guardian);
  display: block;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-proof strong {
  color: var(--c5);
  display: block;
  font-size: 1.55rem;
  margin: 8px 0;
}

.hero-proof p {
  color: var(--muted);
  margin: 0;
}

.hero::after {
  background-image: url("/images/Guardianes911.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  inset: auto 34px 30px auto;
  opacity: .18;
  position: absolute;
  width: min(520px, 45vw);
  height: 300px;
}

.hero-content {
  max-width: 780px;
  position: relative;
  z-index: 1;
}

.hero h1,
.page-heading h1 {
  font-size: clamp(2.2rem, 4vw, 4.7rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.02;
}

.lead {
  color: rgba(255, 255, 255, .86);
  font-size: 1.2rem;
  max-width: 720px;
}

.eyebrow {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .12em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.story-band,
.impact-section,
.trust-band {
  margin-top: 26px;
}

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

.section-heading h2,
.impact-section h2 {
  color: var(--c5);
  font-size: clamp(2rem, 3vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.step-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.step-grid article {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.step-grid span {
  align-items: center;
  background: var(--c5);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  margin-bottom: 18px;
  width: 38px;
}

.step-grid h3 {
  color: var(--guardian);
  font-size: 1.18rem;
  font-weight: 850;
}

.step-grid p,
.impact-section p,
.impact-list span,
.trust-band p {
  color: var(--muted);
}

.impact-section {
  align-items: center;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  padding: clamp(26px, 5vw, 58px);
}

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

.impact-list div {
  background: #f8f5f8;
  border-left: 5px solid var(--guardian);
  border-radius: 8px;
  padding: 18px;
}

.impact-list strong,
.trust-band strong {
  color: var(--c5);
  display: block;
  font-size: 1.1rem;
}

.impact-list span {
  display: block;
  margin-top: 4px;
}

.trust-band {
  align-items: center;
  background: #fff8df;
  border: 1px solid #eadca8;
  border-radius: 8px;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 24px;
}

.trust-band p {
  margin-bottom: 0;
  max-width: 820px;
}

.dashboard-hero {
  align-items: end;
  background:
    linear-gradient(115deg, rgba(43, 40, 79, .98), rgba(141, 29, 73, .9)),
    url("/images/Guardianes911.png");
  background-position: center, right 24px center;
  background-repeat: no-repeat;
  background-size: cover, min(460px, 34vw) auto;
  border-radius: 8px;
  box-shadow: 0 22px 62px rgba(43, 40, 79, .24);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 210px;
  padding: clamp(22px, 3.4vw, 42px);
}

.dashboard-hero h1 {
  font-size: clamp(2.1rem, 3.5vw, 3.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.dashboard-hero p {
  color: rgba(255, 255, 255, .86);
  margin-bottom: 0;
  max-width: 740px;
}

.admin-page-header {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(17, 24, 39, .06);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
}

.admin-page-header h1 {
  color: var(--c5);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 8px;
}

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

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}

.kpi-grid article,
.kpi-link,
.dashboard-panel {
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(17, 24, 39, .07);
}

.kpi-grid article,
.kpi-link {
  color: var(--ink);
  padding: 16px;
  text-decoration: none;
}

.kpi-link:hover {
  border-color: rgba(141, 29, 73, .35);
  color: var(--ink);
  transform: translateY(-1px);
}

.kpi-grid span {
  color: var(--guardian);
  display: block;
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kpi-grid strong {
  color: var(--c5);
  display: block;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  margin: 7px 0;
}

.kpi-grid p {
  color: var(--muted);
  margin: 0;
}

.ops-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.ops-strip a {
  background: #fff8df;
  border: 1px solid #eadca8;
  border-radius: 8px;
  color: var(--ink);
  display: block;
  padding: 14px;
  text-decoration: none;
}

.ops-strip a:hover {
  background: #fff4c8;
}

.ops-strip strong,
.ops-strip span {
  display: block;
}

.ops-strip strong {
  color: var(--c5);
  font-weight: 900;
}

.ops-strip span {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 3px;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  margin-top: 14px;
}

.dashboard-grid.secondary {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .72fr);
}

.dashboard-panel {
  padding: 18px;
}

.compact-hero {
  min-height: 170px;
}

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

.camera-directory {
  margin-top: 14px;
}

.camera-filter-bar {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .7fr) minmax(140px, .65fr) minmax(120px, .55fr) auto;
  margin-bottom: 16px;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.desktop-camera-table .btn {
  margin-bottom: 6px;
  width: 100%;
}

.mobile-camera-list {
  display: none !important;
}

.pager-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
}

.pager-row div {
  display: flex;
  gap: 8px;
}

.access-box {
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
}

.access-box h3 {
  color: var(--c5);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.access-detail-list {
  grid-template-columns: 150px minmax(0, 1fr);
}

.muted-pill {
  background: #eef1f5;
  color: #5c6270;
}

.panel-heading {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-heading h2 {
  color: var(--c5);
  font-size: 1.45rem;
  font-weight: 900;
  margin: 0;
}

.panel-heading > span {
  background: #f8f5f8;
  border-radius: 999px;
  color: var(--guardian);
  font-weight: 850;
  padding: 7px 11px;
}

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

.queue-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px;
  text-decoration: none;
}

.queue-item:hover {
  background: #fff8df;
  color: var(--ink);
}

.queue-item strong,
.queue-item span {
  display: block;
}

.queue-item div > span {
  color: var(--muted);
  font-size: .92rem;
  margin-top: 4px;
}

.status-bars {
  display: grid;
  gap: 13px;
}

.status-bars label {
  align-items: center;
  color: var(--ink);
  display: flex;
  flex-direction: row;
  font-size: .9rem;
  justify-content: space-between;
  margin-bottom: 6px;
}

.status-bars label span {
  color: var(--muted);
}

.bar-track {
  background: #edf0f5;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-track span {
  background: linear-gradient(90deg, var(--guardian), var(--gold));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 3px;
}

.dashboard-table span {
  color: var(--muted);
}

.mobile-request-list {
  display: none;
}

.mobile-request-list.always-visible {
  display: grid;
  gap: 10px;
}

.request-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.request-card-top,
.request-card-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.request-card-top strong {
  color: var(--c5);
  font-weight: 900;
}

.request-card h3 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  margin: 0;
  overflow-wrap: anywhere;
}

.request-card p,
.request-card-meta {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

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

.activity-list li {
  border-left: 4px solid var(--gold);
  padding-left: 14px;
}

.activity-list a {
  color: var(--guardian);
  display: block;
  font-weight: 850;
  text-decoration: none;
}

.activity-list strong,
.activity-list span {
  display: block;
}

.activity-list span {
  color: var(--muted);
  font-size: .86rem;
}

.activity-list p {
  color: var(--muted);
  margin: 5px 0 0;
}

.dashboard-notice {
  margin-top: 18px;
}

.auth-shell {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  min-height: min(580px, calc(100vh - 150px));
}

.auth-copy {
  align-content: end;
  background:
    linear-gradient(135deg, rgba(43, 40, 79, .98), rgba(141, 29, 73, .86)),
    url("/images/Guardianes911.png");
  background-position: center, right 28px center;
  background-repeat: no-repeat;
  background-size: cover, min(500px, 46vw) auto;
  border-radius: 8px;
  box-shadow: 0 22px 62px rgba(43, 40, 79, .22);
  color: #fff;
  display: grid;
  padding: clamp(24px, 4vw, 52px);
}

.auth-copy h1 {
  font-size: clamp(2.3rem, 4.3vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .96;
  max-width: 760px;
}

.auth-copy p {
  color: rgba(255, 255, 255, .88);
  font-size: 1.14rem;
  max-width: 620px;
}

.auth-card {
  align-self: center;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 55px rgba(17, 24, 39, .12);
  display: grid;
  gap: 14px;
  padding: clamp(20px, 2.4vw, 30px);
}

.auth-card h2 {
  color: var(--c5);
  font-weight: 900;
}

.auth-alt {
  color: var(--muted);
  margin: 0;
  text-align: center;
}

.auth-alt a {
  color: var(--guardian);
  font-weight: 850;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--guardian);
  font: inherit;
  font-weight: 850;
  padding: 0;
}

.otp-input {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
}

.form-check-row.compact {
  margin-top: 0;
}

.account-hero {
  align-items: end;
  background:
    linear-gradient(115deg, rgba(43, 40, 79, .98), rgba(141, 29, 73, .88)),
    url("/images/Guardianes911.png");
  background-position: center, right 28px center;
  background-repeat: no-repeat;
  background-size: cover, min(460px, 36vw) auto;
  border-radius: 8px;
  box-shadow: 0 22px 62px rgba(43, 40, 79, .22);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 210px;
  padding: clamp(22px, 3.5vw, 44px);
}

.account-hero h1 {
  font-size: clamp(1.9rem, 3.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.account-hero p {
  color: rgba(255, 255, 255, .86);
  margin-bottom: 0;
  max-width: 720px;
}

.account-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.account-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.account-details {
  grid-template-columns: 100px minmax(0, 1fr);
}

.feature-grid article {
  padding: 18px;
}

.feature-grid h2,
.form-surface h2,
.side-panel h2 {
  color: var(--c5);
  font-size: 1.08rem;
  font-weight: 850;
}

.page-heading {
  margin-bottom: 18px;
}

.page-heading p {
  color: var(--muted);
  max-width: 860px;
}

.form-surface,
.table-surface,
.side-panel {
  padding: 18px;
}

.table-surface {
  overflow-x: auto;
}

.table {
  min-width: 760px;
}

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

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label,
label {
  color: var(--muted);
  font-weight: 750;
}

.field label {
  color: var(--ink);
  font-size: .92rem;
}

.required-mark {
  color: var(--guardian);
  font-weight: 900;
}

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

.quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-list {
  display: grid;
  gap: 14px;
}

.device-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.device-card-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.device-card-heading strong {
  color: var(--c5);
  font-weight: 900;
}

.credential-flow {
  gap: 16px;
}

.credential-step {
  display: grid;
  gap: 14px;
}

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

.device-choice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 5px;
  padding: 14px;
  text-align: left;
}

.device-choice.active {
  border-color: var(--guardian);
  box-shadow: 0 0 0 3px rgba(141, 29, 73, .12);
}

.device-choice span,
.device-choice em {
  color: var(--muted);
  font-size: .78rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.device-choice strong {
  color: var(--c5);
  font-size: 1rem;
}

.device-choice small {
  color: var(--muted);
  font-size: .9rem;
}

.compact-notice {
  margin: 0;
}

.option-chip {
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--c5);
  font-size: .84rem;
  font-weight: 800;
  padding: 7px 11px;
}

.option-chip:hover,
.option-chip:focus {
  background: #fff;
  border-color: var(--guardian);
  color: var(--guardian);
}

.other-brand-input,
.other-access-method-input {
  display: none;
}

.other-brand-input.visible,
.other-access-method-input.visible {
  display: block;
}

.field .text-danger {
  font-size: .84rem;
}

.form-control,
.form-select {
  border-color: #cfd6e2;
  border-radius: 8px;
  min-height: 42px;
}

textarea.form-control {
  min-height: 92px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--guardian);
  box-shadow: 0 0 0 .2rem rgba(141, 29, 73, .15);
}

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

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

.form-flow .form-grid {
  margin-bottom: 0;
}

.compact-flow {
  gap: 14px;
}

.form-section {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
}

.form-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.tab-list {
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  scrollbar-width: thin;
}

.tab-button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 850;
  padding: 10px 14px;
  white-space: nowrap;
}

.tab-button.active {
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .08);
  color: var(--guardian);
}

.tab-panel[hidden] {
  display: none;
}

.tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.detail-tabs {
  display: grid;
  gap: 18px;
}

.form-section-heading {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr);
}

.form-section-heading span {
  align-items: center;
  background: var(--c5);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.form-section-heading h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.form-section-heading p {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 0;
}

.sticky-actions {
  background: rgba(255, 255, 255, .88);
  border-top: 1px solid var(--line);
  bottom: 0;
  margin: 0 -18px -18px;
  padding: 14px 18px 0;
  position: sticky;
  z-index: 3;
}

.address-search {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.map-picker {
  background: #f8fafc;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.map-canvas {
  background: #e8edf3;
  height: min(380px, 48vh);
  min-height: 300px;
  width: 100%;
}

.map-tools {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.map-tools span {
  color: var(--muted);
  font-size: .92rem;
}

.leaflet-container {
  font-family: inherit;
}

.notice {
  background: #fff8df;
  border-left: 4px solid var(--gold);
  color: #5f4a0d;
  margin: 8px 0 20px;
  padding: 14px 16px;
}

.validation-summary {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  color: #9f1239;
  display: none;
  padding: 12px 14px;
}

.validation-summary.validation-summary-errors {
  display: block;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

.status-layout,
.detail-grid {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

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

.timeline li {
  border-left: 4px solid var(--guardian);
  padding-left: 14px;
}

.timeline span {
  color: var(--muted);
  display: block;
  font-size: .9rem;
}

.status-pill {
  background: #eceaf4;
  border-radius: 999px;
  color: var(--c5);
  display: inline-block;
  font-weight: 800;
  padding: 6px 10px;
}

.empty-state {
  color: var(--muted);
  padding-top: 20px;
}

.detail-list {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: 140px minmax(0, 1fr);
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.button-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.toolbar-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.form-check-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.form-check-row .form-check-input {
  flex: 0 0 auto;
  margin: 0;
}

.side-panel a {
  margin-bottom: 8px;
  width: 100%;
}

.print-body {
  background: #e5e7eb;
}

.official-document {
  background: white;
  box-shadow: 0 12px 40px rgba(17, 24, 39, .18);
  margin: 32px auto;
  min-height: 1100px;
  padding: 70px;
  width: min(900px, calc(100% - 32px));
}

.official-document header {
  align-items: center;
  border-bottom: 3px solid var(--c5);
  display: flex;
  justify-content: space-between;
  padding-bottom: 24px;
}

.official-document header strong {
  color: var(--c5);
  display: block;
  font-size: 3rem;
  line-height: 1;
}

.doc-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

.official-document h1 {
  font-size: 2rem;
  margin: 48px 0 28px;
}

.official-document blockquote {
  border-left: 5px solid var(--gold);
  color: var(--muted);
  margin: 26px 0;
  padding-left: 20px;
}

.signature-row {
  display: grid;
  gap: 70px;
  grid-template-columns: 1fr 1fr;
  margin-top: 130px;
}

.signature-row span {
  border-top: 1px solid var(--ink);
  display: block;
  margin-bottom: 10px;
}

.print-button {
  margin-top: 48px;
}

@media (max-width: 900px) {
  body::before {
    background-position: center center;
    background-size: min(92vw, 520px) auto;
    opacity: .42;
  }

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

  .admin-sidebar {
    min-height: auto;
    overflow-x: auto;
    padding: 12px 14px;
    position: static;
  }

  .admin-sidebar-brand {
    border-bottom: 0;
    padding-bottom: 10px;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    margin-top: 0;
    padding-bottom: 2px;
    width: max-content;
  }

  .admin-nav a {
    grid-template-columns: 24px max-content;
    min-width: max-content;
    padding: 9px 10px;
  }

  .admin-content {
    padding: 14px;
  }

  .app-shell {
    padding-bottom: 24px;
    padding-top: 14px;
  }

  .hero::after {
    display: none;
  }

  .public-hero {
    background:
      linear-gradient(180deg, rgba(10, 14, 28, .1) 0%, rgba(10, 14, 28, .72) 52%, rgba(10, 14, 28, .94) 100%),
      url("/images/portada.png");
    background-color: #0a0e1c;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    grid-template-columns: 1fr;
    margin-left: calc(50% - 50vw);
    margin-top: -14px;
    min-height: calc(100vh - 61px);
    padding: 22px;
    width: 100vw;
  }

  .public-hero::before {
    display: none;
  }

  .public-hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.65rem);
    line-height: 1.02;
    margin-bottom: 10px;
  }

  .public-hero .lead {
    font-size: .95rem;
    line-height: 1.45;
  }

  .hero-proof {
    padding: 14px;
  }

  .hero-proof strong {
    font-size: 1.15rem;
  }

  .hero-proof p {
    font-size: .9rem;
    margin-bottom: 0;
  }

  .actions {
    gap: 8px;
    margin-top: 14px;
  }

  .actions .btn-lg {
    font-size: .95rem;
    padding: .55rem .85rem;
  }

  .feature-grid,
  .dashboard-grid,
  .auth-shell,
  .account-grid,
  .step-grid,
  .impact-section,
  .status-layout,
  .detail-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid article {
    padding: 12px;
  }

  .kpi-grid span {
    font-size: .68rem;
  }

  .kpi-grid strong {
    font-size: 1.65rem;
    margin: 5px 0;
  }

  .dashboard-hero,
  .admin-page-header,
  .account-hero {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px;
  }

  .dashboard-hero h1,
  .account-hero h1 {
    font-size: 2rem;
  }

  .dashboard-hero-actions,
  .admin-header-actions,
  .account-hero-actions {
    justify-content: flex-start;
  }

  .ops-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .form-surface,
  .table-surface,
  .side-panel,
  .feature-grid article {
    padding: 14px;
  }

  .camera-filter-bar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .filter-actions,
  .pager-row,
  .pager-row div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .desktop-camera-table {
    display: none;
  }

  .mobile-camera-list {
    display: grid !important;
  }

  .access-detail-list {
    grid-template-columns: 1fr;
  }

  .page-heading {
    margin-bottom: 14px;
  }

  .page-heading h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .page-heading p {
    font-size: .95rem;
  }

  .story-band,
  .impact-section,
  .trust-band {
    margin-top: 16px;
  }

  .section-heading h2,
  .impact-section h2 {
    font-size: 1.7rem;
  }

  .step-grid {
    gap: 10px;
    margin-top: 12px;
  }

  .step-grid article {
    padding: 14px;
  }

  .step-grid span {
    height: 30px;
    margin-bottom: 8px;
    width: 30px;
  }

  .step-grid h3 {
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .step-grid p,
  .impact-section p,
  .impact-list span,
  .trust-band p {
    font-size: .92rem;
    margin-bottom: 0;
  }

  .impact-section {
    gap: 16px;
    padding: 16px;
  }

  .impact-list {
    gap: 8px;
  }

  .impact-list div {
    padding: 12px;
  }

  .trust-band {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .form-flow {
    gap: 14px;
  }

  .tab-list {
    margin-left: -4px;
    margin-right: -4px;
    padding: 5px;
  }

  .tab-button {
    font-size: .88rem;
    padding: 9px 11px;
  }

  .tab-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-actions .btn {
    width: 100%;
  }

  .form-section {
    gap: 12px;
    padding-bottom: 14px;
  }

  .form-section-heading {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .form-section-heading span {
    height: 30px;
    width: 30px;
  }

  .form-section-heading p {
    display: none;
  }

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

  .table {
    min-width: 620px;
  }

  .desktop-table {
    display: none;
  }

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

  .request-card-top,
  .request-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .sticky-actions {
    margin: 0 -14px -14px;
    padding: 12px 14px 0;
    position: static;
  }

  .address-search {
    grid-template-columns: 1fr;
  }

  .map-canvas {
    height: 300px;
    min-height: 260px;
  }

  .map-tools {
    align-items: flex-start;
    gap: 8px;
  }

  .map-tools .btn,
  .form-actions .btn,
  .auth-card .btn {
    width: 100%;
  }

  .auth-shell {
    min-height: auto;
  }

  .auth-copy {
    min-height: 220px;
    padding: 22px;
  }

  .auth-copy h1 {
    font-size: 2.2rem;
  }

  .auth-copy p {
    font-size: 1rem;
  }

  .auth-card {
    padding: 18px;
  }

  .footer-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media print {
  body::before,
  .print-button {
    display: none;
  }

  .print-body {
    background: white;
  }

  .official-document {
    box-shadow: none;
    margin: 0;
    width: auto;
  }
}
