* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f4f7fb;
  color: #1f2937;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: white;
  padding: 28px 20px;
  overflow-y: auto;
}

.sidebar-brand h2 {
  font-size: 28px;
  margin-bottom: 6px;
}

.sidebar-brand p {
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 30px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-nav a {
  text-decoration: none;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 10px;
  transition: 0.25s ease;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.main-content {
  flex: 1;
  padding: 30px;
  min-height: 100vh;
}

.topbar {
  background: white;
  padding: 22px 24px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 30px;
  margin-bottom: 6px;
}

.topbar p {
  color: #64748b;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.card,
.panel {
  background: white;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.card .number {
  font-size: 34px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #0f172a;
}

.card .number.ok {
  color: #16a34a;
  font-size: 28px;
}

.card span,
.panel p,
.module-list li {
  color: #64748b;
  line-height: 1.6;
}

.panel h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.module-list {
  padding-left: 20px;
}

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 600;
}

.alert.success {
  background: #dcfce7;
  color: #166534;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .main-content {
    padding: 20px;
  }
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 26px;
  margin-bottom: 6px;
}

.section-header p {
  color: #64748b;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
}

.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: #f8fafc;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

.table th {
  color: #334155;
}

.table td {
  color: #475569;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.empty-state p {
  color: #64748b;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 700;
  color: #334155;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: #dc2626;
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}

.btn-danger:hover {
  background: #b91c1c;
}

.totales-box {
  margin-top: 24px;
  margin-left: auto;
  width: 100%;
  max-width: 340px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.totales-box div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
}

.total-final {
  font-size: 18px;
  padding-top: 10px;
  border-top: 1px solid #cbd5e1;
}

.empresa-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empresa-logo-wrap {
  width: 100%;
  height: 140px;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.empresa-logo {
  max-width: 90%;
  max-height: 110px;
  object-fit: contain;
}

.empresa-logo-placeholder {
  color: #64748b;
  font-weight: 700;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

.table-actions form,
.form-actions form {
  display: inline-flex;
}

.badge-cancelada {
  background: #fee2e2;
  color: #991b1b;
}

.badge-borrador {
  background: #fef3c7;
  color: #92400e;
}

.badge-enviada {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-aceptada {
  background: #dcfce7;
  color: #166534;
}

.alert.warning {
  background: #fef3c7;
  color: #92400e;
}

.panel h2 {
  margin-bottom: 14px;
}

.filtros-pro {
  margin-bottom: 20px;
}

.input-busqueda {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  margin-bottom: 12px;
  font-size: 14px;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.filtros-grid select,
.filtros-grid input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(16,185,129,0.14), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.hero-label {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #93c5fd;
  margin-bottom: 10px;
}

.dashboard-hero h2 {
  font-size: 34px;
  margin-bottom: 10px;
}

.hero-text {
  color: #cbd5e1;
  max-width: 640px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-kpis .kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.dashboard-kpis .kpi-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
}

.kpi-label {
  display: inline-block;
  margin-bottom: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.panel-highlight {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
}

.panel-highlight h2,
.panel-highlight span {
  color: #e2e8f0;
}

.big-money {
  font-size: 38px;
  font-weight: 800;
  margin: 12px 0;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.mini-stat {
  border-radius: 16px;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mini-stat strong {
  display: block;
  font-size: 26px;
  margin-bottom: 6px;
}

.mini-stat span {
  color: #64748b;
  font-size: 14px;
}

.mini-stat.borrador {
  background: #fff7ed;
}

.mini-stat.enviada {
  background: #eff6ff;
}

.mini-stat.aceptada {
  background: #f0fdf4;
}

.mini-stat.cancelada {
  background: #fef2f2;
}

.info-block {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.info-block span,
.info-block small {
  display: block;
  color: #64748b;
}

.info-block strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
  color: #0f172a;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-link {
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  transition: 0.25s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  background: #eef2ff;
  border-color: #c7d2fe;
}

@media (max-width: 768px) {
  .dashboard-hero h2 {
    font-size: 28px;
  }

  .quick-actions,
  .mini-stats {
    grid-template-columns: 1fr;
  }
}

.logo-mini {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px;
}

.text-muted {
  color: #64748b;
  font-size: 13px;
}

.table td strong {
  color: #0f172a;
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.panel form {
  margin-top: 6px;
}

.service-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}

.service-form-panel,
.service-preview-panel {
  border-radius: 24px;
}

.form-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}

.panel-kicker {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #6366f1;
}

.form-panel-head h3,
.service-preview-panel h3 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #0f172a;
}

.form-panel-head p,
.preview-text {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.service-icon-box {
  min-width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 28px;
  background: linear-gradient(135deg, #eef2ff, #dbeafe);
  border: 1px solid #cbd5e1;
}

.service-form .form-group small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  line-height: 1.5;
  font-size: 12px;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.input-with-prefix span {
  padding: 0 14px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  height: 100%;
  display: flex;
  align-items: center;
}

.input-with-prefix input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.input-with-prefix input:focus {
  outline: none;
}

.service-preview-card {
  margin-top: 18px;
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(99,102,241,0.16), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.service-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.preview-badge,
.preview-unit {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.service-preview-card h4 {
  margin: 0 0 10px;
  font-size: 24px;
  color: #fff;
}

.service-preview-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.7;
}

.preview-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.preview-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.preview-meta span {
  display: block;
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.preview-meta strong {
  font-size: 18px;
  color: #fff;
}

.service-tips {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.service-tips h4 {
  margin: 0 0 12px;
  color: #0f172a;
}

.service-tips ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .service-form-layout {
    grid-template-columns: 1fr;
  }
}

.table-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.text-muted {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

#tablaConceptos .clave-input {
  min-width: 110px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

#tablaConceptos .concepto-input {
  min-width: 240px;
}

#tablaConceptos .precio-input,
#tablaConceptos .cantidad-input,
#tablaConceptos .unidad-input {
  min-width: 110px;
}

.filtros-pro {
  display: grid;
  gap: 18px;
}

.filtro-busqueda {
  width: 100%;
}

.input-busqueda {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe2ea;
  background: #fff;
  font-size: 15px;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: center;
}

.empty-inline {
  text-align: center;
  padding: 24px 10px;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .filtros-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .filtros-grid {
    grid-template-columns: 1fr;
  }
}

.cotizaciones-resumen {
  margin-bottom: 22px;
}

.resumen-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.resumen-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
}

.resumen-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
}

.resumen-card .number {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
}

.resumen-card small {
  display: block;
  color: #64748b;
  line-height: 1.5;
}

.resumen-total {
  background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.resumen-borrador {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.resumen-enviada {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.resumen-aceptada {
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.resumen-cancelada {
  background: linear-gradient(135deg, #fef2f2, #ffffff);
}

.resumen-monto {
  background: linear-gradient(135deg, #ecfeff, #ffffff);
}

.grafica-panel + .grafica-panel {
  margin-top: 0;
}

.dual-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.dual-logos .empresa-logo {
  max-width: 110px;
  max-height: 90px;
  object-fit: contain;
}

.text-muted {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
} 

.texto-largo-cotizacion {
  white-space: pre-line;
  text-align: justify;
  line-height: 1.8;
  color: #334155;
}

.banco-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.banco-texto {
  flex: 1;
  min-width: 260px;
}

.banco-imagen img {
  max-width: 180px;
  object-fit: contain;
}

/* ===== Header / logo ===== */
.sidebar-brand-enhanced {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-copy h2 {
  font-size: 24px;
  margin: 0;
  line-height: 1.1;
}

.brand-copy p {
  margin: 4px 0 0;
  color: #cbd5e1;
  font-size: 13px;
}

/* ===== Cotizaciones ===== */
.text-muted {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.cotizaciones-resumen {
  margin-bottom: 22px;
}

.resumen-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.resumen-card::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
}

.resumen-label {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #64748b;
}

.resumen-total { background: linear-gradient(135deg, #f8fafc, #ffffff); }
.resumen-borrador { background: linear-gradient(135deg, #fff7ed, #ffffff); }
.resumen-enviada { background: linear-gradient(135deg, #eff6ff, #ffffff); }
.resumen-aceptada { background: linear-gradient(135deg, #f0fdf4, #ffffff); }
.resumen-cancelada { background: linear-gradient(135deg, #fef2f2, #ffffff); }
.resumen-monto { background: linear-gradient(135deg, #ecfeff, #ffffff); }

.grafica-panel {
  margin-bottom: 22px;
}

.grafica-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.grafica-head h2 {
  margin: 0 0 6px;
  color: #0f172a;
}

.grafica-head p {
  margin: 0;
  color: #64748b;
}

.grafica-wrap {
  position: relative;
  width: 100%;
  height: 320px;
}

.filtros-pro {
  display: grid;
  gap: 18px;
}

.filtro-busqueda {
  width: 100%;
}

.input-busqueda {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbe2ea;
  background: #fff;
  font-size: 15px;
  margin-bottom: 0;
}

.filtros-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  align-items: center;
}

.empty-inline {
  text-align: center;
  padding: 24px 10px;
  color: #64748b;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .filtros-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .filtros-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Sidebar premium ===== */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #cbd5e1;
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: 700;
  transition: all 0.25s ease;
}

.sidebar-nav a span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  transform: translateX(4px);
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.sidebar-nav a.active span {
  background: #0f172a;
  color: #fff;
}

.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 10px;
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: #38bdf8;
}

/* ===== Topbar sticky ===== */

.topbar {
  position: sticky;
  top: 20px;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* ===== Scrollbar sidebar ===== */

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
/* ===== Auth / Seguridad ===== */
.auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15,23,42,0.18), transparent 35%),
    #f4f7fb;
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.single-auth {
  width: min(520px, 100%);
  grid-template-columns: 1fr;
}

.auth-brand-panel {
  padding: 42px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  width: 190px;
  max-width: 100%;
  margin-bottom: 28px;
  background: #fff;
  border-radius: 18px;
  padding: 10px;
}

.auth-brand-panel h1 {
  font-size: 38px;
  margin-bottom: 14px;
}

.auth-brand-panel p {
  color: #cbd5e1;
  line-height: 1.7;
  max-width: 460px;
}

.auth-card {
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card h2 {
  font-size: 30px;
  margin-bottom: 8px;
  color: #0f172a;
}

.auth-card > p {
  color: #64748b;
  margin-bottom: 24px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-submit {
  width: 100%;
  margin-top: 4px;
}

.auth-link {
  margin-top: 18px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 800;
}

.auth-link:hover {
  text-decoration: underline;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 900;
}

.sidebar-user-card strong,
.sidebar-user-card span {
  display: block;
}

.sidebar-user-card strong {
  color: #fff;
  font-size: 14px;
}

.sidebar-user-card span {
  color: #cbd5e1;
  font-size: 12px;
  margin-top: 3px;
}

.logout-form {
  margin-top: 22px;
}

.logout-button {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.logout-button:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar-user {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topbar-user span {
  color: #64748b;
  font-size: 13px;
}

.topbar-user strong {
  color: #0f172a;
  font-size: 13px;
}

.role-badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.role-admin { background: #fee2e2; color: #991b1b; }
.role-ventas { background: #dbeafe; color: #1d4ed8; }
.role-consulta { background: #dcfce7; color: #166534; }

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    display: none;
  }

  .auth-card {
    padding: 30px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-user {
    text-align: left;
  }
}

/* ===== Seguridad / usuario / sesión ===== */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
  font-size: 18px;
  flex-shrink: 0;
}

.user-info strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

.user-info span {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logout-form {
  margin-top: 24px;
}

.logout-button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.logout-button:hover {
  background: rgba(239, 68, 68, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 20px;
  z-index: 20;
}

.topbar-user {
  text-align: right;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.topbar-user span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 3px;
}

.topbar-user strong {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.5px;
}