:root {
  --ink: #122b26;
  --muted: #687773;
  --paper: #f4f2eb;
  --card: #fffdf8;
  --line: #dcded7;
  --green: #1e7b5a;
  --lime: #d9ed64;
  --red: #b8473d;
  --amber: #c17b22;
  --shadow: 0 16px 40px rgba(18, 43, 38, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.simulator-ribbon { position: fixed; z-index: 20; inset: 0 0 auto; height: 30px; display: grid; place-items: center; background: var(--lime); color: #24310d; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.login-shell { min-height: 100vh; padding: 80px 8vw 50px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 450px); gap: 8vw; align-items: center; background: radial-gradient(circle at 15% 20%, #2b5d4f 0, var(--ink) 45%, #0c211d 100%); color: white; }
.login-copy { max-width: 680px; }
.brand-mark { width: 66px; height: 66px; border-radius: 18px 18px 18px 5px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font: 900 34px/1 Georgia, serif; margin-bottom: 38px; }
.brand-mark.small { width: 42px; height: 42px; border-radius: 12px 12px 12px 4px; font-size: 23px; margin: 0; }
.eyebrow { margin: 0 0 8px; font-size: 11px; letter-spacing: .16em; font-weight: 850; color: var(--green); }
.login-copy .eyebrow { color: var(--lime); }
.login-copy h1 { margin: 0; max-width: 650px; font: 500 clamp(44px, 6vw, 78px)/.98 Georgia, serif; letter-spacing: -.035em; }
.lead { margin: 28px 0; max-width: 560px; color: #c8d4d0; font-size: 18px; line-height: 1.55; }
.trust-list { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-list span { border: 1px solid rgba(255,255,255,.2); padding: 9px 13px; border-radius: 999px; color: #dbe4e1; font-size: 12px; }
.login-card { background: var(--card); color: var(--ink); padding: 42px; border-radius: 4px 28px 28px 28px; box-shadow: 0 30px 70px rgba(0,0,0,.28); }
.login-card h2, .panel h2 { margin: 0; font: 600 30px/1.1 Georgia, serif; }
.muted { color: var(--muted); line-height: 1.5; }
form { display: grid; gap: 18px; margin-top: 28px; }
label { display: grid; gap: 7px; color: #3b4c47; font-size: 13px; font-weight: 750; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 13px 14px; color: var(--ink); outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,123,90,.12); }
.primary { border: 0; border-radius: 10px; padding: 14px 20px; background: var(--ink); color: white; font-weight: 800; }
.primary:hover { background: #1b453a; }
.full { width: 100%; }
.form-error { min-height: 18px; margin: 8px 0 0; color: var(--red); font-size: 13px; }
.app-shell { min-height: 100vh; padding-top: 30px; display: block; }
.sidebar { position: fixed; left: 0; top: 30px; bottom: 0; width: 250px; display: flex; flex-direction: column; justify-content: space-between; padding: 30px 22px; background: var(--ink); color: white; }
.brand-row { display: flex; gap: 12px; align-items: center; }
.brand-row strong, .brand-row span { display: block; }
.brand-row strong { font: 600 20px Georgia, serif; }
.brand-row span { margin-top: 2px; color: #9bb0aa; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
nav { margin-top: 50px; display: grid; gap: 6px; }
.nav-item { padding: 12px 14px; border: 0; border-radius: 9px; background: transparent; color: #abc0ba; text-align: left; font-weight: 700; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.09); color: white; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; }
.sidebar-foot span, .sidebar-foot strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot span { color: #9bb0aa; font-size: 12px; }
.sidebar-foot strong { margin: 4px 0 10px; font-size: 13px; }
.text-button { padding: 0; border: 0; background: none; color: var(--lime); font-size: 12px; font-weight: 800; }
.workspace { margin-left: 250px; width: calc(100% - 250px); padding: 44px clamp(24px, 5vw, 70px) 70px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.topbar h1 { margin: 0; font: 500 clamp(34px, 4vw, 50px)/1 Georgia, serif; }
.live-badge { display: flex; gap: 8px; align-items: center; border: 1px solid #bfccc7; border-radius: 999px; padding: 9px 13px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.5); }
.live-badge i { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(30,123,90,.12); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 16px; margin-bottom: 20px; }
.summary-card { min-height: 150px; padding: 24px; display: grid; align-content: space-between; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.summary-card.accent { background: var(--lime); border-color: var(--lime); }
.summary-card span { color: #52645e; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.summary-card strong { font: 500 42px Georgia, serif; }
.summary-card small { color: var(--muted); }
.content-grid { display: grid; grid-template-columns: minmax(300px, .75fr) minmax(480px, 1.5fr); gap: 20px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); padding: 26px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.step { font: 500 34px Georgia, serif; color: #b9c1bd; }
.optional { float: right; color: #9ba5a2; font-size: 10px; font-weight: 600; }
.money-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }
.money-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30,123,90,.12); }
.money-input span { padding-left: 14px; font: 600 22px Georgia, serif; }
.money-input input { border: 0; box-shadow: none; font-size: 22px; }
.notice { margin: 20px 0 0; padding: 13px; border-left: 3px solid var(--amber); background: #fff7e8; color: #715526; font-size: 12px; line-height: 1.5; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); font-size: 20px; }
.filters { display: flex; gap: 7px; margin: 22px 0 14px; }
.filter { border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; }
.filter.active { background: var(--ink); color: white; border-color: var(--ink); }
.charge-list { display: grid; }
.charge-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(100px, .8fr) auto; gap: 16px; align-items: center; padding: 17px 4px; border-top: 1px solid #e8e9e3; }
.charge-row h3 { margin: 0 0 4px; font-size: 14px; }
.charge-row p { margin: 0; color: var(--muted); font-size: 11px; }
.charge-value { font: 600 17px Georgia, serif; }
.charge-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.status { display: inline-block; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.status.pending { background: #fff1d8; color: #8a5b16; }
.status.confirmed { background: #dff3e9; color: #176b4d; }
.status.review { background: #fff1d8; color: #8a5b16; }
.status.rejected, .status.reversed { background: #f7e2df; color: #9b3c34; }
.status.expired { background: #e7e9e8; color: #59635f; }
.mini-button { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; background: white; color: var(--ink); font-size: 10px; font-weight: 800; }
.mini-button.confirm { background: var(--green); border-color: var(--green); color: white; }
.empty-state { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.event-list { margin-top: 20px; }
.event-row { display: grid; grid-template-columns: 150px 1fr 170px; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; }
.event-row code { word-break: break-all; font-size: 11px; color: var(--muted); }
.admin-grid { margin-bottom: 20px; }
.tenant-list, .user-list { display: grid; margin-top: 20px; }
.tenant-row, .user-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 2px; border-top: 1px solid var(--line); }
.tenant-row h3, .user-row h3 { margin: 0 0 4px; font-size: 14px; }
.tenant-row p, .user-row p { margin: 0; color: var(--muted); font-size: 11px; }
.tenant-actions { display: flex; gap: 6px; align-items: center; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.state-dot.inactive { background: var(--red); }
.users-panel { margin-top: 20px; }
.inline-form { grid-template-columns: 1fr 1.2fr .7fr 1fr auto; align-items: end; }
.inline-form .primary { height: 44px; }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 30; max-width: 360px; padding: 16px 20px; border-radius: 10px; background: var(--ink); color: white; box-shadow: 0 18px 45px rgba(0,0,0,.25); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--green); }
@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; padding: 80px 7vw 40px; }
  .login-copy h1 { font-size: 52px; }
  .login-card { max-width: 520px; }
  .app-shell { display: block; }
  .sidebar { position: static; width: auto; height: auto; flex-direction: row; padding: 18px 22px; }
  .sidebar nav { margin: 0; display: flex; }
  .sidebar-foot { display: none; }
  .workspace { margin: 0; width: 100%; padding: 32px 20px 60px; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .simulator-ribbon { font-size: 8px; text-align: center; }
  .login-copy { display: none; }
  .login-shell { display: block; padding: 80px 16px 30px; }
  .login-card { padding: 30px 22px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-card.wide { grid-column: 1 / -1; }
  .topbar { align-items: flex-start; }
  .live-badge { font-size: 0; padding: 12px; }
  .charge-row { grid-template-columns: 1fr auto; }
  .charge-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .event-row { grid-template-columns: 1fr; gap: 6px; }
  .inline-form { grid-template-columns: 1fr; }
}
