:root {
  --bg: #080b12;
  --bg-2: #0b0f19;
  --surface: rgba(22, 27, 38, .72);
  --surface-solid: #141926;
  --surface-2: rgba(30, 37, 52, .6);
  --elevated: #1a2030;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --code-bg: #070a10;

  --a1: #2ee89e;
  --a2: #37b6f6;
  --accent: #2ee89e;
  --accent-soft: rgba(46, 232, 158, .14);
  --grad: linear-gradient(135deg, var(--a1) 0%, var(--a2) 100%);
  --grad-soft: linear-gradient(135deg, rgba(46, 232, 158, .16), rgba(55, 182, 246, .16));

  --blue: #60a5fa;
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, .12);
  --yellow: #fbbf24;
  --yellow-soft: rgba(251, 191, 36, .12);

  --text: #eaf0f7;
  --muted: #8b95a8;
  --faint: #5c6577;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow: 0 4px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
  --glow: 0 0 0 1px rgba(46, 232, 158, .35), 0 8px 30px rgba(46, 232, 158, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', Roboto, sans-serif;
  --mono: 'SFMono-Regular', 'JetBrains Mono', Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 15% -5%, rgba(46, 232, 158, .13), transparent 60%),
    radial-gradient(55vw 55vw at 100% 8%, rgba(55, 182, 246, .12), transparent 55%),
    radial-gradient(50vw 40vw at 50% 110%, rgba(99, 102, 241, .08), transparent 60%),
    var(--bg);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}

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

::selection { background: rgba(46, 232, 158, .28); color: #fff; }

/* ── Scrollbar ─────────────────────────────── */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .18); background-clip: content-box; }

/* ── Brand ─────────────────────────────────── */
.lf-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.5px; }
.lf-brand .mark {
  width: 1.7em; height: 1.7em; border-radius: 9px;
  display: grid; place-items: center; overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(46, 232, 158, .22);
}
.lf-brand .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-brand b { font-weight: 800; }
.lf-brand .grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Glass surface ─────────────────────────── */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* ── Buttons ───────────────────────────────── */
.btn {
  --bg-btn: var(--elevated);
  appearance: none; border: 1px solid var(--border-strong);
  background: var(--bg-btn); color: var(--text);
  padding: 11px 18px; border-radius: var(--r-sm);
  font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, opacity .2s;
  min-height: 42px; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--grad); border-color: transparent; color: #052617;
  box-shadow: 0 6px 20px rgba(46, 232, 158, .28);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(46, 232, 158, .42); }

.btn-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); border-color: transparent; color: #04122b; box-shadow: 0 6px 20px rgba(59, 130, 246, .28); }
.btn-blue:hover { box-shadow: 0 10px 30px rgba(59, 130, 246, .4); }

.btn-ghost { background: rgba(255, 255, 255, .03); color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 32px; border-radius: 7px; }

/* ── Inputs ────────────────────────────────── */
.field {
  width: 100%; background: var(--code-bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 12px 14px; color: var(--text); font: inherit; font-size: 16px;
  outline: none; transition: border-color .18s, box-shadow .18s, background .18s;
}
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--a1); box-shadow: 0 0 0 3px var(--accent-soft); background: #05070c; }
select.field { cursor: pointer; }

/* ── Badges ────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; line-height: 1.5; }
.pill-green { background: var(--accent-soft); color: var(--a1); border: 1px solid rgba(46, 232, 158, .3); }
.pill-red { background: var(--red-soft); color: var(--red); border: 1px solid rgba(248, 113, 113, .3); }
.pill-yellow { background: var(--yellow-soft); color: var(--yellow); border: 1px solid rgba(251, 191, 36, .3); }
.pill-blue { background: rgba(96, 165, 250, .14); color: var(--blue); border: 1px solid rgba(96, 165, 250, .3); }
.pill-muted { background: rgba(139, 149, 168, .1); color: var(--muted); border: 1px solid var(--border); }

/* ── Spinner ───────────────────────────────── */
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .18); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface-solid); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); padding: 13px 20px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(46, 232, 158, .45); }
.toast.ok::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 10px var(--a1); }
.toast.err { border-color: rgba(248, 113, 113, .45); }
.toast.err::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
@media (min-width: 640px) { .toast { left: auto; right: 24px; transform: translateY(20px); } .toast.show { transform: translateY(0); } }

/* ── Navbar (shared) ───────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, .72);
  backdrop-filter: blur(16px) saturate(130%); -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.nav .lf-brand { font-size: 16px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.nav-link { color: var(--muted); font-size: 13px; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.key-chip { font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--border); padding: 4px 10px; border-radius: 7px; color: var(--muted); }

/* ── Entrance animation ────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise .55s var(--ease) both; }
.rise-1 { animation-delay: .05s; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .19s; }
.rise-4 { animation-delay: .26s; }

/* ══════════════════════════════════════════════
   PAGE: LOGIN
══════════════════════════════════════════════ */
.page-login { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; }
.login-hero { text-align: center; margin-bottom: 34px; }
.login-hero .lf-brand { font-size: 30px; }
.login-hero .tagline { color: var(--muted); font-size: 14px; margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; }
.login-hero .tagline .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 8px var(--a1); }

