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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #0a0a0a;
  color: #e5e5e5;
  min-height: 100vh;
}

a {
  color: #22c55e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand h1 {
  font-size: 32px;
  font-weight: 700;
  color: #22c55e;
  letter-spacing: 1px;
}

.brand p {
  font-size: 13px;
  color: #737373;
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #a3a3a3;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: #262626;
  border: 1px solid #404040;
  border-radius: 8px;
  color: #e5e5e5;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #22c55e;
}

.form-group input::placeholder {
  color: #525252;
}

.form-group .hint {
  font-size: 12px;
  color: #525252;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.btn-primary {
  background: #22c55e;
  color: #000;
}

.btn-primary:hover {
  background: #16a34a;
}

.btn-primary:disabled {
  background: #166534;
  color: #525252;
  cursor: not-allowed;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid #404040;
  color: #a3a3a3;
}

.btn-outline:hover {
  border-color: #22c55e;
  color: #22c55e;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #737373;
}

.auth-footer a {
  font-weight: 600;
}

.error-msg {
  background: #450a0a;
  border: 1px solid #7f1d1d;
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.success-msg {
  background: #052e16;
  border: 1px solid #166534;
  color: #86efac;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.dashboard-header {
  background: #171717;
  border-bottom: 1px solid #262626;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dashboard-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header .brand-inline {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dashboard-header .brand-inline h1 {
  font-size: 22px;
  font-weight: 700;
  color: #22c55e;
}

.dashboard-header .brand-inline span {
  font-size: 12px;
  color: #525252;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dashboard-header .user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-header .user-info .user-name {
  font-size: 14px;
  color: #a3a3a3;
}

.dashboard-header .user-info .user-name strong {
  color: #e5e5e5;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  width: auto;
}

.dashboard-content {
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 24px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
}

.stat-card .stat-value.green {
  color: #22c55e;
}

.stat-card .stat-value.yellow {
  color: #eab308;
}

.stat-card .stat-value.orange {
  color: #f97316;
}

.stat-card .stat-value.cyan {
  color: #06b6d4;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 16px;
}

.table-wrap {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  overflow: hidden;
}

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

.table-wrap thead th {
  background: #1f1f1f;
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #262626;
}

.table-wrap tbody td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid #1f1f1f;
}

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

.table-wrap tbody tr:hover {
  background: #1a1a1a;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-paid {
  background: #052e16;
  color: #22c55e;
}

.badge-pending {
  background: #431407;
  color: #f97316;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #525252;
}

.empty-state p {
  font-size: 15px;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #525252;
}

.loading-spinner::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #262626;
  border-top-color: #22c55e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #525252;
  margin-top: 20px;
}

.back-link:hover {
  color: #22c55e;
  text-decoration: none;
}

.commission-rates {
  background: #171717;
  border: 1px solid #262626;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.commission-rates h3 {
  font-size: 16px;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 12px;
}

.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.rate-item {
  background: #262626;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.rate-item .duration {
  font-size: 13px;
  color: #a3a3a3;
  margin-bottom: 4px;
}

.rate-item .amount {
  font-size: 18px;
  font-weight: 700;
  color: #22c55e;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #166534;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
  transition: background 0.2s;
}

.whatsapp-link:hover {
  background: #15803d;
  text-decoration: none;
}

@media (max-width: 768px) {
  .auth-card {
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .table-wrap table {
    min-width: 500px;
  }

  .dashboard-header .container {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .rates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
