:root {
  --bg: #0f1117;
  --panel: #171a23;
  --card: #1c2029;
  --border: #2a2f3b;
  --text: #e6e9ef;
  --muted: #8b93a5;
  --accent: #1d9bf0;
  --ok: #2fbf71;
  --warn: #f0b429;
  --err: #ef5350;
}

* { box-sizing: border-box; }

/* ---- auth gating ---- */
body.pre-auth #app-header, body.pre-auth #app-main { display: none; }
body:not(.pre-auth) #login-screen { display: none; }
body:not(.role-admin) .admin-only { display: none !important; }
body.role-admin .user-only { display: none !important; }

details.card > summary {
  cursor: pointer;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  user-select: none;
  list-style: none;
}
details.card > summary::before {
  content: "\25B8\FE0E ";
  display: inline-block;
  transition: transform 0.15s;
}
details.card[open] > summary::before { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 1rem; }
details.card > summary:hover { color: var(--accent); }

.login-screen {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem 2.2rem; width: min(92vw, 360px);
  display: flex; flex-direction: column; gap: 1rem;
}
.login-brand-img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.6rem;
  border-radius: 8px;
}
.brand-icon { width: 1.7rem; height: 1.7rem; border-radius: 50%;
  vertical-align: -0.35rem; margin-right: 0.4rem; }
.brand-word { font-weight: 800; letter-spacing: 0.02em; }
.brand-word .brand-accent {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card label { display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.85rem; color: var(--muted); }
.login-error {
  color: var(--err); font-size: 0.85rem;
  background: rgba(239, 83, 80, 0.1);
  border: 1px solid rgba(239, 83, 80, 0.4);
  border-radius: 8px; padding: 0.5rem 0.7rem;
}
.whoami { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.grid-2col { display: grid; grid-template-columns: repeat(auto-fit,
  minmax(200px, 1fr)); gap: 0.5rem 1.4rem; }
.grid-2col b { color: var(--text); }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem 1.6rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.5px; }
.brand span { color: var(--accent); }

nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--card); }
.tab.active { color: #fff; background: var(--accent); }

main { max-width: 1080px; margin: 1.6rem auto; padding: 0 1.2rem; }

.panel { display: none; }
.panel.active { display: block; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.big { font-size: 1.6rem; font-weight: 600; margin: 0.2rem 0 0.6rem; }
.sub { color: var(--muted); font-size: 0.85rem; }

.row { display: flex; }
.gap { gap: 0.6rem; }

.btn {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.small { padding: 0.25rem 0.7rem; font-size: 0.8rem; }
.btn.danger { color: var(--err); }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}
.grid-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
/* fields stack from the top of each stretched cell, so every input
   sits on the same line regardless of hint length below it */
.grid-form label .field-hint { margin-top: 0.05rem; }

.stack-form { display: flex; flex-direction: column; gap: 0.9rem; }
.stack-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }

textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  resize: vertical;
}
textarea:focus { outline: none; border-color: var(--accent); }

input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
}
input:focus { outline: none; border-color: var(--accent); }

select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 8rem;
}
select:hover { border-color: var(--accent); }
select:focus { outline: none; border-color: var(--accent); }
select option { background: var(--panel); color: var(--text); }
select optgroup { background: var(--panel); color: var(--muted); }

/* compact selects inside table rows */
td select { padding: 0.3rem 0.5rem; font-size: 0.85rem; min-width: 6.5rem; }

.saved-blip {
  color: var(--ok);
  font-size: 0.85rem;
  align-self: center;
  white-space: nowrap;
}

input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.label-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  border-radius: 6px;
  padding: 0.25rem 0.45rem;
  font-size: 0.88rem;
  width: 9rem;
}
.label-input:hover { border-color: var(--border); }
.label-input:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--bg);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ok { background: rgba(47, 191, 113, 0.15); color: var(--ok); }
.badge.pending { background: rgba(240, 180, 41, 0.15); color: var(--warn); }
.badge.error { background: rgba(239, 83, 80, 0.15); color: var(--err); }
.badge.info { background: rgba(29, 155, 240, 0.15); color: var(--accent); }

.msg {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  white-space: pre-wrap;
}
.hidden { display: none !important; }

