:root {
  --bg: #070b12;
  --panel: #101827;
  --panel2: #141f33;
  --text: #eef4ff;
  --muted: #9aa9bd;
  --line: rgba(255,255,255,.11);
  --accent: #39d98a;
  --accent2: #2f80ff;
  --danger: #ff5a6b;
  --warning: #ffcc66;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at top left, #14213d, var(--bg) 45%); color: var(--text); font-family: Inter, system-ui, Segoe UI, Arial, sans-serif; min-height: 100vh; }
a { color: inherit; }
.site-header { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid var(--line); background: rgba(7,11,18,.72); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.brand { text-decoration: none; font-weight: 900; letter-spacing: -.03em; font-size: 22px; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; gap: 18px; align-items: center; }
.site-header nav a, .inline-form button { color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.hero { max-width: 1180px; margin: 0 auto; padding: 64px 32px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.hero-card, .panel { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); border: 1px solid var(--line); border-radius: 24px; padding: 36px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 0 0 14px; font-size: clamp(38px, 6vw, 76px); line-height: .92; letter-spacing: -.07em; }
h2 { margin-top: 0; }
.lead { color: var(--muted); font-size: 18px; line-height: 1.55; max-width: 740px; }
.price { font-size: 48px; font-weight: 900; margin: 24px 0; letter-spacing: -.04em; }
.price span { display: block; color: var(--muted); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.buy-box, .stack-form { display: grid; gap: 10px; margin-top: 18px; }
.buy-box label, .stack-form label { color: var(--muted); font-size: 13px; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.26); color: var(--text); padding: 14px 16px; outline: none; font-size: 15px; }
input:focus { border-color: var(--accent2); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
button, .button { border: 0; border-radius: 14px; background: var(--accent); color: #06110b; padding: 14px 18px; font-weight: 900; cursor: pointer; text-decoration: none; display: inline-flex; justify-content: center; align-items: center; }
button.secondary { background: var(--accent2); color: white; }
.small { color: var(--muted); font-size: 13px; }
.features { display: grid; gap: 12px; }
.features div { background: rgba(255,255,255,.055); border: 1px solid var(--line); border-radius: 18px; padding: 18px; color: #dce8fa; font-weight: 800; }
.center-page { max-width: 520px; margin: 0 auto; padding: 64px 24px; }
.account-page { max-width: 980px; margin: 0 auto; padding: 42px 24px; display: grid; gap: 22px; }
.compact { max-width: 420px; }
.notice { border-radius: 14px; padding: 12px 14px; background: rgba(47,128,255,.14); border: 1px solid rgba(47,128,255,.3); color: #cfe2ff; }
.notice.error { background: rgba(255,90,107,.14); border-color: rgba(255,90,107,.34); color: #ffd2d7; }
.notice.warning { background: rgba(255,204,102,.14); border-color: rgba(255,204,102,.34); color: #ffe3a3; }
.hidden { display: none; }
.license-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 12px; }
.license-key { font-size: 22px; font-weight: 900; letter-spacing: .04em; overflow-wrap: anywhere; }
.license-meta { color: var(--muted); margin-top: 8px; }
@media (max-width: 820px) { .site-header { padding: 0 20px; } .hero { grid-template-columns: 1fr; padding: 36px 18px; } .hero-card, .panel { padding: 24px; } }

/* Admin panel */
.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 80px;
}
.admin-shell.narrow {
  width: min(980px, calc(100% - 40px));
}
.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.admin-topbar h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 18px;
}
.stat-card span {
  display: block;
  color: #9db1cf;
  font-size: 13px;
  margin-bottom: 10px;
}
.stat-card strong {
  font-size: 34px;
  line-height: 1;
}
.admin-create-card {
  margin-bottom: 18px;
}
.admin-inline-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(210px, .8fr) 90px auto;
  gap: 14px;
  align-items: end;
}
.admin-inline-form label,
.mini-form label {
  display: grid;
  gap: 7px;
  color: #a9bbd7;
  font-size: 13px;
  font-weight: 700;
}
.admin-inline-form input,
.mini-form input,
.mini-form select {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #ecf4ff;
  border-radius: 12px;
  padding: 12px 13px;
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}
.admin-table th {
  color: #9db1cf;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.admin-table td {
  color: #e9f2ff;
  font-size: 14px;
}
.admin-table code,
.admin-topbar code,
.alert code {
  color: #5bffb7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.table-link {
  color: #62a8ff;
  font-weight: 800;
  text-decoration: none;
}
.table-link:hover { text-decoration: underline; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: rgba(255,255,255,0.08);
  color: #d7e7ff;
}
.pill-active { background: rgba(48, 224, 142, .16); color: #5bffb7; }
.pill-disabled,
.pill-refunded { background: rgba(255, 95, 95, .16); color: #ff9b9b; }
.pill-deactivated { background: rgba(255, 200, 84, .14); color: #ffd37e; }
.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,0.14);
}
.alert-success {
  background: rgba(48, 224, 142, .12);
  color: #cfffe6;
}
.alert-danger {
  background: rgba(255, 95, 95, .12);
  color: #ffd3d3;
}
.license-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
.details-list {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  margin: 18px 0 0;
}
.details-list dt {
  color: #8da5c7;
  font-weight: 800;
}
.details-list dd {
  margin: 0;
  color: #ecf4ff;
}
.admin-actions-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}
.mini-form {
  display: grid;
  gap: 8px;
}
.btn-warning {
  background: #ffd166;
  color: #151515;
}
.btn-ghost {
  background: transparent;
  color: #cfe0ff;
  border: 1px solid rgba(255,255,255,0.16);
}
@media (max-width: 860px) {
  .stats-grid,
  .license-detail-grid,
  .admin-inline-form {
    grid-template-columns: 1fr;
  }
  .admin-topbar {
    flex-direction: column;
  }
}

/* Admin phase 1.2 refinements */
.license-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.summary-text {
  font-size: 16px !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}
.license-title {
  font-size: clamp(22px, 3vw, 34px) !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
}
.copy-code {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: copy;
  font: inherit;
  text-align: left;
  justify-content: flex-start;
}
.copy-code code { transition: color .15s ease, text-shadow .15s ease; }
.copy-code:hover code,
.copy-code.copied code {
  color: #7dffd0;
  text-shadow: 0 0 14px rgba(91,255,183,.22);
}
.copy-code.copied::after {
  content: " copied";
  color: #5bffb7;
  font-size: 12px;
  font-weight: 900;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.copy-code-large {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.full-width { width: 100%; }
.btn-danger {
  background: #ff5a6b;
  color: #fff;
}
.quick-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}
.active-pc-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(48,224,142,.20);
  border-radius: 16px;
  background: rgba(48,224,142,.08);
}
.active-pc-box.inactive {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
}
.active-pc-box h3 { margin: 0 0 8px; }
.active-pc-box p { margin: 6px 0; }
@media (max-width: 860px) {
  .license-summary-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .license-summary-grid { grid-template-columns: 1fr; }
}

/* Phase 2 customer panel + email tools */
.notice.success { background: rgba(48,224,142,.14); border-color: rgba(48,224,142,.34); color: #cdfde6; }
.muted { color: var(--muted); }
.small-lead { margin: 0; font-size: 15px; }
.account-grid { max-width: 1100px; }
.account-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.account-hero h1 { font-size: clamp(34px, 5vw, 56px); }
.account-two-col { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.license-list { display: grid; gap: 14px; margin-top: 14px; }
.license-card.enhanced { padding: 20px; }
.license-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.license-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.license-info-grid div { background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 12px; min-width: 0; }
.license-info-grid span { display: block; color: #91a5c4; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.license-info-grid strong { display: block; color: #edf5ff; font-size: 14px; overflow-wrap: anywhere; }
.email-test-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.email-test-form input { width: 230px; padding: 10px 12px; border-radius: 12px; }
.wide-center { max-width: 760px; }
.download-box { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 12px; }
.disabled-link { opacity: .55; pointer-events: none; filter: grayscale(.25); }

@media (max-width: 860px) {
  .account-hero, .account-two-col { grid-template-columns: 1fr; display: grid; }
  .license-info-grid { grid-template-columns: 1fr 1fr; }
  .email-test-form { width: 100%; }
  .email-test-form input { width: 100%; }
}
@media (max-width: 560px) {
  .license-info-grid { grid-template-columns: 1fr; }
}