.login-card { width: 100%; max-width: 410px; padding: 34px 30px; }
.login-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }

.key-input {
  width: 100%; background: var(--code-bg); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  padding: 15px 16px; color: var(--text); font-family: var(--mono); font-size: 19px; font-weight: 600;
  letter-spacing: 4px; text-align: center; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.key-input:focus { border-color: var(--a1); box-shadow: 0 0 0 3px var(--accent-soft); }
.key-input::placeholder { font-family: var(--font); letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--faint); }

.alert { border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; margin-top: 14px; display: none; align-items: center; gap: 9px; line-height: 1.5; }
.alert.show { display: flex; animation: rise .3s var(--ease); }
.alert-err { background: var(--red-soft); border: 1px solid rgba(248, 113, 113, .3); color: var(--red); }

.format-hint { text-align: center; color: var(--faint); font-size: 12px; margin-top: 16px; font-family: var(--mono); letter-spacing: 2px; }
.login-foot { margin-top: 30px; color: var(--faint); font-size: 12px; text-align: center; }

/* ══════════════════════════════════════════════
   PAGE: GENERATOR
══════════════════════════════════════════════ */
.wrap { max-width: 920px; margin: 0 auto; padding: 34px 20px 80px; }

.hero-title { font-size: clamp(22px, 5vw, 30px); font-weight: 800; letter-spacing: -.6px; margin-bottom: 8px; }
.hero-title .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; max-width: 560px; }

