/* =====================================================
   CLAIM TRACKING PORTAL — Professional Light UI
   Automotive Insurance
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --bg-base:      #f1f5f9;
  --bg-surface:   #f8fafc;
  --bg-card:      #ffffff;
  --bg-hover:     #f1f5f9;
  --bg-input:     #ffffff;

  --border:       #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #93c5fd;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-inverse:   #ffffff;

  --accent:        #1d4ed8;
  --accent-hover:  #1e40af;
  --blue:          #2563eb;
  --blue-hover:    #1d4ed8;

  --navy:          #1e3a5f;
  --navy-light:    #e8f0fb;

  --success:        #16a34a;
  --success-bg:     #f0fdf4;
  --success-border: #bbf7d0;

  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --warning-border: #fde68a;

  --danger:        #dc2626;
  --danger-bg:     #fef2f2;
  --danger-border: #fecaca;

  --info:          #0284c7;
  --info-bg:       #f0f9ff;
  --info-border:   #bae6fd;

  --neutral:        #64748b;
  --neutral-bg:     #f8fafc;
  --neutral-border: #e2e8f0;

  --purple:        #7c3aed;
  --purple-bg:     #faf5ff;
  --purple-border: #ddd6fe;

  --radius-sm:   4px;
  --radius:      8px;
  --radius-md:   10px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow:    0 4px 12px rgba(15,23,42,0.08);
  --shadow-lg: 0 8px 30px rgba(15,23,42,0.12);
  --shadow-card: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);

  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 64px;
  --container:  1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
.site-main { flex: 1; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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

.page-wrapper {
  min-height: calc(100vh - var(--nav-height));
  padding: 40px 0 80px;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  height: var(--nav-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(15,23,42,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  /* needed so ::before positions relative to the navbar */
  isolation: isolate;
}

/* Línea de acento superior */
.navbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 60%, #60a5fa 100%);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 0;
  /* push content down 3px to visually center below the accent line */
  padding-top: 3px;
}

/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  white-space: nowrap;
  letter-spacing: -0.02em;
  padding-right: 24px;
  border-right: 1px solid var(--border);
  margin-right: 24px;
}

.navbar-brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(29,78,216,0.3);
}

.navbar-brand-icon svg { color: #ffffff; }

.navbar-brand-icon--logo { background: #ffffff; border: 1px solid var(--border); box-shadow: none; padding: 4px; }
.navbar-brand-icon--logo img { width: 100%; height: 100%; object-fit: contain; }

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.navbar-brand-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.02em;
}

.navbar-brand-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
}

.navbar-divider {
  display: none;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--navy);
  background: var(--bg-base);
}

.nav-link.active {
  color: var(--blue);
  background: var(--info-bg);
  font-weight: 600;
}

/* Status badge */
.navbar-end {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.navbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
}

.navbar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(22,163,74,0.2);
  animation: pulse-status 2.5s ease-in-out infinite;
}

@keyframes pulse-status {
  0%, 100% { box-shadow: 0 0 0 2px rgba(22,163,74,0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(22,163,74,0.08); }
}

.navbar-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 12px;
  border-left: 1px solid var(--border);
  line-height: 1;
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}

.badge-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.badge-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.badge-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }
.badge-info    { color: var(--info);    background: var(--info-bg);    border-color: var(--info-border); }
.badge-neutral { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-border); }
.badge-purple  { color: var(--purple);  background: var(--purple-bg);  border-color: var(--purple-border); }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  border: 1px solid;
}

.alert-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }

/* ── Progress bars ───────────────────────────────────────────────────────── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.progress-bar-thin {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--blue);
  transition: width 0.5s ease;
}

.progress-fill.complete { background: var(--success); }

.progress-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 34px;
  text-align: right;
}

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

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

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

/* ── Skeleton loaders ────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  color: #ffffff;
  pointer-events: all;
  animation: toastIn 0.25s ease;
  max-width: 340px;
}

.toast.toast-error   { background: var(--danger);  }
.toast.toast-success { background: var(--success); }

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

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
  padding: 20px 0;
  margin-top: 32px;
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.site-footer-brand {
  font-weight: 700;
  color: var(--text-secondary);
}

.site-footer-sep { color: var(--border); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .navbar-company { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }

  .navbar-inner { gap: 12px; }
  .navbar-divider { display: none; }
  .navbar-brand { padding-right: 12px; margin-right: 12px; }
  .navbar-brand-sub { display: none; }
  .navbar-nav { gap: 0; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
  .navbar-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 6px 10px; white-space: nowrap; }
  .navbar-status span:not(.navbar-status-dot) { display: none; }
  .navbar-status { padding: 6px; }

  .page-title { font-size: 19px; }

  .site-footer-inner { font-size: 11px; }
}
