:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  background: #eef3f5;
  color: #1d2935;
  --navy: #14324a;
  --teal: #087f73;
  --teal-dark: #05645b;
  --orange: #b45309;
  --red: #b42318;
  --line: #d8e2e8;
  --muted: #607687;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #eef3f5; }
.topbar { background: var(--navy); color: #fff; border-bottom: 3px solid #0d8b7e; }
.topbar-inner { width: min(1220px, calc(100% - 32px)); margin: auto; min-height: 64px; display: flex; align-items: center; gap: 32px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.admin-nav a { color: #d9f3ef; text-decoration: none; font-size: 14px; }
.admin-nav a:hover, .text-link:hover { color: #0b9485; text-decoration: underline; }
.language-switch { margin-left: auto; color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 5px; padding: 7px 10px; text-decoration: none; font-size: 13px; white-space: nowrap; }
.language-switch:hover { background: rgba(255,255,255,.12); }
.page-shell { width: min(1220px, calc(100% - 32px)); margin: 30px auto 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
h1 { margin: 0 0 7px; font-size: 30px; letter-spacing: 0; }
h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: 0; }
.section-title { margin-top: 32px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: 1.3px; margin-bottom: 8px; }
.muted { color: var(--muted); margin: 0; line-height: 1.6; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: 0 5px 18px rgba(20, 50, 74, .06); }
.section-panel { margin-top: 20px; }
.login-panel, .activation-entry { max-width: 600px; margin: 42px auto; }
.login-panel { max-width: 460px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { min-height: 92px; padding: 17px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #6d8492; border-radius: 7px; display: flex; flex-direction: column; justify-content: space-between; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { font-size: 26px; font-weight: 750; color: var(--navy); }
.stat.balance { border-top-color: var(--teal); }
.stat.balance strong { color: var(--teal-dark); font-size: 21px; }
label { display: block; margin: 14px 0 6px; color: #304858; font-weight: 650; font-size: 13px; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid #b9cbd5; border-radius: 6px; font: inherit; background: #fff; color: #1d2935; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(8, 127, 115, .16); border-color: var(--teal); }
button, .button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; min-height: 40px; padding: 9px 15px; background: var(--teal); color: #fff; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
button:hover, .button:hover { background: var(--teal-dark); }
button.secondary, .button.secondary { background: #466275; }
button.warn { background: var(--orange); }
button.danger { background: var(--red); }
.button.ghost { background: #fff; border: 1px solid #afc1cc; color: #395364; }
.button.ghost:hover { background: #f1f6f8; }
.compact { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.notice, .error, .success { margin: 16px 0; padding: 12px 14px; border-radius: 6px; line-height: 1.55; }
.notice { background: #fff7df; color: #7a4c02; border: 1px solid #f2d28a; }
.error { background: #fff0ef; color: #9c241a; border: 1px solid #f2b8b3; }
.success { background: #eaf8f4; color: #116b60; border: 1px solid #a8ddd2; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.details-grid { margin-top: 20px; }
.field { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafb; }
.field-wide { grid-column: span 2; }
.field .label { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
.field .value { min-width: 0; color: #162c3b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; line-height: 1.5; }
.field .value.plain { font-family: inherit; }
.error-field { background: #fff7f6; border-color: #efc5c1; }
.form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr auto; align-items: end; gap: 12px; }
.form-grid label, .filter-grid label { margin-top: 0; }
.form-submit { padding-top: 14px; }
.filter-grid { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto; align-items: end; gap: 10px; padding: 15px; background: #f7fafb; border: 1px solid var(--line); border-radius: 7px; }
.filter-search { min-width: 0; }
.filter-actions { display: flex; gap: 8px; padding-top: 14px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 12px; }
.bulkbar > span { margin-right: auto; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; font-size: 13px; }
tr:last-child td { border-bottom: 0; }
th { color: #486275; background: #f5f8fa; font-size: 12px; font-weight: 750; }
tbody tr:hover { background: #fbfdfd; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.subtle { display: block; margin-top: 4px; color: #8598a4; font: 11px inherit; }
.truncate { max-width: 290px; overflow: hidden; text-overflow: ellipsis; }
.check-cell { width: 42px; text-align: center; }
input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--teal); }
.terms-check { display: flex; gap: 9px; align-items: flex-start; line-height: 1.55; font-weight: 500; }
.terms-check input { flex: 0 0 17px; margin-top: 3px; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.status-unused { background: #e7f5ee; color: #16704e; }
.status-processing, .status-polling { background: #fff4d6; color: #8a5900; }
.status-active { background: #dff5f0; color: #087064; }
.status-failed { background: #ffe7e4; color: #a52e24; }
.status-banned { background: #ffe9d9; color: #9a4d05; }
.status-deleted { background: #edf0f2; color: #60717b; }
.text-link { color: var(--teal-dark); font-weight: 650; text-decoration: none; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.result-count { color: var(--muted); font-size: 13px; margin: 16px 0 10px; }
.code-output { min-height: 150px; margin-top: 2px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 13px; }
.catalog-summary { cursor: pointer; font-size: 18px; font-weight: 750; color: var(--navy); }
.catalog-note { margin: 10px 0 16px; }
.message-cell { white-space: normal; min-width: 210px; line-height: 1.45; }
details pre { max-width: 520px; margin: 10px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: #f7fafb; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid, .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filter-search { grid-column: span 2; } .filter-actions { align-self: end; } }
@media (max-width: 620px) { .topbar-inner, .page-shell { width: min(100% - 24px, 1220px); } .topbar-inner { display: block; padding: 16px 0 12px; position: relative; } .language-switch { position: absolute; top: 12px; right: 0; } .admin-nav { gap: 12px; margin-top: 14px; padding-right: 75px; } .page-shell { margin-top: 20px; } .page-heading, .section-heading { display: block; } .page-heading > form, .section-heading > a { margin-top: 14px; } .panel { padding: 18px; } h1 { font-size: 25px; } .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid, .filter-grid { display: block; } .filter-search { display: block; } .form-submit, .filter-actions { padding-top: 14px; } .field-wide { grid-column: auto; } .bulkbar > span { width: 100%; margin-right: 0; } .details-grid { grid-template-columns: 1fr; } }