.panel { padding: 26px; margin-bottom: 20px; position: relative; z-index: 30; }
.panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; }
.panel .panel-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.input-row { display: flex; gap: 10px; }
.input-row .field { flex: 1; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

.search-box { position: relative; flex: 1; }
.search-box .field { width: 100%; }
.ac-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden auto; display: none; max-height: 366px; }
.ac-dropdown.show { display: block; animation: rise .18s var(--ease); }
.ac-item { display: flex; align-items: center; gap: 14px; padding: 11px 15px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background .12s; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: var(--accent-soft); }
.ac-item img { width: 120px; height: 45px; object-fit: contain; border-radius: 6px; background: var(--code-bg); flex-shrink: 0; }
.ac-item .ac-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item .ac-id { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.ac-msg { padding: 13px; font-size: 13px; color: var(--muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px; }

.result-cover { width: 100%; max-height: 200px; object-fit: cover; display: block; border-bottom: 1px solid var(--border); background: var(--code-bg); }
.result-cover[hidden] { display: none; }
.drm-warn { background: var(--red-soft); border-bottom: 1px solid rgba(248, 113, 113, .3); color: var(--red); padding: 11px 18px; font-size: 12.5px; line-height: 1.6; }
.drm-warn[hidden] { display: none; }

.loading { display: none; align-items: center; gap: 11px; color: var(--muted); font-size: 14px; padding: 20px 4px; }
.loading.show { display: flex; }
.loading .spinner { color: var(--a1); }

/* result */
.result { padding: 0; overflow: hidden; display: none; }
.result.show { display: block; animation: rise .45s var(--ease); }
.result-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 255, 255, .015); }
.game-name { font-weight: 700; font-size: 15.5px; }
.stats-row { display: flex; gap: 6px; flex-wrap: wrap; }
.result-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.code-wrap { position: relative; }
.code-area { background: var(--code-bg); padding: 20px; overflow-x: auto; max-height: 460px; overflow-y: auto; }
.code-area pre { font-family: var(--mono); font-size: 13px; line-height: 1.65; white-space: pre; }
.cm { color: #5b6472; } .fn { color: #d2a8ff; } .nm { color: #7dd3fc; } .st { color: #86efac; }

/* tutorial */
.tut { margin-top: 22px; overflow: hidden; }
.tut-toggle { width: 100%; background: none; border: none; color: var(--text); padding: 17px 20px; display: flex; align-items: center; gap: 11px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700; text-align: left; transition: background .18s; }
.tut-toggle:hover { background: rgba(255, 255, 255, .03); }
.tut-toggle .tut-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--grad-soft); display: grid; place-items: center; color: var(--a1); flex-shrink: 0; }
.tut-toggle .tut-ic svg { width: 17px; height: 17px; }
.tut-toggle .arr { margin-left: auto; color: var(--muted); transition: transform .25s var(--ease); }
.tut-toggle.open .arr { transform: rotate(180deg); }
.tut-body { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.tut-body.open { max-height: 1600px; }
.tut-inner { padding: 4px 20px 22px; }
.steps { list-style: none; }
.steps li { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: none; }
.snum { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); color: #052617; font-size: 13px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; box-shadow: 0 3px 10px rgba(46, 232, 158, .3); }
.scont h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 5px; }
.scont p { font-size: 13px; color: var(--muted); line-height: 1.65; }
.scont code { background: var(--code-bg); border: 1px solid var(--border); padding: 2px 7px; border-radius: 5px; font-family: var(--mono); font-size: 12px; color: #7dd3fc; }
.flist { margin-top: 8px; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.flist li { font-size: 12.5px; color: var(--muted); }
.flist li::before { content: '📄'; margin-right: 6px; }
.ost-links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.note-box { background: var(--yellow-soft); border: 1px solid rgba(251, 191, 36, .3); border-radius: var(--r-sm); padding: 11px 14px; margin-top: 12px; font-size: 12.5px; color: var(--yellow); line-height: 1.6; }
.note-box.green { background: var(--accent-soft); border-color: rgba(46, 232, 158, .3); color: var(--a1); }
.dir-tree { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1.95; margin-top: 8px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px; overflow-x: auto; }
.dir-tree .hi-blue { color: #7dd3fc; } .dir-tree .hi-green { color: var(--a1); }

/* ══════════════════════════════════════════════
   PAGE: ADMIN
══════════════════════════════════════════════ */
.admin-wrap { max-width: 1140px; margin: 0 auto; padding: 30px 20px 80px; }
.section-title { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 1px; margin: 30px 0 14px; }
.section-title:first-of-type { margin-top: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 13px; }
.stat { padding: 20px 18px; border-radius: var(--r-md); position: relative; overflow: hidden; }
.stat::after { content: ''; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .3s; pointer-events: none; }
.stat:hover::after { opacity: .5; }
.stat .val { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; margin-bottom: 7px; position: relative; }
.stat .lbl { font-size: 12.5px; color: var(--muted); position: relative; }
.stat .ic { position: absolute; top: 16px; right: 16px; opacity: .5; }

.card { padding: 24px; }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.card h3 .meta { font-size: 12px; font-weight: 400; color: var(--muted); }

.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; margin-bottom: 16px; }
.src-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 13px; }
.src-name { font-size: 11px; color: var(--muted); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-count { font-weight: 700; font-size: 14px; }
.src-added { font-size: 11px; color: var(--a1); margin-top: 2px; }
.progress-list { list-style: none; font-size: 12.5px; color: var(--muted); line-height: 2; margin-top: 12px; display: none; padding: 12px 14px; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-sm); }
.progress-list.show { display: block; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-items: end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.wide { grid-column: span 2; }
.form-group label { font-size: 12px; color: var(--muted); font-weight: 500; }
.form-group .field { font-size: 14px; padding: 9px 12px; }
.key-output { background: var(--code-bg); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 15px; margin-top: 16px; font-family: var(--mono); font-size: 13px; line-height: 2; display: none; white-space: pre-wrap; word-break: break-all; color: var(--a1); }
.key-output.show { display: block; animation: rise .3s var(--ease); }

/* table */
.table-card { padding: 0; overflow: hidden; }
.table-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-head h3 { font-size: 15px; margin: 0; }
.table-head .count { color: var(--muted); font-weight: 400; font-size: 13px; }
.table-search { margin-left: auto; max-width: 240px; font-size: 13px; padding: 8px 13px; }
.table-scroll { overflow-x: auto; }
table.keys { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.keys th { text-align: left; padding: 11px 16px; color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
table.keys td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.keys tr:last-child td { border-bottom: none; }
table.keys tbody tr { transition: background .15s; }
table.keys tbody tr:hover { background: rgba(255, 255, 255, .025); }
.key-code { font-family: var(--mono); letter-spacing: .5px; font-size: 12.5px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-active { background: var(--accent-soft); color: var(--a1); }
.s-exhausted { background: var(--yellow-soft); color: var(--yellow); }
.s-disabled { background: rgba(139, 149, 168, .1); color: var(--muted); }
.row-actions { display: flex; gap: 6px; }
.muted-cell { color: var(--muted); }
.small-cell { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* Responsive table → cards */
@media (max-width: 760px) {
  table.keys { min-width: 0; }
  table.keys thead { display: none; }
  table.keys, table.keys tbody { display: block; }
  table.keys tr { display: block; border: 1px solid var(--border); border-radius: var(--r-md); padding: 6px 4px; margin: 12px; background: var(--surface-2); }
  table.keys tr:last-child td { border-bottom: 1px solid var(--border); }
  table.keys td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: right; }
  table.keys tr td:last-child { border-bottom: none; }
  table.keys td::before { content: attr(data-label); color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; text-align: left; flex-shrink: 0; }
  .row-actions { justify-content: flex-end; }
  .table-search { max-width: none; margin-left: 0; width: 100%; }
}

/* ── Responsive shared ─────────────────────── */
@media (max-width: 560px) {
  .input-row { flex-direction: column; }
  .input-row .btn { width: 100%; }
  .result-actions { width: 100%; }
  .result-actions .btn { flex: 1; }
  .panel, .card { padding: 20px 16px; }
  .form-group.wide { grid-column: span 1; }
  .nav { padding: 11px 16px; }
  .wrap, .admin-wrap { padding-left: 16px; padding-right: 16px; }
}

/* ── Reduced motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
