/* ============================================================================
   Estilos principales — Sistema de Gestión de Trámites
   ============================================================================ */

/* --- Variables --- */
:root {
  --sidebar-width: 240px;
  --topbar-height: 56px;
  --sidebar-bg: #212529;
  --primary: #0d6efd;
}

/* --- Base --- */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: #f0f2f5;
}

/* --- Login --- */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* --- Topbar --- */
#topbar {
  height: var(--topbar-height);
  z-index: 1040;
}

/* --- Sidebar --- */
#sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  z-index: 1030;
  transition: transform 0.3s ease;
}

#sidebar .nav-link {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

#sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: rgba(255, 255, 255, 0.3);
}

#sidebar .nav-link.active {
  background: rgba(13, 110, 253, 0.2);
  border-left-color: var(--primary);
  font-weight: 600;
}

/* --- Main content --- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 1.5rem;
  min-height: calc(100vh - var(--topbar-height));
}

/* --- Sidebar collapsed --- */
body.sidebar-collapsed #sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .main-content {
  margin-left: 0;
}

/* --- Cards --- */
.stat-card .card-body {
  padding: 1.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}



/* --- Progress bar naranja --- */
.progress-bar.bg-orange {
  background-color: #fd7e14;
}

/* --- Timeline --- */
.timeline-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.timeline-item:last-child {
  border-bottom: none;
}

/* --- Cursor pointer --- */
.cursor-pointer {
  cursor: pointer;
}

.cursor-pointer:hover {
  background-color: rgba(13, 110, 253, 0.04);
}

/* --- Table fixes --- */
.table th {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6c757d;
}

.table td {
  vertical-align: middle;
  font-size: 0.9rem;
}

/* --- Scrollbar sidebar --- */
#sidebar::-webkit-scrollbar {
  width: 4px;
}

#sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
  #sidebar {
    transform: translateX(-100%);
  }

  body.sidebar-open #sidebar {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 575.98px) {
  .login-card {
    padding: 1.5rem;
  }

  .main-content {
    padding: 1rem;
  }
}

/* --- Badge fixes --- */
.badge {
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* --- Card hover effect --- */
.card {
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

/* --- Alerts inside modals --- */
.modal .alert {
  margin-bottom: 0;
}
