:root {
    --ink: #17212b;
    --muted: #6c7885;
    --line: #e6ebef;
    --surface: #ffffff;
    --canvas: #f5f7f9;
    --navy: #112a46;
    --blue: #1e78d5;
    --teal: #0da88a;
    --amber: #e9a526;
    --red: #d84b5b;
    --shadow: 0 10px 30px rgba(19, 43, 67, .07);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #edf5fc, #f7fafb); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--teal); font-weight: 800; letter-spacing: -1px; }
.login-card .brand-mark { margin-bottom: 24px; }
.login-card h1 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.5px; }
.login-card p { color: var(--muted); margin: 0 0 26px; }
.layout { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; color: #d9e5f1; background: var(--navy); padding: 24px 14px; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; font-weight: 750; color: #fff; padding: 0 11px 28px; font-size: 15px; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.nav-label { margin: 12px 12px 8px; color: #7891aa; text-transform: uppercase; letter-spacing: 1.3px; font-size: 10px; font-weight: 700; }
.nav-link { display: flex; gap: 11px; align-items: center; color: #aec1d3; padding: 11px 12px; border-radius: 9px; margin: 2px 0; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-icon { width: 18px; text-align: center; opacity: .8; font-weight: 700; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 18px 12px 0; color: #9eb3c6; font-size: 12px; }
.sidebar-footer strong { display: block; color: #fff; margin-bottom: 2px; font-size: 13px; }
.sidebar-footer form { margin-top: 15px; }
.main { width: 100%; min-width: 0; }
.topbar { min-height: 76px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.topbar .eyebrow { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.content { padding: 32px 36px 56px; max-width: 1500px; }
.flash { padding: 12px 15px; border-radius: 9px; margin-bottom: 20px; border: 1px solid; }
.flash.success { color: #08785f; background: #e8f8f3; border-color: #bfe9dd; }
.flash.error { color: #a93241; background: #fff0f1; border-color: #f1c3c8; }
.flash.warning { color: #8f650d; background: #fff8e6; border-color: #f0d994; }
.grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); }
.stat-card { padding: 19px 20px; }
.stat-card .stat-label { color: var(--muted); font-size: 12px; }
.stat-card .stat-value { margin-top: 5px; font-size: 28px; font-weight: 750; letter-spacing: -1px; }
.stat-card .stat-note { margin-top: 3px; font-size: 11px; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-head h2 { font-size: 16px; margin: 0; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 20px 21px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16px; margin: 0; }
.card-body { padding: 20px 21px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 17px; text-align: left; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; background: #fbfcfd; }
td { padding: 15px 17px; border-top: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: #fcfdfe; }
.primary, .secondary, .danger-button, .ghost { border: 0; border-radius: 8px; padding: 9px 14px; font-weight: 650; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.primary { color: #fff; background: var(--blue); }
.primary:hover { background: #1765b5; }
.secondary { color: #21557c; background: #eaf3fb; }
.danger-button { color: #a73443; background: #fff0f1; }
.ghost { color: #526777; background: transparent; border: 1px solid var(--line); }
.ghost:hover { background: #f6f8fa; }
.small { padding: 6px 10px; font-size: 12px; }
form.inline { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { color: #405262; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--ink); border: 1px solid #d7e0e6; border-radius: 8px; padding: 10px 11px; background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #75b3e9; box-shadow: 0 0 0 3px rgba(30,120,213,.11); }
textarea { min-height: 90px; resize: vertical; }
.help { color: var(--muted); font-size: 11px; font-weight: 400; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; grid-column: 1 / -1; margin-top: 3px; }
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.search { display: flex; gap: 7px; min-width: min(360px, 100%); }
.search input { min-width: 210px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 9px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge.success { color: #08785f; background: #e4f7f1; }
.badge.warning { color: #8f650d; background: #fff4d6; }
.badge.danger { color: #a93241; background: #ffebed; }
.badge.neutral { color: #60717f; background: #edf1f4; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.muted { color: var(--muted); }
.mono { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: #60717f; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.detail-hero h1 { margin: 0 0 5px; font-size: 25px; letter-spacing: -.5px; }
.detail-hero p { color: var(--muted); margin: 0; }
.two-col { grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); align-items: start; }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.account-card { padding: 20px; }
.account-card h3 { font-size: 15px; margin: 0 0 5px; }
.account-card .account-number { font-size: 18px; font-weight: 700; margin: 10px 0 13px; letter-spacing: -.3px; }
.meta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 17px 0; }
.meta-list dt { color: var(--muted); font-size: 11px; margin-bottom: 2px; }
.meta-list dd { margin: 0; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.notice { color: #6f570f; background: #fff8e5; border: 1px solid #f0dea4; border-radius: 9px; padding: 12px 13px; font-size: 12px; margin-bottom: 16px; }
.notice strong { display: block; margin-bottom: 3px; }
.signup-box { background: linear-gradient(135deg, #edf8f5, #f5fbff); border: 1px solid #d0ebe3; padding: 17px; border-radius: 10px; margin-bottom: 17px; }
.signup-box h3 { margin: 0 0 4px; font-size: 14px; }
.signup-box p { color: var(--muted); margin: 0 0 13px; font-size: 12px; }
.activity-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-top: 6px; flex: 0 0 auto; }
.activity-dot.error { background: var(--red); }
.activity-dot.warning { background: var(--amber); }
.activity-main { min-width: 0; flex: 1; }
.activity-main strong { font-size: 13px; }
.activity-main p { color: var(--muted); margin: 2px 0 0; font-size: 12px; }
.activity-time { white-space: nowrap; color: var(--muted); font-size: 11px; }
.back { display: inline-flex; color: var(--muted); font-size: 12px; margin-bottom: 13px; }
.mobile-only { display: none; }
@media (max-width: 1000px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .sidebar { width: 62px; flex-basis: 62px; padding: 15px 8px; }
    .sidebar-brand { padding: 0 5px 22px; }
    .sidebar-brand span, .nav-label, .nav-link span, .sidebar-footer { display: none; }
    .nav-link { justify-content: center; padding: 12px 6px; }
    .topbar { padding: 0 18px; min-height: 67px; }
    .content { padding: 23px 16px 40px; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 15px; }
    .stat-card .stat-value { font-size: 23px; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full, .form-actions { grid-column: auto; }
    .detail-hero { flex-direction: column; }
    .card-head { padding: 16px; }
    .card-body { padding: 16px; }
    .search { width: 100%; }
    .search input { min-width: 0; }
    .activity-time { display: none; }
}