/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  padding-top: 1rem;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
}
.sidebar .nav-link {
  color: #495057;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
  color: #0d6efd;
  background-color: rgba(13,110,253,0.1);
}

/* Main content */
.main-content {
  margin-left: 240px;
  padding: 2rem 1rem;
}
@media (max-width: 767.98px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }
}

/* Dashboard cards */
.dashboard-card {
  border: 1px solid #e0e0e0;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.dashboard-card h5 {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

/* Tables in dashboard */
.table-responsive {
  margin-bottom: 1.5rem;
}
.table-dashboard thead th {
  background-color: #f1f3f5;
  border-bottom: 2px solid #dee2e6;
}
.table-dashboard tbody tr:hover {
  background-color: #f8f9fa;
}

/* Modals */
.modal-content {
  border-radius: 0.375rem;
}
.modal-header {
  border-bottom: 1px solid #e0e0e0;
}
.modal-footer {
  border-top: 1px solid #e0e0e0;
}

/* Form tweaks in dashboard */
.form-range {
  width: 100%;
}
.form-text {
  font-size: 0.875rem;
  color: #6c757d;
}

/* Cards layout for QRs and URLs */
.card-qr, .card-url {
  transition: transform 0.15s ease-in-out;
}
.card-qr:hover, .card-url:hover {
  transform: translateY(-4px);
}

/* Responsive grid for items */
.row-cols-1 .col, .row-cols-md-3 .col {
  margin-bottom: 1.5rem;
}


/* Impresión: dos columnas y ocultar controles */
@media print {
  nav, .sidebar, #analyticsForm, #printControls, #btnPrint, footer {
    display: none !important;
  }
  body {
    margin: 0;
  }
  /* Resumen en dos columnas */
  .summary {
    display: flex;
    gap: 1rem;
  }
  .summary > .col-md-6 {
    flex: 1;
  }
  /* Gráficas en dos columnas */
  .charts .chart-block {
    width: 50% !important;
    float: left !important;
    box-sizing: border-box;
  }
  .charts::after {
    content: "";
    display: table;
    clear: both;
  }
}