/* public/assets/css/app.css — Estilos globales */
:root {
  --tp-blue:    #29ABE2;
  --tp-navy:    #0a1628;
  --tp-accent:  #00d4aa;
  --sidebar-w:  255px;
}

/* ── ADMIN LAYOUT ────────────────────────────────────────────── */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--tp-navy); color: #fff;
  z-index: 200; display: flex; flex-direction: column;
  transition: transform .3s ease;
}
#sidebar .brand {
  padding: 1.2rem 1.5rem; font-size: 1.05rem; font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,.07); letter-spacing: .04em;
}
#sidebar nav a {
  display: flex; align-items: center; gap: 10px;
  padding: .65rem 1.5rem; color: rgba(255,255,255,.65);
  text-decoration: none; font-size: .88rem; transition: all .18s;
  border-left: 3px solid transparent;
}
#sidebar nav a:hover  { color: #fff; background: rgba(41,171,226,.12); }
#sidebar nav a.active { color: #fff; background: rgba(41,171,226,.18);
                        border-left-color: var(--tp-blue); font-weight: 600; }
#sidebar .sidebar-footer {
  margin-top: auto; padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
#main { margin-left: var(--sidebar-w); padding: 1.5rem; min-height: 100vh; }
body  { background: #f0f4f8; font-family: 'DM Sans', sans-serif; }

/* Topbar */
.topbar {
  background: #fff; border-radius: 12px; padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar h1 { font-size: 1.1rem; font-weight: 700; margin: 0; }

/* Stats */
.stat-card {
  background: #fff; border-radius: 14px; padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border-left: 4px solid var(--tp-blue);
}
.stat-card .label { font-size: .75rem; color: #8a9ab0; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 1.9rem; font-weight: 800; color: #0a1628; line-height: 1.2; }

/* Table card */
.table-card {
  background: #fff; border-radius: 14px;
  padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Status badges */
.badge-draft      { background: #e2e8f0; color: #475569; }
.badge-issued     { background: #dbeafe; color: #1d4ed8; }
.badge-partial    { background: #fef3c7; color: #92400e; }
.badge-paid       { background: #dcfce7; color: #166534; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-approved   { background: #dcfce7; color: #166534; }
.badge-rejected   { background: #fee2e2; color: #991b1b; }

/* ── PORTAL CLIENTE ─────────────────────────────────────────── */
.portal-body  { background: #f0f4f8; }
.portal-nav {
  background: var(--tp-navy); color: #fff;
  padding: .8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.portal-nav .brand   { color: var(--tp-blue); font-size: 1rem; }
.portal-nav .nav-links a {
  color: rgba(255,255,255,.7); text-decoration: none;
  font-size: .88rem; transition: color .2s;
}
.portal-nav .nav-links a:hover { color: #fff; }

/* ── TRACKING TIMELINE ──────────────────────────────────────── */
.tracking-timeline {
  display: flex; align-items: flex-start;
  padding: 1rem 0; overflow-x: auto; gap: 0;
}
.tracking-step {
  display: flex; flex-direction: column; align-items: center;
  min-width: 72px; position: relative;
}
.tracking-step .dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #cbd5e1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; z-index: 1; cursor: default;
}
.tracking-step.done   .dot { background: #22c55e; border-color: #22c55e; color: #fff; }
.tracking-step.active .dot {
  background: var(--tp-blue); border-color: var(--tp-blue); color: #fff;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(41,171,226,.4); }
  50%      { box-shadow: 0 0 0 8px rgba(41,171,226,0); }
}
.tracking-step .step-label {
  font-size: .62rem; text-align: center; color: #94a3b8;
  margin-top: .35rem; max-width: 66px; line-height: 1.2;
}
.tracking-step.done .step-label,
.tracking-step.active .step-label { color: #1e293b; font-weight: 600; }
.tracking-connector       { flex: 1; height: 3px; background: #e2e8f0; min-width: 12px; margin-top: 14px; }
.tracking-connector.done  { background: #22c55e; }

/* ── BOTTOM NAV MÓVIL ───────────────────────────────────────── */
@media (max-width: 575px) {
  .portal-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--tp-navy); display: flex;
    padding: .45rem 0 .5rem; border-top: 1px solid rgba(255,255,255,.08); z-index: 200;
  }
  .portal-bottom-nav a {
    flex: 1; text-align: center; color: rgba(255,255,255,.55);
    text-decoration: none; font-size: .65rem; padding: .2rem 0;
    transition: color .2s;
  }
  .portal-bottom-nav a.active,
  .portal-bottom-nav a:hover { color: var(--tp-blue); }
  .portal-bottom-nav .nav-icon { font-size: 1.15rem; display: block; }
  .portal-content { padding-bottom: 5rem; }
}

/* ── RESPONSIVE ADMIN ───────────────────────────────────────── */
@media (max-width: 767px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.show { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.3); }
  #main { margin-left: 0; }
}
