:root {
  --ink: #17202a;
  --muted: #607080;
  --line: #dbe3ea;
  --paper: #ffffff;
  --soft: #f5f7f8;
  --teal: #087f7a;
  --teal-dark: #065f5b;
  --coral: #e85d4f;
  --amber: #f5b942;
  --green: #1f9d68;
  --danger: #c93a3a;
  --shadow: 0 18px 45px rgba(23, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand,
.nav,
.actions {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.brand-logo {
  height: 34px;
  width: auto;
}

.nav-toggle,
.side-toggle {
  display: none;
}

.nav {
  flex-wrap: wrap;
  font-weight: 650;
  justify-content: flex-end;
}

.button,
button,
input[type="submit"] {
  align-items: center;
  background: var(--teal);
  border: 0;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--teal-dark);
  text-decoration: none;
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
}

.button.ghost {
  background: #e7f3f1;
  color: var(--teal-dark);
}

.button.full {
  width: 100%;
}

.hero {
  background: linear-gradient(90deg, rgba(14, 24, 30, 0.82), rgba(14, 24, 30, 0.42)),
    url("https://images.unsplash.com/photo-1563986768609-322da13575f3?auto=format&fit=crop&w=1800&q=80") center / cover;
  color: white;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.48fr);
  min-height: min(720px, calc(100vh - 72px));
  padding: clamp(56px, 8vw, 110px) 6vw;
}

.hero h1,
.page-head h1,
.dashboard-head h1,
.auth-copy h1,
.certificate-doc h1,
.content-narrow h1 {
  font-size: clamp(2rem, 4.6vw, 4.8rem);
  line-height: 1.02;
  margin: 8px 0 18px;
  max-width: 900px;
}

.hero p {
  font-size: 1.1rem;
  max-width: 720px;
}

.hero-copy {
  align-self: center;
}

.hero-card {
  align-self: end;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 26px;
}

.shield {
  align-items: center;
  background: var(--green);
  border-radius: 8px;
  color: white;
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.eyebrow {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd27a;
}

.search-panel {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 28px;
  max-width: 720px;
  padding: 10px;
}

.search-panel.compact {
  box-shadow: none;
  margin-top: 18px;
}

.input,
textarea,
select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

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

.metric-strip {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 22px 6vw 0;
}

.metric-strip div {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 22px;
}

.metric-strip div:first-child {
  border-radius: 8px 0 0 8px;
}

.metric-strip div:last-child {
  border-radius: 0 8px 8px 0;
}

.metric-strip strong {
  display: block;
  font-size: 2rem;
}

.metric-strip span {
  color: var(--muted);
}

.admin-metrics {
  grid-template-columns: repeat(4, 1fr);
  max-width: none;
}

.section-grid,
.dashboard-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 54px 6vw;
}

.section-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.section-grid h2,
.tips-band h2,
.panel h2 {
  margin-top: 0;
}

.steps,
.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps article,
.card,
.panel,
.certificate-doc,
.qr-panel,
.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.steps article,
.card,
.panel,
.empty-state {
  padding: 22px;
}

.steps span {
  align-items: center;
  background: #fff2cf;
  border-radius: 8px;
  color: #8a5a00;
  display: inline-flex;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.panel {
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
}

.tips-band {
  background: #102321;
  color: white;
  padding: 56px 6vw;
}

.tips-band .cards {
  margin-top: 24px;
}

.tips-band .card {
  background: #f8fbfa;
  color: var(--ink);
}

.page-head,
.dashboard-head,
.auth-shell,
.content-narrow,
.certificate-layout {
  padding: 54px 6vw;
}

.page-head {
  background: #102321;
  color: white;
}

.content-narrow {
  margin: 0 auto;
  max-width: 980px;
}

.auth-shell {
  align-items: center;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  min-height: calc(100vh - 160px);
}

.auth-copy {
  max-width: 680px;
}

.form-card {
  display: grid;
  gap: 14px;
}

.form-card.wide {
  max-width: 980px;
  width: 100%;
}

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

.form-row label {
  display: block;
  font-weight: 750;
  margin-bottom: 6px;
}

.form-row small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.form-row .error {
  color: var(--danger);
}

.checkline {
  align-items: center;
  display: flex !important;
  gap: 10px;
  margin: 0;
}

.checkline input {
  height: 18px;
  width: 18px;
}

.dashboard-head {
  align-items: center;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.dashboard-head h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

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

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

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

table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.badge {
  background: #eef3f5;
  border-radius: 999px;
  color: #33414d;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
}

.badge.success {
  background: #e0f5eb;
  color: #0b6b43;
}

.badge.danger {
  background: #ffe8e6;
  color: var(--danger);
}

.stack {
  display: grid;
  gap: 12px;
}

.seller-row,
.work-row,
.tip-item {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 3px;
  padding: 14px;
}

.seller-row small,
.work-row small,
.tip-item span,
.muted {
  color: var(--muted);
}

.certificate-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.certificate-doc,
.qr-panel {
  padding: 32px;
}

.cert-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

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

.details div {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.details dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.details dd {
  margin: 4px 0 0;
}

.qr-panel {
  align-self: start;
  text-align: center;
}

.qr-panel img {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto 18px;
}

.empty-state {
  margin: 24px 0;
  text-align: center;
}

.flash-wrap {
  display: grid;
  gap: 10px;
  left: 50%;
  max-width: 680px;
  position: fixed;
  top: 86px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  z-index: 50;
}

.flash {
  background: white;
  border: 1px solid var(--line);
  border-left: 6px solid var(--teal);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
}

.flash.is-hiding {
  opacity: 0;
  transition: opacity 240ms ease;
}

.flash.danger {
  border-left-color: var(--danger);
}

.flash.success {
  border-left-color: var(--green);
}

.footer {
  align-items: center;
  background: white;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 26px 6vw;
}

.footer div {
  display: grid;
}

@media (max-width: 920px) {
  .topbar,
  .dashboard-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .section-grid,
  .auth-shell,
  .certificate-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .dashboard-grid,
  .steps,
  .cards,
  .metric-strip,
  .admin-metrics,
  .details {
    grid-template-columns: 1fr;
  }

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

  .metric-strip div,
  .metric-strip div:first-child,
  .metric-strip div:last-child {
    border-radius: 8px;
  }
}

@media (max-width: 620px) {
  .search-panel,
  .form-grid,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .nav,
  .actions {
    align-items: stretch;
    width: 100%;
  }

  .nav a,
  .actions a {
    width: 100%;
  }

  .hero,
  .page-head,
  .dashboard-head,
  .auth-shell,
  .content-narrow,
  .certificate-layout,
  .section-grid,
  .dashboard-grid,
  .tips-band {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* SaaS/app refresh inspired by the provided mockup */
:root {
  --app-bg: #eef5f4;
  --sidebar: #064a50;
  --sidebar-dark: #04373d;
  --mint: #dff4ea;
  --gold: #bd7d11;
  --radius: 8px;
  --soft-shadow: 0 14px 34px rgba(13, 48, 53, 0.12);
}

.topbar {
  margin: 0 auto;
  max-width: 1280px;
  width: calc(100% - 48px);
  top: 18px;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  min-height: 58px;
}

.brand-mark {
  background: linear-gradient(135deg, #18b66a, #06646a);
  height: 30px;
  width: 30px;
}

.nav a {
  color: #17202a;
  font-size: 0.92rem;
}

.button.accent {
  background: var(--gold);
}

.button.accent:hover {
  background: #9b640b;
}

.mock-hero {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.72), transparent 30%),
    linear-gradient(135deg, #e8f4f2 0%, #b9e5ca 56%, #8ed6a6 100%);
  color: var(--ink);
  grid-template-columns: minmax(0, 1fr) 370px;
  margin: 42px auto 0;
  max-width: 1280px;
  min-height: 560px;
  overflow: hidden;
  position: relative;
  width: calc(100% - 48px);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.mock-hero::after {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  bottom: -160px;
  content: "";
  height: 520px;
  position: absolute;
  right: -120px;
  width: 620px;
}

.mock-hero .hero-copy,
.mock-hero .hero-proof {
  position: relative;
  z-index: 1;
}

.mock-hero h1 {
  color: #0f1c1d;
  font-size: clamp(2.2rem, 4vw, 4rem);
  max-width: 860px;
}

.mock-hero p {
  color: #334448;
}

.pill-search {
  align-items: center;
  border-radius: 999px;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  padding: 8px;
}

.pill-search .input {
  border: 0;
  border-radius: 999px;
}

.pill-search .button {
  border-radius: 999px;
  white-space: nowrap;
}

.hero-proof {
  align-self: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  padding: 18px;
}

.valid-strip,
.valid-banner {
  background: linear-gradient(135deg, #17c75b, #00a94f);
  border-radius: var(--radius);
  color: white;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 900;
  margin-bottom: 18px;
  padding: 18px;
  text-align: center;
  text-transform: uppercase;
}

.valid-banner.invalid {
  background: linear-gradient(135deg, #d84f4a, #a92d2d);
}

.valid-banner span {
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  display: inline-flex;
  font-size: 1rem;
  height: 30px;
  justify-content: center;
  margin-left: 8px;
  width: 30px;
}

.hero-proof dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.hero-proof dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-proof dd {
  font-weight: 850;
  margin: 2px 0 0;
}

.trust-strip {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin: -34px auto 0;
  max-width: 900px;
  padding: 16px 22px;
  position: relative;
  width: calc(100% - 96px);
  z-index: 3;
}

.trust-strip div {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 10px;
}

.trust-strip span,
.side-nav a span {
  background: var(--mint);
  border: 1px solid #b9e7d3;
  border-radius: 999px;
  height: 20px;
  width: 20px;
}

.trust-strip span::after {
  color: var(--teal);
  content: "✓";
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.featured-panel {
  background: rgba(255, 255, 255, 0.92);
}

.cert-mock {
  background: linear-gradient(180deg, #f5fbfa, #e6f1ef);
  min-height: calc(100vh - 140px);
}

.cert-mock .certificate-doc {
  box-shadow: var(--soft-shadow);
  margin: 0 auto;
  max-width: 980px;
  width: 100%;
}

.cert-body-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

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

.qr-panel.compact {
  background: #edf5f3;
  padding: 18px;
}

.qr-panel.compact span {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.cert-checks {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
  padding-top: 18px;
}

.cert-checks span {
  color: #123a35;
  font-weight: 850;
}

.cert-checks span::before {
  color: var(--teal);
  content: "✓ ";
}

.app-body {
  background:
    radial-gradient(circle at 15% 0%, rgba(174, 222, 210, 0.45), transparent 36%),
    var(--app-bg);
}

.app-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-dark));
  color: white;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand {
  align-items: center;
  color: white;
  display: flex;
  font-weight: 900;
  gap: 10px;
}

.side-brand:hover,
.side-nav a:hover,
.side-exit:hover {
  text-decoration: none;
}

.side-logo {
  align-items: center;
  background: linear-gradient(135deg, #20c76a, #0b777c);
  border-radius: var(--radius);
  display: inline-flex;
  font-size: 1.5rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.side-logo-img {
  height: 42px;
  max-width: 156px;
  width: auto;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav a,
.side-exit {
  align-items: center;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  font-weight: 750;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.side-nav a span {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  height: 16px;
  width: 16px;
}

.side-exit {
  margin-top: auto;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 86px;
  padding: 18px 28px;
}

.app-topbar h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.05;
  margin: 0;
}

.app-topbar p {
  color: var(--muted);
  margin: 4px 0 0;
}

.app-kicker {
  color: var(--ink) !important;
  font-size: 0.9rem;
  font-weight: 900;
  margin: 0 0 4px !important;
}

.app-user {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.app-user small {
  color: var(--muted);
  display: block;
}

.avatar,
.icon-btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.avatar {
  background: #e6f4ef;
  color: var(--teal-dark);
}

.icon-btn {
  background: white;
  border: 1px solid var(--line);
  color: var(--teal-dark);
  font-size: 0.76rem;
}

.app-content {
  padding: 24px 28px 46px;
}

.app-action-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.mini-search {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  max-width: 560px;
  padding: 6px;
  width: 100%;
}

.mini-search input {
  border: 0;
  font: inherit;
  min-width: 0;
  padding: 0 12px;
}

.mini-search button {
  min-height: 38px;
}

.app-content .dashboard-grid,
.app-content .metric-strip {
  padding: 0;
}

.dashboard-grid {
  gap: 18px;
}

.panel,
.card,
.steps article,
.empty-state,
.certificate-doc,
.qr-panel {
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(13, 48, 53, 0.07);
}

.panel h2,
.card h3 {
  letter-spacing: 0;
}

.panel-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-card {
  align-items: start;
  display: grid;
  gap: 14px;
  min-height: 170px;
}

.stat-card strong {
  color: var(--sidebar);
  font-size: 2.4rem;
  line-height: 1;
}

.avatar-stack {
  display: flex;
}

.avatar-stack i {
  background: linear-gradient(135deg, #d6ad82, #7a4c31);
  border: 2px solid white;
  border-radius: 999px;
  height: 28px;
  margin-right: -8px;
  width: 28px;
}

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

.seller-profile-card {
  text-align: center;
}

.seller-avatar {
  align-items: center;
  background: linear-gradient(135deg, #17c76b, #065f64);
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 2rem;
  font-weight: 900;
  height: 76px;
  justify-content: center;
  width: 76px;
}

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

.timeline li {
  align-items: center;
  color: var(--muted);
  display: grid;
  font-weight: 850;
  gap: 12px;
  grid-template-columns: 34px 1fr;
}

.timeline li::before {
  align-items: center;
  border: 2px solid #9bcac6;
  border-radius: 999px;
  content: counter(step);
  counter-increment: step;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.timeline li.done {
  color: var(--ink);
}

.timeline li.done::before {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
}

.review-switches {
  display: grid;
  gap: 14px;
}

.review-switches span {
  align-items: center;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
}

.review-switches i {
  background: #d2dbdd;
  border-radius: 999px;
  display: inline-block;
  height: 20px;
  position: relative;
  width: 38px;
}

.review-switches i::after {
  background: white;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  content: "";
  height: 16px;
  left: 2px;
  position: absolute;
  top: 2px;
  width: 16px;
}

.review-switches i.on {
  background: var(--teal);
}

.review-switches i.on::after {
  left: 20px;
}

.flash-wrap.in-app {
  left: auto;
  margin: 14px 28px 0;
  max-width: none;
  position: static;
  transform: none;
  width: auto;
}

@media (max-width: 980px) {
  .mock-hero,
  .cert-body-grid {
    grid-template-columns: 1fr;
  }

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

  .app-sidebar {
    height: auto;
    position: static;
  }

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

  .app-topbar,
  .app-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-user {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .topbar,
  .mock-hero {
    width: calc(100% - 24px);
  }

  .topbar {
    top: 10px;
  }

  .pill-search,
  .trust-strip,
  .compact-cards,
  .cert-checks {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    margin-top: 16px;
    width: calc(100% - 36px);
  }

  .app-content,
  .app-topbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-toggle,
  .side-toggle {
    align-items: center;
    background: #e7f3f1;
    border: 1px solid var(--line);
    color: var(--teal-dark);
    display: inline-flex;
    font-weight: 850;
    min-height: 38px;
    padding: 0 12px;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }

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

  .nav a {
    justify-content: center;
    width: 100%;
  }

  .app-sidebar {
    gap: 12px;
  }

  .side-brand {
    justify-content: space-between;
  }

  .side-toggle {
    align-self: flex-start;
  }

  .side-nav,
  .side-exit {
    display: none;
  }

  .app-sidebar.is-open .side-nav {
    display: grid;
  }

  .app-sidebar.is-open .side-exit {
    display: flex;
  }
}

.admin-hero {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
}

.admin-kpi {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(13, 48, 53, 0.08);
  display: grid;
  gap: 8px;
  min-height: 154px;
  padding: 20px;
}

.admin-kpi.primary {
  background: linear-gradient(135deg, #073d42, #0b7d73 58%, #c98212);
  color: white;
}

.admin-kpi span {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
}

.admin-kpi.primary span,
.admin-kpi.primary small {
  color: rgba(255, 255, 255, 0.82);
}

.admin-kpi strong {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1;
}

.admin-kpi small,
td small,
.chart-row small {
  color: var(--muted);
  display: block;
}

.admin-dashboard {
  align-items: start;
}

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

.chart-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 0.9fr) minmax(130px, 1fr) auto;
}

.chart-row.revenue {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.8fr) auto;
}

progress {
  appearance: none;
  background: #e8eff1;
  border: 0;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
  width: 100%;
}

progress::-webkit-progress-bar {
  background: #e8eff1;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, var(--teal), #3aa86e);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, var(--teal), #3aa86e);
  border-radius: 999px;
}

.filter-bar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.34fr) minmax(160px, 0.34fr) auto;
  margin: 14px 0 18px;
}

.filter-bar.compact-filter {
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.34fr) auto;
}

.filter-bar.compact-filter.single {
  grid-template-columns: 1fr 150px auto;
}

.audit-integrity {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 10px;
}

.audit-integrity span {
  background: #f3f7f8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #33414d;
  font-weight: 800;
  padding: 7px 11px;
}

.audit-table code {
  background: #eef5f4;
  border: 1px solid #d4e4e2;
  border-radius: 6px;
  color: #064a50;
  display: inline-block;
  font-size: 0.82rem;
  padding: 3px 6px;
}

.admin-list .work-row {
  align-items: start;
}

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

.search-head p {
  color: rgba(255, 255, 255, 0.84);
  max-width: 760px;
}

.public-filter {
  grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(120px, 0.35fr)) auto;
  max-width: 1180px;
}

.search-results {
  max-width: 1180px;
}

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

@media (max-width: 1120px) {
  .admin-hero,
  .public-filter,
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-kpi.primary {
    grid-column: span 2;
  }

  .filter-bar button,
  .public-filter button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .admin-hero,
  .public-filter,
  .filter-bar,
  .filter-bar.compact-filter,
  .filter-bar.compact-filter.single,
  .chart-row,
  .chart-row.revenue,
  .search-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-kpi.primary {
    grid-column: auto;
  }
}
