/* Quicksand se carga desde Google Fonts en base_dash.html. El !important es
   para ganarle a Bootstrap, DataTables y los demas plugins. */
* {
    font-family: 'Quicksand', sans-serif !important;
}

/* Quicksand tiene un trazo fino: con weight 400 el texto se ve desvaido. Se
   sube el peso base a 500 en body (hereda todo lo que no declare uno propio);
   sin !important, para no pisar los bold/600/700 ya definidos en titulos,
   botones y encabezados de tabla. */
body {
    font-weight: 500;
}

/* Los controles de formulario no heredan la tipografia del body: el navegador
   les aplica su propio font-weight. Sin esto, inputs, selects y botones se
   veian mas finos que el resto del dashboard.
   No se incluye `label` a proposito: ya va en bold mas abajo. */
input, select, textarea, button, .btn, .form-control, .custom-select {
    font-weight: 500;
}

/* Los iconos de Font Awesome dependen de su propia font-family: sin esta
   excepcion el * !important de arriba los convierte en cuadraditos. */
.fa, .fas, .far, .fab, .fa::before, .fas::before, .far::before, .fab::before,
[class^="fa-"], [class*=" fa-"] {
    font-family: 'FontAwesome' !important;
}

html, body {
  height: 100%;
  position: relative;
}

#wrap {
    min-height: 100vh; /* will cover the 100% of viewport */
    overflow: hidden;
    display: block;
    position: relative;
    padding-bottom: 90px;
}

.navbar {
    padding: 5px;
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: #fff;
}

nav {
    background: #80181a;

}


input[type="checkbox"] {
    zoom: 1.5;
}

#the-canvas {
  border: 1px solid black;
  direction: ltr;
}
.container_check {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default checkbox */
.container_check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.p_info {
    padding-left: 2px;
    font-size: 1rem;
    padding-top: 10px;
    color: white;
}

.color_spa {
    font-size: 1.5rem;
    color: white;
}
.box_num {
    background: #302F2C;
    border-top-left-radius: 10px;
    border-bottom-left-radius:10px;
}

.box_info {
    background: #80181a;
    border-top-right-radius: 10px;
    border-bottom-right-radius:10px;
}

.btn-light, .btn-light:hover, .btn-light:active, .btn-light:visited {
    background-color: #80181a !important;
}

.nav_cam {
background-color: #80181a;
color:white;
padding: 5px;
justify-content: center;
}
/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
}

/* On mouse-over, add a grey background color */
.container_check:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.container_check input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
p {
    font-size: 1rem;
    color: #302F2C;
}
/* Show the checkmark when checked */
.container_check input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.container_check .checkmark:after {
  left: 9px;
  top: 5px;
  width: 10px;
  height: 15px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.span_nav {
    padding:10px;
    font-size: 0.8rem;
    color: #fff;
}

th {
    font-size: 13px;
    color: black;
}
td {
    font-size: 13px;
    color: black;
    /* 500 en vez de 400: Quicksand con peso 400 se ve desvaida en las celdas */
    font-weight: 500;
}

#loader {
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 40px;
height: 40px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
margin-left:50%;
margin-top:40px;
}


@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.custom-select{
    font-size:13px;
    padding:7px;
    height: 35px;
}
.dataTables_length,
.dataTables_info,
.dataTables_paginate {
    margin: 5px;
}

#datatables_length > label > select {
    width: 40px;
    height: 35px;
}

.paginate_button.current{
    height: 30px;
    background-color:#80181a;
    color:white;
}

label {
    align-self: center;
    font-weight: bold;
}

input#inputEmail {
    font-size: 15px;
}

label#inputEmail {
    font-size: 11px;
}

.form-control {
    height: 8px;
}

.select-box {
  display: flex;
  width: 400px;
  flex-direction: column;
}

.select-box .options-container {
  background: gray;
  color: #f5f6fa;
  max-height: 0;
  width: 100%;
  opacity: 0;
  transition: all 0.4s;
  border-radius: 8px;
  overflow: hidden;

  order: 1;
}

.selected {
    font-size: 15px;
  background: gray;
  border-radius: 8px;
  margin-bottom: 8px;
  color: #f5f6fa;
  position: relative;

  order: 0;
}