.tweets { display: flex; flex-direction: column; gap: 0.6rem; }
.tweet {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}
.tweet .meta { color: var(--muted); white-space: nowrap; font-size: 0.8rem; }

.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem 1.4rem;
  width: min(92vw, 560px); max-height: 90vh; overflow: auto;
}
.modal.wide {
  width: min(96vw, 1150px);
  max-height: 94vh;
  overflow: hidden;
}
/* scale the screenshot to fit BOTH the modal width and the remaining
   viewport height - no scrolling, aspect ratio preserved */
.modal.wide .shot {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(94vh - 230px);
  display: block;
  margin: 0.6rem auto 0.4rem;
}
.modal h3 { margin-top: 0; display: flex; justify-content: space-between; gap: 1rem; }
.modal .shot {
  width: 100%; border: 1px solid var(--border); border-radius: 8px;
  margin: 0.6rem 0; background: #fff;
}
.prompt-label { display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.85rem; color: var(--muted); margin-bottom: 0.9rem; }
.prompt-label input { width: 100%; }

/* password visibility toggles */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { width: 100%; padding-right: 3.4rem; }
.pw-toggle {
  position: absolute; right: 0.45rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; padding: 0.15rem 0.3rem;
  color: var(--muted); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  cursor: pointer; border-radius: 4px;
}
.pw-toggle:hover { color: var(--accent); }

/* site modal */
.modal-body-text { font-size: 0.92rem; line-height: 1.5;
  margin: 0.4rem 0 1.1rem; white-space: pre-wrap; word-break: break-word; }

/* settings field hints */
.field-hint {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

/* help docs */
.doc-card { scroll-margin-top: 5rem; }
.doc-shot {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: 8px;
  margin: 0.5rem 0 0.8rem;
}
.doc-shot:hover { border-color: var(--accent); }
.doc-body { line-height: 1.55; font-size: 0.88rem; }

/* admin browser-update log */
#browser-update-log {
  grid-column: 1 / -1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
}


.login-terms-link { text-align: center; }
.login-terms-link a { color: var(--accent); }

/* terms ack modal + terms page */
.terms-scroll {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 0.8rem 1rem;
  margin: 0.4rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.terms-scroll ul { margin: 0.5rem 0; padding-left: 1.2rem; }
.terms-scroll li { margin: 0.35rem 0; }
.terms-page { max-width: 820px; margin: 1.6rem auto; padding: 0 1.2rem; }
.terms-title { margin-bottom: 0.2rem; }
.terms-page h3 { margin: 1.4rem 0 0.4rem; color: var(--accent); }
.terms-page p { line-height: 1.6; font-size: 0.92rem; }
.terms-footer { margin-top: 1.4rem; }

/* full-terms viewer */
.terms-full-body {
  max-height: 64vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 0.9rem 1.1rem;
  margin: 0.4rem 0 1rem;
}
.terms-full-body h3, .terms-divider h3 {
  margin: 1.1rem 0 0.35rem; color: var(--accent);
}
.terms-full-body p, .terms-divider p {
  line-height: 1.55; font-size: 0.88rem;
}
.terms-divider {
  margin-top: 0.9rem; padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

/* support tickets */
.ticket-thread {
  max-height: 44vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.5rem 0 0.8rem;
}
.ticket-msg {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  max-width: 82%;
  background: var(--bg);
}
.ticket-msg.mine { align-self: flex-end; }
.ticket-msg.theirs { align-self: flex-start;
  border-color: rgba(29, 155, 240, 0.45); }
.ticket-msg-head { font-size: 0.72rem; margin-bottom: 0.25rem; }
.ticket-msg-body { font-size: 0.88rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; }
#ticket-reply { width: 100%; }
a.ticket-open { color: var(--accent); }

/* ticket attachments */
.att-previews { display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-top: 0.5rem; }
.att-preview { position: relative; }
.att-preview img { width: 88px; height: 66px; object-fit: cover;
  border: 1px solid var(--border); border-radius: 6px; display: block; }
.att-preview .btn { position: absolute; top: -8px; right: -8px;
  padding: 0 0.4rem; line-height: 1.3; }
.ticket-msg-atts { display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 0.5rem; }
.ticket-att-img { max-width: 320px; max-height: 220px;
  border: 1px solid var(--border); border-radius: 8px; display: block; }
.ticket-att-img:hover { border-color: var(--accent); }

/* nav ticket badge */
.nav-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--err);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  vertical-align: 0.08rem;
}

