@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg: #070a12;
  --panel: rgba(18, 23, 38, 0.72);
  --panel-strong: rgba(22, 28, 46, 0.92);
  --panel-solid: #121827;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #eef2ff;
  --muted: #909db8;
  --accent: #8b6cff;
  --accent-2: #25d6f5;
  --green: #34d399;
  --orange: #fbbf24;
  --red: #fb7185;
  --blue: #60a5fa;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 36px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 82% -12%, rgba(139, 108, 255, 0.2), transparent 60%),
    radial-gradient(900px 600px at -5% 105%, rgba(37, 214, 245, 0.12), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 20px; height: 20px; }

.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 0%, black, transparent 85%);
}
.aurora { position: fixed; filter: blur(100px); opacity: .22; pointer-events: none; z-index: 0; animation: float 18s ease-in-out infinite alternate; }
.aurora-a { width: 480px; height: 480px; background: #8b6cff; top: -180px; right: -100px; }
.aurora-b { width: 420px; height: 420px; background: #25d6f5; bottom: -200px; left: -120px; animation-delay: -7s; }
.aurora-c { width: 320px; height: 320px; background: #fb7185; top: 45%; left: 45%; opacity: .09; animation-delay: -12s; }
@keyframes float { to { transform: translate3d(28px, -34px, 0) scale(1.08); } }

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

h1, h2, h3 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
code, .mono { font-family: "JetBrains Mono", Consolas, monospace; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
em { font-style: normal; color: #71809d; font-weight: 400; }
.fineprint { margin-top: 14px; color: #6f7b95; font-size: 11px; line-height: 1.55; }

/* ---------- Login ---------- */
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); border-radius: 26px; padding: 38px; animation: rise .45s ease both; }
.login-card h1 { margin: 24px 0 8px; }
.login-card form { display: grid; gap: 17px; margin-top: 26px; }
.login-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; padding: 7px 12px;
  border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #c8bbff; background: rgba(139,108,255,.14); border: 1px solid rgba(139,108,255,.32);
}
.error-box {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 12px;
  background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.32); color: #ffb3c0;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-center { justify-content: center; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(140deg, var(--accent), #5a7bff 60%, var(--accent-2));
  box-shadow: 0 10px 26px rgba(139,108,255,.42);
}
.brand-mark .icon { width: 21px; height: 21px; stroke-width: 2; }
.brand-title { font-weight: 800; font-size: 15px; }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Fields & buttons ---------- */
.field { display: grid; gap: 8px; }
.field > span { font-size: 12px; font-weight: 600; color: #bdc8e2; }
.field-wide { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%; padding: 11px 13px; color: var(--text); font: inherit; font-size: 13px;
  background: rgba(7, 10, 18, .72); border: 1px solid var(--border-strong); border-radius: 11px;
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,108,255,.18); background: rgba(10,14,24,.9); }
input::placeholder, textarea::placeholder { color: #5d6883; }
select { cursor: pointer; }
select option { background: var(--panel-solid); }
textarea { resize: vertical; line-height: 1.5; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .icon { position: absolute; left: 13px; color: #6f7b95; }
.input-icon input { padding-left: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 15px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-size: 12px;
  font-weight: 650; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.09); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { border: 0; color: white; background: linear-gradient(120deg, #8b6cff, #5a7bff); box-shadow: 0 10px 26px rgba(105,82,255,.35); }
.btn-secondary { background: rgba(139,108,255,.13); border-color: rgba(139,108,255,.36); color: #cfc4ff; }
.btn-danger { background: rgba(251,113,133,.14); border-color: rgba(251,113,133,.36); color: #ffb3c0; }
.btn-danger:hover { background: rgba(251,113,133,.24); }
.btn-danger-outline { background: transparent; border-color: rgba(251,113,133,.34); color: #ffc0ca; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 18px; font-size: 13px; }
.btn-small { padding: 7px 11px; font-size: 11px; border-radius: 9px; }
.icon-only { width: 38px; height: 38px; padding: 0; }
.icon-only .icon { width: 17px; height: 17px; }

/* ---------- App shell ---------- */
.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; flex: 0 0 246px; border-radius: 0 24px 24px 0; border-left: 0;
  padding: 25px 18px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-label { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #68748f; padding-left: 12px; margin-top: -8px; }
.nav { display: grid; gap: 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  text-align: left; padding: 11px 13px; border-radius: 12px; border: 0; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  transition: background .18s, color .18s, transform .18s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: linear-gradient(100deg, rgba(139,108,255,.26), rgba(139,108,255,.05)); color: #ddd4ff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active .icon { color: #b9a6ff; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-left: auto; box-shadow: 0 0 9px var(--orange); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.sidebar-card { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--border); }
.sidebar-card-title { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #6f7b95; margin-bottom: 9px; }
.sidebar-card-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10px; color: #6f7b95; }
.sidebar-card-foot .icon { width: 13px; height: 13px; }
.pill { display: flex; align-items: center; gap: 9px; font-size: 11px; color: #a9b6ce; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); animation: pulse 1.8s ease-in-out infinite; }
.pill.offline .pulse-dot { background: var(--red); box-shadow: 0 0 12px var(--red); animation: none; }
@keyframes pulse { 50% { transform: scale(1.45); opacity: .55; } }

.main { flex: 1; min-width: 0; padding: 28px 32px 120px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.eyebrow { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9b8cff; margin-bottom: 7px; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.alert-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #ffd489; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.3);
  animation: softPulse 2.6s ease-in-out infinite;
}
@keyframes softPulse { 50% { box-shadow: 0 0 0 5px rgba(251,191,36,.06); } }

/* ---------- Stats & overview ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { border-radius: 17px; padding: 17px 18px; display: grid; gap: 5px; animation: rise .4s ease both; position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; inset: auto -20% -70% auto; width: 140px; height: 140px; border-radius: 50%; background: currentColor; opacity: .06; }
.stat:nth-child(2) { animation-delay: .05s; } .stat:nth-child(3) { animation-delay: .1s; }
.stat:nth-child(4) { animation-delay: .15s; } .stat:nth-child(5) { animation-delay: .2s; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: currentColor; }
.stat-icon .icon { width: 15px; height: 15px; color: #0b0f18; stroke-width: 2.2; }
.stat strong { font-size: 28px; line-height: 1.1; }
.stat-hint { font-size: 10px; color: #6d7893; }
.stat-total { color: #b9a6ff; } .stat-active { color: var(--green); }
.stat-unused { color: var(--accent-2); } .stat-expired { color: var(--orange); } .stat-banned { color: var(--red); }

.overview-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 20px; }
.panel { border-radius: var(--radius); padding: 22px; margin-bottom: 20px; animation: rise .42s ease both; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.panel-head.wrap { flex-wrap: wrap; }
.panel-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; background: rgba(139,108,255,.12); color: #c4b8ff; border: 1px solid rgba(139,108,255,.28); }
.panel-chip.danger { background: rgba(251,113,133,.1); color: #ffb3c0; border-color: rgba(251,113,133,.28); }
.panel-chip .icon { width: 12px; height: 12px; }

.distribution-bar { display: flex; height: 13px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid var(--border); }
.distribution-bar .segment { height: 100%; transition: width .6s cubic-bezier(.2,.8,.2,1); animation: grow .6s ease both; }
.bar-empty { display: grid; place-items: center; width: 100%; font-size: 10px; color: #6d7893; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #b3bed4; }
.legend-swatch { width: 9px; height: 9px; border-radius: 3px; }
.legend-item strong { color: var(--text); }

.danger-card { background: linear-gradient(150deg, rgba(48,20,32,.65), rgba(18,23,38,.72)); }
.danger-actions { display: grid; gap: 10px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes grow { from { width: 0 !important; } }

/* ---------- Generate ---------- */
.generate-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.plan-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-chip {
  padding: 9px 15px; border-radius: 10px; border: 1px solid var(--border-strong);
  font-size: 12px; font-weight: 600; cursor: pointer; background: rgba(255,255,255,.03); color: var(--muted);
  transition: all .16s ease;
}
.plan-chip:hover { color: var(--text); border-color: rgba(139,108,255,.5); }
.plan-chip.active { border-color: var(--accent); color: #e3dcff; background: rgba(139,108,255,.2); box-shadow: 0 0 0 3px rgba(139,108,255,.1); }
.action-row { display: flex; justify-content: flex-end; }
.generated-box { margin-top: 20px; padding: 16px; border-radius: 14px; background: rgba(7,10,18,.65); border: 1px solid var(--border); animation: rise .3s ease both; }
.generated-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; }
.key-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.key-item { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; padding: 9px 11px; border-radius: 9px; background: rgba(139,108,255,.11); color: #d3c8ff; cursor: pointer; transition: background .16s; }
.key-item:hover { background: rgba(139,108,255,.22); }

/* ---------- Filters & tables ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; }
.filters select { width: 155px; }
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap .icon { position: absolute; left: 12px; color: #6f7b95; }
.search-wrap input { min-width: 260px; padding-left: 36px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: #7f8ba5; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 0 12px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th.check-col { width: 36px; padding-right: 0; }
td { padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr:hover { background: rgba(255,255,255,.032); }
.empty { text-align: center; color: var(--muted); padding: 42px; }
.key-cell { font-family: "JetBrains Mono", Consolas, monospace; font-weight: 600; color: #ddd6ff; cursor: pointer; }
.key-cell:hover { color: white; text-decoration: underline; }
.sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.active { background: rgba(52,211,153,.13); color: var(--green); }
.badge.unused { background: rgba(37,214,245,.12); color: var(--accent-2); }
.badge.expired { background: rgba(251,191,36,.13); color: var(--orange); }
.badge.banned { background: rgba(251,113,133,.13); color: var(--red); }
.badge.lifetime { background: rgba(139,108,255,.16); color: #c4b8ff; }
.countdown { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; }
.countdown.soon { color: var(--orange); }
.actions-col { text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.icon-btn {
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,.03); color: #b7c2da; cursor: pointer; font-size: 11px; font-weight: 600;
  transition: all .15s ease;
}
.icon-btn:hover { background: rgba(255,255,255,.09); color: white; }
.icon-btn.danger:hover { border-color: rgba(251,113,133,.5); color: #ffb3c0; }
.log-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,.05); }
.log-type.generation, .log-type.activation, .log-type.unban, .log-type.extension, .log-type.success { color: var(--green); }
.log-type.hwid_mismatch, .log-type.product_mismatch, .log-type.ban, .log-type.deletion, .log-type.danger { color: var(--red); }
.log-type.credential_reset, .log-type.note_edit, .log-type.credential_view, .log-type.notice { color: var(--orange); }

/* ---------- Floating bulk bar ---------- */
.bulk-bar {
  position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; padding: 11px 14px; border-radius: 16px;
  background: rgba(20,25,42,.94); animation: bulkIn .24s ease both;
}
.bulk-count { font-size: 12px; font-weight: 700; color: #d8d0ff; white-space: nowrap; }
.bulk-count span { color: var(--accent-2); }
.bulk-actions { display: flex; gap: 7px; }
@keyframes bulkIn { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Details drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(4,6,12,.68); backdrop-filter: blur(6px); animation: fade .2s ease both; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 46; width: min(520px, 100vw);
  border-radius: 24px 0 0 24px; border-right: 0; display: flex; flex-direction: column;
  background: rgba(16,21,35,.96); animation: drawerIn .3s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 26px 26px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 22px; margin-top: 2px; word-break: break-all; }
.drawer-body { padding: 22px 26px 40px; overflow-y: auto; display: grid; gap: 20px; }
.detail-section { display: grid; gap: 12px; }
.detail-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #8e9ab5; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { padding: 12px 13px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--border); }
.detail-item span { display: block; font-size: 10px; color: #71809d; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.detail-item strong { font-size: 12px; font-weight: 600; word-break: break-word; }
.online-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.online-line.online { color: var(--green); font-weight: 600; }
.history-list { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; }
.history-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-size: 11px; }
.history-item .mono { color: #c9d0e4; word-break: break-all; }
.history-empty { padding: 14px; border-radius: 10px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 11px; text-align: center; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.drawer-actions .btn { width: 100%; }
.drawer-danger { border-top: 1px solid rgba(251,113,133,.18); padding-top: 16px; }

/* ---------- Modal & toasts ---------- */
#modalRoot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(4,6,12,.76); backdrop-filter: blur(9px); animation: fade .18s ease both; }
.modal { width: min(470px, 100%); border-radius: 21px; padding: 26px; display: grid; gap: 18px; animation: rise .24s ease both; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-body { display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; }
.modal-warning { padding: 11px 13px; border-radius: 11px; font-size: 11px; background: rgba(251,113,133,.09); border: 1px solid rgba(251,113,133,.25); color: #ffb3c0; }
.modal-error { font-size: 11px; color: #ffb3c0; min-height: 14px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
#toastRoot { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-radius: 12px; font-size: 12px;
  min-width: 230px; max-width: 380px; background: rgba(24,30,48,.96); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft); animation: toastIn .25s ease both;
}
.toast.ok { border-color: rgba(52,211,153,.45); }
.toast.err { border-color: rgba(251,113,133,.5); }
.toast .icon { width: 15px; height: 15px; }
.toast.ok .icon { color: var(--green); } .toast.err .icon { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

/* ---------- Responsive ---------- */
@media (max-width: 1250px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .main { padding: 24px 22px 120px; }
  .sidebar { width: 218px; flex-basis: 218px; }
}
@media (max-width: 900px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .filters select { width: 130px; }
  .search-wrap input { min-width: 200px; }
  .bulk-bar { width: calc(100% - 32px); flex-direction: column; gap: 10px; }
  .bulk-actions { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; height: auto; border-radius: 0; position: static; flex-direction: row; align-items: center; gap: 14px; padding: 14px; overflow-x: auto; }
  .sidebar-label, .sidebar-foot { display: none; }
  .nav { display: flex; margin-left: auto; gap: 4px; }
  .nav-item span:not(.nav-dot) { display: none; }
  .nav-item { padding: 10px; }
  .main { padding: 18px 14px 140px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .generate-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .drawer-actions { grid-template-columns: 1fr; }
}

/* ---------- Launcher downloads ---------- */
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.download-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent, var(--accent));
  border-radius: 16px;
  background: rgba(7, 10, 18, 0.65);
  animation: rise 0.3s ease both;
}
.download-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.download-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--card-accent, var(--accent));
  color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.download-card-title { display: flex; flex-direction: column; min-width: 0; }
.download-card-title strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.download-card-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.download-card-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; word-break: break-all; }
.download-card-meta .icon { width: 14px; height: 14px; flex: 0 0 14px; }
.download-card .btn { margin-top: auto; }
@media (max-width: 760px) {
  .download-grid { grid-template-columns: 1fr; }
}
