/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #27ae60;
  --primary-dark: #1e8449;
  --accent: #00cec9;
  --bg-dark: #0a0a1a;
  --bg-card: #2a2a50;
  --bg-sidebar: #0e0e24;
  --text: #e0e0f0;
  --text-muted: #fff;
  --border: #2a2a4a;
  --danger: #ff4757;
  --success: #2ed573;
  --warning: #ffa502;
  --gradient: linear-gradient(135deg, #27ae60, #2ecc71);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --accent-green: #2e7d32;
  --accent-blue: #1565c0;
  --accent-orange: #e65100;
  --accent-pink: #c62828;
  --accent-teal: #00695c;
  --accent-red: #b71c1c;
  --accent-yellow: #f57c00;
  --accent-indigo: #283593;
}

html { scroll-behavior: smooth; font-size: 14px; }
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 14px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--gradient);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.navbar .logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: #fff;
  background-clip: text;
  letter-spacing: 2px;
}

.navbar nav { display: flex; gap: 30px; align-items: center; }

.navbar nav a {
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 600;
  transition: color 0.3s;
}

.navbar nav a:hover { color: var(--text); }

.navbar .nav-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.navbar .nav-actions .btn { white-space: nowrap; flex-shrink: 0; }

.cart-icon {
  position: relative;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s;
}

.cart-icon:hover { color: var(--accent); }

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #e03e4c;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #26b863;
}

.btn-warning {
  background: var(--warning);
  color: #000;
}

.btn-warning:hover {
  background: #e69500;
}

.btn-sm {
  padding: 12px 24px;
  font-size: 1.1rem;
}

/* ===== HERO SECTION ===== */
.hero {
  margin-top: 0;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(39, 174, 96, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(0, 206, 201, 0.1) 0%, transparent 50%);
  animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(5deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions { display: flex; gap: 15px; justify-content: center; }

/* ===== PRODUCTS SECTION ===== */
.products-section {
  margin-top: 70px;
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 25px;
}

.product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  color: #333;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card-top {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.product-image {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(0, 206, 201, 0.15);
  color: #00cec9;
  margin-bottom: 8px;
  width: fit-content;
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #333;
}

.product-card .description {
  color: #888;
  font-size: 0.8rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #00cec9;
  margin-bottom: 10px;
}

.product-buy-btn {
  display: inline-block;
  padding: 10px 30px;
  background: #00cec9;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-buy-btn:hover {
  background: #00b5b0;
  transform: scale(1.05);
}

.product-info-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.product-info-box {
  background: #e8f8f7;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}

.product-info-box .info-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #00cec9;
  margin-bottom: 3px;
}

.product-info-box .info-label {
  font-size: 0.7rem;
  color: #888;
}

/* ===== SUBSCRIPTION CARDS ===== */
.subs-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.sub-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
}

.sub-card-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.sub-card-body {
  padding: 16px 18px;
}

.sub-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.sub-card-col {
  text-align: center;
}

.sub-card-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.sub-card-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.sub-green { color: #2ed573; }
.sub-amber { color: #ffa502; }

.sub-card-progress {
  margin-bottom: 12px;
}

.sub-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 6px;
}

.sub-progress-pct {
  font-weight: 700;
  color: #00cec9;
}

.sub-card-footer {
  text-align: center;
}

.sub-time {
  font-size: 0.8rem;
  color: #888;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ===== PLAN DETAILS ===== */
.plan-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 15px;
}

.plan-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(10, 10, 26, 0.5);
  border-radius: 6px;
  font-size: 0.8rem;
}

.plan-detail-label {
  color: var(--text-muted);
}

