/* ================================
   Mine – Global Styles (v1)
   ================================ */

/* Theme tokens */
:root{
  --bg:#0b0f14;
  --surface:#0f1520;
  --card:#111720;
  --border:#1f2937;
  --text:#e6edf3;
  --muted:#9aa4af;
  --accent:#38bdf8;
  --accent-strong:#0ea5e9;
  --ok:#22c55e;
  --danger:#ff3b3b;
  --shadow:0 8px 24px rgba(0,0,0,.35);
}

/* Reset-ish */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* ✅ Utility */
.hidden{ display:none !important; }

/* Layout helpers */
.wrap{max-width: 960px; margin: 40px auto; padding: 0 16px;}
.centered{display:flex; align-items:center; justify-content:center}

/* Header */
header{
  display:flex; align-items:center; justify-content:flex-start;
  gap:14px; margin-bottom:22px;
}
header h1{margin:0; font-size:22px; font-weight:600}
.logo{height:44px; width:auto; display:block}

/* Grid + Cards */
.grid{display:grid; grid-template-columns:1fr; gap:16px}
@media (min-width:760px){ .grid{ grid-template-columns:1fr 1fr } }

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:16px;
  padding:18px;
  box-shadow:var(--shadow);
}
.card h2{margin:0 0 10px; font-size:18px; font-weight:600}

/* Rows / Stacks */
.row{display:flex; align-items:center; justify-content:space-between; gap:12px}
.stack > *{margin:6px 0}

/* Text & chips */
.muted{color:var(--muted)}
.small{font-size:12px; color:var(--muted)}
.balance{font-size:28px; font-weight:700}

