/* ══════════════════════════════════════════════════════════════
   PostWise Partner Dashboard — Brand-aligned Design System
   Colours: #ff4500 (primary), #047857 (success), #f59e0b (gold),
            #b91c1c (red), #2563eb (blue), #1f2937 (text)
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --pw-primary: #ff4500;
  --pw-primary-dark: #e03e00;
  --pw-primary-light: rgba(255, 69, 0, 0.08);
  --pw-green: #047857;
  --pw-green-light: rgba(4, 120, 87, 0.08);
  --pw-gold: #f59e0b;
  --pw-red: #b91c1c;
  --pw-blue: #2563eb;
  --pw-sidebar: #0f172a;
  --pw-sidebar-hover: #1e293b;
  --pw-sidebar-active: rgba(255, 69, 0, 0.15);
  --pw-bg: #f8fafc;
  --pw-card: #ffffff;
  --pw-border: #e2e8f0;
  --pw-text: #1f2937;
  --pw-text-secondary: #64748b;
  --pw-text-muted: #94a3b8;
  --pw-radius: 12px;
  --pw-radius-sm: 8px;
  --pw-shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --pw-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --pw-shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --pw-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 260px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--pw-text); background: var(--pw-bg); line-height: 1.5; }
a { color: var(--pw-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(255, 69, 0, 0.15); color: #111; }
::-moz-selection { background: rgba(255, 69, 0, 0.15); color: #111; }

:focus-visible {
  outline: 2px solid var(--pw-primary);
  outline-offset: 2px;
}

input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible { outline-offset: 1px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ══════════════════════════════════════════════
   AUTH PAGES — Gymshark-level Premium
   ══════════════════════════════════════════════ */

.auth-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #fff;
}

.auth-split {
  display: flex;
  min-height: 100vh;
}

/* ── Hero Panel (left) ── */

.auth-hero {
  flex: 0 0 45%;
  background: linear-gradient(160deg, #f7f7f5 0%, #f0eeeb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
}

.auth-hero--dark {
  background: #0f172a;
}
.auth-hero--dark .auth-hero-headline,
.auth-hero--dark .auth-hero-tagline { color: #fff; }
.auth-hero--dark .auth-hero-tagline { opacity: 0.5; }
.auth-hero--dark .auth-hero-footnote { color: rgba(255,255,255,0.25); }

.auth-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo-img {
  width: 140px;
  height: auto;
  margin-bottom: 2.5rem;
  user-select: none;
  -webkit-user-drag: none;
  object-fit: contain;
}

.auth-hero-headline {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.auth-hero-tagline {
  font-size: 1rem;
  color: #666;
  font-weight: 400;
  line-height: 1.6;
  max-width: 320px;
}

.auth-hero-footnote {
  position: absolute;
  bottom: 2rem;
  font-size: 0.6875rem;
  color: #bbb;
  letter-spacing: 0.04em;
}

/* ── Form Panel (right) ── */

.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-form-wrap {
  width: 100%;
  max-width: 360px;
  animation: fadeInUp 0.5s ease-out;
}

.auth-logo-mobile {
  display: none;
  width: 100px;
  margin-bottom: 2rem;
  object-fit: contain;
}

.auth-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.auth-desc {
  font-size: 0.875rem;
  color: #888;
  margin-bottom: 2rem;
}

/* ── Form Fields ── */

.auth-form { text-align: left; }

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.field input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  color: #111;
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.field input:focus {
  border-color: #111;
}

.field input::placeholder {
  color: #bbb;
}

.field-disabled {
  background: #f5f5f5 !important;
  color: #999 !important;
}

.pw-eye-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.pw-eye-toggle:hover { color: #333; }
.pw-eye-toggle:focus { outline: none; }

/* ── Submit Button ── */

.btn-submit {
  display: block;
  width: 100%;
  padding: 0.9375rem 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn-submit:hover {
  background: #ff4500;
}

/* ── Auth Note ── */

.auth-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
  letter-spacing: 0.02em;
}

.auth-note a {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-note a:hover {
  color: #ff4500;
}

/* ── Error Page ── */

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* ── Auth Responsive ── */

@media (max-width: 860px) {
  .auth-hero { display: none; }
  .auth-form-panel { padding: 2rem 1.5rem; }
  .auth-logo-mobile { display: block; }
}

@media (max-width: 480px) {
  .auth-form-panel { padding: 1.5rem 1.25rem; }
  .auth-title { font-size: 1.375rem; }
  .auth-logo-mobile { width: 64px; }
}

/* ── FORMS ── */

.form-group {
  margin-bottom: 1.125rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pw-text);
  margin-bottom: 0.375rem;
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1.5px solid var(--pw-border);
  border-radius: 10px;
  background: #fff;
  color: var(--pw-text);
  transition: border-color var(--pw-transition), box-shadow var(--pw-transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--pw-primary);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
}

.input-disabled {
  background: var(--pw-bg) !important;
  color: var(--pw-text-secondary) !important;
  cursor: not-allowed;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--pw-text-muted);
  margin-top: 0.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── BUTTONS ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: var(--pw-radius-sm);
  cursor: pointer;
  transition: all var(--pw-transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--pw-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--pw-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 69, 0, 0.25);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: var(--pw-bg);
  color: var(--pw-text);
  border: 1.5px solid var(--pw-border);
}
.btn-secondary:hover {
  background: #e2e8f0;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--pw-primary);
  border: 1.5px solid var(--pw-primary);
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}
.btn-outline:hover {
  background: var(--pw-primary-light);
  text-decoration: none;
}

.btn-danger {
  background: var(--pw-red);
  color: #fff;
}
.btn-danger:hover {
  background: #991b1b;
  text-decoration: none;
  color: #fff;
}

.btn-disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  pointer-events: auto;
}

.btn-full { width: 100%; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* ── ALERTS ── */

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--pw-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  line-height: 1.5;
  word-break: break-word;
}

.alert-success {
  background: rgba(4, 120, 87, 0.08);
  color: #047857;
  border: 1px solid rgba(4, 120, 87, 0.2);
}

.alert-error {
  background: rgba(185, 28, 28, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.2);
}

/* ── BADGES ── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-green { background: rgba(4,120,87,0.1); color: #047857; }
.badge-amber { background: rgba(245,158,11,0.1); color: #b45309; }
.badge-red { background: rgba(185,28,28,0.1); color: #b91c1c; }
.badge-blue { background: rgba(37,99,235,0.1); color: #2563eb; }
.badge-lg { padding: 0.375rem 1rem; font-size: 0.875rem; }

/* ── DASHBOARD LAYOUT ── */

.dashboard-page {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--pw-sidebar);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--pw-transition);
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.75rem 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  text-align: center;
}

