:root {
  --cyan:    #0ab8c9;
  --cyan-dk: #0899a8;
  --dark:    #1a252f;
  --gray:    #f4f6f8;
  --text:    #2d3748;
  --muted:   #718096;
  --success: #38a169;
  --warning: #d69e2e;
  --danger:  #e53e3e;
  --info:    #3182ce;
  --radius:  12px;
  --shadow:  0 2px 12px rgba(0,0,0,.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gray);
  color: var(--text);
  min-height: 100vh;
}

/* ── TOPBAR ─────────────────────────────────────────────── */
.topbar {
  background: var(--dark);
  color: #fff;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.topbar-brand img { height: 32px; }
.topbar-brand span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: .5px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
}
.topbar-user .avatar {
  width: 34px; height: 34px;
  background: var(--cyan);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #fff;
}
.topbar-user a {
  color: #adb5bd;
  text-decoration: none;
  font-size: .8rem;
}
.topbar-user a:hover { color: #fff; }

/* ── BOTTOM NAV (móvil) ──────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--dark);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  color: #adb5bd;
  text-decoration: none;
  font-size: .65rem;
  gap: 3px;
  transition: color .2s;
}
.bottom-nav a i { font-size: 1.2rem; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--cyan); }

/* ── CONTENT WRAPPER ─────────────────────────────────────── */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 90px;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 20px;
}
.page-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
}
.page-header p { color: var(--muted); font-size: .9rem; margin-top: 2px; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
}
.card-header h2 i { color: var(--cyan); margin-right: 6px; }
.card-body { padding: 18px; }
.card-body-flush { padding: 0; }

/* ── STAT TILES ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-tile {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
  border-top: 4px solid var(--cyan);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, box-shadow .15s;
  display: block;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.stat-tile.cyan   { border-top-color: var(--cyan); }
.stat-tile.green  { border-top-color: var(--success); }
.stat-tile.orange { border-top-color: var(--warning); }
.stat-tile.red    { border-top-color: var(--danger); }
.stat-tile .num { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.stat-tile .lbl { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.stat-tile i    { font-size: 1.4rem; margin-bottom: 6px; }
.stat-tile.cyan i   { color: var(--cyan); }
.stat-tile.green i  { color: var(--success); }
.stat-tile.orange i { color: var(--warning); }
.stat-tile.red i    { color: var(--danger); }

/* ── BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
}
.badge-cyan    { background: #e6f9fb; color: var(--cyan-dk); }
.badge-green   { background: #f0fff4; color: var(--success); }
.badge-orange  { background: #fffbeb; color: var(--warning); }
.badge-red     { background: #fff5f5; color: var(--danger); }
.badge-gray    { background: #edf2f7; color: var(--muted); }
.badge-blue    { background: #ebf4ff; color: var(--info); }

/* ── TABLE ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { background: #f7fafc; color: var(--muted); font-size: .75rem; text-transform: uppercase;
     letter-spacing: .05em; padding: 10px 14px; text-align: left; border-bottom: 1px solid #edf2f7; }
td { padding: 12px 14px; border-bottom: 1px solid #f7fafc; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7fafc; }

/* ── OS ESTADO COLORS ────────────────────────────────────── */
.estado-recibida   { background:#fff8e1; color:#b7791f; }
.estado-en_proceso { background:#ebf4ff; color:#2b6cb0; }
.estado-lista      { background:#f0fff4; color:#276749; }
.estado-entregada  { background:#f0fff4; color:#276749; }
.estado-cancelada  { background:#fff5f5; color:#c53030; }

/* ── TIMELINE ────────────────────────────────────────────── */
.timeline { padding: 0 0 0 32px; position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 0; bottom: 0;
  width: 2px;
  background: #edf2f7;
}
.timeline-item {
  position: relative;
  margin-bottom: 20px;
}
.timeline-dot {
  position: absolute;
  left: -27px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--cyan);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--cyan);
}
.timeline-dot.green  { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.orange { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.timeline-dot.red    { background: var(--danger);  box-shadow: 0 0 0 2px var(--danger); }
.timeline-date { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.timeline-title { font-weight: 600; font-size: .95rem; }
.timeline-sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }

/* ── PROFILE ─────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
  color: #fff;
  padding: 28px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 70px; height: 70px;
  background: var(--cyan);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.profile-name { font-size: 1.2rem; font-weight: 700; }
.profile-since { font-size: .8rem; color: #adb5bd; margin-top: 4px; }

/* ── PROMO CARDS ─────────────────────────────────────────── */
.promo-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 600px) { .promo-grid { grid-template-columns: 1fr 1fr; } }
.promo-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 5px solid var(--cyan);
}
.promo-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.promo-card .promo-body { padding: 16px; }
.promo-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.promo-card p { font-size: .85rem; color: var(--muted); }
.promo-dates { font-size: .75rem; color: var(--cyan); margin-top: 8px; font-weight: 600; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; color: #cbd5e0; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--dark) 0%, #0d3d4d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-logo {
  text-align: center;
  margin-bottom: 24px;
}
.login-logo img { height: 52px; }
.login-logo h2 {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 400;
}
.login-logo strong { color: var(--cyan); }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: .95rem;
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(10,184,201,.1); }
.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--cyan);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--cyan-dk); }
.alert-error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  margin-bottom: 16px;
}
.login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .8rem;
  color: var(--muted);
}
.pin-hint {
  background: #e6f9fb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .8rem;
  color: var(--cyan-dk);
  margin-bottom: 16px;
  text-align: center;
}