.selected::after {
  content: "";
  background: url("/static/images/down_white.svg");
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  height: 20px;
  width: 32px;
  right: 2px;
  transition: all 0.4s;
}

.select-box .options-container.active {
  max-height: 240px;
  opacity: 1;
  overflow-y: scroll;
}

.select-box .options-container.active + .selected::after {
  transform: rotateX(180deg);
}

.select-box .options-container::-webkit-scrollbar {
  width: 8px;
  background: #0d141f;
  border-radius: 0 8px 8px 0;
}

.select-box .options-container::-webkit-scrollbar-thumb {
  background: #525861;
  border-radius: 0 8px 8px 0;
}

.select-box .option,
.selected {
    font-size: 15px;
  padding: 7px;
  cursor: pointer;
}

.select-box .option:hover {
  background: #2f3640;
}

.select-box label {
  cursor: pointer;
}

.select-box .option .radio {
  display: none;
}

.selected-uni {
    padding: 7px;
    font-size: 15px;
  background: gray;
  border-radius: 8px;
  margin-bottom: 8px;
  color: #f5f6fa;
  position: relative;
  order: 0;
}

.form-group {
    font-size: 14px;
    margin-bottom: 0.6rem;
}
.form-control {
    font-size: 14px;
}

label.btn.btn-secondary {
    padding: 10px;
}


table.dataTable thead tr {
  background-color: #444444;
}

table.dataTable thead tr th{
  color: white;
}

.modal-header {
    background-color: #80181a;
    color: white;
}

.modal-content  {
    -webkit-border-radius: 15px !important;
    -moz-border-radius: 15px !important;
    border-radius: 15px !important;
}

.phe {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size:13px;
}

/* ===== Mejoras UI/UX Polysign ===== */

