:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #777;
  --line: #e6e6e6;
  --soft: #f6f6f4;
  --white: #fff;
  --success: #397451;
  --danger: #a84848;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fafaf9; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(circle at 50% 0, #fff 0, #f3f3f1 55%, #e9e9e7 100%); }
.login-card { width: min(100%, 430px); background: rgba(255,255,255,.92); padding: 44px; border: 1px solid #eee; box-shadow: 0 24px 80px rgba(0,0,0,.07); }
.brand { display: flex; gap: 9px; align-items: center; font-weight: 700; letter-spacing: -.04em; font-size: 17px; }
.brand-mark { background: var(--ink); color: white; border-radius: 7px; padding: 6px 8px 5px; letter-spacing: -.1em; }
.brand-large { font-size: 22px; margin-bottom: 46px; }
.brand-large .brand-mark { padding: 8px 10px 7px; border-radius: 9px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 700; color: var(--muted); margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.1; letter-spacing: -.05em; margin-bottom: 10px; }
h2 { font-size: 25px; letter-spacing: -.045em; margin: 0; }
h3 { font-size: 15px; margin-bottom: 7px; }
.muted { color: var(--muted); }
.login-footer { position: absolute; bottom: 20px; color: #999; font-size: 12px; }
.login-footer span { margin: 0 7px; }
.stack { display: flex; flex-direction: column; }
.gap-lg { gap: 17px; }
label { display: grid; gap: 8px; font-size: 12px; color: #555; font-weight: 650; }
input, select, textarea { border: 1px solid #ddd; border-radius: 7px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #777; box-shadow: 0 0 0 3px #0000000c; }
textarea { min-height: 88px; resize: vertical; }
.button { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 10px 14px; font-weight: 650; color: var(--ink); transition: .15s ease; }
.button:hover { transform: translateY(-1px); border-color: #aaa; }
.button-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.button-quiet { background: var(--soft); }
.button-danger { color: var(--danger); }
.button-full { width: 100%; padding: 12px; }
.form-error { min-height: 16px; color: var(--danger); font-size: 12px; margin: 0; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; padding: 13px 16px; background: var(--ink); color: #fff; border-radius: 8px; box-shadow: 0 10px 30px #0002; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.app { min-height: 100vh; display: flex; }
.sidebar { width: 240px; border-right: 1px solid var(--line); background: #fff; padding: 25px 15px; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .brand { padding: 0 10px 31px; }
.nav { display: grid; gap: 4px; }
.nav button { text-align: left; border: 0; border-radius: 7px; padding: 11px 12px; background: transparent; color: #777; font-weight: 600; }
.nav button:hover, .nav button.active { color: var(--ink); background: var(--soft); }
.sidebar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 17px 10px 0; }
.user-label { font-weight: 700; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.content { flex: 1; min-width: 0; padding: 35px clamp(20px, 5vw, 70px); }
.content-inner { max-width: 1280px; margin: auto; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.topbar .muted { margin: 7px 0 0; }
.top-actions { display: flex; gap: 9px; }
.mobile-menu { display: none; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 15px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 19px; }
.metric-label { color: var(--muted); font-size: 12px; margin-bottom: 15px; }
.metric-value { font-size: 28px; font-weight: 700; letter-spacing: -.05em; }
.metric-note { color: var(--muted); font-size: 11px; margin-top: 9px; }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 15px; }
.section-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 22px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h3 { margin: 0; }
.chart { height: 190px; display: flex; align-items: end; gap: 8px; padding-top: 15px; border-bottom: 1px solid var(--line); }
.bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 8px; min-width: 0; }
.bars { width: 100%; height: calc(100% - 20px); display: flex; align-items: end; justify-content: center; gap: 3px; }
.bar { width: 45%; min-height: 2px; background: #c9c9c6; border-radius: 3px 3px 0 0; }
.bar.reg { background: var(--ink); }
.bar-label { color: #999; font-size: 10px; }
.legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; margin-top: 15px; }
.legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #c9c9c6; margin-right: 5px; }.legend i.dark { background: var(--ink); }
.quick-list { display: grid; gap: 12px; }.quick-list div { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #f0f0ef; }.quick-list div:last-child { border: 0; padding: 0; }.quick-list b { font-size: 15px; }
.table-wrap { overflow-x: auto; }.table { width: 100%; border-collapse: collapse; }.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid #efefed; white-space: nowrap; }.table th { color: #888; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 650; }.table td { font-size: 13px; }.table tr:last-child td { border-bottom: 0; }.table-actions { display: flex; gap: 5px; }.table-actions .button { padding: 6px 8px; font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; background: var(--soft); font-size: 11px; }.status::before { content: ''; width: 5px; height: 5px; background: #999; border-radius: 50%; }.status.active, .status.paid { color: var(--success); background: #eff7f1; }.status.active::before, .status.paid::before { background: var(--success); }.status.blocked, .status.rejected { color: var(--danger); background: #fcf0f0; }.status.blocked::before, .status.rejected::before { background: var(--danger); }.status.pending { color: #866d37; background: #fbf6e9; }.status.pending::before { background: #b59650; }
.empty { text-align: center; color: var(--muted); padding: 38px 15px; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; padding: 20px; background: #0008; display: grid; place-items: center; }.modal { width: min(100%, 520px); max-height: 90vh; overflow: auto; background: white; border-radius: 10px; padding: 25px; }.modal-head { display: flex; justify-content: space-between; margin-bottom: 22px; }.modal-close { border: 0; background: transparent; color: #777; font-size: 20px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.form-grid .wide { grid-column: 1 / -1; }.form-footer { display: flex; justify-content: end; gap: 9px; margin-top: 20px; }
.link-box { display: flex; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); }.link-box code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }.callout { padding: 15px; border-left: 3px solid var(--ink); background: var(--soft); color: #555; line-height: 1.55; }.profile-form { max-width: 600px; display: grid; gap: 15px; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); }.grid-2 { grid-template-columns: 1fr; }.content { padding: 28px 20px; } }
@media (max-width: 650px) { .login-card { padding: 30px 23px; }.brand-large { margin-bottom: 35px; }.sidebar { width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }.sidebar .brand { padding: 0 4px 14px; }.app { display: block; }.sidebar-bottom { display: none; }.nav { display: flex; overflow-x: auto; padding-bottom: 2px; }.nav button { white-space: nowrap; padding: 9px 10px; }.content { padding: 24px 14px; }.topbar { align-items: start; flex-direction: column; margin-bottom: 22px; }.top-actions { width: 100%; }.top-actions .button { flex: 1; }.cards { gap: 8px; }.card { padding: 14px; }.metric-value { font-size: 23px; }.section-card { padding: 16px; }.form-grid { grid-template-columns: 1fr; }.form-grid .wide { grid-column: auto; }.table th, .table td { padding: 11px 8px; } }
