/* Better Bet — layout y utilidades (reemplazo Materialize, subset usado en el proyecto) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
}

body.bb-sidenav-open {
  overflow: hidden;
}

/* ——— Contenedores ——— */
.container {
  margin: 0 auto;
  max-width: 1280px;
  width: 92%;
}

.container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin: 0 auto;
}

/* ——— Grid (12 columnas, mobile-first) ——— */
.row {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}
.row::after {
  content: "";
  display: table;
  clear: both;
}

.row .col {
  float: left;
  padding: 0 0.75rem;
  min-height: 1px;
}

.row .col[class*="push-"],
.row .col[class*="pull-"] {
  position: relative;
}

/* small (default) */
.row .col.s1 { width: 8.3333333333%; }
.row .col.s2 { width: 16.6666666667%; }
.row .col.s3 { width: 25%; }
.row .col.s4 { width: 33.3333333333%; }
.row .col.s5 { width: 41.6666666667%; }
.row .col.s6 { width: 50%; }
.row .col.s7 { width: 58.3333333333%; }
.row .col.s8 { width: 66.6666666667%; }
.row .col.s9 { width: 75%; }
.row .col.s10 { width: 83.3333333333%; }
.row .col.s11 { width: 91.6666666667%; }
.row .col.s12 { width: 100%; }

.row .col.offset-s1 { margin-left: 8.3333333333%; }
.row .col.offset-s2 { margin-left: 16.6666666667%; }
.row .col.offset-s3 { margin-left: 25%; }
.row .col.offset-s4 { margin-left: 33.3333333333%; }
.row .col.offset-s5 { margin-left: 41.6666666667%; }
.row .col.offset-s6 { margin-left: 50%; }
.row .col.offset-s7 { margin-left: 58.3333333333%; }
.row .col.offset-s8 { margin-left: 66.6666666667%; }
.row .col.offset-s9 { margin-left: 75%; }
.row .col.offset-s10 { margin-left: 83.3333333333%; }
.row .col.offset-s11 { margin-left: 91.6666666667%; }

@media only screen and (min-width: 601px) {
  .row .col.m1 { width: 8.3333333333%; }
  .row .col.m2 { width: 16.6666666667%; }
  .row .col.m3 { width: 25%; }
  .row .col.m4 { width: 33.3333333333%; }
  .row .col.m5 { width: 41.6666666667%; }
  .row .col.m6 { width: 50%; }
  .row .col.m7 { width: 58.3333333333%; }
  .row .col.m8 { width: 66.6666666667%; }
  .row .col.m9 { width: 75%; }
  .row .col.m10 { width: 83.3333333333%; }
  .row .col.m11 { width: 91.6666666667%; }
  .row .col.m12 { width: 100%; }

  .row .col.offset-m1 { margin-left: 8.3333333333%; }
  .row .col.offset-m2 { margin-left: 16.6666666667%; }
  .row .col.offset-m3 { margin-left: 25%; }
  .row .col.offset-m4 { margin-left: 33.3333333333%; }
  .row .col.offset-m5 { margin-left: 41.6666666667%; }
  .row .col.offset-m6 { margin-left: 50%; }
  .row .col.offset-m7 { margin-left: 58.3333333333%; }
  .row .col.offset-m8 { margin-left: 66.6666666667%; }
  .row .col.offset-m9 { margin-left: 75%; }
  .row .col.offset-m10 { margin-left: 83.3333333333%; }
  .row .col.offset-m11 { margin-left: 91.6666666667%; }
}

@media only screen and (min-width: 993px) {
  .row .col.l1 { width: 8.3333333333%; }
  .row .col.l2 { width: 16.6666666667%; }
  .row .col.l3 { width: 25%; }
  .row .col.l4 { width: 33.3333333333%; }
  .row .col.l5 { width: 41.6666666667%; }
  .row .col.l6 { width: 50%; }
  .row .col.l7 { width: 58.3333333333%; }
  .row .col.l8 { width: 66.6666666667%; }
  .row .col.l9 { width: 75%; }
  .row .col.l10 { width: 83.3333333333%; }
  .row .col.l11 { width: 91.6666666667%; }
  .row .col.l12 { width: 100%; }
}

@media only screen and (max-width: 600px) {
  .hide-on-small-only {
    display: none !important;
  }
}

/* ——— Tipografía / alineación ——— */
.left-align { text-align: left; }
.right-align { text-align: right; }
.center-align,
.center { text-align: center; }
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.valign-wrapper {
  display: flex;
  align-items: center;
}

