/* Ban Bandhu admin panel. Brand: forest ink, sage paper, turmeric gold, deep rust. */
:root {
  --ink: #1B2B22; --ink-2: #3a4a40; --muted: #6b766e;
  --paper: #EDEFE6; --card: #ffffff; --line: #d8dccf;
  --gold: #C98A2B; --gold-dark: #a8701f; --rust: #8C3D2B;
  --ok: #2f6b3f; --warn: #a8701f; --bad: #8C3D2B;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 "Work Sans", system-ui, sans-serif; }
h1, h2, h3, .brand { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 28px; margin: 0 0 4px; } h2 { font-size: 20px; margin: 0 0 12px; } h3 { font-size: 16px; margin: 0 0 8px; }
a { color: var(--ink); } a:hover { color: var(--gold-dark); }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--ink); color: #dfe4d6; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; margin: 0 6px 24px; text-decoration: none; }
.sidebar .brand img { width: 34px; height: 34px; }
.sidebar nav a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; color: #dfe4d6; text-decoration: none; margin-bottom: 2px; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(201,138,43,.18); color: #fff; }
.sidebar .count { background: var(--gold); color: var(--ink); border-radius: 999px; font-size: 12px; padding: 0 8px; font-weight: 600; }
.sidebar .section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8e9a90; margin: 18px 10px 6px; }
main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.sub { color: var(--muted); margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.grid { display: grid; gap: 16px; } .grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.stat .label { color: var(--muted); font-size: 13px; } .stat .value { font-family: "Fraunces", serif; font-size: 26px; font-weight: 600; margin-top: 2px; }
.stat .hint { font-size: 12px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e3e6db; color: var(--ink-2); white-space: nowrap; }
.badge.pending, .badge.open, .badge.pending_payment, .badge.approved-payout { background: #f6e7cc; color: #7a520f; }
.badge.approved, .badge.active, .badge.paid, .badge.delivered, .badge.resolved, .badge.refunded { background: #dcebdc; color: var(--ok); }
.badge.rejected, .badge.suspended, .badge.cancelled, .badge.unpublished, .badge.failed, .badge.refund_pending { background: #f1dcd6; color: var(--rust); }
.badge.verified { background: var(--rust); color: #fff; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); background: var(--ink); color: #fff; border-radius: 8px; padding: 7px 14px; font: 600 14px "Work Sans", sans-serif; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--ink-2); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); } .btn.gold:hover { background: var(--gold-dark); }
.btn.ghost { background: transparent; color: var(--ink); } .btn.ghost:hover { background: #e3e6db; }
.btn.danger { background: transparent; color: var(--rust); border-color: var(--rust); } .btn.danger:hover { background: #f1dcd6; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
form.inline { display: inline; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.field { margin-bottom: 12px; } .row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .row > .field { flex: 1; min-width: 140px; }
.filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; } .filters .field { margin: 0; min-width: 150px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; } .tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-size: 14px; }
.tabs a.active { background: var(--ink); color: #fff; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; } .flash.ok { background: #dcebdc; color: var(--ok); } .flash.err { background: #f1dcd6; color: var(--rust); }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; } dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; }
details.action { display: inline-block; } details.action summary { list-style: none; cursor: pointer; } details.action[open] .popover { display: block; }
.popover { display: none; position: absolute; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 24px rgba(27,43,34,.15); width: 300px; margin-top: 6px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--paper); }
.bar { height: 8px; background: #e3e6db; border-radius: 99px; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--gold); }
nav[role=navigation] { margin-top: 12px; } nav[role=navigation] ul { list-style: none; display: flex; gap: 6px; padding: 0; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin-top: 14px; }
.pagination li a, .pagination li span { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.login { max-width: 380px; margin: 12vh auto; }
.login .brand { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 26px; margin-bottom: 18px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; } main { padding: 20px 16px; } dl.kv { grid-template-columns: 1fr; }
}