/* 1) Badges de estado */
.status-badge{
  display:inline-block;
  padding:.35em .65em;
  font-size:.74rem;
  font-weight:600;
  line-height:1;
  border-radius:.5rem;
  color:#fff;
  white-space:nowrap;
  text-align:center;
}
.status-badge.s-0{background:#6c757d}
.status-badge.s-1{background:#0d6efd}
.status-badge.s-2{background:#198754}
.status-badge.s-3{background:#dc3545}
.status-badge.s-4{background:#ffc107;color:#212529}

/* 6) Spinner de carga de la tabla */
#loader{
  display:inline-block;
  width:28px;
  height:28px;
  border:3px solid rgba(128,24,26,.2);
  border-radius:50%;
  border-top-color:#80181a;
  animation:polysig-spin .8s linear infinite;
  vertical-align:middle;
}
@keyframes polysig-spin{to{transform:rotate(360deg)}}
.dataTables_processing{
  background:rgba(255,255,255,.7) !important;
  box-shadow:none !important;
  border:none !important;
}

/* 7) Contenedor de la tabla con scroll horizontal + columna ID fija */
.dataTables_wrapper{overflow-x:auto;}
table.dataTable tbody td:first-child,
table.dataTable thead th:first-child{
  position:sticky;
  left:0;
  z-index:2;
  background-color:#fff;
  box-shadow:1px 0 0 #e2e2e2;
}
table.dataTable thead th:first-child{
  background-color:#80181a;
  color:#fff;
}

/* 5) Item de menú activo */
.navbar .nav-item.active .nav-link,
.navbar .nav-item.active .nav-link .span_nav{
  color:#fff !important;
  background-color:#a82629 !important;
  border-color:#a82629 !important;
  box-shadow:0 2px 6px rgba(0,0,0,.18);
}

/* Contador en las pestañas de estado */
.tab-count{
  display:inline-block;
  margin-left:6px;
  padding:.1em .5em;
  font-size:.72rem;
  font-weight:700;
  line-height:1.3;
  border-radius:1rem;
  background:rgba(255,255,255,.55);
  color:#222;
  vertical-align:middle;
}

/* Barra de filtro por fechas */
.date-filter-bar{
  margin-top:12px;
  padding:12px 14px;
  background:#f8f9fa;
  border:1px solid #e3e6ea;
  border-radius:.55rem;
  display:block;
  width:100%;
}
.date-filter-bar .form-inline{
  align-items:center;
  flex-wrap:wrap;
  gap:10px 14px;            /* separacion real entre controles */
}
/* Agrupa cada label con su input para que no se separen al hacer wrap.
   Bootstrap 4 apila los hijos de .form-inline en pantallas chicas: se fuerza fila. */
.date-filter-bar .form-inline .df-group{
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center;
  flex-wrap:nowrap;
  gap:7px;
  width:auto;
}
.date-filter-bar .form-inline .df-group .df-label{ margin:0; }
/* Separador visual entre el rango de fechas y las acciones */
.df-sep{
  width:1px;
  height:26px;
  background:#dee2e6;
  margin:0 4px;
}
.df-label{
  margin:0;
  font-weight:600;
  color:#495057;
  font-size:.86rem;
  white-space:nowrap;
}
.df-date{
  min-width:150px;
  max-width:190px;
  height:36px;
  font-size:.88rem;
}
.df-field{
  max-width:180px;
  height:36px;
  margin-left:0;
  font-size:.88rem;
}
.df-btn{
  margin-left:0;
  height:36px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:600;
  white-space:nowrap;
}
/* Limpiar fechas: discreto, solo visible cuando hay algo que limpiar */
#clear_fecha{
  color:#6c757d;
  border-color:#ced4da;
  background:#fff;
}
#clear_fecha:hover{
  color:#c0392b;
  border-color:#c0392b;
  background:#fff;
}

/* Barra de acciones masivas */
.bulk-actions-bar{
  margin-top:10px;
  padding:12px 14px;
  background:#fff;
  border:1px solid #e3e6ea;
  border-radius:.55rem;
  display:block;
  width:100%;
}
/* Mismo espaciado que la barra de fechas para que ambas se lean igual */
.bulk-actions-bar .form-inline{
  align-items:center;
  flex-wrap:wrap;
  gap:10px 14px;
}
/* Bootstrap fuerza margin en los hijos de .form-inline y anula el gap entre
   botones contiguos: se separan de forma explicita. */
.bulk-actions-bar .df-btn,
.date-filter-bar .df-btn{ margin:0 !important; }
.bulk-actions-bar .df-btn + .df-btn,
.date-filter-bar .df-btn + .df-btn{ margin-left:12px !important; }
/* Separador entre el contador y las acciones */
.bulk-actions-bar .df-sep{
  width:1px;
  height:26px;
  background:#dee2e6;
  margin:0 4px;
}
.bulk-count{
  margin-left:0;
  padding:.15em .55em;
  font-size:.78rem;
  font-weight:700;
  border-radius:1rem;
  background:#e9ecef;
  color:#495057;
  white-space:nowrap;
}
.id-cell{ white-space:nowrap; }
.id-cell .row-check{ margin-right:6px; vertical-align:middle; cursor:pointer; }

/* Columna "Acción" fija a la derecha en tablas con scroll horizontal, para
   que los botones de editar/eliminar no se pierdan al hacer scroll lateral. */
#datatable_type_document th:last-child,
#datatable_type_document td:last-child,
#datatable_client th:last-child,
#datatable_client td:last-child,
#datatable_users th:last-child,
#datatable_users td:last-child,
#datatables th:last-child,
#datatables td:last-child{
  position: sticky;
  right: 0;
  background-color: #fff;
  z-index: 1;
}
#datatable_type_document thead th:last-child,
#datatable_client thead th:last-child,
#datatable_users thead th:last-child,
#datatables thead th:last-child{
  z-index: 2;
}

/* ============================================================
   Modales por pasos (wizard) - reutilizado en Plantillas y Usuarios
   ============================================================ */