.sidebar-logo-img {
  width: 48px;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.logo-brand {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.08em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.logo-sub {
  font-size: 0.625rem;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  border-radius: var(--pw-radius-sm);
  transition: all var(--pw-transition);
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: var(--pw-sidebar-hover);
  text-decoration: none;
}

.nav-link.active {
  color: var(--pw-primary);
  background: var(--pw-sidebar-active);
  font-weight: 600;
  position: relative;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--pw-primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.5rem;
  margin-bottom: 0.5rem;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pw-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.4);
}

.logout-link { color: rgba(255,255,255,0.45) !important; }
.logout-link:hover { color: #ef4444 !important; background: rgba(239,68,68,0.1) !important; }

/* ── MAIN CONTENT ── */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  height: 64px;
  background: var(--pw-card);
  border-bottom: 1px solid var(--pw-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pw-text);
  padding: 0.25rem;
}

.page-title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--pw-text);
  flex: 1;
  letter-spacing: -0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-date {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
}

.content-area {
  flex: 1;
  padding: 1.5rem 2rem 3rem;
  max-width: 1400px;
  width: 100%;
  animation: fadeInUp 0.4s ease-out;
}

/* ── CARDS ── */

.card {
  background: var(--pw-card);
  border-radius: var(--pw-radius);
  border: 1px solid var(--pw-border);
  box-shadow: var(--pw-shadow-sm);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--pw-border);
}

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

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pw-green);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
}

.card-body {
  padding: 1.25rem 1.5rem;
}

/* ── STATS GRID ── */

.stats-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  background: var(--pw-card);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--pw-shadow-sm);
  transition: box-shadow var(--pw-transition), transform var(--pw-transition);
}

.stat-card:hover {
  box-shadow: var(--pw-shadow);
  transform: translateY(-1px);
}

.stat-card.stat-highlight {
  border-color: rgba(4, 120, 87, 0.3);
  background: linear-gradient(135deg, #fff 0%, rgba(4, 120, 87, 0.03) 100%);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pw-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  font-weight: 500;
  margin-top: 0.125rem;
}

.stat-note {
  font-size: 0.6875rem;
  color: var(--pw-gold);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ── GRID LAYOUTS ── */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* ── TABLES ── */

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--pw-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--pw-border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pw-border);
  color: var(--pw-text);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: rgba(0,0,0,0.015); }

.data-table code {
  background: var(--pw-bg);
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pw-primary);
}

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--pw-primary-light) !important; }

/* ── SEARCH ── */

.search-input {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-radius-sm);
  outline: none;
  font-family: inherit;
  width: 220px;
  transition: border-color var(--pw-transition);
}

.search-input:focus {
  border-color: var(--pw-primary);
}

/* ── INLINE FORMS ── */

.inline-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.select-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--pw-border);
  border-radius: 6px;
  font-family: inherit;
  outline: none;
}

.input-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  border: 1px solid var(--pw-border);
  border-radius: 6px;
  width: 120px;
  font-family: inherit;
  outline: none;
}

/* ── WELCOME BANNER ── */

