:root {
  --portal-blue-950: #00264a;
  --portal-blue-900: #003b70;
  --portal-blue-800: #004d8c;
  --portal-blue-700: #0062a8;
  --portal-cyan: #39d3d3;
  --portal-gold: #f6c344;
  --portal-ink: #17212b;
  --portal-muted: #536579;
  --portal-canvas: #f3f7fb;
  --portal-surface: #ffffff;
  --portal-border: #d5e1ec;
  --portal-success: #137a4b;
  --portal-danger: #b42318;
  --portal-radius-sm: 0.5rem;
  --portal-radius: 1rem;
  --portal-radius-lg: 1.5rem;
  --portal-shadow: 0 1rem 2.5rem rgba(0, 59, 112, 0.1);
  --portal-focus: #ffb703;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--portal-ink);
  background: var(--portal-canvas);
  font-family: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a { text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.12em; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--portal-focus) !important;
  outline-offset: 3px !important;
  box-shadow: none !important;
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--portal-blue-950);
  border-radius: var(--portal-radius-sm);
  transform: translateY(-150%);
  transition: transform 0.15s ease;
}

.skip-link:focus { transform: translateY(0); }

.container-xxl { max-width: 1320px; }

/* Public header */
.portal-header { color: #fff; background: var(--portal-blue-900); }

.portal-slim {
  min-height: 2.5rem;
  padding: 0.4rem 0;
  color: #eaf4ff;
  background: var(--portal-blue-950);
  font-size: 0.9rem;
}

.portal-slim-label { font-weight: 600; letter-spacing: 0.01em; }

.portal-slim-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.portal-slim-links a { color: #fff; }

.portal-brand {
  position: relative;
  overflow: hidden;
  padding: 1.25rem 0;
  background:
    radial-gradient(circle at 85% -30%, rgba(57, 211, 211, 0.32), transparent 38%),
    linear-gradient(120deg, var(--portal-blue-900), var(--portal-blue-800));
}

.portal-brand::after {
  position: absolute;
  right: -5rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  content: "";
  border: 3rem solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.portal-brand-row,
.portal-identity { display: flex; align-items: center; }
.portal-brand-row { position: relative; z-index: 1; justify-content: space-between; gap: 1.5rem; }

.portal-identity {
  min-width: 0;
  gap: 1rem;
  color: #fff;
  text-decoration: none;
}

.portal-identity:hover { color: #fff; text-decoration: none; }

.portal-logo-wrap,
.portal-monogram {
  display: grid;
  flex: 0 0 4.25rem;
  width: 4.25rem;
  height: 4.25rem;
  place-items: center;
  overflow: hidden;
  color: var(--portal-blue-950);
  background: #fff;
  border-radius: 1.1rem;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.18);
  font-size: 2rem;
  font-weight: 700;
}

.portal-logo { display: block; max-width: 92%; max-height: 92%; object-fit: contain; }
.portal-entity { display: block; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.05; }
.portal-title { display: block; margin-top: 0.28rem; color: #dceeff; font-size: clamp(1rem, 2.2vw, 1.25rem); }
.portal-brand-actions { flex: 0 0 auto; }
.portal-brand-actions .btn { min-height: 2.75rem; display: inline-flex; align-items: center; }

.portal-nav-wrap { background: #fff; border-bottom: 1px solid var(--portal-border); box-shadow: 0 0.3rem 1rem rgba(0, 38, 74, 0.08); }
.portal-nav { display: flex; align-items: stretch; gap: 0.2rem; overflow-x: auto; scrollbar-width: thin; }
.portal-nav a {
  display: inline-flex;
  min-height: 3.25rem;
  flex: 0 0 auto;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--portal-blue-900);
  border-bottom: 0.22rem solid transparent;
  font-weight: 600;
  text-decoration: none;
}
.portal-nav a:hover { color: var(--portal-blue-950); background: #edf6ff; border-bottom-color: var(--portal-cyan); }

.portal-utility-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-top: 1rem; padding-bottom: 0.25rem; }
.portal-utility-nav a { color: var(--portal-blue-800); font-weight: 600; }

/* Hero and homepage */
.portal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 7vw, 5.25rem) 0;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(0, 38, 74, 0.98), rgba(0, 77, 140, 0.92)),
    var(--portal-blue-900);
}

.portal-hero::before,
.portal-hero::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}
.portal-hero::before { top: -13rem; right: -8rem; width: 34rem; height: 34rem; }
.portal-hero::after { right: 18%; bottom: -16rem; width: 27rem; height: 27rem; }
.portal-hero .container-xxl { position: relative; z-index: 1; }

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: #bff9f9;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.portal-eyebrow::before { width: 2rem; height: 0.18rem; content: ""; background: var(--portal-cyan); }
.portal-hero h1 { width: 100%; max-width: none; margin-bottom: 1rem; color: #fff; font-size: clamp(2.2rem, 6vw, 4.7rem); line-height: 0.98; letter-spacing: -0.035em; }
.portal-hero-lead { width: 100%; max-width: none; color: #e4f2ff; font-size: clamp(1.05rem, 2vw, 1.3rem); }

.portal-search {
  display: flex;
  width: 100%;
  max-width: none;
  margin-top: 2rem;
  padding: 0.45rem;
  background: #fff;
  border-radius: 0.9rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
}
.portal-search .form-control { min-height: 3.5rem; border: 0; background: #fff; }
.portal-search .btn { min-width: 8rem; border-radius: 0.65rem; }

.portal-stats { margin-top: -2.25rem; position: relative; z-index: 2; }
.portal-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); box-shadow: var(--portal-shadow); }
.portal-stat { padding: 1.4rem 1.6rem; }
.portal-stat + .portal-stat { border-left: 1px solid var(--portal-border); }
.portal-stat strong { display: block; color: var(--portal-blue-900); font-size: clamp(1.65rem, 4vw, 2.35rem); line-height: 1; }
.portal-stat span { display: block; margin-top: 0.35rem; color: var(--portal-muted); }

.portal-section-block { padding: clamp(3rem, 7vw, 5rem) 0; }
.portal-section-heading { max-width: 48rem; margin-bottom: 2rem; }
.portal-section-heading h2 { color: var(--portal-blue-950); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.portal-section-heading p { color: var(--portal-muted); font-size: 1.1rem; }

.section-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: 0 0.35rem 1.1rem rgba(0, 59, 112, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.section-card::before { display: block; width: 100%; height: 0.3rem; content: ""; background: linear-gradient(90deg, var(--portal-blue-700), var(--portal-cyan)); }
.section-card:hover { transform: translateY(-0.3rem); border-color: #a6c9e7; box-shadow: var(--portal-shadow); }
.section-card-body { display: flex; min-height: 14rem; flex-direction: column; padding: 1.5rem; }
.section-card-number { color: var(--portal-blue-800); font-family: "Roboto Mono", monospace; font-size: 0.86rem; font-weight: 700; }
.section-card h3 { margin: 0.7rem 0; color: var(--portal-blue-950); font-size: 1.28rem; line-height: 1.2; }
.section-card p { color: var(--portal-muted); }
.section-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; }
.section-card-link { font-weight: 700; }
.section-count { min-width: 2.4rem; padding: 0.25rem 0.55rem; color: var(--portal-blue-950); background: #dff8f8; border-radius: 999px; font-weight: 700; text-align: center; }
.section-card.is-empty::before { background: #a5adb6; }
.section-card.is-empty .section-card-number,
.section-card.is-empty h3,
.section-card.is-empty p,
.section-card.is-empty .section-card-link { color: #5f6b76; }
.section-card.is-empty .section-count { color: #55606b; background: #e8ebee; }

/* Public inner pages */
.portal-main { width: 100%; padding-top: 2rem; padding-bottom: 4rem; }
.page-intro { padding: 1.5rem 0 2rem; }
.page-intro h1 { color: var(--portal-blue-950); font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.05; }
.page-intro p { max-width: 62rem; color: var(--portal-muted); font-size: 1.1rem; }

.breadcrumb { margin-bottom: 1rem; font-size: 0.95rem; }
.breadcrumb a { font-weight: 600; }

.section-sidebar { position: sticky; top: 1rem; padding: 0.75rem; background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); }
.section-sidebar-title { padding: 0.6rem 0.75rem; color: var(--portal-muted); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.section-sidebar .list-group-item { margin-bottom: 0.15rem; color: var(--portal-blue-900); border: 0; border-radius: 0.55rem; font-weight: 600; }
.section-sidebar .list-group-item:hover { background: #edf6ff; }
.section-sidebar .list-group-item.active { color: #fff; background: var(--portal-blue-800); }
.section-sidebar .list-group-item.is-empty:not(.active) { color: #66717c; }

.content-panel { padding: clamp(1.5rem, 3.5vw, 2.5rem); background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius); box-shadow: 0 0.4rem 1.4rem rgba(0, 59, 112, 0.055); }
.content-panel + .content-panel { margin-top: 1.25rem; }

/* Bootstrap Italia intentionally leaves some card spacing to the consumer.
   Public content cards need an explicit inset to keep text and actions away
   from the outer panel edge at every breakpoint. */
.portal-body .portal-main .card > .card-body,
.portal-body .portal-main .card.card-body { padding: clamp(1.4rem, 3vw, 2rem); }
.portal-body .portal-main .card > .card-body > :first-child,
.portal-body .portal-main .card.card-body > :first-child { margin-top: 0; }
.portal-body .portal-main .card > .card-body > :last-child,
.portal-body .portal-main .card.card-body > :last-child { margin-bottom: 0; }

.subsection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.subsection-link { display: flex; min-height: 5.5rem; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem; color: var(--portal-blue-900); background: #f7fbff; border: 1px solid var(--portal-border); border-radius: 0.75rem; font-weight: 700; text-decoration: none; }
.subsection-link:hover { color: var(--portal-blue-950); background: #edf6ff; border-color: #9fc3e3; text-decoration: underline; }
.subsection-link.is-empty { color: #626d78; background: #f3f4f5; border-color: #d9dde1; }
.subsection-link.is-empty:hover { color: #4f5963; background: #eaedef; border-color: #bdc4ca; }
.public-section-empty .page-intro h1,
.public-section-empty .page-intro p { color: #626d78; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; padding: clamp(1.15rem, 2.5vw, 1.5rem); background: #eef5fb; border-radius: 0.75rem; }
.toolbar form { flex: 1 1 24rem; }
.share-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; padding-top: 0.25rem; }
.share-tools .btn { display: inline-flex; min-height: 2.85rem; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 1rem; }
.share-tools img,
.share-tools .share-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 1.2rem; object-fit: contain; }

.table-responsive { border: 1px solid var(--portal-border); border-radius: 0.75rem; }
.table { margin-bottom: 0; color: var(--portal-ink); }
.table caption { padding: 0.75rem 1rem; color: var(--portal-muted); caption-side: top; font-weight: 600; }
.table thead th { color: var(--portal-blue-950); background: #eaf3fa; border-bottom: 2px solid #bdd3e6; }
.table > :not(caption) > * > * { padding: 0.8rem 0.9rem; border-bottom-color: #dde7f0; vertical-align: middle; }
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #f8fbfd; }

.non-applicability-row > * { color: #505b65; background-color: #f3f5f6 !important; }
.non-applicability-row a { color: #4d5964; }
.non-applicability-badge { display: inline-flex; align-items: center; margin-left: 0.65rem; padding: 0.18rem 0.5rem; color: #fff; background: #65717c; border-radius: 999px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: middle; }
.non-applicability-notice { margin-bottom: 1.5rem; overflow: hidden; color: #46515b; background: #f1f3f5; border: 1px solid #cfd5da; border-left: 0.4rem solid #6b7680; border-radius: 0.8rem; box-shadow: 0 0.45rem 1.2rem rgba(37, 48, 58, 0.06); }
.non-applicability-heading { display: flex; align-items: center; gap: 0.7rem; padding: 1rem 1.2rem; background: #e3e7ea; border-bottom: 1px solid #cfd5da; }
.non-applicability-icon { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 1.75rem; place-items: center; color: #fff; background: #66727d; border-radius: 50%; font-family: Georgia, serif; font-weight: 700; }
.non-applicability-label { color: #3f4952; font-size: 1.05rem; font-weight: 700; }
.non-applicability-content { padding: 1.2rem; }
.non-applicability-content > :last-child { margin-bottom: 0; }

.result-summary { margin-bottom: 1.5rem; padding: 1rem 1.2rem; background: #eaf3fa; border-left: 0.35rem solid var(--portal-blue-700); border-radius: 0.3rem 0.75rem 0.75rem 0.3rem; }
.result-group { margin-top: 2.5rem; }
.result-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 0.65rem; border-bottom: 2px solid var(--portal-border); }
.result-list { display: grid; gap: 0.85rem; margin: 1rem 0; padding: 0; list-style: none; }
.result-item { padding: 1.2rem; background: #fff; border: 1px solid var(--portal-border); border-radius: 0.75rem; }
.result-item h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.result-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; color: var(--portal-muted); font-size: 0.92rem; }

.pagination .page-link { min-width: 2.75rem; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; }
.pagination .page-item.active .page-link,
.pagination .page-item.active .page-link:hover,
.pagination .page-item.active .page-link:focus { color: #fff; background: var(--portal-blue-800); border-color: var(--portal-blue-800); font-weight: 700; }

.form-control,
.form-select { min-height: 2.75rem; border-color: #8497aa; }
.form-control:focus,
.form-select:focus { border-color: var(--portal-blue-700); }
.form-label { color: var(--portal-ink); font-weight: 600; }
.btn { min-height: 2.7rem; border-radius: 0.45rem; font-weight: 600; }
.btn-sm { min-height: 2.25rem; }
.btn-primary { background: var(--portal-blue-800); border-color: var(--portal-blue-800); }
.btn-primary:hover { background: var(--portal-blue-950); border-color: var(--portal-blue-950); }
.btn-outline-primary { color: var(--portal-blue-800); border-color: var(--portal-blue-800); }
.btn-outline-primary:hover { color: #fff; background: var(--portal-blue-800); }
.card { border-color: var(--portal-border); border-radius: var(--portal-radius); box-shadow: 0 0.35rem 1.2rem rgba(0, 59, 112, 0.055); }
.alert { border-radius: 0.65rem; }

/* Footer istituzionale */
.portal-footer { padding: 0; color: #edf6ff; background: #173f65; }
.portal-footer a { color: #fff; }
.portal-footer-main { padding: clamp(2.5rem, 5vw, 4rem) 0 0; background: linear-gradient(135deg, #234f77 0%, #173f65 58%, #103452 100%); }
.portal-footer-brand-row { display: flex; align-items: center; margin-bottom: 2.4rem; }
.portal-footer-brand { display: inline-flex; align-items: center; gap: 1rem; color: #fff; text-decoration: none; }
.portal-footer-brand:hover { color: #fff; text-decoration: underline; }
.portal-footer-logo-wrap { display: grid; width: 7rem; height: 4.2rem; flex: 0 0 7rem; place-items: center; padding: 0.45rem; overflow: hidden; background: #fff; border-radius: 0.55rem; }
.portal-footer-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.portal-footer-entity { display: block; margin: 0; color: #fff; font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 700; line-height: 1.15; }
.portal-footer-subtitle { display: block; margin-top: 0.35rem; color: #d9eaff; font-weight: 600; }
.portal-footer-columns { padding-bottom: 2rem; }
.portal-footer-heading { margin-bottom: 1rem; color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 0.025em; text-transform: uppercase; }
.portal-footer-heading a { text-decoration-thickness: 0.08em; }
.portal-footer-address { margin: 0; color: #edf6ff; font-style: normal; line-height: 1.7; }
.portal-footer-links { margin: 0; padding: 0; list-style: none; }
.portal-footer-links li { display: flex; flex-wrap: wrap; gap: 0.25rem 0.45rem; align-items: baseline; }
.portal-footer-links li + li { margin-top: 0.7rem; }
.portal-footer-label { color: #c8dcef; font-weight: 600; }
.portal-footer-privacy { max-width: 24rem; margin: 0; color: #edf6ff; line-height: 1.7; }
.portal-footer-compliance { display: flex; min-height: 5.2rem; align-items: center; justify-content: flex-end; gap: 1.4rem; padding: 1.1rem 0; border-top: 1px solid rgba(255, 255, 255, 0.42); font-size: 0.92rem; text-align: right; }
.portal-footer-agid-mark { display: grid; width: 12rem; height: 3.25rem; flex: 0 0 12rem; place-items: center; padding: 0.35rem 0.55rem; background: #fff; border-radius: 0.35rem; }
.portal-footer-agid-mark img { width: 100%; height: 100%; object-fit: contain; filter: none; }
.portal-footer-legal { background: #0b263e; }
.portal-footer-legal-inner { display: flex; min-height: 5.2rem; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.portal-footer-legal-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1.5rem; }
.portal-footer-legal-links a { font-weight: 600; }
.portal-footer-credits { display: flex; flex-direction: column; gap: 0.25rem; color: #d8e8f6; font-size: 0.9rem; text-align: right; }
.portal-footer-credits strong { color: #fff; letter-spacing: 0.015em; }
.back-to-top { position: fixed; z-index: 1000; right: 1rem; bottom: 1rem; display: grid; width: 3rem; height: 3rem; place-items: center; color: #fff; background: var(--portal-blue-800); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0.5rem 1.5rem rgba(0, 38, 74, 0.25); opacity: 0; pointer-events: none; transform: translateY(0.75rem); transition: 0.18s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* Admin */
.admin-body { min-height: 100vh; background: #eef3f7; }
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { position: fixed; z-index: 1040; inset: 0 auto 0 0; display: flex; width: 17rem; flex-direction: column; color: #fff; background: linear-gradient(180deg, var(--portal-blue-950), #00345f); box-shadow: 0.5rem 0 2rem rgba(0, 38, 74, 0.18); }
.admin-sidebar-brand { display: flex; align-items: center; gap: 0.8rem; min-height: 5.5rem; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.admin-sidebar-brand strong,
.admin-sidebar-brand small { display: block; }
.admin-sidebar-brand strong { font-size: 1.25rem; }
.admin-sidebar-brand small { color: #cde2f5; }
.admin-monogram { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; color: var(--portal-blue-950); background: var(--portal-cyan); border-radius: 0.75rem; font-size: 1.35rem; font-weight: 700; }
.admin-nav { flex: 1 1 auto; padding: 1rem 0.75rem; overflow-y: auto; }
.admin-nav-link { display: flex; min-height: 2.65rem; align-items: center; margin-bottom: 0.18rem; padding: 0.55rem 0.75rem; color: #edf7ff; border-left: 0.25rem solid transparent; border-radius: 0.45rem; font-weight: 600; text-decoration: none; }
.admin-nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.admin-nav-link.active { color: #fff; background: rgba(57, 211, 211, 0.17); border-left-color: var(--portal-cyan); }
.admin-sidebar-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.admin-sidebar-footer a { padding: 0.55rem; color: #fff; border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 0.45rem; font-size: 0.9rem; text-align: center; }
.admin-main { display: flex; width: calc(100% - 17rem); min-width: 0; min-height: 100vh; flex-direction: column; margin-left: 17rem; }
.admin-topbar { position: sticky; z-index: 1020; top: 0; display: flex; min-height: 5.5rem; align-items: center; gap: 1rem; padding: 0.8rem clamp(1rem, 3vw, 2rem); background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--portal-border); backdrop-filter: blur(12px); }
.admin-topbar-kicker { display: block; color: var(--portal-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-page-title { margin: 0; color: var(--portal-blue-950); font-size: clamp(1.2rem, 2.5vw, 1.65rem); }
.admin-user { margin-left: auto; padding: 0.4rem 0.7rem; color: var(--portal-blue-950); background: #e2f6f6; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.admin-user span { color: var(--portal-success); }
.admin-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem); }
.admin-content > .container,
.admin-content > .container-fluid { max-width: none; padding-right: 0; padding-left: 0; }
.admin-menu-toggle { display: none; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; color: var(--portal-blue-950); background: #fff; border: 1px solid var(--portal-border); border-radius: 0.45rem; font-size: 1.25rem; }
.admin-overlay { display: none; }
.admin-wrapper-login .admin-main { width: 100%; margin-left: 0; }
.admin-wrapper-login .admin-content { display: grid; flex: 1 1 auto; place-items: center; }
.admin-wrapper-login .admin-content > .row { width: min(100%, 34rem); }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dashboard-grid .card { position: relative; overflow: hidden; border: 0; box-shadow: 0 0.75rem 2rem rgba(0, 59, 112, 0.09); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.dashboard-grid .card::before { display: block; width: 100%; height: 0.28rem; content: ""; background: linear-gradient(90deg, var(--portal-blue-700), var(--portal-cyan)); }
.dashboard-grid .card:hover { transform: translateY(-0.25rem); box-shadow: 0 1.1rem 2.6rem rgba(0, 59, 112, 0.15); }
.dashboard-grid .card-title { color: var(--portal-blue-950); font-size: 1.2rem; }
.dashboard-grid .display-6 { margin: 1rem 0; color: var(--portal-blue-800); font-family: "Roboto Mono", monospace; font-weight: 700; }
.mandatory-gap-panel { margin: 0 0 1.5rem; padding: clamp(1.2rem, 2.5vw, 1.75rem); background: #fff; border: 1px solid #efc3bd; border-left: 0.45rem solid var(--portal-danger); border-radius: var(--portal-radius); box-shadow: 0 0.75rem 2rem rgba(95, 33, 25, 0.08); }
.mandatory-gap-summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.mandatory-gap-count { display: grid; width: 3.4rem; height: 3.4rem; flex: 0 0 3.4rem; place-items: center; color: #fff; background: var(--portal-danger); border-radius: 50%; font-family: "Roboto Mono", monospace; font-size: 1.35rem; font-weight: 700; }
.mandatory-gap-table td:first-child { min-width: 19rem; }

.status-ok { background: #dff4e9 !important; }
.status-warning { background: #fff3cc !important; }
.status-danger { background: #fde2df !important; }

@media (max-width: 991.98px) {
  .portal-slim-label { display: none; }
  .portal-slim .container-xxl { justify-content: flex-end !important; }
  .portal-brand-actions { display: none; }
  .portal-stat-grid { grid-template-columns: 1fr; }
  .portal-stat + .portal-stat { border-top: 1px solid var(--portal-border); border-left: 0; }
  .section-sidebar { position: static; }
  .admin-sidebar { transform: translateX(-105%); transition: transform 0.2s ease; }
  .admin-main { width: 100%; margin-left: 0; }
  .admin-menu-toggle { display: grid; place-items: center; }
  .admin-menu-open .admin-sidebar { transform: translateX(0); }
  .admin-menu-open .admin-overlay { position: fixed; z-index: 1035; inset: 0; display: block; background: rgba(0, 24, 46, 0.6); border: 0; }
}

@media (max-width: 767.98px) {
  .portal-brand { padding: 1rem 0; }
  .portal-logo-wrap,
  .portal-monogram { width: 3.25rem; height: 3.25rem; flex-basis: 3.25rem; border-radius: 0.8rem; }
  .portal-nav a { padding-right: 0.75rem; padding-left: 0.75rem; }
  .portal-hero { padding-bottom: 4rem; }
  .portal-search { display: grid; }
  .portal-search .btn { width: 100%; }
  .subsection-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; }
  .share-tools { width: 100%; }
  .portal-footer-compliance { align-items: flex-start; justify-content: flex-start; flex-direction: column; text-align: left; }
  .portal-footer-legal-inner { align-items: flex-start; flex-direction: column; }
  .portal-footer-credits { text-align: left; }
  .admin-topbar { min-height: 4.75rem; }
  .admin-topbar-kicker { display: none; }
  .admin-user { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 480px) {
  .portal-slim-links { width: 100%; justify-content: space-between; gap: 0.5rem; }
  .portal-entity { font-size: 1.2rem; }
  .portal-title { font-size: 0.95rem; }
  .portal-stat { padding: 1rem 1.2rem; }
  .content-panel { border-radius: 0.75rem; }
}

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

@media print {
  .portal-slim,
  .portal-nav-wrap,
  .portal-brand-actions,
  .portal-footer,
  .back-to-top,
  .share-tools,
  .admin-sidebar,
  .admin-topbar,
  .page-actions,
  .btn { display: none !important; }
  body { color: #000; background: #fff; }
  .portal-brand { padding: 0 0 1rem; color: #000; background: #fff; border-bottom: 2px solid #000; }
  .portal-identity,
  .portal-entity,
  .portal-title { color: #000; }
  .admin-main { width: 100%; margin: 0; }
  .admin-content,
  .portal-main { max-width: none; padding: 0; }
  a { color: #000; text-decoration: underline; }
}
