@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --paper: #f6f7f4;
  --ink: #25262a;
  --muted: #727b75;
  --line: #e3dfe0;
  --red: #d7192d;
  --red-dark: #b91527;
  --red-pale: #fff0f1;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', 'Segoe UI', Arial, sans-serif;
  --display: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --mono: 'DM Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.topbar { height: 80px; padding: 0 max(6.2vw, 28px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(37, 38, 42, .09); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { display: block; width: 100px; height: 52px; object-fit: cover; object-position: center 40%; mix-blend-mode: multiply; }
.brand-copy { padding-left: 12px; border-left: 1px solid #e3dfe0; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--display); font-size: 10px; letter-spacing: .12em; }
.brand-copy small { color: #818187; font-family: var(--mono); font-size: 7px; letter-spacing: .1em; }
.top-note { color: #696a70; font-size: 12px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d7192d; box-shadow: 0 0 0 3px #d7192d1b; }
main { width: min(1120px, calc(100% - 56px)); margin: 0 auto; }
.hero { position: relative; min-height: 540px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 20px; padding: 52px 0 42px; }
.hero-copy { position: relative; z-index: 1; padding: 0 0 14px 17px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 20px; color: var(--red); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.eyebrow-line { width: 23px; height: 1px; background: var(--red); }
h1 { margin: 0; font-family: var(--display); font-size: clamp(38px, 5vw, 59px); font-weight: 600; line-height: 1.12; letter-spacing: -.055em; }
h1 em { color: var(--red); font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; }
.hero-description { max-width: 440px; margin: 20px 0 31px; color: #68716b; font-size: 15px; line-height: 1.75; }
.search-form { max-width: 526px; }
.search-form label { display: block; margin-bottom: 9px; color: #343539; font-size: 12px; font-weight: 700; }
.search-control { display: flex; align-items: center; min-height: 58px; padding: 5px; border: 1px solid #e2dedf; border-radius: 11px; background: #fff; box-shadow: 0 8px 24px #28292d0b; transition: border-color .2s, box-shadow .2s; }
.search-control:focus-within { border-color: #c66b75; box-shadow: 0 0 0 4px #d7192d18; }
.search-icon { width: 39px; color: #99989d; text-align: center; font-size: 25px; transform: rotate(-20deg); }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 13px; }
.search-control input::placeholder { color: #a4a2a7; }
.search-control button, .primary-button { display: inline-flex; min-height: 46px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 13px; padding: 0 17px; border: 0; border-radius: 8px; background: var(--red); color: white; font-family: var(--sans); font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .18s, transform .18s; }
.search-control button:hover, .primary-button:hover { background: var(--red-dark); transform: translateY(-1px); }
.form-hint { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; color: #8b8b90; font-size: 11px; }
.lock-icon { color: var(--red); font-size: 16px; }
.hero-art { position: relative; height: 410px; display: grid; place-items: center; overflow: hidden; }
.hero-art::before { position: absolute; width: 330px; height: 330px; border-radius: 50%; background: radial-gradient(circle, #f0dfe1 0, #f7eeee 47%, #f6f7f4 73%); content: ''; }
.orbit { position: absolute; z-index: 0; border: 1px solid #d8d2d3a8; border-radius: 50%; transform: rotate(-25deg); }
.orbit-one { width: 380px; height: 150px; }
.orbit-two { width: 420px; height: 195px; transform: rotate(36deg); }
.certificate-card { position: relative; z-index: 1; width: 268px; height: 330px; padding: 24px 22px 18px; transform: rotate(4deg); border: 1px solid #ecdfe1; background: linear-gradient(140deg, #fffdfd, #fffafa); box-shadow: 0 24px 45px #25262a25; }
.cert-top { display: flex; align-items: center; gap: 9px; color: #343539; font-family: var(--display); font-size: 8px; font-weight: 800; letter-spacing: .12em; line-height: 1.5; }
.cert-top small { color: #77777b; font-family: var(--mono); font-size: 5px; font-weight: 400; }
.mini-mark { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #bd1829; border-radius: 50%; color: #c52a3b; font-size: 9px; letter-spacing: -.08em; }
.cert-seal { margin-left: auto; color: #bd1829; font-size: 19px; }
.cert-rule { height: 1px; margin-top: 15px; background: #e3c9cc; }
.cert-label { margin: 38px 0 16px; color: #a72835; font-family: var(--mono); font-size: 7px; letter-spacing: .14em; text-align: center; }
.cert-name-line { width: 85%; height: 14px; margin: 0 auto 10px; border-bottom: 1px solid #dec1c5; }
.cert-name-line.short { width: 58%; }
.cert-subline { margin-top: 24px; color: #838084; font-family: var(--mono); font-size: 7px; text-align: center; }
.cert-bottom { display: flex; align-items: end; justify-content: space-between; margin-top: 23px; }
.signature-line { width: 66px; height: 16px; border-bottom: 1px solid #b87b82; }
.qr-grid { color: #55565c; font-size: 29px; line-height: 1; }
.verified-stamp { position: absolute; z-index: 2; right: 2px; bottom: 50px; display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid #e8e2e3; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px #25262a13; }
.verified-stamp > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #fff0f1; color: var(--red); font-size: 14px; }
.verified-stamp div { display: grid; gap: 3px; }
.verified-stamp strong { font-size: 10px; }
.verified-stamp small { color: #8b8b90; font-size: 9px; }
.art-spark { position: absolute; color: #d7192d; }
.spark-one { top: 56px; right: 65px; font-size: 17px; }
.spark-two { bottom: 79px; left: 41px; font-size: 12px; }
.trust-row { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr; align-items: center; gap: 24px; padding: 25px 28px; border: 1px solid #e7e3e4; border-radius: 12px; background: #fff; }
.trust-item { display: flex; align-items: center; gap: 13px; }
.trust-number { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border: 1px solid #e5dfe0; border-radius: 50%; color: var(--red); font-family: var(--mono); font-size: 10px; }
.trust-check { border-color: #f4d9dc; background: #fff0f1; font-family: var(--sans); font-size: 14px; }
.trust-item div { display: grid; gap: 4px; }
.trust-item strong { font-size: 11px; }
.trust-item small { color: #898a8e; font-size: 10px; }
.trust-divider { height: 31px; background: #e9e5e6; }
.help-card { display: flex; align-items: flex-start; gap: 13px; max-width: 520px; margin: 26px auto 58px; padding: 17px 20px; border: 1px solid #e7e2e3; border-radius: 10px; background: #f2eeee; }
.help-icon { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border: 1px solid #ded8d9; border-radius: 50%; color: var(--red); font-family: var(--serif); font-size: 13px; }
.help-card strong { font-size: 11px; }
.help-card p { margin: 5px 0 0; color: #72747a; font-size: 11px; line-height: 1.6; }
code { color: #8e2731; font-family: var(--mono); font-size: .94em; }
.footer { display: flex; justify-content: space-between; padding: 20px max(6.2vw, 28px); border-top: 1px solid #e5e1e2; color: #929197; font-size: 10px; }
.footer i { padding: 0 5px; color: #b0b7b0; font-style: normal; }

/* Verified certificate */
.back-link { color: #64666b; font-size: 11px; text-decoration: none; }
.back-link:hover { color: var(--red); }
.result-main { padding-top: 53px; padding-bottom: 64px; }
.result-heading { max-width: 920px; margin: 0 auto 27px; }
.result-heading .eyebrow { margin-bottom: 15px; }
.verified-banner { display: flex; align-items: center; gap: 11px; width: fit-content; margin-bottom: 26px; padding: 10px 13px; border: 1px solid #f0d1d5; border-radius: 9px; background: #fff3f4; }
.verified-check { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; background: #fbe0e3; color: var(--red); font-size: 13px; }
.verified-banner > span:nth-child(2) { display: grid; gap: 3px; }
.verified-banner strong { color: #4b2027; font-size: 11px; }
.verified-banner small { color: #786e70; font-size: 9px; }
.verified-pill { margin-left: 12px; padding: 5px 7px; border: 1px solid #f0d0d5; border-radius: 5px; color: #b7192b; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.result-heading h1 { font-size: 43px; }
.record-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; max-width: 920px; margin: 0 auto; align-items: start; }
.record-card, .preview-column { border: 1px solid #e4e8e2; border-radius: 13px; background: #fff; box-shadow: 0 9px 28px #25262a08; }
.record-card { padding: 26px 28px 19px; }
.record-overline { display: flex; align-items: center; justify-content: space-between; color: #879188; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.record-dot { width: 7px; height: 7px; border-radius: 50%; background: #d7192d; }
.record-card h2 { margin: 23px 0 5px; font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.record-subtitle { margin: 0; color: #76777c; font-size: 11px; }
.record-divider { height: 1px; margin: 22px 0 19px; background: #eeeaeb; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; margin: 0; }
.details-grid dt { margin-bottom: 6px; color: #898a8e; font-size: 10px; }
.details-grid dd { margin: 0; color: #2d3932; font-size: 12px; font-weight: 600; }
.rank-value { color: #a72a37; }
.certificate-id-row { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 11px 12px; border: 1px solid #e9e4e5; border-radius: 8px; background: #faf8f8; }
.certificate-id-row > span { color: #898a8e; font-size: 9px; }
.certificate-id-row code { margin-left: auto; font-size: 9px; }
.copy-button { padding: 5px 8px; border: 1px solid #e4dfe0; border-radius: 5px; background: #fff; color: #55565c; font-family: var(--sans); font-size: 9px; cursor: pointer; }
.copy-button:hover { border-color: #dd929a; color: var(--red); }
.record-actions { display: flex; gap: 9px; margin-top: 17px; }
.record-actions .primary-button { min-height: 42px; padding: 0 14px; font-size: 10px; }
.secondary-button { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #e1e6e0; border-radius: 8px; background: #fff; color: #45464b; font-family: var(--sans); font-size: 10px; font-weight: 600; cursor: pointer; }
.secondary-button:hover { border-color: #e0a5aa; background: #fdfafa; }
.record-footnote { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; color: #85858a; font-size: 9px; }
.record-footnote span { color: #d7192d; }
.preview-column { overflow: hidden; padding: 18px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.preview-kicker { color: #898a8e; font-family: var(--mono); font-size: 8px; letter-spacing: .11em; }
.preview-heading h3 { margin: 4px 0 0; font-family: var(--display); font-size: 14px; font-weight: 600; }
.preview-menu { color: #96a097; letter-spacing: 2px; }
.certificate-preview { position: relative; display: grid; min-height: 260px; place-items: center; overflow: hidden; border: 1px solid #edece6; border-radius: 8px; background: #f5f2f2; }
.certificate-preview img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.preview-open { position: absolute; right: 10px; bottom: 10px; padding: 7px 9px; border: 1px solid #e3e5df; border-radius: 6px; background: #ffffffed; color: #4e5c52; font-size: 9px; opacity: 0; transition: opacity .18s; }
.certificate-preview:hover .preview-open, .certificate-preview:focus-visible .preview-open { opacity: 1; }
.preview-caption { display: flex; align-items: center; gap: 6px; margin: 12px 1px 0; color: #898a8e; font-size: 9px; }
.tiny-lock { color: var(--red); font-size: 13px; }
.toast { position: fixed; z-index: 5; right: 24px; bottom: 24px; padding: 12px 16px; transform: translateY(10px); border-radius: 8px; background: #28292d; color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Not found */
.not-found-main { display: grid; min-height: calc(100vh - 141px); align-content: center; justify-items: center; padding: 48px 0; }
.not-found-card { width: min(520px, 100%); padding: 42px 42px 36px; border: 1px solid #e4e8e2; border-radius: 14px; background: #fff; box-shadow: 0 16px 44px #25262a0b; text-align: center; }
.not-found-symbol { display: grid; width: 51px; height: 51px; margin: 0 auto 25px; place-items: center; border: 1px solid #f0dfe1; border-radius: 50%; background: #fff4f4; color: #aa2735; font-family: var(--serif); font-size: 26px; }
.not-found-card .eyebrow { justify-content: center; margin-bottom: 15px; color: #a52b38; }
.not-found-card .eyebrow-line { background: #c1424e; }
.not-found-card h1 { font-size: 37px; }
.not-found-copy { max-width: 355px; margin: 16px auto 20px; color: #737d75; font-size: 12px; line-height: 1.7; }
.searched-id { display: grid; gap: 7px; max-width: 300px; margin: 0 auto 19px; padding: 11px; border: 1px solid #eceeea; border-radius: 8px; background: #fbf9f9; }
.searched-id span { color: #8b8b90; font-family: var(--mono); font-size: 8px; letter-spacing: .09em; }
.searched-id code { overflow-wrap: anywhere; font-size: 11px; }
.retry-button { min-height: 43px; font-size: 11px; }
.not-found-hint { margin: 13px 0 0; color: #98a099; font-size: 9px; }
.support-line { margin-top: 18px; color: #929197; font-size: 10px; text-align: center; }

@media (max-width: 760px) {
  .topbar { height: 70px; padding: 0 22px; }
  main { width: min(100% - 40px, 540px); }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 54px 0 25px; }
  .hero-copy { padding: 0; }
  .hero-art { height: 340px; margin-top: 3px; }
  .certificate-card { transform: rotate(3deg) scale(.9); }
  .verified-stamp { right: 3%; bottom: 33px; }
  .trust-row { grid-template-columns: 1fr; gap: 15px; padding: 20px; }
  .trust-divider { width: 100%; height: 1px; }
  .trust-item small { font-size: 10px; }
  .help-card { margin: 21px auto 38px; }
  .result-main { padding-top: 36px; }
  .record-layout { grid-template-columns: 1fr; }
  .result-heading h1 { font-size: 38px; }
  .preview-column { grid-row: 1; }
  .certificate-preview { min-height: 210px; }
  .certificate-preview img { max-height: 280px; }
  .footer { gap: 10px; padding: 18px 22px; font-size: 9px; }
}
@media (max-width: 460px) {
  .topbar { padding: 0 17px; }
  main { width: calc(100% - 34px); }
  .top-note { font-size: 10px; }
  .brand-copy strong { font-size: 9px; }
  .brand-copy small { font-size: 6px; }
  .hero { padding-top: 42px; }
  h1 { font-size: 39px; }
  .hero-description { font-size: 13px; }
  .search-control { flex-wrap: wrap; padding: 6px; }
  .search-control input { width: calc(100% - 48px); min-height: 44px; }
  .search-control button { width: 100%; min-height: 43px; }
  .hero-art { height: 300px; }
  .certificate-card { transform: rotate(3deg) scale(.78); }
  .verified-stamp { right: 0; bottom: 24px; }
  .footer { flex-direction: column; }
  .back-link { max-width: 155px; font-size: 10px; text-align: right; }
  .verified-banner { max-width: 100%; }
  .verified-banner small { max-width: 190px; line-height: 1.4; }
  .verified-pill { margin-left: auto; font-size: 7px; }
  .record-card { padding: 22px 18px 17px; }
  .record-card h2 { font-size: 23px; }
  .certificate-id-row { flex-wrap: wrap; }
  .certificate-id-row code { margin-left: 0; }
  .certificate-id-row .copy-button { margin-left: auto; }
  .record-actions { flex-direction: column; }
  .record-actions > * { justify-content: center; }
  .not-found-card { padding: 34px 19px 28px; }
  .not-found-card h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Admin panel */
.topbar-actions, .admin-top-actions { display: flex; align-items: center; gap: 22px; }
.admin-entry-link { color: #62646a; font-size: 11px; text-decoration: none; }
.admin-entry-link:hover, .edit-link:hover { color: var(--red); }
.admin-narrow { width: min(500px, calc(100% - 40px)); margin: 70px auto 84px; }
.admin-card { padding: 30px; border: 1px solid #e4e1e2; border-radius: 13px; background: #fff; box-shadow: 0 12px 38px #25262a0c; }
.login-card { padding: 39px 42px 32px; }
.admin-lock { display: grid; width: 42px; height: 42px; margin-bottom: 23px; place-items: center; border: 1px solid #f0d1d5; border-radius: 11px; background: #fff4f5; color: var(--red); font-size: 19px; }
.admin-narrow h1, .admin-page-heading h1 { font-size: 43px; }
.admin-intro { margin: 13px 0 23px; color: #74757b; font-size: 12px; line-height: 1.7; }
.admin-form { display: grid; gap: 9px; }
.admin-form label, .field label { color: #44454b; font-size: 11px; font-weight: 700; }
.admin-form label:not(.field label) { margin-top: 4px; }
.admin-form input:not([type=hidden]), .field input, .admin-search input { width: 100%; min-height: 43px; padding: 0 12px; border: 1px solid #e0ddde; border-radius: 7px; outline: 0; background: #fff; color: #292a2e; font-family: var(--sans); font-size: 12px; }
.admin-form input:focus, .field input:focus, .admin-search input:focus { border-color: #d77b84; box-shadow: 0 0 0 3px #d7192d16; }
.login-submit { width: 100%; margin-top: 12px; }
.login-submit span { margin-left: auto; }
.admin-secure-note { margin: 19px 0 0; color: #909095; font-size: 9px; text-align: center; }
.admin-secure-note span { padding-right: 5px; color: var(--red); font-size: 8px; }
.flash-list { margin: 0 0 16px; }
.flash { margin: 0; padding: 11px 13px; border: 1px solid #eed0d4; border-radius: 7px; background: #fff4f5; color: #8f2732; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.flash.success { border-color: #d9e5dc; background: #f3f7f3; color: #46614d; }
.setup-card > p:not(.eyebrow) { margin: 17px 0 23px; color: #73747a; font-size: 12px; line-height: 1.8; }
.setup-card .primary-button { min-height: 42px; }
.admin-main { width: min(1160px, calc(100% - 56px)); margin: 52px auto 66px; }
.admin-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 7px 26px; }
.admin-page-heading .eyebrow { margin-bottom: 12px; }
.admin-page-heading h1 { line-height: 1.06; }
.admin-page-heading .admin-intro { margin-bottom: 0; }
.add-record-button { min-height: 43px; margin-bottom: 4px; }
.add-record-button > span { font-size: 17px; font-weight: 400; }
.admin-stats { display: grid; grid-template-columns: 180px 180px 1fr; align-items: center; gap: 12px; margin-bottom: 18px; }
.admin-stats > div:not(.stats-note) { display: flex; min-height: 70px; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid #e6e3e4; border-radius: 10px; background: #fff; }
.stat-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #fff0f1; color: var(--red); font-size: 18px; }
.admin-stats > div > span:last-child { display: grid; gap: 3px; }
.admin-stats small { color: #8e8e93; font-family: var(--mono); font-size: 8px; letter-spacing: .09em; }
.admin-stats strong { color: #2c2d31; font-family: var(--display); font-size: 17px; }
.stats-note { padding: 13px 17px; color: #88888d; font-size: 10px; line-height: 1.6; }
.records-panel { overflow: hidden; border: 1px solid #e5e2e3; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px #25262a08; }
.records-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px 22px; border-bottom: 1px solid #efeded; }
.records-heading h2 { margin: 0; font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.records-heading p { margin: 5px 0 0; color: #89898f; font-size: 10px; }
.admin-search { display: flex; align-items: center; gap: 0; }
.admin-search input { width: 230px; min-height: 37px; padding-right: 40px; font-size: 10px; }
.admin-search button { width: 34px; height: 33px; margin-left: -36px; border: 0; border-radius: 6px; background: transparent; color: #77787e; font-size: 20px; cursor: pointer; }
.clear-search { margin-left: 8px; color: #8f343f; font-size: 10px; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.table-wrap { width: 100%; overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; text-align: left; }
.records-table th { padding: 12px 14px; background: #faf9f9; color: #88888e; font-family: var(--mono); font-size: 8px; font-weight: 400; letter-spacing: .08em; white-space: nowrap; }
.records-table th:first-child, .records-table td:first-child { padding-left: 22px; }
.records-table td { padding: 13px 14px; border-bottom: 1px solid #f0eeee; color: #5d5e63; font-size: 10px; white-space: nowrap; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table tbody tr:hover { background: #fdfafa; }
.records-table td:first-child { min-width: 170px; }
.records-table td:first-child strong, .records-table td:first-child small { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.records-table td:first-child strong { color: #323338; font-size: 10px; }
.records-table td:first-child small { margin-top: 4px; color: #929197; font-size: 9px; }
.records-table code { color: #8e2731; font-size: 9px; }
.table-rank { color: #a72a37; font-weight: 700; }
.edit-link { color: #53545a; font-size: 10px; font-weight: 600; text-decoration: none; }
.edit-link span { color: #b1aeb0; }
.empty-state { height: 190px; text-align: center !important; white-space: normal !important; }
.empty-state > * { display: block; margin: 5px auto; }
.empty-state > span { color: var(--red); font-size: 22px; }
.empty-state strong { color: #46474d; font-size: 12px; }
.empty-state small { color: #929197; font-size: 10px; }
.records-footer { display: flex; justify-content: space-between; padding: 13px 22px; border-top: 1px solid #efeded; color: #909096; font-size: 9px; }
.admin-data-note { display: flex; gap: 8px; margin: 17px 3px 0; color: #89898f; font-size: 9px; line-height: 1.6; }
.admin-data-note span { color: var(--red); }
.logout-button { padding: 8px 11px; border: 1px solid #e5e1e2; border-radius: 7px; background: #fff; color: #64646a; font-family: var(--sans); font-size: 10px; cursor: pointer; }
.logout-button:hover { border-color: #d77b84; color: #9f2533; }
.form-page { width: min(620px, calc(100% - 40px)); }
.form-page > .eyebrow { margin-bottom: 13px; }
.form-page h1 { margin: 0; }
.form-page .admin-intro { max-width: 490px; margin-bottom: 19px; }
.form-cert-id { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #e8e3e4; border-radius: 8px; background: #fff; }
.form-cert-id span { color: #88888e; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.form-cert-id code { font-size: 10px; }
.record-edit-form { padding: 23px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 14px; }
.field { display: grid; gap: 7px; }
.full-field { grid-column: 1 / -1; }
.field label span, .required-note span { color: var(--red); }
.field input { min-height: 41px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; padding-top: 17px; border-top: 1px solid #efeded; }
.form-actions .secondary-button { min-height: 41px; text-decoration: none; }
.form-actions .primary-button { min-height: 41px; font-size: 10px; }
.required-note { margin: 12px 0 0; color: #98989d; font-size: 9px; }
@media (max-width: 700px) {
  .topbar-actions, .admin-top-actions { gap: 12px; }
  .admin-entry-link { font-size: 10px; }
  .admin-main { width: calc(100% - 32px); margin-top: 34px; }
  .admin-page-heading { align-items: start; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .stats-note { grid-column: 1 / -1; padding: 5px 2px; }
  .records-heading { align-items: start; flex-direction: column; }
  .admin-search, .admin-search input { width: 100%; }
  .records-footer { gap: 10px; flex-direction: column; }
  .admin-narrow { margin-top: 42px; }
}
@media (max-width: 460px) {
  .brand-logo { width: 83px; height: 45px; }
  .brand { gap: 7px; }
  .brand-copy { padding-left: 8px; }
  .brand-copy strong { font-size: 8px; }
  .brand-copy small { font-size: 5px; }
  .top-note { display: none; }
  .admin-page-heading { flex-direction: column; }
  .add-record-button { align-self: stretch; }
  .admin-top-actions { gap: 7px; }
  .admin-top-actions .back-link { max-width: 115px; }
  .admin-stats { gap: 7px; }
  .admin-stats > div:not(.stats-note) { padding: 10px; }
  .login-card { padding: 30px 23px 25px; }
  .field-grid { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .record-edit-form { padding: 18px; }
}
