*{box-sizing:border-box}
/* Hide the page until common.js has decided whether the viewer is signed in.
   Protected pages that fail /api/me will redirect to /login before the body is
   ever shown. Public pages make themselves visible when mountChrome resolves. */
html{visibility:hidden}
html.rlt-ready{visibility:visible}
body{margin:0;background:#080d17;color:#f7f1e3;font-family:Inter,"Segoe UI",Arial,sans-serif;line-height:1.5}
a{color:#f1cb75;text-decoration:none}
header{display:flex;align-items:center;justify-content:space-between;padding:18px 5%;border-bottom:1px solid #6d592c;background:#101827;gap:16px;flex-wrap:wrap}
.brand{font-family:Georgia,serif;color:#eac66d;font-size:27px;font-weight:bold;display:flex;align-items:center;gap:12px}
.brand em{font-family:"Brush Script MT","Segoe Script",cursive;font-size:28px;transform:rotate(-10deg);display:inline-block;color:#fff3c6;margin-left:-4px}
.brand img{height:34px;width:auto;border-radius:4px}
nav{display:flex;flex-wrap:wrap;gap:12px;padding:12px 5%;background:#131d2b}
nav a{font-size:12px;letter-spacing:.5px}
nav a.active{color:#fff3c6;text-decoration:underline}
main{max-width:1150px;margin:28px auto;padding:0 24px}
.hero{display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:center}
.hero img{width:100%;border-radius:12px}
.eyebrow{letter-spacing:3px;color:#e6bf66;font-size:12px;text-transform:uppercase}
h1{font-family:Georgia,serif;font-size:34px;line-height:1.15;margin:12px 0}
h2{color:#f0cf87;font-size:22px}
h3{color:#f0cf87;font-size:16px}
.muted{color:#aab2c3;line-height:1.6}
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.card{background:#172236;border:1px solid #39445b;border-radius:13px;padding:22px;margin:10px 0}
.stat{font-size:32px;font-weight:bold;color:#efcb77}
.btn,button{background:#d7b05d;color:#101725;border:0;border-radius:8px;padding:12px 18px;cursor:pointer;font-weight:700;font-size:14px}
.btn.secondary,button.secondary{background:transparent;border:1px solid #d7b05d;color:#e8c77c}
.btn.danger,button.danger{background:#c75858;color:#fff}
input,select,textarea{padding:11px;background:#0d1524;color:white;border:1px solid #66718b;border-radius:7px;max-width:100%;width:100%;margin:5px 0 12px;font-family:inherit;font-size:14px}
label{font-size:13px;color:#e4c781;display:block;margin-top:6px}
table{border-collapse:collapse;width:100%;background:#172236;font-size:13px}
td,th{border-bottom:1px solid #38455c;padding:10px;text-align:left}
th{color:#eac773;font-weight:700;background:#0f1a2d;position:sticky;top:0}
.table-wrap{max-height:70vh;overflow:auto;border:1px solid #38455c;border-radius:10px}
section{margin:25px 0}
.alert{background:#2c281c;border-left:3px solid #e5c36b;padding:12px;margin:12px 0;border-radius:4px}
.alert.error{background:#3a1b1b;border-left-color:#e07070;color:#ffd0d0}
.alert.ok{background:#1a2d1f;border-left-color:#7fcb86;color:#d0ffd4}
.pill{border:1px solid #a8894c;border-radius:99px;padding:5px 10px;font-size:11px;color:#f0cf87;display:inline-block}
.pill.ok{border-color:#7fcb86;color:#9be0a0}
.pill.warn{border-color:#e5c36b;color:#f1cb75}
.pill.err{border-color:#e07070;color:#ff9999}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:15px}
footer{padding:28px;text-align:center;color:#8c97ab;font-size:12px}
.hide,[hidden]{display:none !important}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.row > *{margin:0}
.spacer{flex:1}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0}
.toolbar input,.toolbar select{width:auto;min-width:180px;margin:0}
.ledger-table th:first-child,.ledger-table td:first-child{position:sticky;left:0;background:#101827;z-index:1}
.ledger-cell{cursor:pointer;text-align:right;font-variant-numeric:tabular-nums}
.ledger-cell:hover{background:#1f2d47}
.ledger-cell.empty{color:#54607a}
.ledger-cell.has-value{color:#f0cf87;font-weight:600}
.perm-chip{display:inline-block;padding:3px 8px;margin:2px;border-radius:99px;background:#0d1524;border:1px solid #39445b;font-size:11px}
.perm-chip.on{background:#2b3f26;border-color:#7fcb86;color:#c6f0cf}
.money{font-variant-numeric:tabular-nums;color:#f0cf87;font-weight:600}
@media(max-width:750px){.hero,.grid,.grid-2{grid-template-columns:1fr}h1{font-size:28px}nav{max-height:140px;overflow:auto}}
.loader{display:inline-block;width:16px;height:16px;border:2px solid #39445b;border-top-color:#d7b05d;border-radius:50%;animation:spin 1s linear infinite;vertical-align:middle}
@keyframes spin{to{transform:rotate(360deg)}}
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:1000;padding:16px}
.modal{background:#172236;border:1px solid #39445b;border-radius:13px;padding:24px;max-width:520px;width:100%}
details.card summary{cursor:pointer;color:#f0cf87;font-weight:600}