/* ——— Colores Material-like (subset) ——— */
.grey { color: #9e9e9e; }
.grey-text { color: #757575; }
.grey.text-darken-1 { color: #757575; }
.grey.lighten-4 { background-color: #f5f5f5; }

.purple.lighten-4 { background-color: #e1bee7; }
.purple.lighten-5 { background-color: #f3e5f5; }

.purple-text { color: #6a1b9a; }
.purple-text.text-lighten-4 { color: #ce93d8; }

.white { background-color: #fff; color: rgba(0, 0, 0, 0.87); }
.black-text { color: #000; }

.green-text { color: #2e7d32; }
.red-text { color: #c62828; }
.blue-text { color: #1565c0; }

/* ——— Nav ——— */
nav {
  display: block;
  width: 100%;
}
.nav-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 0 0.75rem;
}
.nav-wrapper .right {
  margin-left: auto;
}

/* ——— Cards / colecciones ——— */
.card {
  position: relative;
  margin: 0.5rem 0 1rem;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07);
}
.card-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.collection {
  margin: 0.5rem 0 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  list-style: none;
  padding: 0;
}
.collection-item {
  background-color: #fff;
  line-height: 1.5rem;
  padding: 0.75rem 1rem;
  margin: 0;
  border-bottom: 1px solid #e0e0e0;
  display: block;
  color: inherit;
  text-decoration: none;
}
.collection-item:last-child {
  border-bottom: none;
}
.collection-item.avatar {
  min-height: 84px;
  padding-left: 72px;
  position: relative;
}
.collection-item.avatar > img:first-child,
.collection-item.avatar .circle {
  position: absolute;
  width: 42px;
  height: 42px;
  left: 15px;
  top: 15px;
  border-radius: 50%;
  object-fit: cover;
}

.circle {
  border-radius: 50%;
}

.subheader {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  color: rgba(0, 0, 0, 0.54);
}

.divider {
  height: 1px;
  overflow: hidden;
  background-color: #e0e0e0;
  margin: 0.5rem 0;
}

/* ——— Tablas ——— */
table {
  width: 100%;
  border-collapse: collapse;
}
table.highlight > tbody > tr:hover {
  background-color: rgba(0, 0, 0, 0.04);
}
table.responsive-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.centered thead th,
table.centered tbody td {
  text-align: center;
}

/* ——— Formularios (nativos, sin FormSelect) ——— */
.input-field {
  position: relative;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.input-field > label {
  position: absolute;
  top: 0;
  left: 0.75rem;
  font-size: 0.8rem;
  color: #422668;
  transform: translateY(-100%);
  pointer-events: none;
}
.input-field input[type="text"],
.input-field select {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem 0.25rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}
.input-field select {
  cursor: pointer;
  min-height: 2.5rem;
}

/* ——— Botones ——— */
.btn,
.btn-small {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  font: inherit;
}
.btn-small {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
}
.btn-cuvikal {
  background-color: #061146;
  color: #fff !important;
}
.white-text {
  color: #fff !important;
}

.orange {
  background-color: #ff9800;
  color: #fff;
}

/* ——— Modal ——— */
.bb-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.bb-modal-root--open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.bb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.bb-modal__panel {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.modal-content {
  padding: 1rem 1.5rem;
}
.modal-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
  text-align: right;
}
.success-blue {
  background: #e3f2fd;
  color: #0d47a1;
}

/* ——— Sidenav ——— */
.bb-sidenav {
  position: fixed;
  top: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  margin: 0;
  z-index: 1201;
  overflow-y: auto;
  background: #e1bee7;
  transition: transform 0.25s ease;
  list-style: none;
  padding: 0.5rem 0;
}
.bb-sidenav--right {
  right: 0;
  transform: translateX(105%);
}
.bb-sidenav--left {
  left: 0;
  transform: translateX(-105%);
}
.bb-sidenav.bb-sidenav--open.bb-sidenav--right,
.bb-sidenav.bb-sidenav--open.bb-sidenav--left {
  transform: translateX(0);
}

.bb-sidenav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.bb-sidenav-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* ——— Collapsible ——— */
.collapsible {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.collapsible-header {
  display: block;
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid #ddd;
}
.collapsible-body {
  padding: 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}
.collapsible li:last-child .collapsible-body {
  border-bottom: none;
}

/* ——— Utilidades ——— */
.waves-effect {
  /* sin animación JS; solo compatibilidad de clase */
  cursor: pointer;
}
.z-depth-0 {
  box-shadow: none;
}

.sidenav-trigger {
  cursor: pointer;
}

/* Panel oscuro (dashboard en index): selects nativos */
#dashBoard .input-field > label {
  color: #94a3b8;
}
#dashBoard .input-field select {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}
