:root {
  --navy-950: #071426;
  --navy-900: #0b1d34;
  --navy-800: #112a49;
  --navy-700: #17385d;
  --blue-500: #2f73b9;
  --aqua: #50c6bd;
  --aqua-soft: #dff6f2;
  --cream: #f5f3ee;
  --paper: #fffefa;
  --ink: #132136;
  --muted: #657184;
  --line: #dfe4e8;
  --success: #198f72;
  --warning: #b36b0c;
  --danger: #b34242;
  --shadow: 0 22px 60px rgba(12, 30, 52, .13);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }

.test-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 18px;
  color: #b8eee9;
  background: var(--navy-950);
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
}
.test-ribbon strong { color: white; text-transform: uppercase; letter-spacing: .12em; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 70px);
  border-bottom: 1px solid rgba(11, 29, 52, .08);
  background: rgba(255, 254, 250, .92);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--navy-900);
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
}
.brand strong { display: block; color: var(--navy-900); letter-spacing: .08em; }
.brand span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.site-nav { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: #ecebe6; }
.site-nav button { padding: 9px 16px; border: 0; border-radius: 999px; color: #586273; background: transparent; font-size: 13px; font-weight: 700; }
.site-nav button.active { color: white; background: var(--navy-900); box-shadow: 0 5px 16px rgba(7, 20, 38, .18); }

.page-shell { min-height: calc(100vh - 130px); }
.lookup-hero {
  overflow: hidden;
  position: relative;
  display: grid;
  min-height: 520px;
  padding: clamp(64px, 10vw, 130px) clamp(20px, 8vw, 120px);
  color: white;
  background:
    radial-gradient(circle at 78% 26%, rgba(80, 198, 189, .25), transparent 26%),
    linear-gradient(124deg, var(--navy-950), var(--navy-800));
}
.lookup-hero::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -190px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255,255,255,.03), 0 0 0 140px rgba(255,255,255,.02);
}
.lookup-hero__content { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { color: var(--aqua); font-size: 11px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.lookup-hero h1, .credential-page__intro h1, .expired-card h1 { margin: 14px 0 18px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 7vw, 78px); font-weight: 500; line-height: .98; letter-spacing: -.035em; }
.lookup-hero__lead { max-width: 590px; margin: 0 0 32px; color: #c9d4e0; font-size: 17px; line-height: 1.65; }
.search-box { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 720px; padding: 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); }
.search-box input { min-width: 0; padding: 13px 15px; border: 0; outline: 0; color: white; background: transparent; }
.search-box input::placeholder { color: #acb8c8; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 18px; border: 1px solid transparent; border-radius: 11px; font-weight: 800; transition: transform .18s, box-shadow .18s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button--primary { color: var(--navy-950); background: var(--aqua); box-shadow: 0 10px 24px rgba(80, 198, 189, .18); }
.button--secondary { color: var(--navy-900); border-color: #cbd3da; background: white; }
.button--full { width: 100%; }
.hero-note { display: flex; gap: 8px; margin: 14px 4px 0; color: #aebdca; font-size: 12px; }
.hero-note i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--aqua); }

.lookup-results { width: min(1060px, calc(100% - 40px)); margin: -52px auto 80px; position: relative; z-index: 2; }
.result-state { padding: 34px; border: 1px solid rgba(11,29,52,.08); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.result-state > span { color: var(--blue-500); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-state h3 { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.result-state p { margin: 0; color: var(--muted); }
.result-state--idle { border-style: dashed; box-shadow: none; }
.result-state--expired > span { color: var(--danger); }
.search-result { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 20px; padding: 20px; border: 1px solid rgba(11,29,52,.08); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.search-result + .search-result { margin-top: 12px; }
.search-result img { width: 70px; height: 78px; border-radius: 12px; object-fit: cover; object-position: center 22%; }
.search-result h3 { margin: 7px 0 4px; font-size: 17px; }
.search-result p { margin: 0; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--success { color: var(--success); }
.status--warning { color: var(--warning); }
.status--danger { color: var(--danger); }

.credential-page { width: min(920px, calc(100% - 40px)); margin: 50px auto 90px; }
.back-link, .text-button { padding: 0; border: 0; color: var(--blue-500); background: none; font-size: 13px; font-weight: 800; }
.credential-page__intro { margin: 38px 0 28px; }
.credential-page__intro h1 { color: var(--navy-900); font-size: clamp(42px, 6vw, 64px); }
.credential-page__intro p { color: var(--muted); }
.credential { overflow: hidden; border-radius: 26px; color: white; background: linear-gradient(145deg, #102d4e, #071526 72%); box-shadow: 0 28px 70px rgba(7, 20, 38, .25); }
.credential__topline, .credential__footer { display: flex; justify-content: space-between; padding: 18px 28px; text-transform: uppercase; letter-spacing: .13em; font-size: 10px; font-weight: 800; }
.credential__topline { border-bottom: 1px solid rgba(255,255,255,.11); }
.credential__topline span:first-child { color: var(--aqua); font-size: 14px; }
.credential__body { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; padding: 36px; }
.portrait { overflow: hidden; aspect-ratio: 4 / 5; border-radius: 17px; border: 2px solid rgba(255,255,255,.15); background: #d7dee5; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.credential__identity h3 { max-width: 540px; margin: 10px 0 8px; font-family: Georgia, serif; font-size: clamp(28px, 5vw, 46px); font-weight: 500; line-height: 1.06; }
.credential__identity p { margin: 0 0 20px; color: #b9c8d8; }
.credential .status { padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.08); }
.credential__meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0 36px 32px; }
.credential__meta div { padding: 17px 20px; border: 1px solid rgba(255,255,255,.1); border-right: 0; }
.credential__meta div:first-child { border-radius: 12px 0 0 12px; }
.credential__meta div:last-child { border-right: 1px solid rgba(255,255,255,.1); border-radius: 0 12px 12px 0; }
.credential__meta dt { color: #91a4b8; font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.credential__meta dd { margin: 7px 0 0; font-size: 15px; font-weight: 800; }
.credential__footer { color: #8fa2b8; border-top: 1px solid rgba(255,255,255,.08); }
.expired-card { max-width: 680px; margin: 42px auto; padding: 60px; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.expired-card__icon { display: grid; width: 56px; height: 56px; margin: 0 auto 22px; place-items: center; border-radius: 50%; color: white; background: var(--danger); font-family: Georgia, serif; font-size: 30px; }
.expired-card h1 { color: var(--navy-900); font-size: 50px; }
.expired-card p { color: var(--muted); line-height: 1.6; }
.privacy-note { margin-top: 24px; padding: 14px; border-radius: 12px; color: #725b30; background: #f6ecd7; font-size: 13px; }

.admin-view { width: min(1240px, calc(100% - 38px)); margin: 44px auto 90px; }
.admin-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.admin-intro h1 { margin: 9px 0 8px; color: var(--navy-900); font-family: Georgia, serif; font-size: clamp(36px, 5vw, 56px); font-weight: 500; }
.admin-intro p { margin: 0; color: var(--muted); }
.local-note { max-width: 360px; padding: 16px 18px; border-left: 3px solid var(--aqua); border-radius: 0 12px 12px 0; color: #4f5b69; background: #e9eeec; font-size: 12px; line-height: 1.55; }
.admin-tools { display: grid; grid-template-columns: 1fr auto; gap: 18px; margin-bottom: 18px; }
.simulation-panel, .summary-cards, .panel { border: 1px solid rgba(11,29,52,.08); border-radius: 18px; background: var(--paper); box-shadow: 0 12px 32px rgba(11,29,52,.07); }
.simulation-panel { padding: 20px; }
.simulation-panel form { display: flex; align-items: end; gap: 10px; }
label { display: grid; gap: 7px; color: #334154; font-size: 12px; font-weight: 800; }
label em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 500; }
input { min-height: 44px; padding: 10px 12px; border: 1px solid #cbd3da; border-radius: 10px; outline: none; color: var(--ink); background: white; }
input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(47,115,185,.11); }
.simulation-panel .text-button { margin-left: 10px; color: var(--danger); }
.summary-cards { display: grid; grid-template-columns: repeat(3, 115px); padding: 12px; }
.summary-cards div { padding: 10px 14px; border-right: 1px solid var(--line); }
.summary-cards div:last-child { border: 0; }
.summary-cards strong { display: block; color: var(--navy-900); font-family: Georgia, serif; font-size: 28px; }
.summary-cards span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.admin-grid { display: grid; grid-template-columns: minmax(350px, .8fr) minmax(460px, 1.2fr); gap: 18px; }
.panel { overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel__head h2 { margin: 0; font-size: 16px; }
.panel__head span { color: var(--muted); font-size: 11px; }
.member-list { max-height: 560px; overflow-y: auto; padding: 10px; }
.member-row { display: grid; width: 100%; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid transparent; border-radius: 13px; color: inherit; background: transparent; text-align: left; }
.member-row:hover { background: #f4f5f3; }
.member-row.selected { border-color: #b7d5d2; background: #edf7f5; }
.member-row img { width: 46px; height: 52px; border-radius: 9px; object-fit: cover; object-position: center 22%; }
.member-row__main strong, .member-row__main small { display: block; }
.member-row__main strong { overflow: hidden; max-width: 230px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-row__main small { margin-top: 4px; color: var(--muted); }
.editor { padding: 24px; }
.editor-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 22px; }
.editor-heading h3 { margin: 7px 0 0; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.renewal-box { display: grid; gap: 16px; margin-top: 18px; padding: 20px; border-radius: 15px; background: #eef2f5; }
.renewal-box h4 { margin: 6px 0; }
.renewal-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.pix-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px; border-radius: 11px; background: white; font-size: 12px; }
.notice-panel { grid-column: 1 / -1; }
.notice-panel .panel__head { gap: 14px; }
.notice-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
.notice-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 15px; border-radius: 12px; background: #f5f6f4; }
.notice-item__icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--navy-900); background: var(--aqua-soft); }
.notice-item strong { font-size: 12px; }
.notice-item p, .notice-item small { display: block; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.empty-mini { grid-column: 1 / -1; padding: 24px; color: var(--muted); text-align: center; font-size: 12px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(20px, 5vw, 70px); color: #90a0b2; background: var(--navy-950); font-size: 11px; }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: 420px; padding: 14px 18px; border-radius: 12px; color: white; background: var(--navy-900); box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); pointer-events: none; transition: .22s; font-size: 13px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast[data-tone="danger"] { background: var(--danger); }
.toast[data-tone="neutral"] { background: #4f5b69; }
dialog { width: min(620px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(7,20,38,.3); }
dialog::backdrop { background: rgba(7,20,38,.62); backdrop-filter: blur(5px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; color: white; background: var(--navy-900); }
.dialog-head h3 { margin: 0; font-size: 15px; }
.dialog-head button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: white; background: rgba(255,255,255,.1); }
.email-content { position: relative; padding: 22px; }
.mail-chrome { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.mail-chrome span { color: var(--muted); }
.mail-body { padding: 20px 0 44px; color: #405065; line-height: 1.6; }
.simulation-stamp { position: absolute; right: 22px; bottom: 20px; padding: 7px 10px; border: 2px solid var(--danger); border-radius: 6px; color: var(--danger); transform: rotate(-3deg); font-size: 11px; font-weight: 900; letter-spacing: .08em; }

@media (max-width: 850px) {
  .admin-tools, .admin-grid { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: repeat(3, 1fr); }
  .notice-panel { grid-column: auto; }
  .notice-list { grid-template-columns: 1fr; }
  .admin-intro { align-items: start; flex-direction: column; }
}

@media (max-width: 620px) {
  .site-header { align-items: start; gap: 12px; padding: 12px 16px; }
  .brand span { display: none; }
  .site-nav button { padding: 9px 11px; font-size: 11px; }
  .lookup-hero { min-height: 500px; padding: 70px 20px 100px; }
  .lookup-hero h1 { font-size: 47px; }
  .search-box { grid-template-columns: 1fr; }
  .search-result { grid-template-columns: 58px 1fr; }
  .search-result img { width: 58px; height: 66px; }
  .search-result .button { grid-column: 1 / -1; }
  .credential__body { grid-template-columns: 105px 1fr; gap: 17px; padding: 22px; }
  .credential__identity h3 { font-size: 25px; }
  .credential__meta { grid-template-columns: 1fr; padding: 0 22px 22px; }
  .credential__meta div { border-right: 1px solid rgba(255,255,255,.1); border-bottom: 0; }
  .credential__meta div:first-child { border-radius: 12px 12px 0 0; }
  .credential__meta div:last-child { border-bottom: 1px solid rgba(255,255,255,.1); border-radius: 0 0 12px 12px; }
  .expired-card { padding: 38px 24px; }
  .expired-card h1 { font-size: 40px; }
  .admin-view { width: min(100% - 24px, 1240px); margin-top: 28px; }
  .simulation-panel form { align-items: stretch; flex-direction: column; }
  .simulation-panel .text-button { margin: 8px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .pix-line { align-items: stretch; flex-direction: column; }
  .member-row { grid-template-columns: 42px 1fr; }
  .member-row .status { grid-column: 2; }
  .site-footer { flex-direction: column; }
}
