/* =======================================================
   PORTAL CLIENTE — estilos compartidos
   ======================================================= */

:root {
  --c-primary: #0f172a;
  --c-accent: #f97316;
  --c-accent-dark: #ea580c;
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-text: #0f172a;
  --c-text-muted: #64748b;
  --c-border: #e2e8f0;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --c-gold1: #fbbf24;
  --c-gold2: #f59e0b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
}

.topbar {
  background: var(--c-primary);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-brand .logo {
  width: 36px; height: 36px;
  background: var(--c-accent);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.topbar-brand .name {
  font-weight: 700;
  font-size: 15px;
}
.topbar-brand .sub {
  font-size: 11px;
  opacity: 0.7;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.topbar-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.btn-logout:hover { background: rgba(255,255,255,0.1); }

.tabs {
  background: white;
  border-bottom: 1px solid var(--c-border);
  padding: 0 20px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tabs a {
  padding: 14px 18px;
  text-decoration: none;
  color: var(--c-text-muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tabs a:hover { color: var(--c-text); }
.tabs a.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  font-weight: 600;
}

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

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

h2 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

.puntos-hero {
  background: linear-gradient(135deg, var(--c-gold1), var(--c-gold2));
  color: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.puntos-hero::before {
  content: '⭐';
  position: absolute;
  top: -10px; right: -10px;
  font-size: 100px;
  opacity: 0.15;
}
.puntos-hero .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
  font-weight: 600;
}
.puntos-hero .value {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0;
}
.puntos-hero .sub {
  font-size: 13px;
  opacity: 0.95;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat {
  background: white;
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.stat .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  font-weight: 600;
}
.stat .value {
  font-size: 22px;
  font-weight: 800;
  margin-top: 4px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--c-bg);
  color: var(--c-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--c-border);
}
.table td {
  padding: 12px;
  border-bottom: 1px solid var(--c-border);
}
.table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-gold {
  background: linear-gradient(135deg, var(--c-gold1), var(--c-gold2));
  color: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--c-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background 0.15s;
}
.btn:hover { background: var(--c-accent-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-outline:hover { background: var(--c-bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-muted);
}
.empty .icon {
  font-size: 40px;
  opacity: 0.3;
  margin-bottom: 8px;
}

.text-sm { font-size: 12px; }
.text-muted { color: var(--c-text-muted); }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

@media (max-width: 600px) {
  .topbar { padding: 12px 14px; }
  .topbar-brand .sub { display: none; }
  .container { padding: 16px; }
  .puntos-hero .value { font-size: 36px; }
  .table { font-size: 11px; }
  .table th, .table td { padding: 8px; }
}
