/* ===== ROOT & RESET ===== */
:root {
  --bg: #f0fdf4;
  --bg-card: #ffffff;
  --dark: #0f172a;
  --green: #22c55e;
  --green-light: #dcfce7;
  --blue: #38bdf8;
  --blue-light: #e0f2fe;
  --yellow: #fde047;
  --yellow-light: #fefce8;
  --red: #f87171;
  --red-light: #fee2e2;
  --purple: #c084fc;
  --purple-light: #f3e8ff;
  --border: 3px solid #0f172a;
  --shadow: 4px 4px 0px #0f172a;
  --shadow-md: 6px 6px 0px #0f172a;
  --shadow-lg: 8px 8px 0px #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(34,197,94,.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(56,189,248,.07) 0%, transparent 50%);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.site-header {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 #0f172a;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}
.logo-icon {
  width: 2.4rem;
  height: 2.4rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--dark);
  color: white;
  transition: all 0.15s;
}
.logo:hover .logo-icon {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--dark);
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.logo-accent { color: var(--green); }

.main-nav {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--dark);
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active {
  background: var(--green-light);
  border-color: var(--dark);
  box-shadow: 2px 2px 0 var(--dark);
  transform: translate(-1px,-1px);
}
.nav-icon { width: 1rem; height: 1rem; }

.header-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.guest-actions { display: flex; gap: 0.5rem; }
.user-actions { display: flex; align-items: center; gap: 0.6rem; }
.hidden { display: none !important; }

