/* assets/styles/components.css */

/* ==========================================================================
   BOTONES Y ACCIONES (Optimizados para Touch en iPad y Móvil)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 10px 16px;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.15s ease;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn.primary:hover {
  background: var(--navy-light);
  border-color: var(--navy-light);
}

.btn.wine {
  background: var(--wine);
  border-color: var(--wine);
  color: #ffffff !important;
}

.btn.wine:hover {
  background: #621927;
  border-color: #621927;
  color: #ffffff !important;
}

.btn.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #17243a;
}

.btn.gold:hover {
  background: var(--gold-hover);
}

.btn.small {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn.danger {
  background: var(--wine);
  border-color: var(--wine);
  color: #ffffff !important;
  font-weight: 600;
}

.btn.danger:hover {
  background: #621927;
  border-color: #621927;
  color: #ffffff !important;
}

/* ==========================================================================
   TARJETAS Y PANELES (Adaptativo para iPad y Móvil)
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .panel {
    padding: 16px;
    margin-bottom: 16px;
    border-radius: var(--radius);
  }
}

.panel h3 {
  font-size: 16px;
  color: var(--navy);
  margin: 0 0 14px;
  font-weight: 700;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.panel-head h3 {
  margin: 0;
}

.stat {
  padding: 18px 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (hover: hover) {
  .stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(16, 38, 75, 0.1);
  }
}

.stat .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat strong {
  display: block;
  color: var(--navy);
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0 2px;
  line-height: 1.1;
}

.stat small {
  color: var(--muted);
  font-size: 11px;
}

.stat .icon {
  width: 38px;
  height: 38px;
  background: #eef3f9;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--navy);
  font-size: 17px;
  flex-shrink: 0;
}

.grid2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  min-width: 0;
  max-width: 100%;
}

.grid2 > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .grid2 {
    grid-template-columns: 1fr;
    gap: 18px;
    min-width: 0;
    max-width: 100%;
  }
}

/* ==========================================================================
   TABLAS Y ENVOLTORIOS DE SCROLL (Touch en iPad y Móvil)
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  position: relative;
  margin: 0 -4px;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}

.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 580px;
  font-size: 13px;
}

th {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #fafbfc;
  font-weight: 700;
  position: sticky;
  top: 0;
}

td,
th {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td.wrap-cell,
th.wrap-cell {
  white-space: normal;
}

tr:hover td {
  background: #fdfdfd;
}

tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   INSIGNIAS Y PILLS
   ========================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: #eef1f6;
  color: #475467;
  white-space: nowrap;
}

.pill.green {
  background: var(--green-bg);
  color: var(--green);
}

.pill.amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.pill.red {
  background: var(--red-bg);
  color: var(--red);
}

.pill.blue {
  background: var(--blue-bg);
  color: var(--navy);
}

/* ==========================================================================
   BARRAS DE PROGRESO
   ========================================================================== */
.progress {
  height: 8px;
  background: #edf0f4;
  border-radius: 10px;
  overflow: hidden;
  min-width: 90px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--navy-light));
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* ==========================================================================
   TOOLBARS, CAMPOS DE FORMULARIO E INPUTS (Anti Zoom iOS Safari)
   ========================================================================== */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 240px;
  min-height: 44px;
  background: #fff;
  font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 38, 75, 0.08);
}

@media (max-width: 768px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    width: 100%;
    min-width: 0;
    font-size: 16px; /* Evita auto-zoom en iOS Safari */
  }

  .toolbar .role-badge-select {
    width: 100%;
    min-height: 44px;
    font-size: 15px;
  }
}

.role-badge-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 40px;
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  touch-action: manipulation;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
}

.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: #475467;
}

.field input,
.field select,
.field textarea {
  border: 1px solid #d9dee7;
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
  background: #fff;
  outline: none;
  color: var(--ink);
  width: 100%;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

@media (max-width: 768px) {
  .field input,
  .field select,
  .field textarea {
    font-size: 16px; /* Imprescindible para evitar auto-zoom forzado en iPhone/iPad Safari */
    min-height: 46px;
  }
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 38, 75, 0.08);
}