.sec-title{ color:#80181a; font-weight:700; letter-spacing:.3px; text-transform:uppercase; margin:16px 0 8px; padding-bottom:5px; border-bottom:1px solid #f0e3e3; }
.sec-title .fa{ margin-right:6px; }
.sec-title:first-child{ margin-top:0; }
.err-msg{ display:none; color:#dc3545; font-size:.82rem; margin-top:2px; }
.err-msg.show{ display:block; }

.wz-steps{ display:flex; list-style:none; margin:0 0 18px; padding:0; gap:4px; flex-wrap:wrap; }
.wz-step{ display:flex; align-items:center; gap:8px; padding:7px 14px 7px 10px; flex:1 1 0;
          min-width:130px; border-bottom:3px solid #e9ecef; color:#adb5bd; font-size:.86rem;
          font-weight:600; white-space:nowrap; }
.wz-step .wz-num{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px;
                  border-radius:50%; background:#e9ecef; color:#868e96; font-size:.78rem; flex-shrink:0; }
.wz-step.is-active{ color:#80181a; border-bottom-color:#80181a; }
.wz-step.is-active .wz-num{ background:#80181a; color:#fff; }
.wz-step.is-done{ color:#495057; border-bottom-color:#b58b8c; cursor:pointer; }
.wz-step.is-done .wz-num{ background:#b58b8c; color:#fff; }
.wz-step.is-done:hover{ color:#80181a; }
.wz-steps.is-free .wz-step{ cursor:pointer; }
.wz-steps.is-free .wz-step:hover{ color:#80181a; }

.wz-pane{ display:none; }
.wz-pane.is-active{ display:block; }
.wz-pane .sec-title{ margin-top:0; }

/* Footer del wizard en dos grupos: navegacion a la izquierda, acciones a la
   derecha. Antes iban todos seguidos a la derecha y "Atras" quedaba pegado a
   los botones de guardar. */
.wz-footer{ justify-content:space-between; }
.wz-nav, .wz-acciones{ display:flex; align-items:center; gap:8px; }
.wz-progress{ font-size:.82rem; color:#868e96; margin-right:6px; }
.wz-footer .btn{ margin-left:0; }

/* Azul suave para la navegacion: no compite con el verde de la accion
   principal ni con el rojo de las destructivas. */
.btn-nav{
    background:#e8f1fb;
    border:1px solid #c5ddf5;
    color:#2b6cb0;
}
.btn-nav:hover, .btn-nav:focus{
    background:#d7e7f8;
    border-color:#a9cbee;
    color:#22548a;
}
.btn-nav:disabled, .btn-nav.disabled{ opacity:.5; }

/* --- Pantallas de cuenta (restablecer / cambiar contrasena) ---
   Venian con el HTML crudo de allauth: sin contenedor, sin estilo y con los
   textos por defecto en ingles. */
.acc-wrap{ display:flex; justify-content:center; padding:40px 16px; }
.acc-card{
    width:100%; max-width:460px; background:#fff;
    border:1px solid #e6e8ec; border-radius:10px;
    padding:28px 30px; box-shadow:0 1px 3px rgba(0,0,0,.04);
}
.acc-card-center{ text-align:center; }
.acc-title{ font-size:1.35rem; font-weight:700; color:#302F2C; margin:0 0 10px; }
.acc-intro{ font-size:.92rem; line-height:1.6; color:#6b7280; margin:0 0 18px; }
.acc-link{ color:#80181a; text-decoration:underline; }
.acc-ayuda{ font-size:.82rem; color:#868e96; margin:16px 0 0; padding-top:14px; border-top:1px solid #eef0f3; }
.acc-btn{ width:100%; margin-top:6px; }

/* el formulario lo pinta allauth con form.as_p: se le da forma desde aca */
.acc-card form p{ margin:0 0 14px; }
.acc-card form label{ display:block; font-size:.88rem; margin-bottom:5px; color:#495057; }
.acc-card form input[type=text],
.acc-card form input[type=email],
.acc-card form input[type=password]{
    width:100%; padding:9px 12px; font-size:.95rem;
    border:1px solid #ced4da; border-radius:6px; background:#fff;
}
.acc-card form input:focus{ outline:0; border-color:#80181a; box-shadow:0 0 0 .15rem rgba(128,24,26,.12); }
/* reglas de contrasena que Django inyecta como <ul> */
.acc-card form ul{ margin:6px 0 0; padding-left:18px; }
.acc-card form ul li{ font-size:.78rem; color:#868e96; line-height:1.5; }
.acc-card .errorlist li{ color:#dc3545; }

.acc-icono{ font-size:2.6rem; color:#80181a; margin-bottom:8px; }
.acc-icono-ok{ color:#28a745; }
