:root {
  --bg: #f3f1eb;
  --bg-soft: #f8f6f1;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-strong: #ffffff;
  --surface-dark: #171717;
  --line: rgba(23, 23, 23, 0.1);
  --line-strong: rgba(23, 23, 23, 0.16);
  --text: #171717;
  --muted: #6c6a63;
  --accent: #171717;
  --accent-strong: #2f2f2f;
  --accent-soft: rgba(23, 23, 23, 0.05);
  --success: #286140;
  --shadow-lg: 0 20px 50px rgba(25, 25, 25, 0.08);
  --shadow-md: 0 10px 30px rgba(25, 25, 25, 0.05);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(180deg, #f8f6f1 0%, #f1eee6 100%);
  font-family: "Nunito", sans-serif;
  -webkit-tap-highlight-color: rgba(21, 51, 133, 0.14);
}

a,
button,
input,
textarea,
select {
  touch-action: manipulation;
}

:target {
  scroll-margin-top: 7rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: #153385;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 180ms ease;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(23, 23, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 23, 23, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 72%);
}

a {
  color: inherit;
}

img,
video {
  max-width: 100%;
}

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

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #f8fffe;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

button:focus-visible,
.button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(21, 51, 133, 0.28);
  outline-offset: 3px;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 23, 23, 0.12);
  background: var(--accent-strong);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.56);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button-secondary:hover {
  background: var(--bg-soft);
}

.button-danger {
  background: #b91c1c;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: rgba(23, 23, 23, 0.24);
  box-shadow: 0 0 0 4px rgba(23, 23, 23, 0.07);
}

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

.layout {
  display: block;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1.15rem 1.25rem 0;
}

.topbar-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(23, 23, 23, 0.08);
  box-shadow: 0 10px 25px rgba(23, 23, 23, 0.05);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.topbar-shell::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.brand-link {
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title,
.brand-copy p,
.page-title,
.hero-copy h1,
.hero-copy h2,
.section-heading h2,
.stat-card strong,
.auth-panel h1,
.card-title,
.public-header h1,
.public-section h2,
.kpi-card strong {
  font-family: "Nunito", sans-serif;
}

.brand-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 0.95;
  font-weight: 800;
}

.brand-copy p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  min-width: 0;
}

.topnav-link {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  font-weight: 600;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.topnav-link:hover,
.topnav-link.is-active {
  transform: none;
  color: var(--text);
  background: var(--bg-soft);
  border-color: var(--line);
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.main-full {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.72) 100%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.hero::before {
  content: "";
  position: absolute;
  right: -3rem;
  top: -3rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 23, 23, 0.08) 0%, rgba(23, 23, 23, 0) 70%);
  pointer-events: none;
}

.hero::after {
  display: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.95fr);
  gap: 2rem;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-title {
  margin: 0.8rem 0 0.75rem;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  max-width: 11ch;
}

.hero-copy h2,
.page-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

