* {box-sizing: border-box;}
:root {font-family: system-ui, sans-serif; color: #1e293b; background: #f5f7fa; line-height: 1.5;}
body {max-width: 76rem; margin: 0 auto; padding: 2.5rem 2rem;}
header {display: flex; justify-content: space-between; align-items: center; gap: 1rem;}
h1 {font-size: 1.9rem; letter-spacing: -.04em; margin: 0;}
h2 {font-size: 1.05rem; margin: 0 0 .6rem;}
p {margin: .4rem 0;}
a {color: #315d9e; text-underline-offset: .2em;}
.eyebrow {font-size: .7rem; letter-spacing: .15em; font-weight: 700; color: #64748b;}
.connection {font-size: .85rem; color: #526176; margin: 1rem 0 1.8rem;}
.panel {background: #fff; border: 1px solid #dce3eb; border-radius: .7rem; padding: 1.4rem; margin: 1rem 0;}
.muted {color: #566579; font-size: .85rem;}
.fine-print {color: #64748b; font-size: .78rem;}
.badge {display: inline-block; padding: .2rem .55rem; border-radius: .3rem; font-size: .78rem; background: #edf1f6; color: #41516a;}
.good {background: #e6f4ed; color: #216347;}
.warning {background: #fff3d7; color: #775313;}
.danger {background: #fce8e8; color: #942d2d;}
.all-clear {color: #216347;}
.attention-list {list-style: none; padding: 0; margin: 0 0 1rem;}
.attention-list li {border-left: 3px solid #d6a24c; padding: .35rem .85rem; margin: .8rem 0;}
.attention-list strong {font-size: .9rem;}
.attention-list p {color: #566579; font-size: .85rem;}
.loop-line {display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .8rem 0; flex-wrap: wrap; font-size: .9rem;}
.table-scroll {overflow-x: auto;}
table {width: 100%; border-collapse: collapse; font-size: .85rem; text-align: left;}
th {font-size: .73rem; color: #64748b; font-weight: 600; padding: .85rem .7rem; border-bottom: 1px solid #dce3eb;}
td {padding: 1rem .7rem; border-bottom: 1px solid #edf1f6; vertical-align: top; min-width: 9rem; overflow-wrap: anywhere;}
td:nth-child(2) {max-width: 27rem;}
tr:last-child td {border-bottom: 0;}
.metrics {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1rem;}
.metric {background: #f6f8fb; padding: 1rem; border-radius: .4rem;}
.metric strong {font-size: 1.6rem; font-weight: 600; letter-spacing: -.03em;}
.accounting-gap {font-size: .8rem; color: #775313; margin-top: 1rem;}
details {margin: .6rem 0;}
summary {cursor: pointer; color: #41516a; font-size: .85rem; padding: .4rem 0;}
.secondary {border-top: 1px solid #dce3eb; margin-top: 1.5rem; padding-top: .6rem;}
.secondary > summary {font-weight: 600;}
form {border: 1px solid #dce3eb; border-radius: .4rem; padding: 1rem; margin: .8rem 0; background: #fff;}
label {display: inline-block; margin: .3rem .5rem .3rem 0; vertical-align: middle; font-size: .85rem;}
input, textarea, button {font: inherit;}
input, textarea {display: block; max-width: 100%; padding: .4rem; border: 1px solid #a5b1c2; border-radius: .25rem;}
textarea {width: 28rem; height: 5rem;}
button {padding: .5rem .8rem; cursor: pointer; border: 1px solid #a5b1c2; border-radius: .25rem; background: #eef2f7; color: #1e293b;}
button:disabled {cursor: wait; opacity: .6;}
:focus-visible {outline: 3px solid #387ac1; outline-offset: 3px;}
pre {white-space: pre-wrap; overflow-wrap: anywhere; background: #eef2f7; padding: 1rem; max-height: 24rem; overflow: auto; font-size: .8rem;}
@media (max-width: 600px) {body {padding: 1.2rem .8rem;} header {align-items: flex-start;} h1 {font-size: 1.5rem;} .panel {padding: 1rem;} .metrics {grid-template-columns: 1fr;} textarea {width: 100%;} label {display: block;} table {min-width: 43rem;}}

.login-panel { max-width: 28rem; margin: 12vh auto; padding: 2rem; background: white; border: 1px solid var(--line, #ddd); border-radius: .75rem; }
.login-panel button { width: 100%; }
.login-panel [role="status"] { min-height: 1.5em; }
