:root { --green: #1a9e57; --orange: #ff7a29; --ink: #1c2333; --muted: #6b7280; --line: #e5e7eb; --bg: #f7f7f5; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.brand { font-weight: 800; font-size: 18px; }
.brand span { color: var(--muted); font-weight: 400; font-size: 14px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 60px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.narrow { max-width: 440px; margin: 40px auto; }
h1 { margin: 0 0 8px; font-size: 22px; }
h2 { font-size: 18px; margin: 28px 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: 14px; }
input, select { width: 100%; padding: 10px 12px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
.btn { padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.btn.warn { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.btn.ghost { padding: 6px 12px; font-size: 14px; }
.btn.block { width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.error { color: #c0392b; font-size: 14px; }
.ok { color: var(--green); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 15px; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; flex: 1; min-width: 160px; margin-top: 0; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f0fdf4; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.paid { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.expired, .badge.cancelled { background: #fee2e2; color: #991b1b; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 10; }
.modal-card { background: #fff; border-radius: 14px; padding: 24px; max-width: 560px; width: 100%; position: relative; max-height: 88vh; overflow: auto; }
.modal-close { position: absolute; top: 12px; right: 12px; border: none; background: none; font-size: 18px; cursor: pointer; }
.modal-card dl { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.modal-card dt { color: var(--muted); }
.modal-card dd { margin: 0; word-break: break-all; }
#modalActions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#modalActions input { flex: 1; min-width: 120px; }
.recon-item { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; cursor: pointer; }
.empty { color: var(--muted); }