.field textarea {
  min-height: 95px;
  resize: vertical;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.formgrid .field {
  margin: 0;
}

.full {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .formgrid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   MODAL (Optimizado para Touch y Viewport Móvil/iPad - Bottom Sheet Nativo)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 24, 48, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100005 !important;
}

.modal.show {
  display: flex !important;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes sheetUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* En modo móvil (<= 768px): Bottom Sheet nativo de ancho completo, proporcionado y sin solapamiento */
@media (max-width: 768px) {
  .modal {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    padding: 14px 18px calc(24px + env(safe-area-inset-bottom, 16px)) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.32) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    animation: sheetUp 0.28s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
  }
}

.modal-handle-bar {
  display: none;
  width: 44px;
  height: 4.5px;
  background: #cbd5e1;
  border-radius: 4px;
  margin: -4px auto 14px auto;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .modal-handle-bar {
    display: block;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.modal-head h2 {
  font-size: 17px;
  color: var(--navy);
  margin: 0;
  font-weight: 750;
  line-height: 1.3;
}

.modal-head .x {
  border: 0;
  background: #f1f3f7;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.modal-head .x:active {
  background: #e2e8f0;
  color: var(--ink);
}

/* ==========================================================================
   CHECKLIST DE EVALUACIONES (Optimizado para iPad en Campo y Móvil)
   ========================================================================== */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkrow {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: center;
  background: #fff;
  transition: border-color 0.15s ease;
}

.checkrow:hover {
  border-color: #cbd5e1;
}

.checkrow p {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 13.5px;
  color: #1e293b;
  line-height: 1.45;
}

.checkrow small {
  color: var(--muted);
  font-size: 11.5px;
}

.checkrow select.control-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  background: #f8fafc;
  font-weight: 600;
  min-height: 44px;
  width: 100%;
  touch-action: manipulation;
}

.checkrow select.val-C {
  background: var(--green-bg);
  color: var(--green);
  border-color: #bbf7d0;
}

.checkrow select.val-NC {
  background: var(--red-bg);
  color: var(--red);
  border-color: #fecaca;
}

.checkrow select.val-P {
  background: var(--blue-bg);
  color: var(--navy);
  border-color: #bfdbfe;
}

.checkrow select.val-NA {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
}

/* En iPad Portrait y Teléfonos, los controles pasan a columna completa para tocar fácilmente */
@media (max-width: 820px) {
  .checkrow {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .checkrow select.control-select {
    min-height: 48px;
    font-size: 15px;
  }
}

/* ==========================================================================
   TABS Y NAVEGACIÓN POR SECCIONES (Deslizable con dedo en iPad y Móvil)
   ========================================================================== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 16px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 44px;
  transition: all 0.15s ease;
}

.tabs button:hover {
  color: var(--navy);
  border-color: #cbd5e1;
}

.tabs button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 38, 75, 0.15);
}

/* ==========================================================================
   PORTAL DE CLIENTE (ESPECIAL PARA TABLET / iPAD)
   ========================================================================== */
.portal-banner {
  background: linear-gradient(135deg, var(--navy), #1d3c6d);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.portal-banner h2 {
  margin: 4px 0 6px;
  font-size: clamp(20px, 3.5vw, 24px);
  color: #fff;
  font-weight: 800;
}

.portal-banner p {
  color: #d9e2f0;
  margin: 0;
  font-size: 13.5px;
}

@media (max-width: 768px) {
  .portal-banner {
    padding: 18px 16px;
  }
}

/* ==========================================================================
   SUBIDA DE ARCHIVOS Y EXPEDIENTES
   ========================================================================== */
.file-upload-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-input-hidden {
  display: none;
}

.file-link {
  color: var(--navy-light);
  text-decoration: underline;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   EMPTY, NOTICES, FOOTER
   ========================================================================== */
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

.empty b {
  display: block;
  color: var(--navy);
  margin: 8px 0;
  font-size: 15px;
}

.notice {
  padding: 14px 16px;
  border-radius: 9px;
  background: #f5f1e9;
  border-left: 4px solid var(--gold);
  color: #66502c;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.footer-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.5;
}

/* ==========================================================================
   TOAST NOTIFICACIONES
   ========================================================================== */
.toast {
  position: fixed;
  right: 24px;
  bottom: calc(24px + var(--safe-bottom));
  background: var(--navy);
  color: #fff;
  padding: 13px 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1200;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 4px solid var(--gold);
  animation: slideUp 0.25s ease;
  max-width: calc(100vw - 32px);
}

@keyframes slideUp {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.show {
  display: block;
}

@media (max-width: 600px) {
  .toast {
    right: 16px;
    left: 16px;
    bottom: calc(16px + var(--safe-bottom));
    text-align: center;
  }
}

/* ==========================================================================
   PANTALLA DE LOGIN
   ========================================================================== */
.login-wrapper {
  min-height: 90vh;
  min-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  padding-bottom: calc(30px + var(--safe-bottom));
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(16, 38, 75, 0.14);
  max-width: 440px;
  width: 100%;
  padding: 36px 32px;
  animation: modalIn 0.25s ease;
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
    border-radius: 14px;
  }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-box {
  margin-bottom: 14px;
}

.login-logo {
  max-height: 58px;
  max-width: 220px;
  object-fit: contain;
}

.login-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--wine);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.login-header h2 {
  font-size: 21px;
  color: var(--navy);
  margin: 0 0 6px;
  font-weight: 800;
}

.login-header p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.login-form {
  margin-bottom: 20px;
}

.login-error {
  background: var(--red-bg);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
  font-weight: 600;
}

.login-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ==========================================================================
   DASHBOARD NATIVO MÓVIL Y TABLET (Matching Reference Screenshot)
   ========================================================================== */
.dashboard-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
}

.dash-head {
  margin-bottom: 18px;
}

.dash-eyebrow {
  color: #7a1f33;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dash-title {
  font-size: 24px;
  font-weight: 800;
  color: #10264b;
  margin: 0 0 4px;
  line-height: 1.2;
  letter-spacing: -0.4px;
}

.dash-subtitle {
  color: #64748b;
  font-size: 13.5px;
  margin: 0;
  line-height: 1.4;
}

/* Botones de Acción Superiores (2 Columnas) */
.dash-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.dash-btn-wine,
.dash-btn-navy {
  border: 0;
  border-radius: 16px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 64px;
}

.dash-btn-wine {
  background: #7a1f33;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(122, 31, 51, 0.32);
}

.dash-btn-wine:active {
  background: #631728;
  transform: scale(0.97);
}

.dash-btn-navy {
  background: #10264b;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(16, 38, 75, 0.25);
}

.dash-btn-navy:active {
  background: #09172f;
  transform: scale(0.97);
}

.dash-btn-wine .btn-top-line,
.dash-btn-navy .btn-top-line {
  font-size: 14.5px;
  font-weight: 750;
  line-height: 1.25;
  color: #ffffff;
  white-space: nowrap;
}

.dash-btn-wine .btn-sub-line,
.dash-btn-navy .btn-sub-line {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.92;
  color: #ffffff;
  line-height: 1.25;
}

/* ==========================================================================
   CARRUSEL DE BANNERS HORIZONTALES (Optimizado para Modo Móvil)
   ========================================================================== */
.dash-banners-section {
  margin-bottom: 24px;
  position: relative;
  width: 100%;
}

.dash-banners-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  scrollbar-width: none;
}

.dash-banners-carousel::-webkit-scrollbar {
  display: none;
}

.dash-banner-card {
  flex: 0 0 85%;
  max-width: 340px;
  scroll-snap-align: center;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(16, 38, 75, 0.08);
  border: 1px solid rgba(16, 38, 75, 0.06);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
}

.dash-banner-card:active {
  transform: scale(0.98);
}

.dash-banner-img-wrap {
  position: relative;
  width: 100%;
  height: 155px;
  overflow: hidden;
  background: #0d1e38;
}

.dash-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.dash-banner-card:hover .dash-banner-img {
  transform: scale(1.03);
}

.dash-banner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dash-banner-content {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #ffffff;
  flex: 1;
}

.dash-banner-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.dash-banner-number {
  font-size: 34px;
  font-weight: 850;
  color: #10264b;
  line-height: 1;
  letter-spacing: -0.5px;
}

.dash-banner-tag {
  font-size: 11px;
  font-weight: 650;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 12px;
}

.dash-banner-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #10264b;
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-transform: uppercase;
}

.dash-banner-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

/* Indicadores de puntos (Dots) para modo móvil */
.dash-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: -4px;
  padding-bottom: 6px;
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  cursor: pointer;
}

.dash-dot.active {
  width: 22px;
  border-radius: 10px;
  background: #10264b;
}

/* En Desktop / Tablets (> 768px), se muestra en cuadrícula de 2 columnas */
@media (min-width: 769px) {
  .dash-banners-carousel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  .dash-banner-card {
    flex: none;
    max-width: none;
    scroll-snap-align: none;
  }

  .dash-banner-img-wrap {
    height: 165px;
  }

  .dash-carousel-dots {
    display: none;
  }
}

.pill-orange-badge {
  background: #ffedd5;
  color: #c2410c;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* Badges redondeados estilo píldora */
.pill-green-badge {
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.pill-blue-badge {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.pill-red-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: fit-content;
}

/* ==========================================================================
   CARRUSEL DE BANNERS DE HALLAZGOS (Sin imagen, auto-scroll de dcha a izq)
   ========================================================================== */
.pulse-indicator-red {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  animation: pulseRed 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseRed {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(220, 38, 38, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

.findings-banner-panel {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.findings-carousel-wrap {
  position: relative;
  width: 100%;
}

.findings-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 4px 12px;
  scrollbar-width: none;
}

.findings-carousel::-webkit-scrollbar {
  display: none;
}

.finding-banner-card {
  flex: 0 0 86%;
  max-width: 330px;
  scroll-snap-align: center;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #64748b;
  box-shadow: 0 4px 16px rgba(16, 38, 75, 0.06);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.finding-banner-card:active {
  transform: scale(0.98);
}

.finding-banner-card.risk-critico {
  border-left-color: #dc2626;
  background: linear-gradient(180deg, #fffefe 0%, #ffffff 100%);
}

.finding-banner-card.risk-alto {
  border-left-color: #ea580c;
  background: linear-gradient(180deg, #fffdfb 0%, #ffffff 100%);
}

.finding-banner-card.risk-medio {
  border-left-color: #2563eb;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}

.finding-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.finding-card-code-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finding-card-code {
  font-family: monospace;
  font-weight: 750;
  font-size: 12px;
  color: var(--navy);
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
}

.finding-card-risk {
  font-size: 11px;
  font-weight: 700;
}

.finding-card-status {
  font-size: 10.5px;
  font-weight: 650;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 10px;
}

.finding-card-body {
  margin-bottom: 12px;
}

.finding-card-title {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.finding-card-area {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finding-card-evidence {
  font-size: 11.5px;
  color: #475569;
  background: #f8fafc;
  padding: 6px 9px;
  border-radius: 8px;
  border-left: 2px solid #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.finding-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
}

.finding-card-company {
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.finding-card-action {
  font-weight: 750;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

/* Indicadores de carrusel de hallazgos (Dots) */
.findings-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 0;
}

.finding-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.finding-dot.active {
  width: 20px;
  border-radius: 10px;
  background: var(--navy);
}

@media (min-width: 769px) {
  .findings-carousel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  .finding-banner-card {
    flex: none;
    max-width: none;
    scroll-snap-align: none;
  }

  .findings-carousel-dots {
    display: none;
  }
}

/* ==========================================================================
   ASISTENTE DE INICIO DE AUDITORÍA (Responsive Stepper, Pills y Acciones Móvil)
   ========================================================================== */
.wiz-step-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: relative;
  width: 100%;
}

.wiz-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
  flex: 0 0 auto;
}

.wiz-step-bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  transition: all 0.2s ease;
}

.wiz-step-item.active .wiz-step-bubble {
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 38, 75, 0.25);
}

.wiz-step-item.completed .wiz-step-bubble {
  background: #16a34a;
  color: #ffffff;
}

.wiz-step-text {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.wiz-step-item.active .wiz-step-text {
  color: var(--navy);
  font-weight: 750;
}

.wiz-step-connector {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px 18px;
  transition: background 0.2s ease;
}

.wiz-step-connector.active {
  background: var(--navy);
}

.wiz-section-box {
  margin-bottom: 16px;
}

.wiz-label-title {
  font-weight: 750;
  font-size: 13.5px;
  color: var(--navy);
  display: block;
  margin-bottom: 10px;
}

.wiz-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 480px) {
  .wiz-type-selector {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.wiz-type-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: #475569;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-user-select: none;
}

.wiz-type-pill.active {
  border-color: var(--navy);
  background: #eff6ff;
  color: var(--navy);
  font-weight: 750;
  box-shadow: 0 2px 8px rgba(16, 38, 75, 0.08);
}

.wiz-type-icon {
  font-size: 15px;
}

.wiz-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.wiz-btn-primary {
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 700;
}

.wiz-btn-secondary {
  min-height: 44px;
  padding: 10px 16px;
}

@media (max-width: 600px) {
  .wiz-action-row {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 18px;
    padding-top: 12px;
  }

  .wiz-action-row .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 48px !important;
    font-size: 14.5px !important;
  }
}

.wiz-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.wiz-summary-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--wine);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.wiz-summary-company {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 17px;
  font-weight: 800;
}

.wiz-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 12.5px;
}

@media (max-width: 500px) {
  .wiz-summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.wiz-summary-item {
  color: #334155;
}

.wiz-item-label {
  color: #64748b;
  margin-right: 4px;
}

.wiz-summary-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
