:root {
  --bg-main: #090e13;
  --bg-card: #111822;
  --bg-subcard: #0b1017;
  --border-card: #1c2836;
  --accent: #00df82;
  --accent-text: #000000;
  --accent-soft: rgba(0, 223, 130, 0.15);
  --accent-border: rgba(0, 223, 130, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  background-color: var(--bg-main);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}
a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; min-width: 0; max-width: 100%; box-sizing: border-box; }

.app-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  border-left: 1px solid var(--border-card);
  border-right: 1px solid var(--border-card);
  padding-bottom: 84px;
  position: relative;
}
.wide-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px;
  padding-bottom: 60px;
}
@media (min-width: 768px) {
  .wide-shell { padding: 24px; }
}

.topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border-card);
  background: var(--bg-main);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  overflow: hidden;
}
.data-card {
  background: var(--bg-subcard);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 14px;
  width: 100%;
}
.card-lg {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 20px;
  width: 100%;
}

.balance-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-subcard) 100%);
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

/* Buttons & Inputs */
.btn-green {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 13px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.btn-green:active { transform: scale(0.99); opacity: 0.9; }

.btn-outline {
  background: var(--bg-subcard);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-card);
  color: #fff;
  font-size: 13px;
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  display: block;
}
.input:focus { border-color: var(--accent); }

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

/* Badges */
.badge-green { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.badge-cyan { background: rgba(0,229,255,0.15); color: #67e8f9; border: 1px solid rgba(0,229,255,0.35); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.badge-amber { background: rgba(245,158,11,0.16); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }
.badge-rose { background: rgba(244,63,94,0.16); color: #fda4af; border: 1px solid rgba(244,63,94,0.4); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; }

/* Navigation Bars */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-card);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  z-index: 40;
}
.nav-item { background: none; border: none; color: #6d7f94; font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; padding: 4px 10px; border-radius: 10px; }
.nav-item.active { color: var(--accent); font-weight: 700; }

/* Clean Tab Grid */
.admin-tabs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}
@media (min-width: 480px) {
  .admin-tabs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .admin-tabs-grid { grid-template-columns: repeat(6, 1fr); }
}
.admin-tab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  transition: all 0.15s;
}
.admin-tab-card .tab-icon { font-size: 18px; }
.admin-tab-card.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.hidden { display: none !important; }
.space-y > * + * { margin-top: 16px; }
.space-y-sm > * + * { margin-top: 12px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.form-grid, .cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.price-3-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 420px) {
  .price-3-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 720px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; word-break: break-all; overflow-wrap: anywhere; }
.code-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.text-green { color: var(--accent); }
.text-muted { color: #94a3b8; }
.text-xs { font-size: 13px; }
.text-xxs { font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.84); backdrop-filter: blur(5px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.toast { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); z-index: 60; background: #0f172a; border: 1px solid var(--accent); color: #fff; font-size: 13px; font-weight: 600; padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.6); max-width: 92vw; text-align: center; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 0.6s linear infinite; }