:root {
  --bg: #040506; --panel: #07080a; --line: #232425; --txt: #ffffff;
  --muted: #9c9c9d; --dim: #6a6b6c; --accent: #ff6363; --fill: #e6e6e6; --dark: #454647;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--txt); font-family: Inter, system-ui, sans-serif; font-size: 15px; line-height: 1.6; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid #161718; position: sticky; top: 0; background: rgba(7,8,10,.9); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.diamond { width: 13px; height: 13px; background: var(--accent); transform: rotate(45deg); border-radius: 3px; }
nav button { background: none; border: none; color: var(--muted); font-size: 13px; padding: 8px 10px; cursor: pointer; border-radius: 8px; }
nav button:hover { color: #fff; }
nav button.on { color: #fff; background: #1b1c1e; }
nav button.right { margin-left: 12px; border: 1px solid var(--line); }
.wrap { max-width: 880px; margin: 0 auto; padding: 40px 20px 80px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.card.narrow { max-width: 440px; margin: 40px auto; }
h1 { font-size: 28px; font-weight: 500; margin-bottom: 8px; }
h2 { font-size: 22px; font-weight: 500; margin-bottom: 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.muted { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select { background: #111214; border: 1px solid var(--line); color: #fff; border-radius: 8px; padding: 10px 12px; font-size: 15px; min-width: 220px; }
input.code { text-transform: uppercase; font-family: monospace; letter-spacing: 2px; }
.btn { background: var(--fill); color: var(--dark); border: none; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; }
.btn:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.ghost:hover { color: #fff; }
.btn.danger { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.small { padding: 6px 10px; font-size: 12px; }
.switch { display: flex; gap: 8px; margin: 16px 0; }
.switch button { flex: 1; background: #111214; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 8px; cursor: pointer; }
.switch button.on { color: #fff; border-color: var(--accent); }
.hidden { display: none !important; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px -4px 0; padding: 0 4px 4px; }
.table-wrap table { min-width: 620px; margin-top: 0; }
.table-wrap td, .table-wrap th { white-space: nowrap; }
.table-wrap td:first-child { white-space: normal; min-width: 140px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid #161718; color: var(--muted); }
td:first-child { color: #fff; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; }
.pill.active { background: #dcfce7; color: #166534; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.expired, .pill.cancelled { background: #fee2e2; color: #991b1b; }
.backup { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 12px; }
.backup h4 { font-size: 15px; margin-bottom: 4px; }
.backup .meta { font-size: 12px; color: var(--dim); font-family: monospace; margin-bottom: 10px; }
.backup .files { display: flex; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 24px; right: 24px; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 50; }
.toast.ok { background: #16a34a; color: #fff; }
.toast.err { background: #dc2626; color: #fff; }
.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 24px; border-top: 1px solid #161718; }

@media (max-width: 640px) {
  .wrap { padding: 24px 12px 60px; }
  .card { padding: 18px; border-radius: 12px; }
  .card.narrow { margin: 16px auto; }
  h1 { font-size: 24px; }
  h2 { font-size: 19px; }
  input, select { min-width: 0; width: 100%; }
  .row { flex-direction: column; align-items: stretch; }
  .row .btn { width: 100%; justify-content: center; }
  .top { padding: 10px 12px; }
  nav { display: flex; gap: 4px; overflow-x: auto; max-width: 60vw; }
  nav button { white-space: nowrap; }
}
