:root {
    --bg: #080d17;
    --surface: #0f1726;
    --surface-2: #151f31;
    --border: #243047;
    --text: #f2f6ff;
    --muted: #8c99af;
    --accent: #6ee7b7;
    --accent-strong: #34d399;
    --blue: #60a5fa;
    --danger: #fb7185;
    --warning: #fbbf24;
    --radius: 16px;
    color-scheme: dark;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 85% -15%, rgba(52, 211, 153, .14), transparent 30%), var(--bg); }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }
button, .button-link { cursor: pointer; }
code, pre { font-family: "Cascadia Code", Consolas, monospace; }
.app-shell { display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 244px; padding: 26px 18px; background: rgba(11, 17, 29, .94); border-right: 1px solid var(--border); backdrop-filter: blur(18px); display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 9px 30px; }
.brand-mark, .login-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #042016; background: linear-gradient(135deg, var(--accent), #a7f3d0); font-weight: 900; letter-spacing: -.08em; box-shadow: 0 10px 32px rgba(52, 211, 153, .18); }
.brand strong { display: block; font-size: 15px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; letter-spacing: .08em; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { color: #aab5c8; padding: 11px 12px; border-radius: 11px; display: flex; align-items: center; gap: 10px; transition: .18s ease; }
.sidebar nav a:hover { color: var(--text); background: rgba(255,255,255,.035); }
.sidebar nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(110, 231, 183, .12); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.active .nav-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
.logout-form { margin-top: auto; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 10px 12px; }
.main { grid-column: 2; min-width: 0; padding: 0 34px 50px; max-width: 1500px; width: 100%; margin: 0 auto; }
.topbar { height: 70px; display: flex; justify-content: flex-end; align-items: center; color: var(--muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; display: inline-block; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.menu-button { display: none; border: 0; background: transparent; color: var(--text); font-size: 21px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 22px 0 27px; }
.page-head h1 { margin: 2px 0 5px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.045em; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.muted { color: var(--muted); margin: 0; line-height: 1.7; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel { background: linear-gradient(145deg, rgba(21, 31, 49, .9), rgba(13, 20, 33, .95)); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.17); }
.stat-card { padding: 21px; min-height: 132px; display: flex; flex-direction: column; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong { font-size: 29px; margin: 12px 0 7px; letter-spacing: -.04em; }
.stat-card small { margin-top: auto; }
.panel { padding: 21px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel h2 { margin: 0 0 18px; font-size: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h2 { margin: 0 0 4px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.detail-list { margin: 0; }
.detail-list div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.compact-list > div { display: grid; grid-template-columns: minmax(0, 1.2fr) 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.compact-list .code { overflow: hidden; text-overflow: ellipsis; color: #d7def0; }
.ok { color: var(--accent); }
.bad { color: var(--danger); }
.primary, .secondary, .danger-button, .button-link { border-radius: 10px; padding: 10px 15px; border: 1px solid transparent; font-weight: 750; display: inline-flex; justify-content: center; align-items: center; }
.primary { color: #062118; background: var(--accent); }
.primary:hover { background: #a7f3d0; }
.secondary { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.danger-button { color: #fecdd3; background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .3); }
.text-link { color: var(--muted); padding: 10px; }
.link-button { border: 0; padding: 4px; color: var(--accent); background: transparent; }
.link-button.danger { color: var(--danger); }
.stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #c9d2e2; font-size: 13px; }
label small { color: var(--muted); line-height: 1.5; }
input, select { width: 100%; color: var(--text); background: #0b1220; border: 1px solid var(--border); border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(110, 231, 183, .09); }
.filter-bar { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto auto; align-items: end; gap: 12px; padding: 15px; margin-bottom: 15px; border: 1px solid var(--border); border-radius: 14px; background: rgba(15, 23, 38, .72); }
.table-panel { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 830px; }
th { padding: 13px 17px; text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.018); }
td { padding: 15px 17px; border-top: 1px solid rgba(255,255,255,.055); color: #d7deea; font-size: 13px; vertical-align: middle; }
td strong, td small { display: block; }
td small { color: var(--muted); margin-top: 5px; max-width: 285px; overflow: hidden; text-overflow: ellipsis; }
td code { color: #b9c8dc; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { display: inline; }
.badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.success { color: var(--accent); background: rgba(52, 211, 153, .09); }
.badge.error { color: var(--danger); background: rgba(251, 113, 133, .09); }
.badge.neutral { color: var(--muted); background: rgba(140, 153, 175, .1); }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 15px 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.secret-banner { display: grid; grid-template-columns: 1fr minmax(260px, auto) auto; gap: 15px; align-items: center; padding: 17px 20px; margin-bottom: 15px; border: 1px solid rgba(110, 231, 183, .25); border-radius: 14px; background: rgba(52, 211, 153, .07); }
.secret-banner p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.secret-banner code { padding: 10px; background: #07110e; border-radius: 8px; overflow: auto; }
.secret-banner button { color: var(--accent); background: transparent; border: 0; }
dialog { width: min(520px, calc(100vw - 30px)); max-width: calc(100vw - 30px); max-height: calc(100dvh - 30px); overflow-x: hidden; overflow-y: auto; border: 1px solid var(--border); border-radius: 16px; color: var(--text); background: #101827; box-shadow: 0 30px 100px rgba(0,0,0,.55); padding: 0; }
dialog.wide-dialog { width: min(820px, calc(100vw - 30px)); }
dialog::backdrop { background: rgba(1, 5, 12, .75); backdrop-filter: blur(4px); }
.dialog-card { display: grid; gap: 17px; width: 100%; min-width: 0; padding: 22px; }
.dialog-card > *, .dialog-content-stack > * { min-width: 0; max-width: 100%; }
.dialog-content-stack { display: grid; gap: 12px; min-width: 0; }
.dialog-content-stack pre { width: 100%; margin: 0; }
.dialog-content-stack button { justify-self: start; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { margin: 0; }
.dialog-head button { border: 0; color: var(--muted); background: transparent; font-size: 24px; }
.revealed-secret { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-width: 0; padding: 10px; border-radius: 10px; background: #07110e; }
.revealed-secret code { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.revealed-secret button { align-self: center; }
pre { width: 100%; min-width: 0; padding: 15px; border-radius: 10px; color: #cbd7e8; background: #070c15; border: 1px solid #1d293c; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 330px; overflow: auto; line-height: 1.6; }
.settings-grid { align-items: start; }
.configuration-section { margin-bottom: 18px; }
.configuration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; align-items: start; }
.setup-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; padding: 0; overflow: hidden; }
.setup-guide > div { min-height: 145px; padding: 20px; background: rgba(255,255,255,.012); }
.setup-guide strong, .setup-guide small { display: block; }
.setup-guide strong { margin: 13px 0 7px; }
.setup-guide small { color: var(--muted); line-height: 1.55; }
.step-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #052018; background: var(--accent); font-weight: 900; }
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.check-card { min-height: 150px; padding: 15px; border-radius: 12px; background: rgba(255,255,255,.018); border: 1px solid var(--border); }
.check-card > div { display: flex; align-items: center; gap: 9px; }
.check-card p { margin: 13px 0 7px; overflow-wrap: anywhere; }
.check-card small { color: var(--muted); line-height: 1.5; }
.check-mark { padding: 3px 7px; border-radius: 99px; font-size: 10px; font-weight: 800; }
.check-card.passed .check-mark { color: var(--accent); background: rgba(52, 211, 153, .1); }
.check-card.failed .check-mark { color: var(--danger); background: rgba(251, 113, 133, .1); }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.instruction-box { padding: 13px 15px; border-radius: 10px; color: #c9d8e9; background: rgba(96, 165, 250, .08); border: 1px solid rgba(96, 165, 250, .18); line-height: 1.65; }
.instruction-box.warning { color: #fde9af; background: rgba(251, 191, 36, .07); border-color: rgba(251, 191, 36, .18); }
.quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.quick-links a { display: grid; gap: 7px; padding: 15px; border: 1px solid var(--border); border-radius: 11px; background: rgba(255,255,255,.016); }
.quick-links a strong { color: var(--text); }
.quick-links a small { color: var(--muted); line-height: 1.5; }
.metric-large { padding: 15px 0 24px; display: flex; align-items: baseline; gap: 10px; }
.metric-large strong { font-size: 45px; letter-spacing: -.06em; }
.metric-large span { color: var(--muted); }
.database-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.database-card { position: relative; }
.database-card.active-source { border-color: rgba(110, 231, 183, .38); box-shadow: inset 0 0 35px rgba(52, 211, 153, .035); }
.inline-error { padding: 11px; margin-top: 10px; color: #fecdd3; border-radius: 9px; background: rgba(251, 113, 133, .09); }
.docs-panel pre { max-height: none; margin: 0; border: 0; background: transparent; padding: 0; }
.flash { padding: 13px 16px; margin: 0 0 18px; border-radius: 11px; color: #d8ffef; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .2); }
.flash.error { color: #ffe0e5; background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .22); }
.lookup-shell { width: min(1280px, 100%); min-height: calc(100vh - 50px); display: flex; flex-direction: column; }
.lookup-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 0 28px; }
.lookup-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.lookup-brand > span:last-child { display: grid; gap: 3px; }
.lookup-brand strong { font-size: 16px; }
.lookup-brand small { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.lookup-main { display: grid; gap: 18px; }
.lookup-hero { position: relative; overflow: hidden; padding: clamp(28px, 5vw, 56px); border: 1px solid var(--border); border-radius: 24px; background: radial-gradient(circle at 85% 5%, rgba(110, 231, 183, .18), transparent 31%), linear-gradient(145deg, rgba(21, 31, 49, .96), rgba(10, 17, 29, .98)); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.lookup-hero::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 300px; height: 300px; border: 1px solid rgba(110, 231, 183, .12); border-radius: 50%; box-shadow: 0 0 0 45px rgba(110, 231, 183, .025), 0 0 0 90px rgba(110, 231, 183, .018); pointer-events: none; }
.lookup-hero > * { position: relative; z-index: 1; }
.lookup-hero h1 { max-width: 760px; margin: 8px 0 10px; font-size: clamp(31px, 5vw, 54px); letter-spacing: -.055em; }
.lookup-hero > p:not(.eyebrow) { max-width: 720px; margin: 0; color: #aebbd0; line-height: 1.75; }
.lookup-search { max-width: 790px; margin-top: 30px; }
.lookup-search > label { margin-bottom: 8px; font-weight: 750; }
.lookup-search > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.lookup-search input { min-height: 54px; padding: 13px 16px; font-size: 18px; background: rgba(5, 11, 20, .85); }
.lookup-search button { min-width: 128px; }
.lookup-examples { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 15px; color: var(--muted); font-size: 12px; }
.lookup-examples a { padding: 4px 8px; border: 1px solid rgba(110, 231, 183, .18); border-radius: 999px; background: rgba(110, 231, 183, .06); }
.lookup-message { display: flex; gap: 10px; align-items: center; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.lookup-message.error { color: #ffe1e6; border-color: rgba(251, 113, 133, .28); background: rgba(251, 113, 133, .09); }
.lookup-summary { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; padding: clamp(22px, 4vw, 34px); border: 1px solid rgba(110, 231, 183, .25); border-radius: 20px; background: linear-gradient(135deg, rgba(52, 211, 153, .09), rgba(15, 23, 38, .96)); }
.lookup-status { display: inline-flex; padding: 5px 9px; color: var(--accent); border-radius: 999px; background: rgba(52, 211, 153, .1); font-size: 11px; font-weight: 800; }
.lookup-summary p { margin: 18px 0 4px; color: var(--muted); font-size: 12px; }
.lookup-summary h2 { margin: 0 0 9px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -.05em; }
.lookup-summary > div > strong { color: #c9d5e6; font-size: 15px; line-height: 1.6; }
.lookup-summary dl, .lookup-detail-card dl { margin: 0; }
.lookup-summary dl { display: grid; align-content: center; }
.lookup-summary dl div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.lookup-summary dl div:last-child { border-bottom: 0; }
.lookup-summary dt, .lookup-detail-card dt { color: var(--muted); }
.lookup-summary dd, .lookup-detail-card dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.lookup-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.lookup-detail-card { padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, rgba(21, 31, 49, .88), rgba(12, 19, 31, .95)); }
.lookup-detail-card h3 { margin: 0 0 6px; font-size: 17px; }
.lookup-detail-card > div > p { min-height: 42px; margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.lookup-detail-card dl div { display: grid; grid-template-columns: minmax(92px, .8fr) minmax(0, 1.2fr); gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.055); font-size: 13px; }
.lookup-detail-card dd { text-align: right; color: #d9e3f2; }
.lookup-detail-card .is-empty dd { color: #667389; }
.lookup-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--border); }
.lookup-meta > div { display: grid; gap: 5px; padding: 17px; background: #101827; }
.lookup-meta span { color: var(--muted); font-size: 11px; }
.lookup-meta strong { overflow-wrap: anywhere; }
.lookup-raw { padding: 17px 19px; border: 1px solid var(--border); border-radius: 16px; background: rgba(15, 23, 38, .8); }
.lookup-raw summary { cursor: pointer; color: #cbd7e8; font-weight: 750; }
.lookup-raw pre { max-height: 480px; margin: 15px 0 0; }
.lookup-empty-state { padding: 42px 24px; text-align: center; border: 1px dashed #2b3a54; border-radius: 18px; background: rgba(15, 23, 38, .55); }
.lookup-empty-state strong { font-size: 18px; }
.lookup-empty-state p { margin: 8px 0 0; color: var(--muted); line-height: 1.7; }
.lookup-footer { margin-top: auto; padding: 28px 0 5px; color: var(--muted); text-align: center; font-size: 12px; }
@media (min-width: 981px) {
    .lookup-shell.has-result .lookup-header { padding-bottom: 16px; }
    .lookup-shell.has-result .lookup-main { gap: 14px; }
    .lookup-shell.has-result .lookup-hero { display: grid; grid-template-columns: minmax(260px, .62fr) minmax(0, 1.38fr); gap: 28px; align-items: end; padding: 22px 28px; border-radius: 18px; }
    .lookup-shell.has-result .lookup-hero .eyebrow,
    .lookup-shell.has-result .lookup-hero > p:not(.eyebrow),
    .lookup-shell.has-result .lookup-examples { display: none; }
    .lookup-shell.has-result .lookup-hero h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -.04em; }
    .lookup-shell.has-result .lookup-search { max-width: none; margin: 0; }
    .lookup-shell.has-result .lookup-summary { padding: 20px 26px; }
    .lookup-shell.has-result .lookup-summary p { margin-top: 12px; }
    .lookup-shell.has-result .lookup-summary h2 { font-size: 38px; }
    .lookup-shell.has-result .lookup-summary dl div { padding: 8px 0; }
    .lookup-shell.has-result .lookup-detail-grid { gap: 12px; }
    .lookup-shell.has-result .lookup-detail-card { padding: 17px 19px; }
    .lookup-shell.has-result .lookup-detail-card > div > p { min-height: 34px; margin-bottom: 9px; }
    .lookup-shell.has-result .lookup-detail-card dl div { padding: 7px 0; }
    .lookup-shell.has-result .lookup-meta > div { padding: 12px 16px; }
}
.auth-shell { display: grid; place-items: center; padding: 25px; }
.login-wrap { width: min(430px, 100%); }
.login-card { padding: 38px; border: 1px solid var(--border); border-radius: 21px; background: rgba(15, 23, 38, .93); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.login-logo { width: 50px; height: 50px; margin-bottom: 26px; }
.login-card h1 { margin: 8px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.login-card .stack { margin-top: 27px; }
@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar { transform: translateX(-102%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .main { padding: 0 20px 40px; }
    .topbar { justify-content: space-between; }
    .menu-button { display: block; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar { grid-template-columns: 1fr 1fr; }
    .setup-guide, .check-grid, .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lookup-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
    .page-head { align-items: flex-start; flex-direction: column; }
    .stats-grid, .two-column, .database-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .secret-banner { grid-template-columns: 1fr; }
    .login-card { padding: 27px 22px; }
    .head-actions { width: 100%; flex-wrap: wrap; }
    .configuration-grid, .setup-guide, .check-grid, .quick-links, .form-pair { grid-template-columns: 1fr; }
    .auth-shell { padding: 15px; }
    .lookup-header { padding-bottom: 18px; }
    .lookup-header .button-link { padding: 8px 10px; font-size: 12px; }
    .lookup-hero { border-radius: 19px; }
    .lookup-search > div { grid-template-columns: 1fr; }
    .lookup-search button { min-height: 49px; }
    .lookup-summary, .lookup-detail-grid, .lookup-meta { grid-template-columns: 1fr; }
    .lookup-summary dl { margin-top: 7px; }
    .lookup-detail-card > div > p { min-height: 0; }
}
