/* TurboChargeWP customer portal — modern, interactive. Trademark gradient
   (rose→orange) matches the plugin's heading-banner background. */
:root {
  --rose: #f43f5e;
  --orange: #f97316;
  --grad: linear-gradient(90deg, #f4566a, #fb923c);
  --grad-diag: linear-gradient(135deg, #f4566a 0%, #fb7185 40%, #fb923c 100%);
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e6e8ee;
  --bg: #ffffff;
  --card: #ffffff;
  --ok: #0a8a3f; --ok-bg: #e7f6ec;
  --warn: #9a6700; --warn-bg: #fdf5e2;
  --bad: #b3261e; --bad-bg: #fdeceb;
  --ring: rgba(244, 63, 94, .28);
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(225, 29, 72, .18);
}
* { box-sizing: border-box; }
h1, h2, h3, h4 { font-weight: 400; }
b, strong { font-weight: 500; }
html, body { margin: 0; }
body {
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.muted { color: var(--muted); }

/* ---------- animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-up { animation: fadeUp .5s cubic-bezier(.2,.7,.2,1) both; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(249,115,22,.16), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(225,29,72,.16), transparent 55%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 20px;
  box-shadow: var(--shadow); overflow: hidden; animation: pop .45s cubic-bezier(.2,.8,.2,1) both; }
.login-hero { background: var(--grad-diag); color: #fff; padding: 30px 28px 26px;
  position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 160px at 80% 0%, rgba(255,255,255,.25), transparent 70%); }
.login-hero .bolt { font-size: 26px; }
.login-hero h1 { margin: 10px 0 2px; font-size: 21px; font-weight: 500; letter-spacing: -.02em; }
.login-hero p { margin: 0; opacity: .92; font-size: 13.5px; }
.login-body { padding: 24px 28px 28px; }
.login-body label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 7px; }
.key-input { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  letter-spacing: 1px; transition: border-color .15s, box-shadow .15s; text-align: center; }
.key-input:focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 4px var(--ring); }
.hint { font-size: 12px; color: var(--faint); margin-top: 10px; text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; font-weight: 400; font-size: 14px;
  background: #fff; color: var(--ink-2); border: 1.5px solid var(--line);
  transition: transform .12s, box-shadow .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-grad { color: #fff; border: 0; background: var(--grad); background-size: 180% 100%; }
.btn-grad:hover { background-position: 100% 0; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-ghost-danger { color: var(--bad); border-color: #f3cdca; background: #fff; }
.btn-ghost-danger:hover { background: var(--bad-bg); }
.spinner { width: 16px; height: 16px; border: 2.5px solid rgba(255,255,255,.45);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- app shell: fixed header + dedicated left icon rail ---------- */
:root { --appbar-h: 64px; --rail-w: 88px; }

.shell { max-width: 940px; margin: 0 auto; padding: 24px 18px 60px; }
.logo { font-weight: 400; letter-spacing: -.02em; font-size: 18px; white-space: nowrap; }
.logo .g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header spans the full width and stays put while the page scrolls. */
.appbar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: var(--appbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: #fff; border-bottom: 1px solid var(--line); }
.appbar .spacer { flex: 1; }

/* Admin-authored promo strip — customer header only. */
.promo { display: inline-flex; align-items: center; gap: 9px; max-width: 46vw;
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(90deg, #fff1f2, #fff7ed); border: 1px solid #fde3e7;
  color: #d8455c; font-size: 14px; transition: border-color .15s, background .15s; }
.promo svg { width: 17px; height: 17px; flex: none; }
.promo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.promo:hover { border-color: #f9c9d1; background: linear-gradient(90deg, #ffe9ec, #fff1e2); }

.icon-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color .15s, background .15s, color .15s; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.icon-btn:hover { background: #faf7f8; border-color: #e7d6da; }
.icon-btn.on { color: var(--rose); border-color: #f9c9d1; background: #fff0f2; }
.nav-toggle { display: none; }

/* Left rail: icon above label, sitting under the header. */
.rail { position: fixed; top: var(--appbar-h); left: 0; bottom: 0; z-index: 60; width: var(--rail-w);
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 8px 16px; overflow-y: auto; }
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px; border-radius: 12px; text-decoration: none; border: 0; background: none;
  color: var(--muted); font-size: 11.5px; line-height: 1.25; text-align: center; width: 100%;
  transition: background .15s, color .15s; }
.rail-item svg { width: 22px; height: 22px; flex: none; }
.rail-item:hover { background: #faf7f8; color: var(--ink); }
.rail-item.active { background: #fff0f2; color: var(--rose); }
/* Accent bar hugs the rail's right edge (matches the 8px padding). */
.rail-item.active::after { content: ""; position: absolute; right: -8px; top: 50%;
  width: 3px; height: 26px; margin-top: -13px; border-radius: 3px 0 0 3px; background: var(--grad); }
.rail-foot { margin-top: auto; }

.main { margin-left: var(--rail-w); padding-top: var(--appbar-h); min-width: 0; }
.scrim { display: none; }

/* Narrow screens: the rail slides in over the page, the header stays fixed. */
@media (max-width: 860px) {
  .appbar { padding: 0 12px; gap: 8px; }
  .nav-toggle { display: inline-flex; }
  /* The promo keeps its text here — it shrinks and ellipsizes rather than hiding. */
  .promo { max-width: none; flex: 0 1 auto; min-width: 0; padding: 8px 13px; font-size: 13px; }
  .rail { transform: translateX(-100%); transition: transform .22s ease; }
  .rail.open { transform: translateX(0); }
  .scrim { display: block; position: fixed; top: var(--appbar-h); left: 0; right: 0; bottom: 0;
    z-index: 55; background: rgba(15,23,42,.42); }
  .main { margin-left: 0; }
  .shell { padding: 18px 16px 60px; }
}

/* Tightest screens: the brand gives up its space so the promo stays readable. */
@media (max-width: 560px) {
  .appbar .brand-logo, .appbar .logo { display: none; }
}

/* ---------- hero banner (trademark gradient) ---------- */
.hero { position: relative; border-radius: 22px; padding: 26px; color: #fff; overflow: hidden;
  background: var(--grad-diag); box-shadow: var(--shadow-lg); }
.hero::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 240px at 100% -20%, rgba(255,255,255,.28), transparent 60%); }
.hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,.10); }
.hero > * { position: relative; }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.hero .plan { font-size: 13px; font-weight: 500; opacity: .92; text-transform: uppercase; letter-spacing: .08em; }
.hero h2 { margin: 4px 0 0; font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.hero .keyline { margin-top: 8px; font-size: 13.5px; opacity: .95; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  font-weight: 500; font-size: 13px; background: rgba(255,255,255,.18); backdrop-filter: blur(2px); }
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6);
  animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.5);} 70%{ box-shadow: 0 0 0 8px rgba(255,255,255,0);} 100%{box-shadow:0 0 0 0 rgba(255,255,255,0);} }

/* seat meter */
.meter { margin-top: 22px; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13.5px; }
.meter-head b { font-size: 15px; }
.meter-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, #fff, #ffe4d6); transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- cards grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 30px 2px 4px; }
.section-title h3 { margin: 0; font-size: 16px; }
.count-chip { font-size: 12.5px; font-weight: 500; color: var(--rose); background: #fff0f2; padding: 4px 11px; border-radius: 999px; }

/* key reveal */
.keybox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-pill { flex: 1 1 220px; min-width: 0; font-size: 15px; letter-spacing: 1.5px; padding: 13px 15px; border-radius: 12px;
  background: #fff; color: var(--ink); overflow-x: auto; white-space: nowrap;
  border: 1.5px solid var(--line); }
.key-masked { color: var(--faint); letter-spacing: 3px; }

/* site cards */
.site { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; transition: transform .12s, box-shadow .2s, border-color .2s;
  animation: fadeUp .4s both; }
.site:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #f1d9dc; }
.site .globe { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed); flex: none; }
.site .meta { flex: 1; min-width: 0; }
.site .host { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site .facts { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.env { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.env-production { background: var(--ok-bg); color: var(--ok); }
.env-staging { background: #eef2ff; color: #4338ca; }
.env-local { background: #f1f5f9; color: #475569; }

/* badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.badge-active { background: var(--ok-bg); color: var(--ok); }
.badge-grace { background: var(--warn-bg); color: var(--warn); }
.badge-expired, .badge-suspended, .badge-revoked { background: var(--bad-bg); color: var(--bad); }

.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.err { color: var(--bad); font-size: 13px; margin-top: 10px; text-align: center; min-height: 18px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px; z-index: 40; animation: pop .2s both; }
.modal { background: #fff; border-radius: 18px; padding: 24px; max-width: 400px; width: 100%; box-shadow: var(--shadow-lg);
  animation: pop .25s cubic-bezier(.2,.8,.2,1) both; }
.modal h4 { margin: 0 0 8px; font-size: 17px; }
.modal p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal .row { display: flex; gap: 10px; }
.modal .row .btn { flex: 1; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; font-weight: 500; font-size: 14px;
  box-shadow: var(--shadow-lg); z-index: 50; animation: pop .25s both; display: flex; align-items: center; gap: 9px; }
.toast .tick { color: #4ade80; font-weight: 500; }

.center-load { min-height: 60vh; display: grid; place-items: center; color: var(--muted); }
.load-ring { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--rose);
  border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .card-wide { grid-column: 1 / -1; }
}

/* ---------- auth forms (accounts) ---------- */
.login-body label { margin-top: 13px; }
.fld { width: 100%; padding: 12px 13px; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s; }
.fld:focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 4px var(--ring); }
.banner-ok { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px;
  font-size: 13px; margin-bottom: 12px; line-height: 1.45; }
.authlinks { display: flex; justify-content: space-between; margin-top: 16px; font-size: 13px; }
.authlinks a { color: var(--rose); text-decoration: none; }
.authlinks a:hover { text-decoration: underline; }
.mini { font-size: 12.5px; color: var(--rose); text-decoration: none; }
.mini:hover { text-decoration: underline; }
.opt { color: var(--faint); font-weight: 400; font-size: 11.5px; }

/* ---------- pricing page ---------- */
.banner-info { background: #eef2ff; color: #4338ca; border-radius: 10px; padding: 11px 14px;
  font-size: 13.5px; margin-bottom: 16px; text-align: center; }
.plans { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
.plan-card { position: relative; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 18px; padding: 26px 22px;
  transition: transform .15s, border-color .2s; }
.plan-card:hover { transform: translateY(-3px); border-color: #f0d3d8; }
.plan-card.popular { border-color: var(--rose); }
.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 11.5px; font-weight: 500; padding: 5px 14px;
  border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }
.plan-name { font-size: 15px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.plan-price { margin: 10px 0 2px; display: flex; align-items: baseline; gap: 4px; }
.plan-price .amt { font-size: 40px; font-weight: 400; letter-spacing: -.02em; color: var(--ink); }
.plan-price .per { font-size: 14px; color: var(--muted); }
.plan-seats { font-size: 13.5px; color: var(--rose); font-weight: 400; margin-bottom: 18px; }
.plan-feats { list-style: none; margin: 0 0 22px; padding: 0; }
.plan-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-2);
  padding: 6px 0; border-top: 1px solid var(--line-soft, #f1f5f9); }
.plan-feats li:first-child { border-top: 0; }
.plan-feats .ck { color: var(--ok); font-weight: 500; flex: none; }
@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(3, 1fr); }
  .plan-card.popular { transform: scale(1.04); }
  .plan-card.popular:hover { transform: scale(1.04) translateY(-3px); }
}

/* ---------- payment confirmation overlay ---------- */
.pay-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.94);
  backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 60; animation: pop .22s both; }
.pay-box { text-align: center; padding: 30px; max-width: 340px; }
.pay-box h3 { margin: 20px 0 6px; font-size: 20px; }
.pay-box p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.pay-spinner { width: 56px; height: 56px; margin: 0 auto; border: 4px solid #f3e4e8;
  border-top-color: var(--rose); border-radius: 50%; animation: spin .8s linear infinite; }
.pay-tick { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--ok);
  display: grid; place-items: center; animation: tickpop .45s cubic-bezier(.2,.9,.3,1.5) both; }
.pay-tick svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round; }
@keyframes tickpop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- brand logo (admin-configurable) ---------- */
.brand-logo { max-height: 30px; max-width: 190px; object-fit: contain; display: block; }
.brand-logo-lg { max-height: 42px; max-width: 220px; object-fit: contain; display: block; margin-bottom: 4px; }

/* ---------- profile ---------- */
.prow { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0;
  border-bottom: 1px solid var(--line); font-size: 13.5px; }
.prow span { color: var(--muted); }
.prow b { text-align: right; word-break: break-word; }
.okmsg { color: var(--ok); font-size: 13px; margin-top: 10px; }

/* ---------- "how to use your key" flow ---------- */
.flow { list-style: none; margin: 16px 0 20px; padding: 0; }
.flow li { display: flex; gap: 13px; align-items: flex-start; padding-bottom: 18px; position: relative; }
.flow li:last-child { padding-bottom: 0; }
.flow li::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.flow li:last-child::before { display: none; }
.flow .step { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad);
  color: #fff; display: grid; place-items: center; font-size: 13px; position: relative; z-index: 1; }
.flow div { font-size: 13.5px; line-height: 1.55; padding-top: 5px; color: var(--ink-2); }

/* Generic flex row (the portal was missing this — headers/actions relied on it) */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge-pending { background: #eef2ff; color: #4338ca; }

/* Reminder shown only while a purchased licence has not been activated yet. */
.activate-note { color: var(--muted); font-weight: 300; font-size: 12px; margin-top: 9px; }
