/* =====================================================
   SEGUIMIENTO — Estilos principales
   ===================================================== */

:root {
  --sidebar-width: 0px;
  --topbar-height: 56px;
}

/* Layout */
body {
  font-size: .9rem;
  background-color: #f0f2f5;
}

.main-content {
  margin-top: var(--topbar-height);
  min-height: calc(100vh - var(--topbar-height));
  padding-bottom: 2rem;
}

/* ── Navbar ──────────────────────────────────── */
.navbar {
  height: var(--topbar-height);
  z-index: 1030;
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: .3px;
}

/* ── Cards ───────────────────────────────────── */
.card {
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: 1px solid rgba(0,0,0,.06);
  padding: .75rem 1.25rem;
  font-size: .875rem;
}

.hover-shadow {
  transition: box-shadow .2s, transform .15s;
}
.hover-shadow:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,.12) !important;
  transform: translateY(-2px);
}

/* ── Stats icon ──────────────────────────────── */
.stats-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 12px;
}

/* ── Timeline ────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.25rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.1);
  flex-shrink: 0;
}

.timeline-content {
  background: #f8f9fa;
  border-radius: 8px;
  padding: .75rem;
  font-size: .85rem;
}

.timeline-internal .timeline-content {
  background: #fff8e1;
  border: 1px solid #ffe082;
}

/* Portal timeline (cliente) */
.portal-timeline .timeline-content {
  background: #fff;
  border: 1px solid #e9ecef;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

/* ── Notas / muro ────────────────────────────── */
.notes-list {
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
}

.note-avatar {
  font-size: .75rem;
  font-weight: bold;
}

/* ── Tables ──────────────────────────────────── */
.table > :not(caption) > * > * {
  padding: .6rem .75rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, .04);
}

/* ── Formularios ─────────────────────────────── */
.form-control:focus,
.form-select:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.2);
}

/* ── Badges ──────────────────────────────────── */
.badge {
  font-weight: 600;
  letter-spacing: .3px;
}

/* ── Buttons ─────────────────────────────────── */
.btn {
  border-radius: 8px;
  font-size: .875rem;
}
.btn-sm {
  border-radius: 6px;
}

/* ── Alerts ──────────────────────────────────── */
.alert {
  border-radius: 10px;
  border: none;
  border-left: 4px solid;
}
.alert-success { border-left-color: #198754; }
.alert-danger  { border-left-color: #dc3545; }
.alert-warning { border-left-color: #ffc107; }
.alert-info    { border-left-color: #0dcaf0; }

/* ── Font monospace ──────────────────────────── */
code, .font-monospace {
  font-size: .85em;
}

/* ── Menú móvil (navbar collapse) ───────────── */
@media (max-width: 991.98px) {
  #navMenu {
    background-color: #0d6efd;
    padding: .5rem .75rem .75rem;
    border-radius: 0 0 .5rem .5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    margin-top: .25rem;
  }
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 576px) {
  .main-content {
    padding-left: .5rem;
    padding-right: .5rem;
  }
  .card-body {
    padding: 1rem;
  }
}

/* ── Scroll suave ────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Loading state ───────────────────────────── */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: .75;
}