.welcome-banner {
  background: linear-gradient(135deg, var(--pw-sidebar) 0%, #1e293b 100%);
  border-radius: var(--pw-radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.welcome-text h2 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.welcome-text p {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

.welcome-text p strong { color: rgba(255,255,255,0.85); }

.discount-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--pw-radius-sm);
  padding: 0.625rem 1.25rem;
}

.discount-label {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.discount-code {
  font-size: 1.125rem;
  color: var(--pw-primary);
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ── REGION BARS ── */

.region-bars {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.region-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.region-label {
  width: 140px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pw-text);
  flex-shrink: 0;
}

.region-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--pw-bg);
  border-radius: 99px;
  overflow: hidden;
}

.region-bar {
  height: 100%;
  border-radius: 99px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.region-pct {
  width: 48px;
  text-align: right;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--pw-text);
}

/* ── PROGRESS BAR ── */

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--pw-bg);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-lg { height: 10px; }

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--pw-primary);
  transition: width 0.6s ease;
}

.progress-fill-green { background: var(--pw-green); }
.progress-fill-orange { background: var(--pw-primary); }

/* ── PAYOUT SECTION ── */

.payout-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
}

.payout-amount {
  display: flex;
  align-items: baseline;
}

.payout-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--pw-text-secondary);
}

.payout-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--pw-text);
  letter-spacing: -0.02em;
}

.payout-period {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  margin: 0.5rem 0 1.25rem;
}

.payout-status { margin-top: 0.5rem; }

.btn-payout {
  padding: 0.75rem 2rem;
}

.payout-disabled-wrap {
  position: relative;
  width: 100%;
}

.payout-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--pw-sidebar);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10;
}

.payout-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--pw-sidebar);
}

.payout-disabled-wrap:hover .payout-tooltip { display: block; }

/* ── PAYOUT HERO (Payouts Page) ── */

.payout-hero-card { border-color: rgba(4,120,87,0.15); }

.payout-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.payout-hero-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pw-text-secondary);
  margin-bottom: 0.25rem;
}

.payout-hero-amount {
  display: flex;
  align-items: baseline;
}

.payout-currency-lg {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pw-text-secondary);
  margin-right: 2px;
}

.payout-value-lg {
  font-size: 3rem;
  font-weight: 800;
  color: var(--pw-text);
  letter-spacing: -0.03em;
  line-height: 1;
}

.payout-hero-meta {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  margin-top: 0.5rem;
}

.payout-hero-meta .divider { margin: 0 0.5rem; }

.payout-status-large { text-align: center; }
.payout-status-date {
  font-size: 0.75rem;
  color: var(--pw-text-muted);
  margin-top: 0.5rem;
}

.payout-progress-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--pw-border);
}

.payout-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pw-text);
  margin-bottom: 0.5rem;
}

.payout-progress-hint {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  margin-top: 0.5rem;
}

.payout-progress-success { color: var(--pw-green); font-weight: 600; }

/* ── PAYMENT METHOD ── */

.payment-method-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--pw-bg);
  border-radius: var(--pw-radius-sm);
  border: 1px solid var(--pw-border);
}

.payment-icon { flex-shrink: 0; }

.payment-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.payment-bank { font-weight: 700; font-size: 0.9375rem; }
.payment-details { font-size: 0.8125rem; color: var(--pw-text-secondary); }

/* ── EMPTY STATES ── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.empty-state p { font-weight: 600; color: var(--pw-text-secondary); margin: 0.75rem 0 0.375rem; }
.empty-state .btn { margin-top: 1rem; }

/* ── DETAIL ROWS ── */

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--pw-border);
}

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

.detail-label {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  font-weight: 500;
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--pw-text);
  text-align: right;
}

.link-code {
  font-size: 0.6875rem;
  word-break: break-all;
  background: var(--pw-bg);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* ── BACK LINK ── */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--pw-text-secondary);
  margin-bottom: 1.25rem;
  transition: color var(--pw-transition);
}

.back-link:hover { color: var(--pw-primary); text-decoration: none; }

/* ── SECURITY NOTICE ── */

.security-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--pw-radius-sm);
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
}

.security-notice svg { flex-shrink: 0; color: var(--pw-blue); margin-top: 1px; }

.security-notice p {
  font-size: 0.8125rem;
  color: var(--pw-text-secondary);
  line-height: 1.5;
}

/* ── FOOTER ── */

.dashboard-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.6875rem;
  color: var(--pw-text-muted);
  letter-spacing: 0.02em;
  border-top: 1px solid var(--pw-border);
  margin-top: auto;
}

.auth-copyright {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.625rem;
  color: #bbb;
  letter-spacing: 0.03em;
}

/* ── UTILITIES ── */

.text-center { text-align: center; }
.text-muted { color: var(--pw-text-muted) !important; font-size: 0.8125rem; }

/* ── RESPONSIVE ── */

@media (max-width: 1024px) {
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.3);
  }
  .sidebar-close { display: block; }
  .hamburger { display: block; }
  .main-content { margin-left: 0; }
  .topbar { padding: 0 1rem; }
  .content-area { padding: 1rem; }
  .stats-grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .payout-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .payout-value-lg { font-size: 2.25rem; }
  .stat-value { font-size: 1.25rem; }
  .stat-icon { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .stats-grid-4 { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem; }
  .inline-form { flex-wrap: wrap; }
}

/* ── OVERLAY FOR MOBILE SIDEBAR ── */

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.sidebar-overlay.active { display: block; }
