/* admin.css — Econiq.ai admin pages shared styles */

body { min-height: 100vh; }

/* ── HEADER ──────────────────────────────────── */
.header {
  background: #1e293b;
  padding: .75rem 2rem;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-logo img {
  width: 110px;
  height: auto;
  display: block;
}
.header-divider {
  width: 1px;
  height: 24px;
  background: #334155;
}
.header-title {
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.nav-links          { display: flex; gap: .25rem; margin-left: auto; }
.nav-links a        { color: #94a3b8; text-decoration: none; font-size: .85rem; padding: .3rem .75rem; border-radius: 6px; transition: .1s; }
.nav-links a:hover,
.nav-links a.active { background: #334155; color: #e2e8f0; }

/* ── CONTAINER ───────────────────────────────── */
.container     { max-width: 1400px; margin: 0 auto; padding: 1.5rem 2rem; }

/* ── STAT CARDS ──────────────────────────────── */
.stats-row  { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.stat-card  { background: #1e293b; border: 1px solid #334155; border-radius: 10px; padding: 1rem 1.2rem; }
.stat-card .val { font-size: 1.6rem; font-weight: 700; margin-bottom: .2rem; }
.stat-card .lbl { font-size: .78rem; color: #64748b; }
.stat-card.active   .val { color: #22c55e; }
.stat-card.cooldown .val { color: #eab308; }
.stat-card.banned   .val { color: #ef4444; }
.stat-card.relogin  .val { color: #f97316; }
.stat-card.critical .val { color: #ef4444; }
.stat-card.high     .val { color: #f97316; }
.stat-card.medium   .val { color: #eab308; }
.stat-card.low      .val { color: #22c55e; }

/* ── CARD (panel) ─────────────────────────────── */
.card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.card h2 { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }

/* ── TOOLBAR ─────────────────────────────────── */
.toolbar { display: flex; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.toolbar select,
.toolbar input {
  background: #1e293b; border: 1px solid #334155;
  color: #e2e8f0; padding: .5rem .8rem;
  border-radius: 8px; font-size: .85rem;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .45rem 1rem; border-radius: 8px; border: none;
  cursor: pointer; font-size: .82rem; font-weight: 500;
  transition: .15s;
}
.btn-primary   { background: #0284c7; color: #fff; }
.btn-primary:hover { background: #0369a1; }
.btn-secondary { background: #334155; color: #e2e8f0; }
.btn-secondary:hover { background: #475569; }
.btn-danger    { background: #7f1d1d; color: #fca5a5; }
.btn-danger:hover { background: #991b1b; }
.btn-success   { background: #064e3b; color: #34d399; }
.btn-success:hover { background: #065f46; }
.btn-ghost     { background: #334155; color: #cbd5e1; }
.btn-ghost:hover { background: #475569; }
.btn-sm        { padding: .2rem .6rem; font-size: .75rem; }

/* ── TABLES ──────────────────────────────────── */
table             { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: .6rem 1rem; font-size: .7rem; color: #64748b; text-transform: uppercase; border-bottom: 1px solid #334155; white-space: nowrap; }
td { padding: .6rem 1rem; border-bottom: 1px solid #1e293b55; font-size: .82rem; vertical-align: middle; }
tr:last-child td  { border-bottom: none; }
tr:hover td       { background: #1e293b55; }

/* ── BADGES ──────────────────────────────────── */
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 9999px; font-size: .7rem; font-weight: 600; }
.b-green  { background: #064e3b; color: #34d399; }
.b-red    { background: #450a0a; color: #f87171; }
.b-blue   { background: #0c4a6e; color: #38bdf8; }
.b-yellow { background: #451a03; color: #fbbf24; }
.b-gray   { background: #1e293b; color: #64748b; }

/* Status badges */
.status-badge     { font-size: .72rem; padding: .2rem .5rem; border-radius: 4px; font-weight: 600; }
.status-active    { background: #15803d22; color: #4ade80; border: 1px solid #15803d44; }
.status-cooldown  { background: #92400e22; color: #fbbf24; border: 1px solid #92400e44; }
.status-banned    { background: #7f1d1d22; color: #f87171; border: 1px solid #7f1d1d44; }
.status-needs_relogin { background: #78350f22; color: #fb923c; border: 1px solid #78350f44; }
.status-disabled  { background: #1e293b; color: #64748b; border: 1px solid #334155; }

/* Sub tag */
.sub-tag { display: inline-block; padding: .15rem .5rem; border-radius: .375rem; background: #0c4a6e; color: #7dd3fc; font-size: .7rem; margin: .1rem; }

/* ── FORMS ───────────────────────────────────── */
.form-group              { margin-bottom: 1rem; }
.form-group label        { display: block; font-size: .82rem; color: #94a3b8; margin-bottom: .4rem; }
.form-group input,
.form-group select,
input, select {
  width: 100%; padding: .45rem .75rem;
  background: #0f172a; border: 1px solid #334155;
  border-radius: .375rem; color: #e2e8f0;
  font-size: .85rem; margin-top: .25rem;
}
input:focus, select:focus { outline: none; border-color: #0284c7; }
label { font-size: .8rem; color: #94a3b8; display: block; }

/* ── GRID HELPERS ────────────────────────────── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #1e293b; border: 1px solid #334155;
  border-radius: 12px; padding: 1.75rem;
  width: 520px; max-width: 92vw;
  max-height: 85vh; overflow-y: auto;
}
.modal h3       { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.modal-footer   { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ── MISC ────────────────────────────────────── */
#msg {
  position: fixed; bottom: 1rem; right: 1rem;
  padding: .6rem 1.25rem; border-radius: .5rem;
  font-size: .8rem; display: none; z-index: 300;
}
.key-display {
  font-family: monospace; font-size: .75rem;
  background: #0f172a; padding: .5rem .75rem;
  border-radius: .375rem; border: 1px solid #334155;
  color: #38bdf8; word-break: break-all; margin-top: .5rem;
}
.detail-panel { display: none; background: #0f172a; border-radius: .5rem; padding: 1rem; margin-top: .5rem; }

/* ── ACCOUNT POOL SPECIFIC ───────────────────── */
.accounts-grid  { display: flex; flex-direction: column; gap: .6rem; }
.account-card {
  background: #1e293b; border: 1px solid #334155;
  border-radius: 10px; padding: 1rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
}
.account-card.active        { border-left: 4px solid #22c55e; }
.account-card.cooldown      { border-left: 4px solid #eab308; }
.account-card.banned        { border-left: 4px solid #ef4444; }
.account-card.needs_relogin { border-left: 4px solid #f97316; }
.account-card.disabled      { border-left: 4px solid #475569; opacity: .6; }
.plat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.plat-tokopedia { background: #03AC0B22; }
.plat-shopee    { background: #EE442022; }
.plat-lazada    { background: #0F146D22; }
.plat-tiktok    { background: #FE2C5522; }
.account-info   { flex: 1; }
.account-name   { font-size: .92rem; font-weight: 600; margin-bottom: .2rem; }
.account-meta   { font-size: .78rem; color: #64748b; display: flex; gap: .8rem; flex-wrap: wrap; }
.account-actions{ display: flex; gap: .5rem; flex-wrap: wrap; }
