/* ProCash — Global Styles v2.0 */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --primary-mid: #6366f1;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --info: #0284c7;
  --dark: #0f172a;
  --card-bg: #ffffff;
  --body-bg: #f1f5f9;
  --sidebar-bg: #0f172a;
  --topbar-bg: #0f172a;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
}

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

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---- Layout ---- */
.app { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  background: var(--topbar-bg);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.topbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.topbar-brand .brand-text span { color: #818cf8; }
.topbar-nav { display: flex; align-items: center; gap: 2px; }
.topbar-nav a {
  color: #94a3b8;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: .15s;
}
.topbar-nav a:hover, .topbar-nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.balance-pill {
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.35);
  color: #a5b4fc;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.user-menu { display: flex; align-items: center; gap: 8px; color: #94a3b8; font-size: 13px; }
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

.layout { display: flex; flex: 1; }

.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  padding: 16px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: transform .25s;
  position: relative;
}
.sidebar-section {
  padding: 10px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #475569;
  margin-top: 6px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  text-decoration: none;
}
.sidebar-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; text-decoration: none; }
.sidebar-item.active { background: rgba(99,102,241,.18); color: #a5b4fc; }
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #6366f1;
  border-radius: 0 3px 3px 0;
}
.sidebar-item .s-icon { font-size: 16px; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
}

.main { flex: 1; padding: 24px; min-width: 0; overflow-x: hidden; }
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--dark); }
.page-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---- Cards ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 600; color: var(--dark); display: flex; align-items: center; gap: 7px; }

/* ---- Stat Cards ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60px; height: 60px;
  border-radius: 50%;
  opacity: .07;
}
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.stat-trend-up { color: #059669; font-weight: 600; }
.stat-trend-down { color: #dc2626; font-weight: 600; }

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: #f8fafc; }
th {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafa; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f1f5f9; color: #475569; }
.badge-purple  { background: #ede9fe; color: #5b21b6; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: .15s; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 5px 12px; font-size: 11px; border-radius: 7px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-gray    { background: #f1f5f9; color: #475569; border: 1px solid var(--border); }
.btn-dark    { background: var(--dark); color: #fff; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.form-label span { color: #dc2626; }
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: .15s;
  font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.form-control::placeholder { color: #94a3b8; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-group { display: flex; }
.input-group .form-control { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .btn { border-radius: 0 var(--radius) var(--radius) 0; }
.input-icon { position: relative; }
.input-icon .form-control { padding-left: 38px; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; }

/* ---- Alerts / Flash ---- */
.flash {
  padding: 12px 16px; border-radius: var(--radius);
  margin-bottom: 16px; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.flash-success { background: #d1fae5; color: #065f46; border-left: 4px solid #059669; }
.flash-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.flash-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }
.flash-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.info-box  { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 12px 14px; font-size: 12px; color: #1e40af; }
.warn-box  { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 12px 14px; font-size: 12px; color: #92400e; }
.danger-box{ background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); padding: 12px 14px; font-size: 12px; color: #991b1b; }

/* ---- Plans ---- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px;
  background: #fff;
  position: relative;
  transition: .2s;
  cursor: default;
}
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.plan-card.featured { border-color: var(--primary); }
.plan-card .plan-top-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  padding: 3px 14px; border-radius: 20px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.plan-roi-num { font-size: 36px; font-weight: 900; line-height: 1; }
.plan-meta-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid #f1f5f9; }
.plan-meta-row:last-child { border-bottom: none; }
.plan-meta-row .key { color: var(--text-muted); }
.plan-meta-row .val { font-weight: 700; color: var(--text); }

/* ---- Progress ---- */
.progress { background: #f1f5f9; border-radius: 20px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); transition: .4s; }
.progress-bar.success { background: var(--success); }

/* ---- Misc ---- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 10px; opacity: .4; }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mono { font-family: 'Courier New', monospace; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 24px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 5px; font-size: 11px; background: #f1f5f9; color: #475569; font-weight: 500; }
.announcement-bar {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  color: #fff;
  padding: 10px 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.announcement-bar .a-badge { background: rgba(255,255,255,.2); padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }

/* ---- Payment Method Cards ---- */
.pm-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: .15s;
  background: #fff;
}
.pm-card:hover { border-color: var(--primary); }
.pm-card.selected { border-color: var(--primary); background: var(--primary-light); }
.pm-icon { font-size: 28px; margin-bottom: 6px; }
.pm-name { font-size: 12px; font-weight: 700; color: var(--dark); }
.pm-sub { font-size: 10px; color: var(--text-muted); }

/* ---- Auth Pages ---- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #0f172a;
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-circle {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}
.auth-logo h1 { font-size: 22px; font-weight: 800; color: #0f172a; }
.auth-logo h1 span { color: var(--primary); }
.auth-logo p { font-size: 12px; color: #64748b; margin-top: 4px; }
.auth-features { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.auth-feature { background: #f0fdf4; color: #065f46; border: 1px solid #bbf7d0; border-radius: 20px; padding: 4px 12px; font-size: 11px; font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 60px; bottom: 0;
    transform: translateX(-100%);
    z-index: 300;
    box-shadow: 4px 0 20px rgba(0,0,0,.3);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 299;
  }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; align-items: center; justify-content: center; }
  .topbar-nav { display: none; }
  .main { padding: 14px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-title { font-size: 18px; }
  .auth-card { padding: 24px; }
  .plan-roi-num { font-size: 28px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar-brand .brand-text { display: none; }
  .balance-pill { font-size: 12px; padding: 4px 10px; }
}
</style>
