/* =============================================================
   SB Bots — Portal (login / activate / account / admin)
   Uses the same design language as styles.css.
   ============================================================= */

/* ---------- auth (login / activate / reset) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 460px; background: linear-gradient(180deg, var(--surface), #081127); border: 1.5px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 40px 36px; box-shadow: var(--shadow), var(--glow-blue); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-logo img { height: 58px; }
.auth-card h1 { font-size: 1.7rem; font-weight: 900; text-align: center; letter-spacing: -.4px; }
.auth-card .sub { text-align: center; color: var(--text-soft); margin-top: 10px; line-height: 1.7; font-size: 1.02rem; }
.auth-form { margin-top: 26px; display: grid; gap: 16px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .96rem; }
.auth-row label { display: flex; align-items: center; gap: 8px; color: var(--text-soft); cursor: pointer; }
.auth-row a { color: var(--cyan); font-weight: 700; }
.auth-foot { text-align: center; margin-top: 20px; color: var(--text-muted); font-size: .96rem; }
.auth-foot a { color: var(--cyan); font-weight: 700; }
.auth-msg { border-radius: 12px; padding: 12px 15px; font-size: .96rem; line-height: 1.5; display: none; }
.auth-msg.err { display: block; background: rgba(255,107,125,.12); border: 1px solid rgba(255,107,125,.4); color: #ffb3bd; }
.auth-msg.ok { display: block; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); color: #a7f3d0; }

/* ---------- portal shell (account / admin) ---------- */
.p-top { position: sticky; top: 0; z-index: 50; background: rgba(4,11,26,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border-2); }
.p-top-inner { max-width: 1240px; margin-inline: auto; padding: 16px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.p-brand { display: flex; align-items: center; gap: 14px; }
.p-brand img { height: 46px; }
.p-brand .p-role { font-size: .8rem; font-weight: 800; color: var(--cyan-2); background: rgba(31,116,255,.12); border: 1px solid var(--border-2); padding: 4px 10px; border-radius: 999px; }
.p-actions { display: flex; align-items: center; gap: 12px; }
.p-user { color: var(--text-soft); font-weight: 600; }
.p-main { max-width: 1240px; margin-inline: auto; padding: 34px var(--pad) 70px; }
.p-h { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 900; letter-spacing: -.5px; }
.p-sub { color: var(--text-soft); margin-top: 6px; font-size: 1.05rem; }

/* stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin: 26px 0 34px; }
.p-stat { background: linear-gradient(165deg, rgba(16,34,66,.85), rgba(8,18,38,.85)); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px; }
.p-stat .n { font-size: 2rem; font-weight: 900; color: var(--cyan); }
.p-stat .l { color: var(--text-soft); margin-top: 4px; font-size: 1rem; }

/* status badges */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.amber { color: #f3b843; background: rgba(243,184,63,.12); border: 1px solid rgba(243,184,63,.35); }
.badge.green { color: #34d399; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); }
.badge.blue { color: #4d9bff; background: rgba(31,116,255,.14); border: 1px solid var(--border-2); }
.badge.red { color: #ff6b7d; background: rgba(255,107,125,.12); border: 1px solid rgba(255,107,125,.35); }
.badge.purple { color: #b98cff; background: rgba(150,120,255,.14); border: 1px solid rgba(150,120,255,.35); }
.badge.neutral { color: var(--text-soft); background: rgba(120,160,255,.08); border: 1px solid var(--border); }

/* section head inside portal */
.p-section-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 8px 0 16px; }
.p-section-h h2 { font-size: 1.4rem; font-weight: 800; }

/* order cards (customer) */
.order-list { display: grid; gap: 14px; }
.order-card { background: linear-gradient(180deg, var(--surface), #081127); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; transition: border-color .18s, box-shadow .18s; }
.order-card:hover { border-color: var(--border-2); box-shadow: 0 0 26px rgba(31,116,255,.12); }
.oc-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.oc-num2 { font-weight: 900; font-size: 1.16rem; letter-spacing: .3px; direction: ltr; }
.oc-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: var(--text-soft); font-size: 1rem; }
.oc-meta b { color: var(--white); font-weight: 700; }
.oc-row-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-soft); border: 1.5px dashed var(--border); border-radius: var(--radius-lg); }

/* admin table */
.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.filters input, .filters select { background: rgba(4,10,22,.7); border: 1px solid var(--border-2); border-radius: 12px; padding: 12px 15px; color: var(--text); font-family: inherit; font-size: 1rem; }
.filters input { min-width: 240px; flex: 1; }
.tbl-wrap { overflow-x: auto; border: 1.5px solid var(--border); border-radius: var(--radius-lg); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 820px; }
table.tbl th, table.tbl td { text-align: right; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .98rem; }
table.tbl th { color: var(--text-muted); font-weight: 700; background: rgba(10,24,48,.5); position: sticky; top: 0; }
table.tbl tr:hover td { background: rgba(31,116,255,.05); }
table.tbl .num { direction: ltr; font-weight: 800; }
.tab-btns { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btns button { padding: 10px 18px; border-radius: 11px; border: 1px solid var(--border-2); background: rgba(31,116,255,.06); color: var(--text-soft); font-weight: 700; }
.tab-btns button.active { background: rgba(31,116,255,.16); color: #fff; border-color: var(--cyan); }

/* detail rows */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; margin-top: 18px; }
.detail-item { background: rgba(6,16,34,.55); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.detail-item .k { color: var(--text-muted); font-size: .88rem; }
.detail-item .v { font-weight: 700; margin-top: 4px; }
.timeline { margin-top: 20px; display: grid; gap: 0; }
.tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item::before { content: ''; position: absolute; inset-inline-start: 6px; top: 18px; bottom: -2px; width: 2px; background: var(--border-2); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: none; margin-top: 3px; }
.tl-body .m { font-weight: 700; }
.tl-body .t { color: var(--text-muted); font-size: .86rem; margin-top: 2px; }

/* copyable link box (admin activation link) */
.link-box { display: flex; gap: 8px; margin-top: 12px; }
.link-box input { flex: 1; background: rgba(4,10,22,.7); border: 1px solid var(--border-2); border-radius: 10px; padding: 10px 12px; color: var(--cyan); font-family: monospace; font-size: .86rem; direction: ltr; }

@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  :root { --pad: 18px; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
  .p-top-inner { padding-inline: 18px; }
  .filters input { min-width: 0; }
}