/* screenshot lightbox */
.lightbox-inner { text-align: center; }
.lightbox-inner img {
  max-width: 92vw;
  max-height: 78vh;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
a.ticket-att-link { display: inline-block; line-height: 0; }

/* ---------- pricing page ---------- */
.pricing-body { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem 3rem;
  --muted: #9aa3b8; }
.pricing-header { position: static; display: flex;
  justify-content: space-between; align-items: center;
  padding: 1.2rem 0 0; }
.grad-text {
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.pricing-hero { text-align: center; padding: 4rem 1rem 3rem; }
.pricing-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.1;
  margin: 0 0 1.2rem; font-weight: 800;
}
.pricing-hero p { max-width: 620px; margin: 0 auto 2.4rem;
  color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: center; max-width: 860px; margin: 0 auto; }
.hero-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.9rem 1.2rem; flex: 1;
  min-width: 150px; max-width: 200px;
}
.hero-stat b { display: block; font-size: 1.5rem;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; }
.hero-stat span { font-size: 0.78rem; color: var(--muted); }

.pricing-section { padding: 2.6rem 0; }
.pricing-section h2 {
  font-size: 1.7rem; margin: 0 0 0.4rem; text-align: center;
  font-weight: 700;
}
.grad-underline { position: relative; display: inline-block;
  width: 100%; }
.grad-underline::after {
  content: ""; position: absolute; left: 50%; bottom: -10px;
  transform: translateX(-50%); width: 72px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
}
.section-sub { text-align: center; color: var(--muted);
  max-width: 560px; margin: 1.4rem auto 0; line-height: 1.55; }

.steps-grid { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem; margin-top: 2.2rem; }
.step-card { background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem; }
.step-num {
  width: 2rem; height: 2rem; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700;
  margin-bottom: 0.7rem;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
}
.step-card h3 { margin: 0 0 0.4rem; font-size: 1rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.86rem;
  line-height: 1.55; }

.feat-grid { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem; margin-top: 2.2rem; }
.feat-card { background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.3rem; transition: border-color .15s,
  transform .15s; }
.feat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feat-icon { font-size: 1.5rem; margin-bottom: 0.55rem; }
.feat-card h3 { margin: 0 0 0.45rem; font-size: 1.02rem; }
.feat-card p { margin: 0; color: var(--muted); font-size: 0.87rem;
  line-height: 1.6; }

.compare-wrap { overflow-x: auto; margin-top: 2.2rem; }
.compare-table { width: 100%; min-width: 640px; }
.compare-table .us-col { color: var(--accent); }
.compare-table td.bad { color: var(--muted); }
.compare-table td.good { color: var(--text); font-weight: 600; }
.compare-table tbody tr:nth-child(odd) { background: var(--card); }

.tiers-grid { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 1rem; margin-top: 2.4rem; align-items: stretch; }
.tier-card { position: relative; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem 1.3rem; text-align: center;
  display: flex; flex-direction: column; gap: 0.45rem;
  transition: border-color .15s, transform .15s; }
.tier-card:hover { border-color: var(--accent);
  transform: translateY(-3px); }
.tier-card.featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, #a855f7, #ec4899) border-box;
}
.tier-badge {
  position: absolute; top: 0.9rem; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff; font-size: 0.72rem; font-weight: 700;
  padding: 0.2rem 0.8rem; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.tier-card h3 { margin: 2rem 0 0; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); font-weight: 700; }
.tier-price { font-size: 2.3rem; font-weight: 800; }
.tier-price span { font-size: 0.95rem; color: var(--muted);
  font-weight: 400; }
.tier-per { color: var(--muted); font-size: 0.85rem; }
.tier-scale { font-size: 1.15rem; font-weight: 700; }
.tier-eng { font-size: 0.9rem; margin-bottom: 0.4rem; }
.tier-list { list-style: none; padding: 0; margin: 0.5rem 0 0;
  border-top: 1px solid var(--border); padding-top: 0.8rem;
  display: flex; flex-direction: column; gap: 0.35rem; }
