/* Reclamé Acá — sistema de diseño base */

:root {
  --navy-900: #0f2338;
  --navy-800: #16324f;
  --navy-700: #1f4166;
  --orange-500: #ff6b35;
  --orange-600: #e85a2a;
  --orange-50: #fff1eb;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text-primary: #1a2433;
  --text-secondary: #5b6b7c;
  --text-muted: #8a97a6;
  --success: #1e9e62;
  --success-bg: #e7f7ef;
  --warning: #b7791f;
  --warning-bg: #fdf3e0;
  --danger: #e0433b;
  --danger-bg: #fdeceb;
  --pending: #4a5c72;
  --pending-bg: #eaeef2;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 35, 56, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 35, 56, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 35, 56, 0.12);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--navy-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: #9fb2c6;
  letter-spacing: 0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: #cfdcea;
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover, .main-nav a.active {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.85rem;
}

.header-user .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange-500);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange-500);
  color: #fff;
}
.btn-primary:hover { background: var(--orange-600); }

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--navy-700); background: var(--bg); }

.btn-dark {
  background: var(--navy-900);
  color: #fff;
}
.btn-dark:hover { background: var(--navy-800); }

.btn-danger-outline {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger-outline:hover { background: var(--danger-bg); }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 0.82rem; }

/* ---------- Hero ---------- */

.hero {
  background: radial-gradient(circle at 15% 20%, var(--navy-700), var(--navy-900) 60%);
  color: #fff;
  padding: 72px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,0.35), transparent 70%);
}

.hero-inner {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,53,0.15);
  border: 1px solid rgba(255,107,53,0.4);
  color: #ffb28f;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.12;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.hero h1 span { color: var(--orange-500); }

.hero p {
  font-size: 1.08rem;
  color: #c3d2e0;
  margin: 0 0 32px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.search-bar {
  margin-top: 40px;
  display: flex;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  max-width: 560px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.stats-strip {
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.stats-strip .stat b {
  display: block;
  font-size: 1.7rem;
  color: #fff;
}
.stats-strip .stat span {
  font-size: 0.82rem;
  color: #9fb2c6;
}

/* ---------- Sections ---------- */

.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.55rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.section-head p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card-pad { padding: 24px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.how-card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.how-card .num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange-600);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.how-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.how-card p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }

/* ---------- Complaint card ---------- */

.reclamo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s, transform 0.15s;
}

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

.reclamo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.empresa-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-800);
}

.empresa-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--navy-800);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.reclamo-card h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.reclamo-card .excerpt {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reclamo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.reclamo-meta .left { display: flex; align-items: center; gap: 14px; }

/* ---------- Badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pendiente { background: var(--pending-bg); color: var(--pending); }
.badge-proceso { background: var(--warning-bg); color: var(--warning); }
.badge-resuelto { background: var(--success-bg); color: var(--success); }
.badge-rechazado { background: var(--danger-bg); color: var(--danger); }

.badge-excelente { background: var(--success-bg); color: var(--success); }
.badge-buena { background: #eaf1ff; color: #2b5fd9; }
.badge-regular { background: var(--warning-bg); color: var(--warning); }
.badge-mala { background: var(--danger-bg); color: var(--danger); }
.badge-sin_calificar { background: var(--pending-bg); color: var(--pending); }

.badge-category {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  text-transform: none;
  font-weight: 600;
}
.badge-category::before { display: none; }

/* ---------- Filters ---------- */

.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.filters-bar select, .filters-bar input[type="text"] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.87rem;
  background: var(--bg);
  color: var(--text-primary);
}

.filters-bar .grow { flex: 1; min-width: 180px; }

/* ---------- Forms ---------- */

.auth-wrap {
  max-width: 460px;
  margin: 56px auto;
  padding: 0 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px;
}

.auth-card h1 {
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.auth-card > p.sub {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 26px;
}

.tabs button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.tabs button.active {
  background: var(--surface);
  color: var(--navy-900);
  box-shadow: var(--shadow-sm);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px var(--orange-50);
}

.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }

.form-msg {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.error { background: var(--danger-bg); color: var(--danger); }
.form-msg.success { background: var(--success-bg); color: var(--success); }

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.87rem;
  color: var(--text-secondary);
}
.auth-switch a { color: var(--orange-600); font-weight: 600; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: #9fb2c6;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-grid a, .footer-grid p {
  font-size: 0.87rem;
  line-height: 2;
  color: #9fb2c6;
}
.footer-grid a:hover { color: #fff; }

.footer-bottom {
  padding-top: 20px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Detail page ---------- */

.breadcrumb {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.breadcrumb a:hover { color: var(--navy-800); }

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 6px;
}

.detail-header h1 { font-size: 1.6rem; margin: 10px 0; letter-spacing: -0.01em; }

.detail-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.87rem;
  margin-bottom: 24px;
}

.detail-body {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
  align-items: flex-start;
}

.detail-text { font-size: 0.98rem; color: var(--text-primary); line-height: 1.7; }

.response-box {
  margin-top: 24px;
  border-left: 4px solid var(--navy-700);
  background: var(--bg);
  padding: 18px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.response-box .who {
  font-weight: 700;
  font-size: 0.87rem;
  color: var(--navy-800);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.side-card { margin-bottom: 20px; }
.side-card h4 { margin: 0 0 12px; font-size: 0.9rem; }
.side-card .row { display: flex; justify-content: space-between; font-size: 0.87rem; padding: 8px 0; border-bottom: 1px solid var(--border); }
.side-card .row:last-child { border-bottom: none; }
.side-card .row span:first-child { color: var(--text-secondary); }

/* ---------- Dashboard (empresa) ---------- */

.dash-shell { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: flex-start; }

.dash-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: sticky;
  top: 88px;
}

.dash-sidebar .biz {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.dash-sidebar .biz .empresa-logo { width: 38px; height: 38px; font-size: 0.85rem; }
.dash-sidebar .biz strong { display: block; font-size: 0.9rem; }
.dash-sidebar .biz span { font-size: 0.78rem; color: var(--text-muted); }

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.dash-nav a:hover { background: var(--bg); }
.dash-nav a.active { background: var(--orange-50); color: var(--orange-600); font-weight: 700; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; }
.kpi span { font-size: 0.8rem; color: var(--text-secondary); }
.kpi b { display: block; font-size: 1.6rem; margin-top: 6px; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { text-align: left; padding: 12px 18px; background: var(--bg); color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--bg); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 2.4rem; margin-bottom: 12px; }

/* ---------- How it works / CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 6px; font-size: 1.4rem; }
.cta-band p { margin: 0; color: #c3d2e0; }

/* ---------- Utilities ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.items-center { align-items: center; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .main-nav { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .detail-body { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 60px; }
}