.hero-copy p,
.section-heading p,
.muted,
.empty-state p,
.public-meta,
.auth-subtitle {
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

.hero-actions,
.inline-actions,
.section-actions,
.card-actions,
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-panel,
.info-panel,
.kpi-card,
.upload-panel,
.signature-panel,
.public-section,
.auth-panel {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: 1.5rem;
  border-radius: 24px;
  transform: translateY(1.6rem);
}

.hero-panel .metric {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.hero-panel .metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 0.25rem;
  font-size: 2.2rem;
  font-family: "Nunito", sans-serif;
}

.section {
  margin-top: 1.25rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 0.98;
}

.card-grid,
.stats-grid,
.gallery-grid,
.public-grid,
.kpi-grid {
  display: grid;
  gap: 1rem;
}

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

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card,
.content-card,
.list-card,
.media-card,
.observation-card,
.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 1.45rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.stat-card::before,
.content-card::before,
.list-card::before,
.media-card::before,
.observation-card::before,
.kpi-card::before {
  display: none;
}

.stat-card strong,
.kpi-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stat-card span,
.kpi-card span,
.chip,
.meta-line {
  color: var(--muted);
}

.chip-row,
.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.split-layout,
.two-column {
  display: grid;
  gap: 1rem;
}

.split-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

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

.form-card,
.surface-card,
.list-card,
.info-panel,
.upload-panel,
.signature-panel {
  padding: 1.5rem;
  border-radius: 24px;
}

.form-card,
.surface-card,
.list-card,
.info-panel {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.field-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stack {
  display: grid;
  gap: 1rem;
}

.list-card h3,
.form-card h3,
.surface-card h3,
.info-panel h3,
.upload-panel h3,
.signature-panel h3,
.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.card-title {
  margin-bottom: 0.35rem;
  font-size: 1.7rem;
  line-height: 1;
}

.media-card img,
.media-card video,
.public-media img,
.public-media video {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: none;
  border: 1px solid var(--line);
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.media-card video,
.public-media video {
  background: #1b1b1b;
}

.media-card {
  padding: 1rem;
}

.media-card a {
  display: block;
}

.media-card img,
.media-card video {
  aspect-ratio: 4 / 3;
  height: auto;
}

.media-meta,
.public-observations {
  margin-top: 0.85rem;
}

.observation-card {
  background: rgba(255, 255, 255, 0.52);
}

.empty-state {
  padding: 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.canvas-shell {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

#canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  background: #ffffff;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  border-radius: 36px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.auth-feature {
  padding: 2.5rem;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-right: 1px solid var(--line);
}

.auth-feature ul {
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.72);
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.95;
}

.auth-actions,
.auth-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.auth-footer {
  margin-top: 1rem;
  color: var(--muted);
}

.public-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.public-header {
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.public-header h1 {
  margin: 0.75rem 0;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}

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

.public-section {
  padding: 1.7rem;
  border-radius: 24px;
}

.public-media {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-link {
  display: block;
  cursor: zoom-in;
}

.gallery-link-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(7, 15, 32, 0.88);
  backdrop-filter: blur(10px);
}

.gallery-viewer.is-open {
  display: flex;
}

.gallery-viewer[aria-hidden="false"] {
  overflow: hidden;
}

.gallery-viewer-dialog {
  position: relative;
  width: min(100%, 1100px);
  max-height: calc(100vh - 4rem);
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98) 0%, rgba(236, 243, 255, 0.94) 100%);
  box-shadow: 0 24px 70px rgba(3, 10, 24, 0.42);
}

.gallery-viewer-frame {
  display: grid;
  gap: 0.9rem;
}

.gallery-viewer-media-shell {
  display: grid;
  place-items: center;
  min-height: min(68vh, 760px);
  border-radius: 18px;
  background: rgba(10, 22, 48, 0.08);
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-viewer-media {
  max-width: 100%;
  max-height: min(68vh, 760px);
  object-fit: contain;
  border-radius: 16px;
  transition: transform 180ms ease;
  transform-origin: center center;
}

.gallery-viewer-media.is-hidden {
  display: none;
}

.gallery-viewer-video {
  width: min(100%, 960px);
  max-height: min(68vh, 760px);
  background: #0b1428;
}

.gallery-viewer-toolbar {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-left: auto;
}

.gallery-viewer-action,
.gallery-viewer-close,
.gallery-viewer-nav {
  border: 0;
  border-radius: 999px;
  background: #153385;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 41, 102, 0.24);
}

.gallery-viewer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gallery-viewer-caption {
  min-width: 0;
}

.gallery-viewer-title,
.gallery-viewer-count {
  margin: 0;
}

.gallery-viewer-title {
  color: #16213f;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.gallery-viewer-count {
  margin-top: 0.2rem;
  color: #617095;
  font-size: 0.92rem;
}

.gallery-viewer-action {
  min-width: 42px;
  height: 42px;
  padding: 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.gallery-viewer-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-viewer-nav.prev {
  left: 1rem;
}

.gallery-viewer-nav.next {
  right: 1rem;
}

.gallery-viewer-close:hover,
.gallery-viewer-action:hover,
.gallery-viewer-nav:hover,
.gallery-viewer-action:focus-visible,
.gallery-viewer-close:focus-visible,
.gallery-viewer-nav:focus-visible {
  background: #102966;
}

.fade-in {
  animation: fadeIn 420ms ease both;
}

.fade-in.delay-1 { animation-delay: 80ms; }
.fade-in.delay-2 { animation-delay: 160ms; }
.fade-in.delay-3 { animation-delay: 240ms; }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .layout,
  .hero-grid,
  .split-layout,
  .auth-panel,
  .two-column {
    grid-template-columns: 1fr;
  }

  .topbar-shell,
  .main,
  .public-shell {
    padding: 1rem;
  }

  .topbar-shell {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 28px;
  }

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

  .hero-panel {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in,
  .fade-in.delay-1,
  .fade-in.delay-2,
  .fade-in.delay-3 {
    animation: none;
  }

  button,
  .button,
  .topnav-link,
  input,
  textarea,
  select,
  .skip-link {
    transition: none;
  }
}

@media (max-width: 680px) {
  .hero,
  .public-header,
  .auth-feature,
  .auth-form,
  .sidebar-shell,
  .form-card,
  .surface-card,
  .list-card,
  .upload-panel,
  .signature-panel,
  .info-panel {
    padding: 1rem;
  }

  .topbar {
    padding: 0.75rem 0.75rem 0;
  }

  .topbar-shell,
  .button,
  button,
  .topnav-link {
    border-radius: 20px;
  }

  .topnav {
    width: 100%;
    justify-content: stretch;
  }

  .topnav-link {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-actions,
  .inline-actions,
  .card-actions,
  .split-actions,
  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .button {
    width: 100%;
  }

  .hero-copy h1,
  .hero-copy h2,
  .page-title,
  .public-header h1,
  .auth-panel h1 {
    line-height: 1.05;
  }

  .field-grid,
  .gallery-grid,
  .card-grid,
  .public-media,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .gallery-viewer {
    padding: 1rem;
  }

  .gallery-viewer-dialog {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .gallery-viewer-media-shell {
    min-height: 52vh;
  }

  .gallery-viewer-nav {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }

  .gallery-viewer-nav.prev {
    left: 0.55rem;
  }

  .gallery-viewer-nav.next {
    right: 0.55rem;
  }

  .gallery-viewer-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-viewer-toolbar {
    margin-left: 0;
  }
}

/* Modern commercial refresh */

:root {
  --bg: #eef3fb;
  --bg-soft: #f7f9fd;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-dark: #10234f;
  --line: rgba(21, 51, 133, 0.12);
  --line-strong: rgba(21, 51, 133, 0.24);
  --text: #16213f;
  --muted: #617095;
  --accent: #153385;
  --accent-strong: #102966;
  --accent-soft: rgba(21, 51, 133, 0.08);
  --success: #198754;
  --shadow-lg: 0 28px 70px rgba(18, 36, 83, 0.12);
  --shadow-md: 0 16px 38px rgba(18, 36, 83, 0.1);
}

body {
  background:
    radial-gradient(circle at top left, rgba(124, 158, 247, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(21, 51, 133, 0.12), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 44%, #edf2fb 100%);
  font-family: "Nunito", sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(21, 51, 133, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 51, 133, 0.02) 1px, transparent 1px);
}

.brand-title,
.brand-copy p,
.page-title,
.hero-copy h1,
.hero-copy h2,
.section-heading h2,
.stat-card strong,
.auth-panel h1,
.card-title,
.public-header h1,
.public-section h2,
.kpi-card strong,
.metric-value {
  font-family: "Nunito", sans-serif;
}

.topbar {
  padding-top: 1rem;
}

.topbar-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(21, 51, 133, 0.1);
  box-shadow: 0 16px 40px rgba(16, 41, 102, 0.08);
}

.topbar-shell::after {
  border-color: rgba(255, 255, 255, 0.7);
}

.brand-mark {
  background: linear-gradient(135deg, #153385 0%, #0d225f 100%);
  box-shadow: 0 14px 30px rgba(21, 51, 133, 0.22);
}

.brand-copy p,
.metric-label,
.eyebrow {
  letter-spacing: 0.12em;
}

.topnav-link:hover,
.topnav-link.is-active {
  background: rgba(21, 51, 133, 0.08);
  border-color: rgba(21, 51, 133, 0.12);
  color: var(--accent);
}

button,
.button {
  background: linear-gradient(135deg, var(--accent) 0%, #2049b3 100%);
  box-shadow: 0 14px 28px rgba(21, 51, 133, 0.18);
}

button:hover,
.button:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, #153385 100%);
  box-shadow: 0 18px 34px rgba(21, 51, 133, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  border: 1px solid rgba(21, 51, 133, 0.14);
}

.button-secondary:hover {
  background: #f2f6ff;
}

.button-danger {
  background: rgba(185, 28, 28, 0.08);
  color: #b42318;
  border: 1px solid rgba(185, 28, 28, 0.18);
  box-shadow: none;
}

.button-danger:hover {
  background: rgba(185, 28, 28, 0.14);
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.28);
  box-shadow: 0 10px 20px rgba(185, 28, 28, 0.12);
}

input,
textarea,
select {
  border-color: rgba(21, 51, 133, 0.14);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: rgba(21, 51, 133, 0.34);
  box-shadow: 0 0 0 4px rgba(21, 51, 133, 0.1);
}

.flash-stack {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.card-title,
.muted,
.search-summary,
.chip,
.metric-note,
.metric-label,
.panel-note {
  overflow-wrap: anywhere;
}

.flash {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.94);
}

.flash strong {
  font-size: 0.92rem;
}

.flash-success {
  border-color: rgba(25, 135, 84, 0.16);
  background: linear-gradient(180deg, rgba(240, 255, 247, 0.98) 0%, rgba(235, 251, 242, 0.98) 100%);
  color: #145a39;
}

.flash-error {
  border-color: rgba(220, 53, 69, 0.14);
  background: linear-gradient(180deg, rgba(255, 245, 246, 0.98) 0%, rgba(255, 238, 240, 0.98) 100%);
  color: #8d2030;
}

.flash-info {
  border-color: rgba(21, 51, 133, 0.14);
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.98) 0%, rgba(235, 242, 255, 0.98) 100%);
  color: #153385;
}

.hero,
.public-header,
.auth-panel,
.hero-panel,
.info-panel,
.upload-panel,
.signature-panel,
.public-section,
.auth-form,
.auth-feature,
.form-card,
.surface-card,
.list-card,
.stat-card,
.content-card,
.media-card,
.observation-card,
.kpi-card {
  border-color: rgba(21, 51, 133, 0.1);
  box-shadow: var(--shadow-md);
}

.hero {
  padding: 2.7rem;
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 244, 255, 0.95) 64%, rgba(225, 235, 255, 0.88) 100%);
}

.hero::before {
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(21, 51, 133, 0.15) 0%, rgba(21, 51, 133, 0) 68%);
}

.dashboard-hero-grid {
  align-items: stretch;
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.hero-mini-stats div {
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(21, 51, 133, 0.1);
}

.hero-mini-stats strong,
.panel-kicker,
.stat-kicker,
.card-topline,
.workflow-step strong {
  display: block;
}

.hero-mini-stats strong,
.metric-value,
.stat-card strong {
  font-variant-numeric: tabular-nums;
}

.hero-mini-stats strong {
  font-size: 1.4rem;
  color: var(--accent);
}

.hero-mini-stats span,
.panel-note,
.stat-kicker,
.card-topline {
  color: var(--muted);
  font-size: 0.86rem;
}

.panel-kicker,
.stat-kicker,
.card-topline {
  margin-bottom: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel {
  transform: none;
  padding: 1.55rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(17, 43, 110, 0.98) 0%, rgba(21, 51, 133, 0.96) 100%);
  color: #f5f8ff;
}

.hero-panel .metric {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.hero-panel .metric-label,
.hero-panel .panel-kicker,
.hero-panel .panel-note {
  color: rgba(241, 246, 255, 0.78);
}

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

.metric.compact {
  padding: 0.4rem 0 0;
  border-bottom: 0;
}

.metric-highlight .metric-value {
  font-size: 3.1rem;
}

.stats-grid {
  gap: 1.15rem;
}

.stat-card,
.content-card,
.list-card,
.media-card,
.observation-card,
.kpi-card,
.form-card,
.surface-card,
.info-panel,
.upload-panel,
.signature-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(249, 251, 255, 0.92) 100%);
}

.stat-card {
  padding-top: 1.2rem;
}

.content-card,
.list-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2ab27b;
  box-shadow: 0 0 0 5px rgba(42, 178, 123, 0.12);
}

.card-topline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.chip {
  background: rgba(21, 51, 133, 0.05);
  border-color: rgba(21, 51, 133, 0.12);
  color: var(--accent);
}

.workflow-step {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(21, 51, 133, 0.04);
  border: 1px solid rgba(21, 51, 133, 0.08);
}

.workflow-step p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.compact-step p,
.metric-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.metric-textual {
  border-bottom: 0;
  padding-bottom: 0;
}

.inline-form {
  margin: 0;
}

.card-actions {
  align-items: center;
}

.card-actions .button,
.card-actions .inline-form .button {
  min-height: 40px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  line-height: 1;
}

.card-actions .inline-form {
  display: flex;
}

.section-card-actions {
  flex-wrap: nowrap;
}

.section-card-actions .action-main {
  flex: 0 0 auto;
}

.section-card-actions .action-secondary,
.section-card-actions .inline-form {
  flex: 1 1 auto;
}

.section-card-actions .action-main,
.section-card-actions .action-secondary,
.section-card-actions .inline-form .action-secondary {
  justify-content: center;
  white-space: nowrap;
}

.section-card-actions .action-main {
  min-width: 88px;
  padding-inline: 0.9rem;
}

.section-card-actions .action-secondary,
.section-card-actions .inline-form .action-secondary {
  min-width: 0;
}

.detail-split-layout {
  align-items: start;
}

.search-panel {
  margin-bottom: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(21, 51, 133, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(249, 251, 255, 0.92) 100%);
  box-shadow: var(--shadow-md);
}

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

.search-field {
  display: grid;
  gap: 0.45rem;
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.search-summary {
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.topnav-button {
  appearance: none;
  font: inherit;
  background: transparent;
  cursor: pointer;
}

.user-role-form {
  margin-top: 0.5rem;
}

.media-form {
  margin-top: 0.85rem;
}

.media-chip {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.observation-stack .observation-card {
  border-left: 4px solid rgba(21, 51, 133, 0.16);
}

.auth-panel {
  background: rgba(255, 255, 255, 0.9);
}

.auth-feature {
  background:
    radial-gradient(circle at top left, rgba(87, 127, 241, 0.18), transparent 34%),
    linear-gradient(180deg, #16398f 0%, #102966 100%);
  color: #f8fbff;
  border-right-color: rgba(255, 255, 255, 0.12);
}

.auth-brand-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 1.1rem;
  display: grid;
  place-items: center;
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-feature .auth-subtitle,
.auth-feature ul,
.auth-feature .eyebrow {
  color: rgba(245, 248, 255, 0.82);
}

.auth-form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 255, 0.96) 100%);
}

.public-header {
  background:
    radial-gradient(circle at top right, rgba(87, 127, 241, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(242, 247, 255, 0.94) 100%);
}

.empty-state {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(21, 51, 133, 0.2);
}

@media (max-width: 1080px) {
  .hero-mini-stats,
  .metric-row,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 681px) and (max-width: 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .hero {
    padding: 1.2rem;
  }

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

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

  .hero-mini-stats {
    grid-template-columns: 1fr;
  }

  .flash {
    align-items: flex-start;
    flex-direction: column;
  }
}