.tier-list li { font-size: 0.83rem; color: var(--muted); }
.tier-list li::before { content: "\2713\20"; color: var(--ok);
  font-weight: 700; }
.tier-note { text-align: center; margin-top: 1.4rem; }

.faq { background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.9rem 1.2rem; margin-top: 0.8rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem;
  user-select: none; list-style: none; }
.faq summary::before { content: "+\20"; color: var(--accent); }
.faq[open] summary::before { content: "\2212\20"; }
.faq p { margin: 0.6rem 0 0.2rem; color: var(--muted);
  line-height: 1.6; font-size: 0.9rem; }

.pricing-cta { text-align: center; padding: 3.4rem 1rem;
  border-top: 1px solid var(--border); margin-top: 2rem; }
.pricing-cta h2 { font-size: 2rem; margin: 0 0 0.8rem; }
.pricing-cta p { color: var(--muted); max-width: 460px;
  margin: 0 auto; line-height: 1.6; }
.pricing-footer { text-align: center; padding-top: 2rem;
  border-top: 1px solid var(--border); }

/* admin pricing tab embed */
.pricing-frame { width: 100%; height: 78vh; border: 1px solid
  var(--border); border-radius: 12px; background: var(--bg); }

/* pricing gate */
.pricing-gate-card {
  max-width: 400px; margin: 10vh auto 0; text-align: center;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem 2.2rem;
  display: flex; flex-direction: column; gap: 0.9rem;
}
.pricing-gate-card label { display: flex; flex-direction: column;
  gap: 0.35rem; font-size: 0.85rem; color: var(--muted);
  text-align: left; }
.gate-brand { justify-content: center; font-size: 1.4rem; }
.pricing-gate-card h2 { margin: 0; font-size: 1.15rem; }
.gate-foot { margin-top: 0.3rem; }

/* =====================================================================
   ONLYFANS-STYLE THEME (overrides everything above)
   Blue #00AFF0 + white cards + pill buttons + squared inputs + Roboto
   ===================================================================== */

:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --card: #ffffff;
  --border: #dcdfe4;
  --text: #1c1c1e;
  --muted: #6b7280;
  --accent: #00aff0;
  --accent-dark: #008fd6;
  --ok: #16a34a;
  --warn: #b45309;
  --err: #dc2626;
}

body { font-family: Roboto, "Helvetica Neue", -apple-system,
  "Segoe UI", Arial, sans-serif; background: var(--bg); }

/* header + nav */
header { background: var(--panel); border-bottom: 1px solid var(--border); }
.brand-icon { border-radius: 50%; }
.tab { background: transparent; color: var(--muted); border-radius: 999px;
  text-transform: none; font-weight: 500; }
