/* Admin page: same playful look as the app. */
.admin .top { margin-bottom: 8px; }
.admin .brand { text-decoration: none; color: inherit; }
.admin .back { display: inline-flex; align-items: center; text-decoration: none; }
.admin .section-title { margin: 26px 4px 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 22px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.stat span { font-size: 24px; }
.stat b { font-size: 30px; font-weight: 900; line-height: 1.1; }
.stat small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.admin-card { display: grid; gap: 10px; background: var(--surface); border-radius: 24px; padding: 14px; box-shadow: var(--shadow); }
.admin-card input, .admin-card select { font-size: 16px; }
.btn.big { height: 54px; font-size: 17px; font-weight: 800; border-radius: 18px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; height: 44px; border-radius: 14px; font-weight: 800; font-size: 14px; background: var(--surface-2); transition: background 0.15s, color 0.15s, transform 0.12s; }
.seg input:checked + span { background: var(--brand); color: #fff; }
.seg label:active span { transform: scale(0.95); }
.seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.new-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(120deg, #8b5cf6, #db2777); color: #fff; }
.new-code code { background: none; color: #fff; font-size: 24px; font-weight: 900; letter-spacing: 0.08em; padding: 0; }
.new-code button { border: 0; border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 800; background: #fff; color: #db2777; cursor: pointer; }
.admin-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.admin-list li { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.admin-list .who { flex: 1; min-width: 0; }
.admin-list .who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-list .who small { color: var(--muted); font-size: 12.5px; }
.tier { flex: none; font-size: 12.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); }
.tier.plus { background: color-mix(in srgb, #8b5cf6 18%, var(--surface)); color: #6d28d9; }
.tier.comp { background: color-mix(in srgb, #16a34a 18%, var(--surface)); color: #15803d; }
.act { flex: none; border: 0; border-radius: 12px; height: 38px; padding: 0 12px; font: inherit; font-weight: 800; font-size: 13.5px; cursor: pointer; background: var(--surface-2); color: var(--text); transition: transform 0.12s; }
.act:active { transform: scale(0.94); }
.act.give { background: var(--brand); color: #fff; }

/* ===== tabs ===== */
.app.admin { max-width: 1120px; }
.tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.tab { border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
.tab.on { background: linear-gradient(120deg, #fb923c, #db2777); color: #fff; }
.tab b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: #fff; color: #db2777; font-size: 12px; }

/* ===== contact inbox (Gmail-ish) ===== */
.mail { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.mail.reading { grid-template-columns: 210px minmax(0, 380px) minmax(0, 1fr); }
.folders { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 12px; }
.fold { display: flex; align-items: center; gap: 10px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--text); padding: 10px 12px; border-radius: 0 999px 999px 0; cursor: pointer; text-align: left; }
.fold span { font-size: 18px; }
.fold b { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.fold.on { background: var(--brand-soft); color: #be185d; }
.fold.on b { color: #be185d; }
.labels { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 4px; }
.lbl { border: 0; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: color-mix(in srgb, var(--c) 80%, var(--text)); }
.lbl.on { background: var(--c); color: #fff; }
.t-question { --c: #3b82f6; } .t-bug { --c: #ef4444; } .t-idea { --c: #8b5cf6; } .t-press { --c: #f59e0b; } .t-other { --c: #64748b; }
.autofwd { display: flex; gap: 8px; align-items: flex-start; margin: 8px 4px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.autofwd input { margin-top: 2px; accent-color: #db2777; }
.mailmain { min-width: 0; }
.mail-search { margin: 0 0 8px; }
.bulk { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; }
.chk { display: inline-grid; place-items: center; width: 32px; height: 32px; cursor: pointer; flex: none; }
.chk input { width: 18px; height: 18px; accent-color: #db2777; cursor: pointer; }
.chk i { display: none; }
.bulk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-acts button { border: 0; border-radius: 12px; padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.bulk-acts button:active { transform: scale(0.95); }
.bulk-info { margin-left: auto; color: var(--muted); font-size: 13px; }
.mail[data-folder='spam'] .if-not-spam, .mail:not([data-folder='spam']) .if-spam,
.mail[data-folder='trash'] .if-not-trash, .mail:not([data-folder='trash']) .if-trash { display: none; }
.mail-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.mrow { display: grid; grid-template-columns: 32px 28px minmax(0, 170px) minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 10px 12px 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { background: var(--surface-2); }
.mrow.sel { background: color-mix(in srgb, #db2777 9%, var(--surface)); }
.mrow.open { box-shadow: inset 3px 0 0 #db2777; }
.mrow .star { border: 0; background: none; font-size: 17px; cursor: pointer; filter: grayscale(1) opacity(0.35); padding: 0; }
.mrow .star.on { filter: none; }
.mrow .from { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .subj { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .subj .lbl { padding: 2px 8px; font-size: 11.5px; margin-right: 6px; cursor: default; }
.mrow .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mrow.unread .from, .mrow.unread .when { font-weight: 900; color: var(--text); }
.mrow.unread .subj { color: var(--text); }
.mrow .clip { margin-left: 4px; }
.mail-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-weight: 700; }
.mail-empty span { display: block; font-size: 40px; margin-bottom: 6px; }
.reader { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px; min-width: 0; position: sticky; top: 12px; }
.reader .r-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.reader .r-top .close { margin-left: auto; }
.reader h2 { font-size: 20px; margin: 4px 0 2px; }
.reader .r-from { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; word-break: break-all; }
.reader .r-body { white-space: pre-wrap; font-size: 15.5px; line-height: 1.6; overflow-wrap: anywhere; }
.reader .r-img { display: block; max-width: 100%; border-radius: 14px; margin-top: 14px; border: 1px solid var(--line); }
.reader .r-spam { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #fee2e2; color: #991b1b; font-size: 13px; font-weight: 600; }
.reader .r-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.reader .r-acts a, .reader .r-acts button { border: 0; border-radius: 14px; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; background: var(--surface-2); color: var(--text); text-decoration: none; }
.reader .r-acts .primary { background: linear-gradient(120deg, #fb923c, #db2777); color: #fff; }
.reader .r-fwd { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) {
  .mail, .mail.reading { grid-template-columns: 1fr; }
  .folders { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .fold { border-radius: 999px; padding: 8px 12px; white-space: nowrap; background: var(--surface); box-shadow: var(--shadow); }
  .folders .labels, .folders .autofwd { display: none; }
  .mrow { grid-template-columns: 32px 26px minmax(0, 1fr) auto; }
  .mrow .subj { grid-column: 3 / 5; grid-row: 2; }
  .mail.reading .mailmain, .mail.reading .folders { display: none; }
  .reader { position: static; }
  .bulk-acts span { display: none; }
}

/* All-time flick counter */
.flickstats { margin: 0 0 18px; padding: 20px; border-radius: 26px; color: #fff; background: linear-gradient(125deg, #F97316, #E11D74 55%, #7C3AED); box-shadow: 0 18px 40px -22px rgba(190, 24, 93, .7); display: grid; gap: 14px; }
.fs-hero { display: flex; flex-direction: column; gap: 2px; }
.fs-hero small { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.fs-hero b { font-size: clamp(44px, 11vw, 72px); font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fs-since { font-size: 12px; opacity: .8; }
.fs-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fs-row > div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .16); min-width: 0; }
.fs-row b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fs-row small { font-size: 12px; font-weight: 600; opacity: .9; }
.fs-spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.fs-spark i { flex: 1; border-radius: 4px 4px 2px 2px; background: rgba(255, 255, 255, .55); }
.fs-spark i:last-child { background: #FEF08A; }
@media (max-width: 520px) { .fs-row { grid-template-columns: repeat(2, 1fr); } }
.fs-cost { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .25); }
.fs-cost-h { display: flex; align-items: center; gap: 8px; }
.fs-cost-h b { font-size: 15px; }
.fs-cost-h span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.fs-note { margin: 0; font-size: 12px; line-height: 1.45; opacity: .85; }

.admin .top-r { display: inline-flex; align-items: center; gap: 10px; }
.admin .back { white-space: nowrap; }
@media (max-width: 520px) { .admin .back .wide { display: none; } .admin .top-r { gap: 8px; } }
