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

:root {
  --gold: #CC9230;
  --gold-light: #E2B65C;
  --gold-bright: #F0C96E;
  --navy: #0B2749;
  --navy-dark: #091e3a;
  --navy-deeper: #050f1e;
  --white: #ffffff;
  --off-white: #f8f9fc;
  --text-light: rgba(255,255,255,0.85);
  --text-muted: rgba(255,255,255,0.5);
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #3b82f6;
  --orange: #f97316;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--navy-deeper);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN PAGE ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: var(--navy-dark);
  border: 1px solid rgba(204,146,48,0.2);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-card .logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--navy-deeper);
  font-family: 'Playfair Display', serif;
}

.login-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--white);
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 14px;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: var(--gold);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-deeper);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(204,146,48,0.3);
}

.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  color: var(--red);
  font-size: 14px;
  margin-top: 12px;
  display: none;
}

/* ===== DASHBOARD ===== */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
}

.dash-header h1 span {
  color: var(--gold);
}

.dash-header .plan-badge {
  background: rgba(204,146,48,0.15);
  color: var(--gold-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-logout:hover {
  border-color: var(--red);
  color: var(--red);
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px;
}

.kpi-card .label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.kpi-card .value {
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
}

.kpi-card .value.gold { color: var(--gold-light); }
.kpi-card .value.green { color: var(--green); }

.kpi-card .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Sections */
.section {
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.section h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Chart */
.chart-container {
  height: 280px;
  position: relative;
}

/* Disputes Table */
.disputes-table {
  width: 100%;
  border-collapse: collapse;
}

.disputes-table th {
  text-align: left;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.disputes-table td {
  padding: 14px 12px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

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

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-ENVIADA { background: rgba(59,130,246,0.15); color: var(--blue); }
.status-EN_REVISION { background: rgba(234,179,8,0.15); color: var(--yellow); }
.status-RESPONDIDA { background: rgba(249,115,22,0.15); color: var(--orange); }
.status-ELIMINADA { background: rgba(34,197,94,0.15); color: var(--green); }
.status-DENEGADA { background: rgba(239,68,68,0.15); color: var(--red); }

/* Notifications */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.notification-item:last-child { border-bottom: none; }

.notification-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

.notification-item.read .dot { background: rgba(255,255,255,0.15); }

.notification-item .text {
  font-size: 14px;
  color: var(--text-light);
  flex: 1;
}

.notification-item .date {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-muted);
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 12px;
}

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

/* Responsive */
@media (max-width: 640px) {
  .dash-header h1 { font-size: 22px; }
  .kpi-card .value { font-size: 24px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 16px; }
  .disputes-table { font-size: 13px; }
  .disputes-table th:nth-child(3),
  .disputes-table td:nth-child(3) { display: none; }
  .bureau-grid { grid-template-columns: 1fr !important; }
}

/* Bureau Analysis */
.bureau-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.bureau-card { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 20px; text-align: center; }
.bureau-name { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.bureau-score { font-size: 36px; font-weight: 700; color: var(--gold); }
.bureau-change { font-size: 14px; font-weight: 600; margin-top: 4px; }
.bureau-change.green { color: #2ecc71; }
.bureau-change.red { color: #e74c3c; }
.bureau-start { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 6px; }

.analysis-stats { display: flex; justify-content: center; gap: 40px; margin-top: 20px; padding: 16px; background: rgba(255,255,255,0.03); border-radius: 12px; }
.analysis-stat { text-align: center; }
.analysis-stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--gold); }
.analysis-stat-label { display: block; font-size: 12px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