.plan-detail-value {
  font-weight: 700;
  font-size: 0.85rem;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== AUTH PAGES ===== */
.auth-container {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-box {
  background: rgba(rgba(255, 255, 255, 0.50));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.93);
  border-radius: var(--radius);
  padding: 28px 30px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgb(76, 70, 49);
  color: #fff;
}

.auth-box h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.auth-box .subtitle {
  color: rgba(255, 255, 255, 3.8);
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.auth-box .form-group label {
  color: rgba(255, 255, 255, 0.9);
}

.auth-box .switch-link {
  color: rgba(255, 255, 255, 0.7);
}

.auth-box .switch-link a {
  color: var(--accent);
}

.auth-box input[type="text"],
.auth-box input[type="password"],
.auth-box input[type="email"],
.auth-box input[type="number"],
.auth-box select,
.auth-box textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.auth-box input::placeholder,
.auth-box textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.auth-box .auto-username {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.auth-box .alert {
  color: #fff;
}

.auth-box small {
  color: rgba(255, 255, 255, 0.6);
}

.auth-box input[type="checkbox"] {
  accent-color: var(--accent);
}

.auth-box .pw-toggle {
  color: rgba(255, 255, 255, 0.6);
}
.auth-box .pw-toggle:hover {
  color: var(--accent);
}

.login-input-icon { position:relative; }
.login-input-icon .input-icon { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:rgba(255,255,255,0.5); font-size:1rem; pointer-events:none; z-index:1; }
.login-input-icon input { padding-left:36px; }

.pw-wrap { position:relative; }
.pw-wrap .pw-toggle { position:absolute; right:12px; top:50%; transform:translateY(-50%); cursor:pointer; font-size:1.1rem; user-select:none; padding:4px; z-index:1; }

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: #ededf21f;
  border: #fff;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.auth-box .btn {
  width: 100%;
  padding: 11px;
  font-size: 0.95rem;
  margin-top: 4px;
}

.auth-box .switch-link {
  text-align: center;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-box .switch-link a {
  color: var(--accent);
  font-weight: 600;
}

.auth-box .switch-link a:hover {
  text-decoration: underline;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: none;
}

.alert-error {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--danger);
  display: block;
}

.alert-success {
  background: rgba(46, 213, 115, 0.1);
  border: 1px solid rgba(46, 213, 115, 0.3);
  color: var(--success);
  display: block;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-layout {
  display: flex;
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.admin-sidebar {
  width: 220px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  top: 70px;
  bottom: 0;
  overflow-y: auto;
}

.admin-sidebar .sidebar-title {
  padding: 0 20px 20px;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 700;
}

.admin-sidebar .nav-item {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1rem;
  font-weight: 600;
}

.admin-sidebar .nav-item:hover {
  background: var(--bg-dark);
  color: var(--text);
}

.admin-sidebar .nav-item.active {
  background: var(--bg-dark);
  color: var(--accent);
  border-right: 3px solid var(--accent);
}

.admin-main {
  flex: 1;
  margin-left: 220px;
  padding: 28px;
}

.admin-header {
  margin-bottom: 30px;
}

.admin-header h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.admin-header p {
  color: var(--text-muted);
  font-size: 1.4rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card[onclick] {
  cursor: pointer;
}
.stat-card[onclick]:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.stat-card .stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Data Table */
.data-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table-wrapper .table-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.data-table-wrapper .table-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 14px 22px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 22px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
}

.data-table tr:hover td {
  background: var(--bg-dark);
}

.data-table .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.data-table .actions button {
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* Admin Panel Sections */
.admin-panel {
  display: none;
  position: relative;
  z-index: 1;
}

.admin-panel.active {
  display: block;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  visibility: hidden;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 35px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow);
}

.modal h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}

/* ===== CART DROPDOWN ===== */
.cart-dropdown {
  position: fixed;
  top: 70px;
  right: 40px;
  width: 360px;
  max-height: 450px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1500;
  overflow: hidden;
  display: none;
}

.cart-dropdown.show {
  display: block;
}

.cart-dropdown .cart-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.05rem;
}

.cart-dropdown .cart-items {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(42, 42, 74, 0.3);
}

.cart-item .item-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item .item-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item .item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
}

.cart-dropdown .cart-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-dropdown .cart-total {
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}

/* ===== NOTIFICATION TOAST ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 24px;
  background: var(--success);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 3000;
  opacity: 0;
  transition: all 0.4s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pending {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

.status-active, .status-completed {
  background: var(--bg-dark);
  color: var(--success);
}

.status-approved {
  background: var(--bg-dark);
  color: var(--success);
  font-weight: 700;
  border: 1px solid var(--border);
}

.status-cancelled, .status-rejected {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger);
}

/* ===== USER DETAIL MODAL ===== */
.user-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.user-detail-item {
  background: var(--bg-dark);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.user-detail-item .detail-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.user-detail-item .detail-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.order-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(42, 42, 74, 0.5);
  font-size: 0.85rem;
}

/* ===== USER SIDEBAR INFO ===== */
.sidebar-user-info {
  padding: 15px 25px 25px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 15px;
}

.sidebar-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 10px;
}

