/* ─── WatchPay Global Styles ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0a0a0a;
  --surface:  #111111;
  --card:     #1a1a1a;
  --border:   #2a2a2a;
  --green:    #00c97a;
  --green2:   #00b86e;
  --red:      #ef4444;
  --yellow:   #facc15;
  --text:     #f0f0f0;
  --muted:    #666666;
  --radius:   16px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ─── Header ────────────────────────────────────────────────────────────────── */
.wp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
}
.wp-logo { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.wp-header-right { display: flex; align-items: center; gap: 10px; }
.wp-balance-pill {
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.wp-moon {
  width: 36px; height: 36px;
  background: #1e1e1e;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
}

/* ─── Content ───────────────────────────────────────────────────────────────── */
.wp-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 100px;
}
.wp-content::-webkit-scrollbar { width: 0; }

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.wp-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.stat-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.5px;
}
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }

/* ─── Section header ────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  margin-top: 8px;
}
.section-title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(.7); }
}

/* ─── Order card ────────────────────────────────────────────────────────────── */
.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn .4s cubic-bezier(.22,.9,.44,1) both;
}
@keyframes slideIn {
  from { opacity:0; transform:translateY(-14px) scale(.98); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}
.order-amount { font-size: 22px; font-weight: 700; letter-spacing: -.5px; margin-bottom: 4px; }
.order-bonus  { color: #4ade80; font-size: 13px; font-weight: 600; }
.order-timer  { color: var(--yellow); font-size: 12px; font-weight: 600; margin-top: 4px; }
.order-card.expired { opacity: .3; pointer-events: none; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-green {
  background: var(--green2);
  color: #000;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-green:hover  { background: #00a562; }
.btn-green:active { transform: scale(.97); }

.btn-red {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-red:hover { opacity: .85; }

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  font-weight: 600;
  font-size: 13px;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

/* ─── Bottom nav ────────────────────────────────────────────────────────────── */
.wp-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: #000;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 50;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
  text-decoration: none;
  transition: color .15s;
}
.nav-item.active { color: var(--green); }
.nav-icon { font-size: 22px; line-height: 1; }

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.wp-form-group { margin-bottom: 16px; }
.wp-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
.wp-input {
  width: 100%;
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.wp-input:focus { border-color: var(--green); }
.wp-select {
  width: 100%;
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  appearance: none;
}

/* ─── Alerts ────────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; font-weight: 500; }
.alert-success { background: #00c97a22; color: var(--green); border: 1px solid #00c97a44; }
.alert-error   { background: #ef444422; color: #f87171; border: 1px solid #ef444444; }
.alert-info    { background: #3b82f622; color: #60a5fa; border: 1px solid #3b82f644; }

/* ─── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-green   { background: #00c97a22; color: var(--green); }
.badge-yellow  { background: #facc1522; color: var(--yellow); }
.badge-red     { background: #ef444422; color: #f87171; }
.badge-gray    { background: #33333366; color: var(--muted); }

/* ─── Auth pages ────────────────────────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.auth-box {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 28px;
}
.auth-logo { font-size: 26px; font-weight: 800; letter-spacing: 1px; text-align: center; margin-bottom: 6px; }
.auth-sub  { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 28px; }

/* ─── Admin sidebar ─────────────────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; max-width: 100%; }
.admin-sidebar {
  width: 220px;
  background: #000;
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}
.admin-logo { font-size: 18px; font-weight: 800; padding: 0 20px 24px; color: #fff; border-bottom: 1px solid var(--border); }
.admin-logo span { color: var(--green); }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  margin: 2px 0;
}
.admin-nav-item:hover { background: #1a1a1a; color: var(--text); }
.admin-nav-item.active { background: var(--green-dim, #00c97a22); color: var(--green); border-right: 3px solid var(--green); }
.admin-nav-icon { font-size: 18px; }

.admin-main {
  margin-left: 220px;
  flex: 1;
  padding: 28px 28px 60px;
  background: var(--bg);
  min-height: 100vh;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-title { font-size: 22px; font-weight: 700; }

/* ─── Tables ────────────────────────────────────────────────────────────────── */
.wp-table { width: 100%; border-collapse: collapse; }
.wp-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  letter-spacing: .3px;
}
.wp-table td {
  padding: 14px;
  font-size: 14px;
  border-bottom: 1px solid #1e1e1e;
  vertical-align: middle;
}
.wp-table tr:last-child td { border-bottom: none; }
.wp-table tr:hover td { background: #141414; }

/* ─── Stat grid (admin) ─────────────────────────────────────────────────────── */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.admin-stat-icon { font-size: 28px; margin-bottom: 10px; }
.admin-stat-val  { font-size: 26px; font-weight: 700; color: var(--green); }
.admin-stat-lbl  { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ─── Misc ──────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.text-green { color: var(--green); }
.text-red   { color: #f87171; }
.text-muted { color: var(--muted); }
.text-sm    { font-size: 13px; }
.fw-700     { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-8  { margin-bottom: 8px; }
.info-banner {
  background: #111;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 700px) {
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; }
}