.pill{
  padding:6px 10px; border-radius:999px; font-size:12px;
  border:1px solid #243041; background:#0b1220; color:var(--text)
}
.pill.on{ background:#86efac; color:#052e16; border-color:#14532d }
.pill.off{ background:#e5e7eb; color:#3f3f46; border-color:#a1a1aa }

/* Buttons */
.btn{
  border:1px solid #243041; background:#0b1220; color:var(--text);
  padding:10px 14px; border-radius:10px; cursor:pointer;
  transition:border-color .2s ease, background .2s ease, transform .04s ease;
}
.btn:hover{ border-color:#2f3f56 }
.btn:active{ transform:translateY(1px) }

.btn.primary{ border-color:var(--accent-strong) }
.btn.ok{ background:#0b1a11; border-color:#14532d; color:#a7f3d0 }
.btn.danger{ background:#2a1212; border-color:#7f1d1d; color:#fecaca }

/* Sign-out ids (support both spellings) */
#signOutBtn, #signout-btn{
  border:1px solid #243041; background:#0b1220; color:var(--text);
  padding:10px 14px; border-radius:10px; cursor:pointer;
}

/* Avatar */
#avatar{ width:56px; height:56px; border-radius:50%; display:none }

/* Inputs / toggles */
.switch{display:flex; align-items:center; gap:10px}
input[type="checkbox"]{ width:18px; height:18px; accent-color:var(--accent-strong) }

/* Footer */
footer{ margin-top:18px; display:flex; justify-content:flex-end }

/* Index (login) helpers */
.login-container{
  min-height:100vh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center; padding:24px;
}
.login-title{ font-size:22px; font-weight:600; margin:16px 0 24px }
.login-btn{
  background:#4285f4; color:#fff; border:none; border-radius:8px;
  padding:12px 24px; font-size:16px; cursor:pointer; transition:background .25s ease;
}
.login-btn:hover{ background:#357ae8 }

/* Links */
a{color:var(--accent)}
a.muted{text-decoration:none; color:var(--muted)}
a:hover{text-decoration:underline}

/* Accessibility focus */
:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:6px
}

/* ==========================================================
   Frosted Admin Theme (scoped) — does not affect other pages
   ========================================================== */

body.frosted-admin{
  background:
    radial-gradient(1100px 520px at 20% -10%, rgba(14,165,233,0.18), transparent 55%),
    radial-gradient(900px 520px at 90% 10%, rgba(15,23,42,0.10), transparent 60%),
    #f5f7fb;
  color:#0f172a;
}

body.frosted-admin .muted{ color: rgba(15,23,42,0.60); }
body.frosted-admin .mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

body.frosted-admin .mine-shell{
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 22px;
  padding: 18px 18px 8px;
  box-shadow: 0 18px 55px rgba(15,23,42,0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.frosted-admin .mine-shell__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

body.frosted-admin .mine-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 260px;
}

/* ✅ Make Admin logo block match Brand Dashboard logo block */
body.frosted-admin .mine-logo-block{
  width:72px;
  height:72px;
  border-radius:18px;
  display:block;
  background: radial-gradient(circle at 30% 0, #e0f2fe 0, #020617 60%, #000000 100%);
  padding: 0;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(226, 232, 240, 0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

body.frosted-admin .mine-logo-block img{
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: none;
}

body.frosted-admin .mine-title{
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body.frosted-admin .mine-subtitle{
  font-size: 13px;
  margin-top: 3px;
}

body.frosted-admin .mine-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Buttons (admin scoped) */
body.frosted-admin .btn{
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.85);
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

body.frosted-admin .btn:hover{
  border-color: rgba(14,165,233,0.35);
  box-shadow: 0 12px 26px rgba(15,23,42,0.10);
}

body.frosted-admin .btn:active{ transform: translateY(1px); }

body.frosted-admin .btn.primary{
  background: linear-gradient(180deg, rgba(14,165,233,0.16), rgba(14,165,233,0.10));
  border-color: rgba(14,165,233,0.40);
}

body.frosted-admin .btn.ghost{
  background: rgba(255,255,255,0.55);
}

/* ✅ Disabled buttons (admin scoped) */
body.frosted-admin .btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Cards / panels */
body.frosted-admin .panel{
  margin-top: 14px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 38px rgba(15,23,42,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.frosted-admin .panel__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

body.frosted-admin .panel__title{
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.frosted-admin .panel__subtitle{
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
}

body.frosted-admin .kvs{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 14px;
  font-size: 13px;
  margin-top: 10px;
}

body.frosted-admin .kvs .k{ color: rgba(15,23,42,0.60); }
body.frosted-admin .kvs .v{ color: #0f172a; }

body.frosted-admin .btn-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top: 12px;
}

body.frosted-admin .divider{
  height:1px;
  background: rgba(15,23,42,0.10);
  margin: 14px 0;
}

body.frosted-admin .txList{
  display:flex;
  flex-direction:column;
  gap:8px;
}

body.frosted-admin .tx{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.08);
}

body.frosted-admin .tx span{ font-size: 13px; }

body.frosted-admin .hint{
  margin-top: 10px;
  font-size: 12px;
}

/* Notices */
body.frosted-admin .notice{
  display:flex;
  gap:12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 10px 28px rgba(15,23,42,0.08);
}

body.frosted-admin .notice__icon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.10);
}

body.frosted-admin .notice__title{
  font-weight: 700;
  margin-bottom: 2px;
}

body.frosted-admin .notice.ok{
  border-color: rgba(34,197,94,0.25);
}

body.frosted-admin .notice.warn{
  border-color: rgba(245,158,11,0.30);
}

body.frosted-admin .notice.err{
  border-color: rgba(239,68,68,0.30);
}

/* ==========================================================
   Phase 1.8 — Admin payout breakdown table + badges (scoped)
   ========================================================== */

body.frosted-admin .tableWrap{
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.60);
}

body.frosted-admin table.miniTable{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px; /* keeps columns readable */
}

body.frosted-admin table.miniTable th,
body.frosted-admin table.miniTable td{
  padding: 10px 12px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
  white-space: nowrap;
}

body.frosted-admin table.miniTable thead th{
  text-align: left;
  color: rgba(15,23,42,0.65);
  font-weight: 700;
  background: rgba(255,255,255,0.65);
}

body.frosted-admin table.miniTable tr:last-child td{
  border-bottom: none;
}

body.frosted-admin .right{ text-align: right; }

body.frosted-admin .badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.75);
}

body.frosted-admin .badge.pending{
  border-color: rgba(245,158,11,0.35);
}

body.frosted-admin .badge.cleared{
  border-color: rgba(34,197,94,0.35);
}

body.frosted-admin .badge.failed{
  border-color: rgba(239,68,68,0.35);
}
