.formulario_pagina {
  --bg:#0b1220;
  --card:#111b2e;
  --muted:#9bb0d1;
  --text:#e8f0ff;
  --line:#223255;
  --accent:#4da3ff;
  --ok:#31d07f;
  --warn:#ffcc66;
  --bad:#ff6b6b;

  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:linear-gradient(180deg,#071022,#0b1220);
  padding:20px;
  border-radius:16px;
  max-width: 1400px;
  margin: 0 auto;
}

.formulario_pagina * {
  box-sizing:border-box;
}

/* CABECERA */

.cabecera_formulario {
  padding:22px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(7,16,34,.75);
  border-radius:16px;
  margin-bottom:14px;
  width: 100%;
}

.row {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

.row h1 {
  font-size:18px;
  margin:0;
  color:#fff;
}

.pill {
  font-size:12px;
  color:#fff;
  background:var(--accent);
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
}

/* CONTENEDOR PRINCIPAL */

.cuerpo_formulario {
  display:grid;
  gap:20px;
}

.cuerpo_formulario.dos_columnas{
  grid-template-columns: minmax(420px, 1fr) 2fr;
}

@media (max-width:1200px){
  .cuerpo_formulario.dos_columnas{
    grid-template-columns: 1fr;
  }
}

.cuerpo_formulario.una_columna{
  grid-template-columns: 1fr;
}


.cuerpo_formulario.una_columna .mesa_col_tickets{
  max-width: 100%;
}
/* Elimina widths, deja que grid controle */
.mesa_col_crear{
  min-width: 0;
}
.mesa_col_tickets {
  width: 100%;
  min-width:0;
}

.tabla_wrap{
  width:100%;
  overflow-x:auto;
}

/*  EVIDENCIA */
.evidencia-img,
.evidencia-video {
  display: block;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 400px !important;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 6px;
}
/* RESPONSIVE REAL */
@media (max-width:980px){
  .cuerpo_formulario {
    grid-template-columns:1fr;
  }
}

/* TARJETAS */

.card {
  background:rgba(17,27,46,.9);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

.card h2 {
  margin:0 0 10px 0;
  font-size:14px;
  color:#cfe2ff;
}

/* FORMULARIOS */

label {
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:10px 0 6px;
}

input,
select,
textarea,
button {
  width:100%;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b152b;
  color:var(--text);
  outline:none;
}

textarea {
  min-height:90px;
  resize:vertical;
}

/* GRIDS */

.grid2 {
  display:grid;
  gap:10px;
  grid-template-columns:1fr 1fr;
}

.grid3 {
  display:grid;
  gap:10px;
  grid-template-columns:1fr 1fr 1fr;
}

/* ESTADISTICAS */

.conteoTickets {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

.graficosDistribucion {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

/* BOTONES */

.actions {
  display:flex;
  gap:10px;
  margin-top:12px;
}

.actions button {
  cursor:pointer;
  font-weight:700;
}

.primary {
  background:var(--accent);
  border:none;
  color:#00152a;
}

.ghost {
  background:transparent;
}

.danger {
  background:transparent;
  border-color:#4a2230;
  color:#ffb3b3;
}

.mini {
  font-size:12px;
  padding:8px 10px;
}

/* TOOLBAR */

.toolbar {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.toolbar > * {
  flex:1;
  min-width:160px;
}

/* TABLAS (UNIFICADO) */

.table {
  width:100%;
  min-width:0;
  border-collapse:collapse;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--line);
}

.table th,
.table td {
  padding:10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  font-size:13px;
  vertical-align:top;
}

.table th {
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  background:#0b152b;
}

.table tr:hover {
  background:rgba(255,255,255,.03);
}

/* TEXTO */

.muted {
  color:var(--muted);
  font-size:12px;
}

.small {
  font-size:12px;
  color:var(--muted);
}

.right {
  text-align:right;
}

/* FLEX */

.split {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
}

.linkbtn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

/* DETAILS */

details {
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background:#0b152b;
}

summary {
  cursor:pointer;
  color:#cfe2ff;
  font-weight:700;
}

/* STATS */

.statCard {
  background:rgba(17,27,46,.9);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  text-align:center;
}

.statCard h3 {
  color:#ffffff;
}

/* COMENTARIOS */

.comentario {
  padding:10px;
  border-bottom:1px solid var(--line);
  margin-bottom:6px;
}

.mostrarFolio {
  color:#fff;
  font-size:18px;
  font-weight:600;
}

.etiquetaComentarios {
  color:#fff;
  font-size:16px;
  margin-top:10px;
}

.loaderGlobal{
  position:fixed;
  inset:0;
  background:rgba(5,10,20,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  backdrop-filter: blur(4px);
}

.loaderGlobal.hidden{
  display:none;
}

.loaderSpinner{
  width:50px;
  height:50px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.2);
  border-top:4px solid #4da3ff;
  animation:spin .8s linear infinite;
}

#pagination {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:12px;
}

#pagination button {
  background:#0b152b;
  border:1px solid var(--line);
  color:var(--text);
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
  transition:.2s;
}

#pagination button:hover {
  background:var(--accent);
  color:#00152a;
}

#pagination button.active {
  background:var(--accent);
  color:#00152a;
  font-weight:700;
}

.page-btn {
  border-radius:10px;
}

.page-btn {
  width:40px;
  height:40px;
  border-radius:10px;
  border:2px solid #ccc;
  background:transparent;
  color:#555;
}

.page-btn.active {
  background:transparent;
  border:2px solid var(--accent);
  color:var(--accent);
}

.page-btn.nav {
  font-size:18px;
  font-weight:bold;
}

@keyframes spin{
  to{ transform:rotate(360deg); }
}