.tab:hover { color: var(--text); background: #f0f2f5; }
.tab.active { color: var(--accent); background: rgba(0, 175, 240, 0.1); }
.whoami { color: var(--muted); font-size: 0.88rem; }

/* buttons: full pills, uppercase tracked labels */
.btn { background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.55rem 1.25rem; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent);
  color: #fff; }
.btn.primary:hover { background: var(--accent-dark);
  border-color: var(--accent-dark); color: #fff; filter: none; }
.btn.small { padding: 0.35rem 0.9rem; font-size: 0.7rem; }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }

/* inputs: squared, hairline borders (OF pairing vs pill buttons) */
input, select, textarea {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; padding: 0.6rem 0.8rem; font-size: 0.92rem;
  font-family: inherit; }
input::placeholder, textarea::placeholder { color: #a6abb2; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.12); }
select { cursor: pointer; min-width: 8rem; }
td select { padding: 0.35rem 0.55rem; font-size: 0.85rem; }

/* cards */
.card { background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.card h3 { color: var(--muted); }

/* tables */
th { color: var(--muted); }
.badge.ok { background: rgba(22, 163, 74, 0.1); color: var(--ok); }
.badge.pending { background: rgba(217, 119, 6, 0.12); color: var(--warn); }
.badge.error { background: rgba(220, 38, 38, 0.1); color: var(--err); }
.badge.info { background: rgba(0, 175, 240, 0.1); color: var(--accent-dark); }

/* modals */
.modal { background: var(--panel); box-shadow: 0 8px 30px
  rgba(16, 24, 40, 0.12); }
.modal-backdrop { background: rgba(28, 28, 30, 0.5); }

/* login: OF-style split screen */
.login-screen { background: var(--bg); align-items: stretch; }
.login-screen .login-split { display: grid;
  grid-template-columns: 1.1fr 1fr; min-height: 100vh; width: 100%; }
.login-left { background: var(--accent); color: #fff; position: relative;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1rem; overflow: hidden; padding: 2rem; }
.login-left .login-ghost { position: absolute; width: 46vh; height: 46vh;
  opacity: 0.14; transform: rotate(-12deg) translate(-8%, 14%);
  pointer-events: none; }
.login-left .login-mark { width: 84px; height: 84px; border-radius: 50%;
  background: #fff; padding: 6px; position: relative; z-index: 1; }
.login-left .login-word { font-size: 2.6rem; font-weight: 800;
  position: relative; z-index: 1; letter-spacing: 0.01em; }
.login-left .login-tag { font-size: 1.02rem; opacity: 1; z-index: 1;
  max-width: 320px; text-align: center; line-height: 1.5; }
.login-right { display: flex; align-items: center; justify-content: center;
  padding: 2rem; }
.login-card { background: transparent; border: none; border-radius: 0;
  padding: 0; width: min(92vw, 360px); box-shadow: none; }
.login-brand-img { display: none; }
.login-error { color: var(--err); background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.35); }
.login-terms-link a { color: var(--accent); }
@media (max-width: 800px) { .login-screen .login-split {
  grid-template-columns: 1fr; } .login-left { min-height: 32vh; } }

/* brand gradients -> OF blue */
.brand-accent, .brand-word .brand-accent, .grad-text {
  background: linear-gradient(90deg, #00aff0, #008fd6);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.step-num, .tier-badge, .hero-stat b {
  background: linear-gradient(135deg, #00aff0, #008fd6); color: #fff; }
.grad-underline::after {
  background: linear-gradient(90deg, #00aff0, #008fd6); }
.tier-card.featured {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, #00aff0, #008fd6) border-box; }

/* tickets + misc surfaces */
.ticket-msg { background: #f7f9fb; }
.ticket-msg.theirs { border-color: rgba(0, 175, 240, 0.45); }
.att-preview img, .ticket-att-img { background: #fff; }
#browser-update-log, .terms-scroll, .terms-full-body { background: #f7f9fb; }
.compare-table tbody tr:nth-child(odd) { background: #fafbfc; }
.compare-table .us-col { color: var(--accent-dark); }
.doc-shot { background: #fff; }
.msg.hidden, .saved-blip { color: var(--ok); }
.big { color: var(--text); }
#engine-state.stopped { color: var(--warn); }
#engine-state.running { color: var(--ok); }
.nav-badge { background: var(--err); }
.pw-toggle:hover { color: var(--accent); }
a { color: var(--accent-dark); }
.pricing-gate-card { background: var(--panel); }
.feat-card:hover, .tier-card:hover { border-color: var(--accent); }
.faq summary::before, .faq[open] summary::before { color: var(--accent); }


/* =====================================================================
   ROBOTO WEBFONT + LEFT SIDEBAR (OF-style)
   ===================================================================== */

@font-face { font-family: Roboto; font-style: normal; font-weight: 400;
  font-display: swap; src: url(/fonts/roboto-400.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 500;
  font-display: swap; src: url(/fonts/roboto-500.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 700;
  font-display: swap; src: url(/fonts/roboto-700.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-style: normal; font-weight: 800;
  font-display: swap; src: url(/fonts/roboto-800.woff2) format("woff2"); }

/* sidebar layout */
#app-header { position: fixed; top: 0; left: 0; bottom: 0; width: 232px;
  display: flex; flex-direction: column; gap: 0.4rem;
  background: var(--panel); border-right: 1px solid var(--border);
  padding: 1.1rem 0.8rem; z-index: 5; overflow-y: auto; }
.sidebar-top { padding: 0 0.5rem 0.9rem; border-bottom: 1px solid
  var(--border); margin-bottom: 0.6rem; }
.sidebar-top .brand { font-size: 1.15rem; }
#app-header nav { display: flex; flex-direction: column; gap: 0.25rem;
  flex: 1; }
.sidebar-bottom { border-top: 1px solid var(--border);
  padding-top: 0.8rem; display: flex; flex-direction: column;
  gap: 0.6rem; }
.sidebar-bottom .whoami { display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; font-size: 0.85rem; color: var(--text); }

#app-main { margin-left: 232px; }

/* nav rows: icon + label */
.tab { display: flex; align-items: center; gap: 0.85rem;
  background: transparent; color: var(--muted); border: none;
  border-radius: 10px; padding: 0.65rem 0.85rem; font-size: 0.95rem;
  font-weight: 500; text-transform: none; letter-spacing: 0;
  text-align: left; width: 100%; cursor: pointer; }
.tab:hover { color: var(--text); background: #f0f2f5; }
.tab.active { color: var(--accent); background: rgba(0, 175, 240, 0.1); }
.tab-ico { width: 21px; height: 21px; flex: 0 0 21px;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.tab .nav-badge { margin-left: auto; }
#btn-logout { width: 100%; }

/* narrow screens: icon-only rail */
@media (max-width: 860px) {
  #app-header { width: 64px; padding: 1rem 0.5rem; }
  #app-main { margin-left: 64px; }
  .tab-label, .sidebar-top .brand-word, .sidebar-bottom .whoami
    { display: none; }
  .tab { justify-content: center; padding: 0.7rem 0; }
  .sidebar-top { display: flex; justify-content: center; }
  .brand-icon { width: 1.9rem; height: 1.9rem; }
  #btn-logout { font-size: 0.6rem; padding: 0.4rem 0.2rem; }
}

/* form controls + buttons must inherit Roboto (browsers default them
   to the system UI font otherwise) */
button, input, select, textarea { font-family: inherit; }

/* pricing page: full-bleed top bar spanning the viewport */
.pricing-header {
  position: sticky; top: 0; z-index: 4;
  display: flex; justify-content: space-between; align-items: center;
  width: 100vw; margin-left: calc(50% - 50vw);
  padding: 0.85rem max(1.2rem, calc(50vw - 540px));
  background: var(--panel); border-bottom: 1px solid var(--border);
}

/* =====================================================================
   DARK MODE (OF-style) - toggled via body.dark
   ===================================================================== */

body.dark {
  --bg: #0d151d;
  --panel: #14212b;
  --card: #16242f;
  --border: #263745;
  --text: #e9eef3;
  --muted: #8296a6;
  --accent-dark: #33c1f5;
  --ok: #2fbf71;
  --warn: #f0b429;
  --err: #ef5350;
}

body.dark input, body.dark select, body.dark textarea {
  background: #0f1a23; color: var(--text); }
body.dark input::placeholder, body.dark textarea::placeholder {
  color: #54677a; }
body.dark input:focus, body.dark select:focus,
body.dark textarea:focus {
  box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.18); }
body.dark .tab:hover { background: #1b2833; }
body.dark .tab.active { background: rgba(0, 175, 240, 0.16); }
body.dark .card { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
body.dark .modal { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); }
body.dark .ticket-msg { background: #101c26; }
body.dark #browser-update-log, body.dark .terms-scroll,
body.dark .terms-full-body { background: #101c26; }
body.dark .compare-table tbody tr:nth-child(odd) { background: #132029; }
body.dark .att-preview img, body.dark .ticket-att-img { background:
  transparent; }
body.dark .badge.ok { background: rgba(47, 191, 113, 0.14); }
body.dark .badge.pending { background: rgba(240, 180, 41, 0.12); }
body.dark .badge.error { background: rgba(239, 83, 80, 0.14); }
body.dark .badge.info { background: rgba(0, 175, 240, 0.14); }
body.dark .tier-card.featured {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, #00aff0, #33c1f5) border-box; }
body.dark .login-error { background: rgba(239, 83, 80, 0.08); }
body.dark a { color: var(--accent-dark); }

/* native control chrome (selects, popups, scrollbars, date pickers) */
body.dark { color-scheme: dark; }
body.dark select option { background: #14212b; color: var(--text); }
body.dark .field-hint { color: #93a7b8; }

/* share tab: recruitment light + copy rows */
.nav-divider { height: 1px; background: var(--border);
  margin: 0.5rem 0.6rem; flex: 0 0 auto; }
.recruit-dot { display: inline-block; width: 0.72rem; height: 0.72rem;
  border-radius: 50%; margin-right: 0.45rem; vertical-align: -0.05rem; }
.recruit-dot.on { background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: recruit-pulse 2s infinite; }
.recruit-dot.off { background: var(--err); }
@keyframes recruit-pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
#share-status-badge, #admin-recruit-badge {
  display: inline-flex; align-items: center; }
.share-row { display: flex; gap: 0.6rem; align-items: center;
  margin-bottom: 0.7rem; }
.share-copy-input { flex: 1; width: 100%;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem; }
.share-row .pw-wrap { flex: 1; }

/* share nav status dot (on the tab itself) */
.nav-status-dot { display: inline-block; width: 0.62rem; height: 0.62rem;
  border-radius: 50%; margin-left: 0.4rem; flex: 0 0 auto; }
.nav-status-dot.on { background: var(--ok);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
  animation: recruit-pulse 2s infinite; }
.nav-status-dot.off { background: var(--err); }
@media (max-width: 860px) {   /* icon rail: dot anchors to the icon */
  .nav-status-dot { position: absolute; margin: 0;
    top: 0.5rem; right: 0.55rem; width: 0.5rem; height: 0.5rem; }
  .tab { position: relative; }
}

/* pricing CTA mail link */
.cta-mail { color: var(--accent-dark); font-weight: 700;
  font-size: 1.1rem; text-decoration: none;
  border-bottom: 2px solid rgba(0, 175, 240, 0.4); }
.cta-mail:hover { border-bottom-color: var(--accent); }
.pricing-cta p { color: var(--muted); max-width: 560px;
  margin: 0 auto 0.9rem; line-height: 1.6; }

/* locked country display (accounts table) */
.country-lock { display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; white-space: nowrap; cursor: help; }
.country-lock .icon-lock { width: 0.85rem; height: 0.85rem;
  fill: var(--muted); flex: 0 0 auto; }

/* per-user accounts expander (admin Users tab) */
.user-accounts-row > td { background: var(--bg2, rgba(127,127,127,0.06));
  padding: 0.4rem 0.8rem 0.8rem; }
.user-accounts { width: 100%; font-size: 0.85rem; }

/* suspended-account dashboard banner */
.banner.warn { background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.45); border-radius: 10px;
  padding: 0.8rem 1rem; margin-bottom: 1rem; line-height: 1.55;
  color: var(--fg); }
.banner.warn a { color: var(--accent-dark); font-weight: 700; }

/* disabled action buttons (suspended accounts) */
.btn:disabled { opacity: 0.45; cursor: not-allowed;
  filter: saturate(0.6); }

/* main account card + verification modal */
.main-current-row { display: flex; gap: 0.8rem; align-items: center; }
.main-avatar { width: 3rem; height: 3rem; border-radius: 50%;
  object-fit: cover; flex: 0 0 auto; background: var(--bg2, #eee); }
.main-handle-line { display: flex; gap: 0.45rem; align-items: baseline;
  flex-wrap: wrap; }
.main-verify-profile { display: flex; gap: 0.8rem; align-items: center;
  margin-top: 0.6rem; }
.main-verify-tweets { margin-top: 0.4rem; display: flex;
  flex-direction: column; gap: 0.45rem; }
.main-verify-tweets .mini-tweet { border: 1px solid
  rgba(127,127,127,0.25); border-radius: 8px; padding: 0.5rem 0.7rem;
  font-size: 0.85rem; line-height: 1.45; }
.mini-tweet .sub { font-size: 0.75rem; margin-top: 0.15rem; }

/* dashboard main-account profile card */
.main-avatar.big { width: 4.2rem; height: 4.2rem; }
.mp-info { min-width: 0; }
.mp-bio, .mp-stats { margin-top: 0.35rem; }
.mp-stats { display: flex; gap: 1.4rem; margin-top: 0.55rem;
  flex-wrap: wrap; }
.mp-stat b { font-size: 1.05rem; }
.mp-stat { display: flex; flex-direction: column; }
.mp-stat .sub { font-size: 0.78rem; }