.sidebar-user-name {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-user-balance {
  font-size: 1.2rem;
  color: var(--accent);
}

/* ===== TOP UP BALANCE CARD ===== */
.topup-balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  margin-bottom: 30px;
  color: var(--text);
}

.topup-balance-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.topup-balance-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 5px;
}

/* ===== ACTION BUTTONS ===== */
/* ===== QUICK ACTIONS GRID ===== */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.qa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 8px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.qa-card:active { transform: scale(0.96); }
.qa-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.qa-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,255);
  text-align: center;
}
.qa-browse { background: linear-gradient(135deg, #fff, #fff0); }
.qa-plans { background: linear-gradient(135deg, #fff, #fff0); }
.qa-done { background: linear-gradient(135deg, #fff, #fff0); }
.qa-schedule { background: linear-gradient(135deg, #fff, #fff0); }
.qa-team { background: linear-gradient(135deg, #fff, #fff0); }
.qa-history { background: linear-gradient(135deg, #fff, #fff0); }
.qa-topup { background: linear-gradient(135deg, #fff, #fff0); }
.qa-withdraw { background: linear-gradient(135deg, #fff, #fff0); }
.qa-settings { background: linear-gradient(135deg, #fff, #fff0); }
.qa-circle-green { background: linear-gradient(135deg, #000, #fdb7ff); }
.qa-circle-blue { background: linear-gradient(135deg, var(--primary), var(--accent-indigo)); }
.qa-circle-darkgreen { background: linear-gradient(135deg, #1b5e20, #2e7d32); }
.qa-circle-purple { background: linear-gradient(135deg, #6a1b9a, #8e24aa); }
.qa-circle-orange { background: linear-gradient(135deg, #e65100, #f57c00); }
.qa-circle-pink { background: linear-gradient(135deg, #c62828, #e53935); }
.qa-circle-teal { background: linear-gradient(135deg, #00695c, #00897b); }
.qa-circle-red { background: linear-gradient(135deg, #b71c1c, #d32f2f); }
.qa-circle-dark { background: linear-gradient(135deg, #37474f, #546e7a); }

/* ===== QUICK ICONS ROW ===== */
.quick-icons-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 4px;
}
.qi-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
}
.qi-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  transition: transform 0.15s;
}
.qi-item:active .qi-circle { transform: scale(0.92); }
.qi-label {
  font-size: 0.12rem;
  font-weight: 900;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}
.qi-green { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); }
.qi-blue { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.qi-darkgreen { background: linear-gradient(135deg, var(--accent-green), var(--primary-dark)); }
.qi-purple { background: linear-gradient(135deg, var(--accent-indigo), var(--accent-pink)); }
.qi-orange { background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow)); }
.qi-pink { background: linear-gradient(135deg, var(--accent-pink), var(--accent-red)); }
.qi-teal { background: linear-gradient(135deg, var(--accent-teal), var(--accent-green)); }
.qi-red { background: linear-gradient(135deg, var(--accent-red), var(--accent-orange)); }
.qi-dark { background: linear-gradient(135deg, var(--primary-dark), var(--text-muted)); }
.qi-indigo { background: linear-gradient(135deg, var(--accent-indigo), var(--primary)); }

/* Deposit / Withdraw own section */
.cash-actions-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px 4px;
}
.cash-section-label {
  grid-column: 1 / -1;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0;
}
.cash-actions-grid {
  display: contents;
}
.cash-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  min-width: 0;
}
.cash-item:active .qi-circle,
.cash-item:active .cash-qi-circle { transform: scale(0.92); }
.cash-qi-circle {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  border-radius: 50%;
}

/* ===== MODERN STATS ===== */
.stats-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: var(--bg-card);
  border-radius: 14px;
  border-left: 5px solid var(--accent);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.stat-modern:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.stat-modern:active { transform: scale(0.97); }
.stat-modern-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.stat-modern-info { flex: 1; min-width: 0; }
.stat-modern-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-modern-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-modern-val-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat-modern-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}
.stat-modern-arrow {
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.stat-modern-green { border-left-color: var(--accent-green); }
.stat-modern-green .stat-modern-icon { background: linear-gradient(135deg, var(--accent-green), var(--accent-teal)); }
.stat-modern-purple { border-left-color: var(--accent-indigo); }
.stat-modern-purple .stat-modern-icon { background: linear-gradient(135deg, var(--accent-indigo), var(--accent-pink)); }
.stat-modern-blue { border-left-color: var(--primary); }
.stat-modern-blue .stat-modern-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.stat-modern-orange { border-left-color: var(--accent-orange); }
.stat-modern-orange .stat-modern-icon { background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow)); }
.stat-modern-teal { border-left-color: var(--accent-teal); }
.stat-modern-teal .stat-modern-icon { background: linear-gradient(135deg, var(--accent-teal), var(--accent-green)); }
.stat-modern-violet { border-left-color: var(--accent-indigo); }
.stat-modern-violet .stat-modern-icon { background: linear-gradient(135deg, var(--accent-indigo), var(--primary)); }

/* ===== TRANSACTION CARDS ===== */
.txn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 4px;
}
.txn-filters::-webkit-scrollbar { display: none; }

.txn-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.txn-filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.txn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
}

.txn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.txn-details {
  flex: 1;
  min-width: 0;
}

.txn-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.txn-desc {
  font-size: 0.72rem;
  color: rgb(255, 255, 255);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txn-right {
  text-align: right;
  flex-shrink: 0;
}

.txn-amount {
  font-size: 0.9rem;
  font-weight: 700;
}

.txn-status {
  font-size: 0.68rem;
  font-weight: 600;
  margin-top: 2px;
  text-transform: capitalize;
}

.txn-date {
  font-size: 0.65rem;
  color: #fff;
  opacity: 0.7;
  margin-top: 1px;
}

.txn-cancel-btn {
  margin-top: 4px;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.txn-cancel-btn:hover {
  background: rgba(231, 76, 60, 0.25);
}

/* ===== PANEL BACK BUTTON ===== */
.panel-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}
.panel-back-btn:hover {
  background: var(--primary);
  transform: scale(1.05);
}
.panel-back-btn:active {
  transform: scale(0.95);
}
.admin-header {
  display: flex;
  align-items: center;
}

/* ===== SCHEDULE TABLE GRID ===== */
.schedule-grid {
  border-collapse: collapse;
  width: 100%;
  border: 2px solid #7a8499;
  font-size: 0.8rem;
  table-layout: fixed;
}
.schedule-grid th,
.schedule-grid td {
  border: 1.5px solid #9aa3b5;
  padding: 4px 6px;
  word-break: break-word;
  vertical-align: middle;
  line-height: 1.2;
}
.schedule-grid th {
  background: rgba(0,206,158,0.15);
  color: var(--success);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1.5px solid #7a8499;
  text-align: left;
}
.schedule-grid td {
  color: var(--text);
  font-size: 0.75rem;
}
.schedule-grid td:nth-child(1) { text-align: left; }
.schedule-grid td:nth-child(2) { text-align: left; font-weight: 600; color: var(--accent); }
.schedule-grid td:nth-child(3) { text-align: left; }
.schedule-grid td:nth-child(4) { text-align: left; }
.schedule-grid td:nth-child(5) { text-align: left; font-weight: 600; color: var(--accent); }
.schedule-grid tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}
.schedule-grid tr:hover td {
  background: var(--bg-dark);
}
.modal .schedule-grid {
  table-layout: auto;
}
.modal .schedule-grid td {
  word-break: break-word;
}
.modal .schedule-grid th {
  background: var(--bg-dark);
  color: var(--accent);
  border: 1.5px solid #7a8499;
}
.modal .schedule-grid td:nth-child(2),
.modal .schedule-grid td:nth-child(5) {
  font-weight: 600;
  color: var(--accent);
}
@media (max-width: 480px) {
  .schedule-grid th { font-size: 0.55rem; padding: 3px 3px; }
  .schedule-grid td { font-size: 0.6rem; padding: 3px 3px; }
}

/* ===== PLAN TIMELINE BAR ===== */
.plan-timeline {
  width: 100%;
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.plan-timeline-bar {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ===== STEP INDICATOR ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 25px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-circle.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.step-circle.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.step-line {
  width: 30px;
  height: 2px;
  background: var(--border);
  flex-shrink: 0;
}

/* ===== FORM STEP ===== */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(15px); }
  to { opacity: 1; transform: translateX(0); }
}

.step-label {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
  text-align: center;
}

.step-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ===== CONFIRM CARD ===== */
.confirm-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 15px;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(42, 42, 74, 0.4);
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.confirm-value {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

/* ===== ALERTS ===== */
.alerts-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.alerts-bell:hover { background: rgba(255, 183, 77, 0.12); }

.alerts-bell-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger, #e74c3c);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alerts-bell-badge[hidden] { display: none; }

.nav-count-badge {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 9px;
  background: #e74c3c;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.nav-count-badge[hidden] { display: none; }

.alerts-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.alerts-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.alerts-control select {
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
}

.alert-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}

.alert-row:last-child { border-bottom: none; }

.alert-unread {
  background: rgba(255, 183, 77, 0.07);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.alert-icon { font-size: 1.3rem; line-height: 1.2; flex-shrink: 0; }

.alert-body { flex: 1; min-width: 0; }

.alert-title { font-weight: 700; font-size: 0.92rem; color: var(--text); }

.alert-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 3px;
  word-break: break-word;
}

.alert-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e74c3c;
  vertical-align: middle;
}

.alert-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.alert-time { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }

.alert-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
.mobile-bottom-nav { display: none; }
@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 6px 0 env(safe-area-inset-bottom, 8px);
    z-index: 9999;
    height: 60px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    flex: 1;
    text-align: center;
  }
  .mobile-nav-item svg { flex-shrink: 0; }
  .mobile-nav-item.active {
    color: var(--accent);
  }
  .mobile-nav-item:active {
    background: var(--bg-dark);
  }
  .admin-main { padding-bottom: 70px; }
  .navbar { padding: 0 8px; height: auto; min-height: 54px; background: var(--gradient); }
  .navbar nav { display: none; }
  .navbar .logo { font-size: 1rem; gap: 6px; background: none; -webkit-text-fill-color: #fff; color: #fff; min-width: 0; overflow: hidden; }
  .navbar .logo img { width: 22px; height: 22px; }
  #nav-user-id { max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; color: var(--text) !important; -webkit-text-fill-color: var(--text) !important; font-size: 0.95rem !important; font-weight: 800 !important; }
  #nav-user-today { max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block !important; color: var(--text-muted) !important; -webkit-text-fill-color: var(--text-muted) !important; font-size: 0.7rem !important; font-weight: 700 !important; }
  .nav-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: transparent;
    border: 2px dashed var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    box-sizing: border-box;
  }
  .nav-user-avatar.has-logo {
    background: var(--primary);
    border: 2px solid transparent;
    color: #fff;
  }
  .nav-user-avatar.has-logo .nav-avatar-upload-hint,
  .nav-user-avatar.has-logo #nav-initials { display: none !important; }
  .nav-avatar-upload-hint { font-size: 0.65rem; line-height: 1; pointer-events: none; }
.nav-user-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.nav-ref-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--bg-dark);
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.nav-ref-code:hover { background: var(--accent); color: #fff; }
  #user-name { display: none; }
  .navbar .nav-actions .btn { padding: 4px 8px; font-size: 0.7rem; white-space: nowrap; }
  .navbar .nav-actions { gap: 4px; }
  .theme-toggle { padding: 2px 4px !important; font-size: 0.85rem !important; max-width: 34px; min-width: 34px; height: 28px; border-radius: 8px; text-align: center; flex-shrink: 0; }
  #nav-balance { font-size: 0.65rem; margin-right: 0 !important; display: none; }
  .nav-pending-badge { display: none; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .products-grid { grid-template-columns: 1fr; }
  .product-card-top { flex-direction: column; align-items: center; text-align: center; }
  .product-image { width: 120px; height: 120px; }
  .product-info { align-items: center; }
  .product-buy-btn { width: 100%; }
  .auth-box { padding: 25px 20px; }
  .user-detail-grid { grid-template-columns: 1fr; }
  .order-item { grid-template-columns: 1fr; gap: 4px; }
  .sub-card-row { grid-template-columns: 1fr; gap: 8px; }
  .sub-card-col { text-align: left; display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
  .sub-card-label { margin-bottom: 0; }

  /* Sidebar collapses to icons only */
  .admin-layout { flex-direction: column; margin-top: 0; min-height: auto; }
  .admin-sidebar {
    position: fixed;
    top: 48px;
    left: 0;
    bottom: 60px;
    width: 260px;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 0;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar .sidebar-user-info { position: relative; z-index: 1; padding-top: 12px; }
  .admin-sidebar .sidebar-user-name { color: #fff !important; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
  }
  .admin-sidebar-overlay.active { display: block; }
  .admin-main {
    margin-left: 0;
    margin-top: 48px;
    padding: 8px 6px;
    padding-bottom: 70px;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
  }
  #activity-columns { grid-template-columns: 1fr !important; }
  .quick-actions-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .qa-card { padding: 12px 6px 10px; }
  .qa-circle { width: 46px; height: 46px; font-size: 1.2rem; }
  .qa-label { font-size: 0.6rem; }
  .stats-modern { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-modern { padding: 10px 10px; gap: 8px; overflow: visible; }
  .stat-modern-icon { width: 34px; height: 34px; font-size: 0.9rem; border-radius: 10px; }
  .stat-modern-value { font-size: 0.8rem; }
  .stat-modern-label { font-size: 0.55rem; }
  .stat-modern-sub { font-size: 0.65rem; }
  .stat-modern-arrow { font-size: 1rem; }
  .quick-icons-row { flex-wrap: wrap; justify-content: center; }
  .cash-actions-row { gap: 8px 12px; }
  html, body { max-width: 100%; overflow-x: hidden; }
    .admin-main, .admin-layout { box-sizing: border-box; width: 100%; overflow-x: hidden; }
  .schedule-grid, .data-table, .txn-card, #schedule-table-container { max-width: 100%; box-sizing: border-box; }
  .txn-card { max-width: 100%; box-sizing: border-box; }
  .admin-header h1 { font-size: 1rem; margin-bottom: 2px; }
  .admin-header p { font-size: 0.65rem; margin-bottom: 6px; }
  .admin-header { margin-bottom: 8px; }

  /* Modals centered on mobile */
  .modal-overlay {
    padding: 10px;
    align-items: center;
  }
  .modal {
    max-width: 100% !important;
    border-radius: 16px;
    padding: 25px 20px;
    max-height: 80vh;
    overflow-y: auto;
  }

  /* Tables responsive */
  .data-table-wrapper {
    max-width: 100%;
  }
  .data-table {
    width: 100%;
    min-width: 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
    white-space: normal;
    min-width: 0;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .stat-card {
    padding: 8px 10px;
  }
  .stat-card .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.5px;
  }
  .stat-card .stat-value {
    font-size: 0.9rem;
    margin-top: 2px;
  }

  /* Back button larger for touch */
  .panel-back-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    margin-right: 10px;
  }
  .panel-back-btn svg { width: 22px; height: 22px; }

  /* Admin header compact */
  .admin-header h1 { font-size: 1.1rem; margin-bottom: 0; line-height: 1.2; }
  .admin-header p { font-size: 0.65rem; margin-bottom: 0; }
  .admin-header { margin-bottom: 10px; }
  .admin-header p { display: none; }

  /* Transaction cards compact */
  .txn-card { padding: 10px; gap: 10px; margin-bottom: 8px; }
  .txn-icon { width: 36px; height: 36px; font-size: 0.95rem; }
  .txn-title { font-size: 0.78rem; }
  .txn-desc { font-size: 0.65rem; }
  .txn-date { font-size: 0.6rem; }
  .txn-amount { font-size: 0.8rem; }
  .txn-status { font-size: 0.6rem; }
  .txn-cancel-btn { font-size: 0.6rem; padding: 2px 8px; }

  /* Transaction filters compact */
  .txn-filters { gap: 4px; margin-bottom: 12px; }
  .txn-filter-btn { padding: 5px 10px; font-size: 0.68rem; }

  /* Form inputs bigger for touch */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .btn { padding: 12px 20px; }
  .btn-sm { padding: 8px 14px; font-size: 0.85rem; }

  /* Cart dropdown */
  .cart-dropdown {
    right: 10px;
    width: calc(100% - 20px);
    max-height: 70vh;
  }

  /* Topup balance card */
  .topup-balance-card { padding: 20px; }
  .topup-balance-card h2 { font-size: 1.6rem; }

  /* Step indicator mobile */
  .step-circle { width: 28px; height: 28px; font-size: 0.75rem; }
  .step-line { width: 20px; }
  .step-label { font-size: 1rem; }

  /* Plan timeline mobile */
  .plan-timeline { height: 6px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-card { padding: 6px 8px; }
  .stat-card .stat-label { font-size: 0.55rem; letter-spacing: 0.5px; margin-bottom: 1px; }
  .stat-card .stat-value { font-size: 0.8rem; font-weight: 700; margin-top: 1px; }
  .hero { min-height: 70vh; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .auth-container { padding: 0 10px; }
  .auth-box { padding: 20px 15px; }
  .data-table th, .data-table td { padding: 8px 8px; font-size: 0.75rem; }
  .modal { padding: 18px 14px; max-height: 85vh; }
  .txn-card { padding: 8px; gap: 8px; }
  .txn-icon { width: 32px; height: 32px; font-size: 0.85rem; border-radius: 50%; }
  .txn-title { font-size: 0.72rem; }
  .txn-desc { font-size: 0.6rem; }
  .txn-date { font-size: 0.55rem; }
  .txn-amount { font-size: 0.72rem; }
  .txn-status { font-size: 0.55rem; }
  .txn-filter-btn { padding: 4px 8px; font-size: 0.62rem; }
  .action-buttons-top .btn { padding: 14px; font-size: 0.9rem; }
  .step-circle { width: 26px; height: 26px; font-size: 0.7rem; }
  .step-line { width: 14px; }
  .step-label { font-size: 0.85rem; }
  .plan-card { padding: 12px; }
  .plan-card h3 { font-size: 1rem; }
}

@media (max-width: 360px) {
  .navbar .nav-actions { gap: 4px; }
  .navbar .nav-actions .btn { padding: 4px 8px; font-size: 0.7rem; }
  #user-balance { font-size: 0.75rem; }
  .hero h1 { font-size: 1.4rem; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-value { font-size: 1.2rem; }
}

/* ===== SHOP & ORDERS ===== */
#shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

#shop-products-grid > div {
  transition: transform 0.2s, box-shadow 0.2s;
}
#shop-products-grid > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

#shop-products-grid img {
  background: transparent;
}

/* My Orders */
#myorders-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Order checkout modal */
#order-checkout-modal .modal {
  max-width: 500px;
}

@media (max-width: 768px) {
  #shop-products-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  #shop-products-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Daily Returns Modal Table */
#daily-returns-modal .data-table {
  border-collapse: collapse;
  width: 100%;
  border: 2px solid #7a8499;
}
#daily-returns-modal .data-table th {
  background: rgba(0,206,158,0.15);
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border: 1.5px solid #7a8499;
}
#daily-returns-modal .data-table td {
  padding: 10px 16px;
  border: 1.5px solid #9aa3b5;
  font-size: 0.9rem;
  color: var(--text);
}
#daily-returns-modal .data-table tr:hover td {
  background: rgba(255,255,255,0.03);
}
#daily-returns-modal .data-table td:nth-child(2),
#daily-returns-modal .data-table td:nth-child(5) {
  font-weight: 600;
  color: var(--accent);
}
#daily-returns-modal .data-table td:nth-child(4) {
  color: var(--text-muted);
}
#daily-returns-modal .data-table td:nth-child(4) b {
  color: var(--success);
  font-weight: 700;
}

/* ===== PUBLIC MENU DRAWER (single combined nav button) ===== */
.pub-nav-hide { display: none !important; }

.pub-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.pub-menu-btn:hover,
.pub-menu-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.3);
  border-color: #fff;
}
.pub-menu-btn-icon { font-size: 1.15rem; line-height: 1; }

.pub-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.pub-drawer-overlay.pub-open { opacity: 1; visibility: visible; }

.pub-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1101;
  width: 100vw;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 45px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s ease;
}
.pub-drawer.pub-open { transform: translateX(0); visibility: visible; }

.pub-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--gradient);
}
.pub-drawer-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.pub-drawer-close {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.pub-drawer-close:hover { background: rgba(0, 0, 0, 0.4); }

.pub-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 14px 30px;
}

.pub-group-title {
  margin: 20px 8px 9px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}
.pub-drawer-body .pub-group-title:first-child { margin-top: 12px; }

.pub-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 7px;
  padding: 13px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.pub-item:hover {
  border-color: var(--accent);
  background: rgba(0, 206, 201, 0.12);
  transform: translateX(3px);
}
.pub-item-icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1;
}
.pub-item-text { min-width: 0; }
.pub-item-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.7;
}
.pub-item-current { border-color: var(--accent); }
.pub-item-danger { color: var(--danger); }
.pub-item-danger:hover {
  border-color: var(--danger);
  background: rgba(255, 71, 87, 0.14);
}

.pub-empty {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .pub-menu-btn { padding: 8px 12px; font-size: 0.8rem; }
  .pub-menu-btn-label { display: none; }
}

.pub-user-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 8px 4px;
  padding: 11px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.pub-user-line b { color: var(--accent); font-weight: 700; }

/* Compact dashboard menu presentation — full-screen drawer */
.pub-drawer { width: 100vw; background: color-mix(in srgb, var(--bg-card) 94%, var(--accent)); }
.pub-drawer-body { padding: 12px 14px 28px; }
.pub-group-title { margin: 16px 6px 8px; font-size: .64rem; }
.pub-item { min-height: 46px; margin-bottom: 8px; padding: 11px 13px; border-radius: 13px; background: var(--bg-card); box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.pub-item:hover { transform: translateX(2px); }
.pub-item-icon { width: 22px; font-size: 1rem; }
.pub-item-text { flex: 1; }
.pub-item::after { content: '\203A'; color: var(--accent); font-size: 1.25rem; line-height: 1; }
.pub-item-danger::after { color: var(--danger); }
/* Top Menu rows match Settings rows */
.pub-drawer-body { display: grid; align-content: start; gap: 8px; padding: 14px; }
.pub-group-title { margin: 10px 6px 0; }
.pub-drawer-body .pub-group-title:first-child { margin-top: 4px; }
.pub-item {
  min-height: 38px; margin: 0; padding: 6px 10px; border: 0; border-radius: 10px;
  background: var(--bg-card); color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.pub-item:hover { background: color-mix(in srgb, var(--accent) 8%, var(--bg-card)); transform: none; }
.pub-item-icon {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-card)); font-size: .78rem;
}
.pub-item-sub { color: var(--text-muted); font-size: .65rem; font-weight: 600; opacity: 1; }
.pub-item::after { margin-left: auto; }
.pub-item-current { outline: 1px solid var(--accent); }
.pub-item-danger { color: var(--danger); }
.pub-item-danger .pub-item-icon { background: rgba(231,76,60,.12); }
.pub-item-danger:hover { background: rgba(231,76,60,.08); }

.pub-page .navbar { background: var(--bg-dark); }

@media (max-width: 768px) {
  .pub-page .navbar nav { display: flex; gap: 12px; min-width: 0; }
  .pub-page .navbar nav a { font-size: 0.9rem; white-space: nowrap; }
  .pub-page .navbar nav a:active { color: #fff; }
}