.coin-badge {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  border: 2px solid var(--dark);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 2px 2px 0 var(--dark);
}
.avatar-btn, .logout-btn {
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 2px 2px 0 var(--dark);
}
.avatar-btn { background: var(--blue-light); }
.avatar-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--dark); }
.logout-btn { background: var(--red-light); color: #dc2626; }
.logout-btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #dc2626; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.12s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.2) 0%, transparent 100%);
  pointer-events: none;
}
.btn:hover:not(:disabled) { transform: translate(-2px,-2px); box-shadow: var(--shadow-md); }
.btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--dark); transition-duration: 0.05s; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: var(--shadow); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.82rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-green { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; border-color: #15803d; }
.btn-blue  { background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: #fff; border-color: #0284c7; }
.btn-yellow { background: linear-gradient(135deg, #fde047, #facc15); color: var(--dark); }
.btn-red { background: var(--red-light); color: #b91c1c; border-color: #b91c1c; }
.btn-outline { background: #fff; color: var(--dark); }
.mt-2 { margin-top: 0.5rem; }

/* ===== FORMS ===== */
.brutal-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all 0.15s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.04);
}
.brutal-input:focus {
  box-shadow: 4px 4px 0 var(--green), inset 0 2px 4px rgba(0,0,0,.04);
  transform: translate(-2px,-2px);
  border-color: var(--green);
}
.brutal-input:disabled { background: #f1f5f9; cursor: not-allowed; opacity: 0.7; }
.brutal-input.error { border-color: #dc2626; box-shadow: 3px 3px 0 #dc2626; }
.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: #94a3b8;
  pointer-events: none;
}
.input-with-icon { padding-left: 2.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-weight: 700; font-size: 0.9rem; }
.form-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label-lg { font-weight: 700; font-size: 1rem; }
.req { color: #dc2626; }
.space-y-4 > * + * { margin-top: 1rem; }

/* ===== ALERTS ===== */
.alert {
  padding: 0.75rem 1rem;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
}
.alert-error   { background: var(--red-light);  border-color: #dc2626; color: #b91c1c; }
.alert-success { background: var(--green-light); border-color: #16a34a; color: #15803d; }
.alert-info    { background: var(--blue-light);  border-color: #0284c7; color: #0369a1; }

/* ===== CARDS ===== */
.brutal-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative;
}
.brutal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255,255,255,.6) 0%, transparent 60%);
  pointer-events: none;
}
.p-6 { padding: 1.5rem; }
.green-light  { background: var(--green-light)  !important; }
.blue-light   { background: var(--blue-light)   !important; }
.yellow-light { background: var(--yellow-light) !important; }

/* ===== PAGE TITLE ICONS ===== */
.page-title-icon {
  width: 2.8rem;
  height: 2.8rem;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 3px 3px 0 var(--dark);
  flex-shrink: 0;
}
.page-title-icon.green-icon  { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }
.page-title-icon.blue-icon   { background: linear-gradient(135deg, #38bdf8, #0ea5e9); color: white; }
.page-title-icon.purple-icon { background: linear-gradient(135deg, #c084fc, #9333ea); color: white; }

/* ===== PAGES ===== */
.app-main { flex: 1; padding: 1.5rem 1rem; }
.page { display: none; }
.page.active { display: block; }
.page-container { max-width: 1100px; margin: 0 auto; }

/* ===== AUTH MAIN (multi-page) ===== */
.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 1rem;
  min-height: calc(100vh - 70px);
  position: relative;
}
.auth-main .auth-bg-deco {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(34,197,94,.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(56,189,248,.1) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}
.auth-main .auth-card { z-index: 1; }
.page-title {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.page-title h1 { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.page-subtitle { font-weight: 500; opacity: 0.7; margin-top: 0.2rem; font-size: 0.9rem; }

/* ===== GUEST BANNER ===== */
.guest-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--blue-light);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.guest-banner-btns {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

/* ===== AUTH ===== */
.auth-page {
  justify-content: center;
  align-items: flex-start;
  padding: 2.5rem 1rem;
  min-height: calc(100vh - 70px);
  position: relative;
}
.auth-page.active { display: flex; }

.auth-bg-deco {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(34,197,94,.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(56,189,248,.1) 0%, transparent 45%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg), 0 20px 60px rgba(0,0,0,.1);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: cardIn 0.3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes cardIn {
  from { transform: translateY(24px) scale(0.96); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.auth-card-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: left;
  border-bottom: var(--border);
  position: relative;
  overflow: hidden;
}
.auth-card-header::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
}
.auth-card-header.green-bg { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.auth-card-header.blue-bg  { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }

.auth-logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.auth-logo-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: 2.5px solid var(--dark);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--dark);
  flex-shrink: 0;
}
.auth-card-header h2 { font-size: 1.6rem; font-weight: 800; margin: 0; line-height: 1.2; }
.auth-card-header p  { font-weight: 500; opacity: 0.7; margin-top: 0.25rem; font-size: 0.88rem; }
.auth-form { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.auth-switch { text-align: center; font-weight: 600; font-size: 0.9rem; color: #64748b; }
.auth-switch a { color: #16a34a; text-decoration: underline; }

/* ===== ORDER PAGE ===== */
.order-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.order-form-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; }

.provider-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.provider-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 2px 2px 0 var(--dark);
}
.provider-tab:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--dark); }
.provider-tab.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 3px 3px 0 var(--dark);
}
.prov-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--dark); flex-shrink: 0; }
.prov-dot.green { background: var(--green); }
.prov-dot.blue  { background: var(--blue);  }

.category-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cat-pill {
  padding: 0.3rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid var(--dark);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: all 0.12s;
  box-shadow: 2px 2px 0 var(--dark);
}
.cat-pill:hover, .cat-pill.active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 2px 2px 0 var(--dark);
  transform: translate(-1px,-1px);
}

/* Custom select */
.cselect { position: relative; }
.cselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.cselect__trigger:hover { transform: translate(-1px,-1px); box-shadow: var(--shadow-md); }
.cselect__arrow { width: 1.1rem; height: 1.1rem; transition: transform 0.2s; flex-shrink: 0; }
.cselect.open .cselect__arrow { transform: rotate(180deg); }
.cselect__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 50;
  max-height: 320px;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.cselect.open .cselect__dropdown { display: flex; }
.cselect__search {
  position: relative;
  padding: 0.6rem;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.cselect__search-icon {
  position: absolute;
  left: 1rem; top: 50%;
  transform: translateY(-50%);
  width: 1rem; height: 1rem;
  color: #94a3b8;
  pointer-events: none;
}
.cselect__search input {
  width: 100%;
  padding: 0.4rem 0.5rem 0.4rem 2rem;
  border: 2px solid var(--dark);
  border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  outline: none;
}
.cselect__list { overflow-y: auto; flex: 1; }
.cselect__list::-webkit-scrollbar { width: 8px; }
.cselect__list::-webkit-scrollbar-track { background: #f1f5f9; }
.cselect__list::-webkit-scrollbar-thumb { background: var(--dark); border-radius: 4px; }
.cselect__option {
  padding: 0.7rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.1s;
}
.cselect__option:last-child { border-bottom: none; }
.cselect__option:hover { background: #f8fafc; }
.cselect__option.selected { background: var(--green-light); }
.opt-name { font-weight: 700; font-size: 0.92rem; display: flex; align-items: flex-start; gap: 0.4rem; }
.opt-id { background: #e2e8f0; border: 1px solid #cbd5e1; padding: 0 0.3rem; border-radius: 4px; font-size: 0.75rem; flex-shrink: 0; margin-top: 1px; }
.opt-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.opt-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
}
.opt-tag.price { background: #f0fdf4; border-color: var(--green); color: #15803d; margin-left: auto; }
.placeholder { opacity: 0.5; }

.service-info-box {
  background: linear-gradient(135deg, var(--blue-light), #f0f9ff);
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  box-shadow: 3px 3px 0 var(--dark);
}
.service-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.sinfo-item { text-align: center; }
.sinfo-label { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.6; margin-bottom: 0.2rem; }
.sinfo-val { font-weight: 800; font-size: 0.95rem; color: #0369a1; }

.qty-hint { font-size: 0.82rem; font-weight: 600; color: #6b7280; margin-top: 0.3rem; }

.price-calc-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--yellow-light), #fef9c3);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 4px 4px 0 var(--dark);
}
.price-calc-label { font-size: 0.85rem; font-weight: 700; opacity: 0.7; }
.price-calc-val {
  font-size: 1.9rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.coin-inline-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: #b45309;
  flex-shrink: 0;
}

.order-info-panel { display: flex; flex-direction: column; gap: 1rem; }
.info-card { padding: 1.2rem; }
.info-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem; }
.inline-icon { width: 1rem; height: 1rem; }
.info-list { display: flex; flex-direction: column; gap: 0.5rem; padding: 0; list-style: none; }
.info-list li { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.85rem; font-weight: 500; }
.check-icon { width: 1rem; height: 1rem; color: #16a34a; flex-shrink: 0; margin-top: 1px; }
.warn-icon  { width: 1rem; height: 1rem; color: #d97706; flex-shrink: 0; margin-top: 1px; }
.balance-display {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== HISTORY PAGE ===== */
.history-table-wrap { overflow-x: auto; }
.history-table {
  width: 100%;
  border-collapse: collapse;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.history-table th {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
}
.history-table td {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: #f8fafc; }
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid;
}
.status-Pending     { background: #fefce8; border-color: #ca8a04; color: #854d0e; }
.status-Processing  { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }
.status-In-progress { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.status-Completed   { background: #dcfce7; border-color: #16a34a; color: #166534; }
.status-Partial     { background: #fff7ed; border-color: #ea580c; color: #9a3412; }
.status-Canceled    { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.status-Refunded    { background: #f3e8ff; border-color: #9333ea; color: #6b21a8; }
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}
.empty-state svg { width: 3rem; height: 3rem; margin: 0 auto 1rem; display: block; opacity: 0.5; }
.loading-state { text-align: center; padding: 3rem; color: #94a3b8; display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-weight: 600; }
.spin-icon { width: 1.2rem; height: 1.2rem; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PROFILE PAGE ===== */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
.profile-card { padding: 1.5rem; text-align: center; }
.profile-avatar {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  border: var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow);
}
.prof-username { color: #64748b; font-weight: 600; font-size: 0.9rem; margin-top: 0.2rem; }
.coin-display {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--yellow), #f59e0b);
  border: 2px solid var(--dark);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0.75rem 0;
  box-shadow: 3px 3px 0 var(--dark);
}
.coin-label { font-size: 0.8rem; font-weight: 600; opacity: 0.7; }
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid #e2e8f0;
}
.profile-main { display: flex; flex-direction: column; gap: 1rem; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toast {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 260px;
  max-width: 360px;
  font-weight: 600;
  font-size: 0.9rem;
  animation: toastIn 0.25s cubic-bezier(.34,1.56,.64,1);
}
.toast.success { border-left: 5px solid #16a34a; }
.toast.error   { border-left: 5px solid #dc2626; }
.toast.info    { border-left: 5px solid #0284c7; }
@keyframes toastIn { from { transform: translateX(100%) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== SELECT CUSTOM STYLE ===== */
select.brutal-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 1.2rem; flex-wrap: wrap; }
.page-num {
  width: 2.2rem; height: 2.2rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--dark);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  background: #fff;
  transition: all 0.1s;
  box-shadow: 2px 2px 0 var(--dark);
}
.page-num:hover { background: var(--green-light); transform: translate(-1px,-1px); }
.page-num.active { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; }

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-info-panel { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .form-two-col { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .service-info-grid { grid-template-columns: repeat(2,1fr); }
  .history-table th, .history-table td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
  .guest-banner { flex-direction: column; align-items: flex-start; }
  .guest-banner-btns { margin-left: 0; }

  /* Compact header */
  .header-inner { padding: 0.45rem 0.8rem; gap: 0.5rem; }
  .logo-text { font-size: 1.05rem; }
  .logo-icon { width: 2.1rem; height: 2.1rem; }
  .coin-badge { padding: 0.25rem 0.55rem; font-size: 0.82rem; gap: 0.25rem; }
  .avatar-btn, .logout-btn { width: 1.9rem; height: 1.9rem; }
  .guest-actions { gap: 0.35rem; }
  .guest-actions .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.78rem; box-shadow: 2px 2px 0 #0f172a; }
  .guest-actions .btn-text { display: none; } /* hide text labels on very small screens */

  /* Bottom nav visible on mobile */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 3.8rem;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: var(--border);
    box-shadow: 0 -4px 0 #0f172a;
    z-index: 90;
  }
  .mbnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.4rem 0.3rem;
    text-decoration: none;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.62rem;
    letter-spacing: 0.01em;
    border-right: 2px solid #e2e8f0;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
  }
  .mbnav-item:last-child { border-right: none; }
  .mbnav-item svg { width: 1.25rem; height: 1.25rem; transition: transform 0.15s; }
  .mbnav-item.active {
    color: #15803d;
    background: linear-gradient(180deg, #f0fdf4, #dcfce7);
  }
  .mbnav-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 0 0 4px 4px;
  }
  .mbnav-item.active svg { transform: scale(1.1); }
  .mbnav-item:active { background: #f0fdf4; }

  /* Push content up above bottom nav */
  .app-main   { padding-bottom: 4.8rem; }
  .auth-main  { padding-bottom: 1.5rem; }
}

@media (max-width: 480px) {
  .auth-card { border-radius: var(--radius); }
  .page-title h1 { font-size: 1.25rem; }
  .auth-main { padding: 1.5rem 0.75rem; }
  .header-inner { padding: 0.4rem 0.7rem; }
}

/* ===== DEPOSIT / TOP-UP ===== */
.input-prefix {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: .9rem;
  color: #64748b;
  pointer-events: none;
}
.input-with-prefix { padding-left: 2.4rem !important; }

.deposit-calc-card { display: flex; flex-direction: column; gap: .75rem; }

.deposit-breakdown {
  background: #f8fafc;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .25rem;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  color: #475569;
}
.breakdown-val { font-weight: 600; color: var(--dark); }
.fee-row .breakdown-val { color: #dc2626; }
.total-row {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: .4rem;
  margin-top: .2rem;
  font-size: .95rem;
}
.total-val { font-size: 1rem; color: #16a34a !important; }

/* QR Display */
.deposit-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  background: #f8fafc;
  border: 2.5px solid var(--dark);
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--dark);
}
.qr-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qr-badge {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--dark);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .7rem;
  border-radius: 999px;
}
.qr-expiry { font-size: .8rem; color: #94a3b8; font-weight: 600; }
.qr-image {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  background: #fff;
}
.qr-info {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
}
.qr-info-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: #475569;
}
.qr-coins-val { font-weight: 700; color: #b45309; }
.qr-total-row {
  border-top: 1.5px dashed #cbd5e1;
  padding-top: .35rem;
  margin-top: .15rem;
  font-size: .95rem;
  color: var(--dark);
}

/* Status badge */
.qr-status-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 700;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  border: 2px solid;
}
.qr-status-badge.pending { background: #fef9c3; border-color: #ca8a04; color: #92400e; }
.qr-status-badge.paid    { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.qr-status-badge.expired { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.spin-icon { animation: spin .8s linear infinite; width: 1rem; height: 1rem; }

/* ===== WA CHANNEL PREVIEW ===== */
.channel-preview {
  margin-top: .6rem;
}
.ch-loading {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 600;
  color: #64748b;
  padding: .6rem .85rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
}
.spin-anim { width: .95rem; height: .95rem; animation: spin .8s linear infinite; flex-shrink: 0; }

/* Channel card — clean pill-style */
.ch-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #16a34a;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 #16a34a;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
/* subtle WA-green left accent bar */
.ch-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #22c55e, #15803d);
  border-radius: var(--radius) 0 0 var(--radius);
}

.ch-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--dark);
  flex-shrink: 0;
  background: #e2e8f0;
  box-shadow: 2px 2px 0 var(--dark);
}
.ch-avatar-placeholder {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  border: 2.5px solid var(--dark);
  flex-shrink: 0;
  background: linear-gradient(135deg, #22c55e, #15803d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  box-shadow: 2px 2px 0 var(--dark);
}
.ch-info {
  flex: 1;
  min-width: 0;
}
.ch-label {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .66rem;
  font-weight: 700;
  color: #15803d;
  background: #bbf7d0;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: .1rem .45rem;
  margin-bottom: .25rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.ch-name {
  font-weight: 800;
  font-size: .9rem;
  color: var(--dark);
  line-height: 1.3;
  /* allow 2 lines on mobile, truncate after */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ch-followers {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .76rem;
  font-weight: 700;
  color: #15803d;
  margin-top: .3rem;
}
.ch-followers-icon {
  width: .8rem;
  height: .8rem;
  flex-shrink: 0;
  opacity: .8;
}
.ch-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--dark);
  box-shadow: 1px 1px 0 var(--dark);
  align-self: flex-start;
  margin-top: .2rem;
}
.ch-dot.green { background: #22c55e; }
.ch-dot.gray  { background: #94a3b8; }

.ch-error {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 600;
  color: #b91c1c;
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
}

/* ===== DEPOSIT PAGE ===== */
.deposit-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.dbb-left { display: flex; align-items: center; gap: .75rem; }
.dbb-label { font-size: .8rem; font-weight: 600; opacity: .65; }
.dbb-val { font-size: 1.15rem; font-weight: 800; color: #b45309; }

.deposit-step {}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--dark);
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  border-radius: 50%;
  margin-right: .5rem;
  flex-shrink: 0;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.qa-btn {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: .8rem;
  padding: .5rem .3rem;
  cursor: pointer;
  transition: all .15s;
  color: var(--dark);
}
.qa-btn:hover { border-color: var(--dark); background: #f0fdf4; }
.qa-btn.active { background: var(--dark); color: #fff; border-color: var(--dark); }
@media (max-width: 480px) {
  .quick-amounts { grid-template-columns: repeat(2, 1fr); }
}

.deposit-note {
  font-size: .78rem;
  color: #64748b;
  margin-top: .75rem;
  line-height: 1.5;
}

/* QR Step */
.qr-center-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.qr-img-wrap { position: relative; display: inline-block; }
.qr-image-lg {
  width: 240px;
  height: 240px;
  object-fit: contain;
  border: 3px solid var(--dark);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 4px 4px 0 var(--dark);
  display: block;
}
.qr-countdown {
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem .65rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  letter-spacing: .05em;
  min-width: 60px;
  text-align: center;
}

.payment-details-card {
  width: 100%;
  max-width: 300px;
  background: #f8fafc;
  border: 2px solid var(--dark);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.pd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .9rem;
  font-size: .875rem;
  border-bottom: 1px solid #e2e8f0;
}
.pd-row:last-child { border-bottom: none; }
.pd-label { color: #64748b; font-weight: 600; }
.pd-val { font-weight: 700; color: var(--dark); }
.coins-val { color: #b45309; }
.fee-val { color: #dc2626; }
.pd-total { background: #f0fdf4; }

/* Pay status */
.pay-status {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 2px solid;
  width: 100%;
  max-width: 340px;
}
.pay-status svg { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.pay-status-title { font-weight: 800; font-size: .9rem; }
.pay-status-sub { font-size: .78rem; opacity: .7; margin-top: .1rem; }
.pay-status.pending { background: #fef9c3; border-color: #ca8a04; color: #92400e; }
.pay-status.paid    { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.pay-status.expired,
.pay-status.failed  { background: #fee2e2; border-color: #dc2626; color: #991b1b; }

.qr-action-btns {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Deposit history rows */
.deposit-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
  border-bottom: 1px solid #e2e8f0;
  gap: .5rem;
}
.deposit-history-row:last-child { border-bottom: none; }
.dhr-amount { font-weight: 800; font-size: .9rem; color: var(--dark); }
.dhr-meta { font-size: .75rem; color: #64748b; margin-top: .1rem; }

/* Status badges */
.status-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1.5px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-pending  { background: #fef9c3; border-color: #ca8a04; color: #92400e; }
.badge-paid     { background: #dcfce7; border-color: #16a34a; color: #14532d; }
.badge-expired,
.badge-failed   { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
