:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #171916; background: #f3f4ef; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f3f4ef; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.eyebrow { margin: 0 0 .45rem; color: #61705e; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: #697067; }
.brand-mark { width: 3.4rem; height: 3.4rem; display: grid; place-items: center; border-radius: 1rem; background: #10120f; color: white; font-size: 1.7rem; font-weight: 900; transform: skewX(-8deg); }
.brand-mark.small { width: 2.4rem; height: 2.4rem; border-radius: .7rem; font-size: 1.15rem; }
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #e0e7d9, transparent 36rem), #f3f4ef; }
.login-card { width: min(100%, 28rem); padding: clamp(1.6rem, 5vw, 2.8rem); border: 1px solid #d7dbd2; border-radius: 1.5rem; background: rgba(255,255,255,.92); box-shadow: 0 1.2rem 4rem rgba(32,44,29,.09); }
.login-card h1 { margin: 1.6rem 0 .4rem; font-size: clamp(2rem, 7vw, 3rem); line-height: .98; }
form { display: grid; gap: 1rem; margin-top: 1.6rem; }
label { display: grid; gap: .45rem; color: #3c433a; font-size: .84rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 2.85rem; border: 1px solid #cbd0c7; border-radius: .7rem; padding: .65rem .8rem; background: #fff; color: #151713; }
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(76, 108, 68, .18); border-color: #4c6c44; }
.primary, .quiet, .icon-button { min-height: 2.75rem; border-radius: .7rem; border: 1px solid transparent; padding: .65rem 1rem; font-weight: 750; }
.primary { background: #151713; color: white; }
.primary:hover { background: #2d332b; }
.primary:disabled { opacity: .4; cursor: not-allowed; }
.quiet { border-color: #d6dad1; background: #fff; color: #2b3029; }
.quiet.compact { min-height: 2.25rem; padding: .35rem .7rem; }
.form-error { min-height: 1.2rem; margin: 0; color: #a12b26; font-size: .85rem; }
.topbar { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid #dde0d8; background: rgba(250,251,247,.94); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.brand-lockup { display: flex; align-items: center; gap: .75rem; }
.brand-lockup div { display: grid; }
.brand-lockup span { color: #70766d; font-size: .78rem; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.freshness { color: #6c7269; font-size: .8rem; }
.workspace { width: min(100% - 2rem, 90rem); margin: 0 auto; padding: clamp(1.5rem, 5vw, 4rem) 0 5rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.page-heading h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: .94; letter-spacing: -.055em; }
.page-heading p:last-child { margin-bottom: 0; color: #667064; }
.server-chip { display: flex; align-items: center; gap: .55rem; padding: .65rem .8rem; border-radius: 999px; background: #fff; border: 1px solid #dce0d8; white-space: nowrap; font-size: .82rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin: 2.5rem 0 1rem; }
.summary-card { display: flex; flex-direction: column; gap: 1.2rem; min-height: 8.5rem; padding: 1.15rem; border-radius: 1rem; background: #fff; border: 1px solid #dce0d8; }
.summary-card span { color: #687066; font-size: .82rem; font-weight: 700; }
.summary-card strong { margin-top: auto; font-size: 2.7rem; line-height: 1; }
.summary-card.warning { border-color: #e5c67d; background: #fffaf0; }
.summary-card.critical { border-color: #e2aaa6; background: #fff5f4; }
.summary-card.support { border-color: #a9bf9e; background: #f1f7ee; }
.instances-panel, .audit-panel { margin-top: 1rem; overflow: hidden; border: 1px solid #dce0d8; border-radius: 1rem; background: #fff; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid #e5e8e1; }
.panel-heading h2 { margin: 0; font-size: 1.1rem; }
.panel-heading p { margin: .25rem 0 0; color: #70776e; font-size: .8rem; }
.filters { display: flex; gap: .55rem; }
.filters input { width: 15rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1.15rem; text-align: left; border-bottom: 1px solid #eceee9; font-size: .84rem; vertical-align: middle; }
th { color: #737970; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.instance-name { display: flex; align-items: center; gap: .7rem; min-width: 12rem; border: 0; background: transparent; padding: 0; text-align: left; color: inherit; }
.instance-name span:last-child { display: grid; gap: .18rem; }
.instance-name small { color: #777d74; }
.status-dot { width: .62rem; height: .62rem; flex: 0 0 auto; border-radius: 50%; background: #92988f; box-shadow: 0 0 0 4px rgba(146,152,143,.12); }
.status-dot.healthy { background: #4f7a47; box-shadow: 0 0 0 4px rgba(79,122,71,.12); }
.status-dot.warning { background: #c3891d; box-shadow: 0 0 0 4px rgba(195,137,29,.12); }
.status-dot.critical, .status-dot.unknown { background: #b63c34; box-shadow: 0 0 0 4px rgba(182,60,52,.12); }
.status-pill { display: inline-flex; align-items: center; min-height: 1.7rem; padding: .2rem .55rem; border-radius: 999px; background: #eef0ec; font-size: .72rem; font-weight: 800; }
.status-pill.healthy { background: #e7f1e4; color: #355b30; }
.status-pill.warning { background: #fff2d4; color: #76500d; }
.status-pill.critical, .status-pill.unknown { background: #fbe4e2; color: #8a2923; }
.warning-copy { display: block; margin-top: .3rem; color: #776b58; }
.empty { padding: 2rem; color: #737970; text-align: center; }
.instance-cards { display: none; }
.audit-list { list-style: none; margin: 0; padding: .4rem 1.2rem 1rem; }
.audit-list li { display: flex; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid #eceee9; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list div { display: grid; gap: .22rem; }
.audit-list span { color: #747a71; font-size: .76rem; }
.audit-dot { width: .55rem; height: .55rem; margin-top: .35rem; border-radius: 50%; background: #7e8b78; }
dialog { width: min(calc(100% - 2rem), 42rem); max-height: calc(100dvh - 2rem); overflow: auto; border: 1px solid #d4d8cf; border-radius: 1.2rem; padding: 0; background: #fff; color: inherit; box-shadow: 0 2rem 6rem rgba(20,28,18,.22); }
dialog::backdrop { background: rgba(22,28,20,.45); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; padding: 1.3rem 1.4rem; border-bottom: 1px solid #e3e6df; }
.dialog-heading h2 { margin: 0; font-size: 1.5rem; }
.icon-button { min-width: 2.5rem; padding: 0; border-color: #daddd6; background: white; font-size: 1.4rem; }
#detail-content, .support-dialog form, .recovery-dialog form { padding: 1.35rem; }
.support-dialog form, .recovery-dialog form { margin-top: 0; }
.detail-status { display: flex; align-items: center; justify-content: space-between; color: #72786f; font-size: .78rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin: 1.2rem 0; }
.detail-grid div { padding: .8rem; border-radius: .75rem; background: #f5f6f2; }
.detail-grid dt { color: #71776e; font-size: .72rem; }
.detail-grid dd { margin: .25rem 0 0; font-weight: 750; }
.detail-section { margin-top: 1.4rem; }
.detail-section h3 { margin-bottom: .65rem; font-size: .86rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips span { padding: .35rem .55rem; border-radius: 999px; background: #edf1ea; font-size: .74rem; }
.warnings { margin: 0; padding-left: 1.1rem; color: #7c342f; }
.support-session-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.support-session-list li { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem; border: 1px solid #e2e5de; border-radius: .75rem; background: #fafbf8; }
.support-session-list li > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .2rem .5rem; min-width: 0; }
.support-session-list small { grid-column: 1 / -1; color: #6e756b; overflow-wrap: anywhere; }
.support-state { display: inline-flex; width: fit-content; padding: .18rem .45rem; border-radius: 999px; background: #ecefea; color: #545b51; font-size: .68rem; font-weight: 800; }
.support-state.exchanged { background: #e7f1e4; color: #355b30; }
.support-state.issued { background: #fff2d4; color: #76500d; }
.danger { color: #8a2923; border-color: #dfbbb7; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: .6rem; padding: 1rem 1.35rem; border-top: 1px solid #e3e6df; }
.notice { margin: 0; padding: .8rem; border-radius: .7rem; background: #f1f4ee; color: #586154; font-size: .78rem; line-height: 1.45; }
.field-hint { color: #737a70; font-size: .74rem; font-weight: 500; line-height: 1.35; }
.recovery-dialog .form-error:empty { display: none; }
.recovery-intro { margin: 0; color: #4e574b; font-size: .88rem; line-height: 1.55; }
.recovery-warning { margin: 0; padding: .85rem; border: 1px solid #e7cc8b; border-radius: .75rem; background: #fff8e9; color: #654b14; font-size: .8rem; line-height: 1.5; }
.recovery-dialog input[name="totp"] { max-width: 12rem; letter-spacing: .22em; font-variant-numeric: tabular-nums; }
.recovery-result { padding: 1.5rem; }
.recovery-result h3 { margin: .8rem 0 .35rem; font-size: 1.25rem; }
.recovery-result > p { margin: 0 0 1.15rem; color: #596157; font-size: .86rem; line-height: 1.5; }
.recovery-result > label { margin-bottom: .45rem; }
.recovery-result textarea { min-height: 6.5rem; resize: none; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; line-height: 1.45; }
.result-success { width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: 50%; background: #e4f0e0; color: #365f30; font-size: 1.35rem; font-weight: 900; }
.copy-status { min-height: 1.25rem; margin: .55rem 0 .8rem !important; color: #42603d !important; font-size: .76rem !important; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 760px) {
  .freshness { display: none; } .topbar .quiet { padding-inline: .65rem; font-size: .76rem; }
  .page-heading { align-items: start; flex-direction: column; } .server-chip { display: none; }
  .summary-grid { grid-template-columns: 1fr 1fr; } .summary-card { min-height: 6.8rem; }
  .panel-heading { align-items: stretch; flex-direction: column; } .filters { flex-direction: column; } .filters input { width: 100%; }
  .table-wrap { display: none; } .instance-cards { display: grid; padding: .75rem; gap: .65rem; }
  .instance-card { display: grid; gap: .9rem; padding: 1rem; border: 1px solid #e0e3dc; border-radius: .85rem; background: #fff; text-align: left; color: inherit; }
  .card-top, .card-top > span:first-child { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
  .card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
  .card-meta span { display: grid; gap: .18rem; color: #727970; font-size: .68rem; } .card-meta strong { color: #242823; font-size: .76rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-actions button { flex: 1 1 calc(50% - .3rem); }
  .recovery-dialog form { gap: .8rem; padding: 1rem; }
  .recovery-dialog textarea[name="reason"] { min-height: 5rem; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}
@media (max-width: 430px) { .brand-lockup div { display: none; } .workspace { width: min(100% - 1rem, 90rem); } .summary-grid { gap: .5rem; } .summary-card { padding: .85rem; } }
