:root {
  --bg: #090b0f;
  --panel: #101319;
  --panel-2: #141821;
  --ink: #e8edf4;
  --muted: #7d8798;
  --line: #1e232c;
  --line-2: #2a313d;
  --brand: #c8ff5e;
  --brand-ink: #10160a;
  --violet: #9d8cf7;
  --ok: #4ade9b;
  --warn: #e8b464;
  --bad: #f07171;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 20px 40px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 13.5px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 224px; flex: none;
  background: #07090d;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}

.brand { display: flex; align-items: center; gap: 9px; padding: 0 4px; }
.brand img { width: 30px; height: 30px; }
.brand b { color: #f2f6fb; font-size: 15px; letter-spacing: -.2px; }
.brand b span { color: var(--brand); }
.brand small { display: block; color: #5f6b7d; font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; }

nav { display: flex; flex-direction: column; gap: 1px; }
nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 7px; color: #8b95a5; font-size: 13px;
  transition: background .1s, color .1s;
}
nav a:hover { background: #10151c; color: #f2f6fb; text-decoration: none; }
nav a.active { background: #141a23; color: #f2f6fb; }
nav a.active::before { content: ""; width: 2px; height: 14px; background: var(--brand); border-radius: 2px; margin-right: -2px; }
nav .count { background: #1a212b; color: #b9c4d3; border-radius: 4px; padding: 0 6px; font-size: 10.5px; font-variant-numeric: tabular-nums; }

.sidebar-foot { margin-top: auto; display: grid; gap: 8px; font-size: 12px; color: #5f6b7d; padding: 0 2px; }
.who { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.who b { display: block; color: #dbe3ee; font-size: 12.5px; }
.who span { font-size: 9.5px; color: var(--violet); letter-spacing: 1.2px; text-transform: uppercase; }

main { flex: 1; padding: 28px 36px 72px; max-width: 1180px; min-height: 60vh; }
.card:has(table) { overflow-x: auto; }
@media (max-width: 640px) { nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; } nav a.active::before { display: none; } .sidebar-foot { display: flex; align-items: center; flex-wrap: wrap; } .who { flex: 1; } }
.btn:focus-visible, input:focus-visible, select:focus-visible, nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

h1 { font-size: 20px; margin: 0 0 4px; letter-spacing: -.4px; font-weight: 650; }
h2 { font-size: 13.5px; margin: 0 0 12px; letter-spacing: .1px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

.grid { display: grid; gap: 12px; }
.grid.cols { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
.grid.two { grid-template-columns: 1.45fr .95fr; align-items: start; }
@media (max-width: 940px) { .grid.two { grid-template-columns: 1fr; } .layout { flex-direction: column; } .sidebar { position: static; height: auto; } main { padding: 18px; } }

.stat { padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px; }
.stat .v { font-size: 23px; font-weight: 650; margin-top: 4px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 11.5px; color: var(--muted); font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); background: #151a22; color: var(--ink);
  padding: 7px 12px; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}
.btn:hover { background: #1a212b; border-color: #39424f; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 650; }
.btn.primary:hover { background: #d4ff7a; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #151a22; color: var(--ink); }
.btn.danger { color: #f6b3b3; border-color: #3a2528; background: #1a1214; }
.btn.danger:hover { background: #221619; }
.btn.sm { padding: 4px 8px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }

input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 7px;
  font: inherit; font-size: 13px; background: #0b0e13; color: var(--ink);
}
input::placeholder { color: #4d5765; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #4d5765; background: #0d1117; }
label { display: block; font-size: 11.5px; color: var(--muted); margin: 12px 0 4px; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; color: #6b7686; font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #161b22; vertical-align: middle; }
tbody tr:hover { background: #0c1016; }
tr:last-child td { border-bottom: 0; }

.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 4px; padding: 1px 7px; font-size: 10.5px; font-weight: 650; letter-spacing: .3px; text-transform: uppercase; }
.pill.ok { background: rgba(74, 222, 155, .1); color: var(--ok); }
.pill.warn { background: rgba(232, 180, 100, .1); color: var(--warn); }
.pill.bad { background: rgba(240, 113, 113, .1); color: var(--bad); }
.pill.mute { background: #171c24; color: #8b95a5; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.code { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: 5px; font-size: 22px; font-weight: 600; color: var(--brand); }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11.5px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.empty { padding: 32px; text-align: center; color: var(--muted); font-size: 12.5px; }

dialog { border: 1px solid var(--line-2); border-radius: 12px; padding: 22px; width: min(460px, 92vw); background: var(--panel); color: var(--ink); box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(4, 6, 9, .7); backdrop-filter: blur(2px); }
dialog h3 { margin: 0 0 6px; font-size: 15px; }

pre.log { background: #06080b; color: #b6c8bd; border: 1px solid var(--line); padding: 14px; border-radius: 8px; font-size: 11px; line-height: 1.5; max-height: 420px; overflow: auto; white-space: pre-wrap; }

.toast { position: fixed; right: 18px; bottom: 18px; background: #12171f; color: #eef3fa; border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 8px; font-size: 12.5px; opacity: 0; transform: translateY(6px); transition: .16s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
.toast.bad { background: #241316; border-color: #452428; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(370px, 100%); background: var(--panel); border: 1px solid var(--line); padding: 28px; border-radius: 14px; box-shadow: var(--shadow); }
.login h1 { font-size: 18px; margin: 18px 0 2px; }
.login .brand img { width: 42px; height: 42px; }
.login .brand { padding: 0; }
.login-foot { margin-top: 16px; font-size: 11.5px; color: #5f6b7d; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 7px 12px; font-size: 12.5px; }
.kv .k { color: var(--muted); }

.live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #5f6b7d; letter-spacing: .5px; text-transform: uppercase; }
.live .dot { background: #3f4b5b; }
.live.on { color: var(--brand); }
.live.on .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(200, 255, 94, .12); }


/* ---------- previews ---------- */
.previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(266px, 1fr)); gap: 20px; }
.phone { border: 1px solid #232b36; border-radius: 24px; padding: 8px; background: #05070a; box-shadow: 0 26px 50px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.phone .screen { border-radius: 17px; overflow: hidden; background: #f6f7f9; color: #12161c; height: 470px; position: relative; display: flex; flex-direction: column; }
.phone .bar { height: 21px; background: #05070a; color: #7d8798; font-size: 9.5px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; letter-spacing: .3px; }
.p-head { padding: 16px 18px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.p-overline { font-size: 8.5px; letter-spacing: 1.8px; color: #7d8798; }
.p-title { font-size: 19px; font-weight: 750; letter-spacing: -.4px; }
.p-pill { font-size: 9px; border-radius: 20px; padding: 3px 8px; background: #fff; border: 1px solid #e4e7ec; font-family: ui-monospace, monospace; font-weight: 700; }
.p-h { padding: 10px 18px 0; font-size: 13px; font-weight: 750; }
.p-s { padding: 4px 18px 0; font-size: 10.5px; color: #6b7686; line-height: 1.45; }
.p-card { margin: 14px 18px 0; border-radius: 12px; padding: 14px; color: #fff; height: 122px; position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(15, 23, 42, .18); }
.p-card.visa { background: linear-gradient(140deg, #1b1f5c, #2f3a9e); }
.p-card.none { background: linear-gradient(140deg, #1b2028, #2b323d); }
.p-card b { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; opacity: .95; }
.p-card .chip { position: absolute; left: 14px; top: 36px; width: 24px; height: 18px; border-radius: 4px; background: linear-gradient(135deg, #e8d9a8, #b79a58); opacity: .9; }
.p-card .pan { position: absolute; left: 14px; bottom: 27px; font-family: ui-monospace, monospace; font-size: 13px; letter-spacing: 1.1px; }
.p-card .val { position: absolute; left: 14px; bottom: 11px; font-size: 8px; letter-spacing: .8px; opacity: .8; text-transform: uppercase; }
.p-card .arcs { position: absolute; right: 14px; top: 14px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); }
.p-pin { margin: 12px 18px 0; display: flex; gap: 6px; }
.p-pin .field { flex: 1; border: 1px solid #e4e7ec; border-radius: 8px; background: #fff; font-size: 10px; color: #98a2b3; padding: 8px 9px; }
.p-pin .go { background: #12161c; color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 14px; display: flex; align-items: center; }
.p-foot { margin-top: auto; padding: 12px 18px; font-size: 9px; color: #98a2b3; }
.p-dotsrow { display: flex; justify-content: center; gap: 10px; padding: 18px 0 4px; }
.p-dotsrow i { width: 9px; height: 9px; border-radius: 50%; background: #e4e7ec; }
.p-dotsrow i.on { background: #12161c; }
.p-padwrap { padding: 8px 18px 0; }
.p-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.p-pad span { display: grid; place-items: center; height: 42px; border: 1px solid #e4e7ec; border-radius: 9px; background: #fff; font-size: 15px; font-weight: 600; color: #12161c; }
.p-pad span.del { font-size: 13px; color: #6b7686; }
.p-pad span:empty { border: 0; background: transparent; }
.p-ring { margin: 26px auto 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 9px rgba(22, 163, 74, .08), 0 0 0 20px rgba(22, 163, 74, .05), 0 0 0 32px rgba(22, 163, 74, .03); }
.p-ring-in { width: 92px; height: 92px; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.p-overlay { position: absolute; inset: 21px 0 0; display: flex; flex-direction: column; align-items: center; padding: 26px 18px; text-align: center; }
.p-overlay.dark { background: #0a0f16; color: #fff; }
.p-overlay:not(.dark) { justify-content: center; }
.p-secure .p-spin { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .14); border-top-color: #c8ff5e; animation: spin 1s linear infinite; margin-top: 16px; }
.p-secure h4 { margin: 16px 0 5px; font-size: 17px; }
.p-secure p { margin: 0; font-size: 10.5px; color: #94a3b8; }
.p-secure .meta { margin-top: auto; font-size: 9.5px; color: #64748b; }
.p-wipe { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; }
.p-wipe .tick { width: 48px; height: 48px; border-radius: 50%; background: #12b76a; display: grid; place-items: center; font-size: 21px; font-weight: 800; }
.p-wipe h4 { margin: 14px 0 5px; font-size: 20px; }
.p-wipe p { margin: 0; font-size: 10.5px; color: #94a3b8; max-width: 82%; }
.p-dotsc { display: flex; gap: 6px; }
.p-dotsc i { width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .45; animation: pulse 1.1s infinite; }
.p-dotsc i:nth-child(2) { animation-delay: .16s; }
.p-dotsc i:nth-child(3) { animation-delay: .32s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }

.p-label { text-align: center; font-size: 11.5px; color: var(--muted); padding: 11px 4px 2px; }
.p-label b { color: var(--ink); display: block; font-size: 12px; font-weight: 600; }
