/* ----- ESTILOS GENERALES ----- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #F4F7FA;
    color: #2D3748;
    margin: 0;
    padding: 0;
}

/* ----- CONTENEDOR PRINCIPAL ----- */
.page {
    display: flex;
    min-height: 100vh;
}

/* ----- MENÚ LATERAL ----- */
.dashboard-menu {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 60px 20px 20px 20px;
    display: flex;
    flex-direction: column;
}

.dashboard-menu ul {
    list-style: none;
    padding: 0;
}

.dashboard-menu ul li {
    
    font-size: 16px;
    border-radius: 6px;
    transition: background 0.3s;
    cursor: pointer;
}

.dashboard-menu ul li a {
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    display: block;
}

.dashboard-menu ul li:hover {
    background: #017aa2;
}

#closeDashboardMenu {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
    border-radius: 6px;
}

.dashboard-menu {
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background-color: #333;
    color: white;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.dashboard-menu--closed {
    left: -250px;
    /* Oculta el menú desplazándolo a la izquierda */
}

.page-content {
    margin-left: 250px;
    /* espacio para el menú abierto */
    transition: all 0.3s ease;
}

.page-content--full {
    margin-left: 0;
    /* cuando el menú está cerrado */
}

.menu-toggle {
    cursor: pointer;
    position: fixed;
    left: 0px;
    top: 10%;
    background: #333;
    color: white;
    padding: 10px 7px 10px 5px;
    z-index: 1100;
    transition: left 0.3s ease;
}

.menu-toggle.open {
    left: 250px;
    /* mueve el botón cuando está abierto */
}

#closeDashboardMenu {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 0;
}


/* ----- CONTENIDO PRINCIPAL ----- */
.page-content {
    flex: 1;
    padding: 40px;
}

/* ----- ENCABEZADO ----- */
.mis-fichajes__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px 20px;
    /* Reducido */
    border-radius: 8px;
    /* box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05); */
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 15px;
}

.mis-fichajes__header h2 {
  font-size: 20px;
  /* Más compacto */
  font-weight: 500;
  color: #2c3e50;
  margin: 0 10px 0 0;
  }
  .mis-fichajes__header h2 small {
    font-size: 13px;
  }
.mis-fichajes__header .date-selector {
  font-size: 14px;
  margin: 6px 0;
  padding: 5px 10px;
  }

#month-total h6,
.dashboard-clock h6,
#worked-time h6 {
    font-size: 14px;
    color: #95a5a6;
}

#month-total p,
.dashboard-clock p,
#worked-time p {
    font-size: 16px;
    color: #34495e;
    font-weight: 600;
}

.mis-fichajes__header,
#month-total,
#fichajes-graph,
.dashboard-clock,
#worked-time,
.button-primary {
    border-radius: 12px;
    /* Aumenta para suavidad */
}

.mis-fichajes__header,
#month-total,
#fichajes-graph {
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.08);
    /* sombra más suave y amplia */
}

/* ----- PETICIONES ----- */
#mis-fichajes #gform_1 {
  background: #fff;
  padding: 4rem;
}
#mis-fichajes .gform-theme--framework #gform_1 .field_sublabel_above .gfield_label {
  font-size: 1.2rem;
  font-weight: 600;
}
#mis-fichajes .gform-theme--framework #gform_1 input,
#mis-fichajes .gform-theme--framework #gform_1 textarea {
  border: 1px solid #d9d9d9;
  border-radius: 2px;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1em;
  font-weight: 400;
  line-height: normal;
  outline: 0;
  padding: 9px 13px 10px;
}

/* ----- INFO (HORAS Y RELOJ) ----- */
.mis-fichajes__info {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Espaciado uniforme */
}

.dashboard-clock,
#worked-time {
    background: #ecf0f1;
    padding: 5px 12px;
    /* Reduce el tamaño */
    border-radius: 6px;
    font-size: 12px;
    /* Menos prominente */
    display: flex;
    flex-direction: column;
    text-align: center;
}

.dashboard-clock h6,
#worked-time h6 {
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 500;
}

.dashboard-clock p,
#worked-time p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
}

.ol,
ul {
    margin: 0;
}

ul#mn-hours,
ul#mn-hours li {
    text-align: left;
    height: 20px;
    background-color: #C9C9C9;
    color: #ffffff;
    font-weight: bold;
}

ul#mn-hours li {
    padding-left: 5px;
    border: none;
}

div#content {
    width: 100%;
}

img.custom-logo {
    max-width: 300px;
}

/* DASHBOARD */
.ssm-checks-list-content {
    width: 100%;
    font-family: sans-serif;
    position: relative;
}

.ssm-checks-list-hours {
    position: relative;
    height: 30px;
    margin-bottom: 15px;
    padding: 0;
}

.ssm-checks-list-hours .timing {
    position: absolute;
    border-right: 1px solid #ccc;
    height: 100%;
    text-align: center;
    font-size: 12px;
    color: #777;
}

.ssm-checks-list-days {
    list-style: none;
    padding: 0;
    margin: 0;
}

.day-title {
    font-size: 13px;
    color: #444;
    padding: 0px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.day-title-text {
    font-size: 13px;
    padding: 5px;
    align-self: center;
}

.daily-hours {
    font-size: 13px;
    color: #555;
    align-self: flex-end;
    padding: 5px;
}

.bar {
    position: relative;
    height: 30px;
    background: #eaeaea;
    margin-bottom: 0;
}

.bar.holiday {
    background-color: #ffd8d8;
}

.bar[_title]:before {
    content: attr(_title);
    font-size: 12px;
    padding-left: 5px;
    color: #a00;
    font-weight: bold;
}

.bar .working {
    background-color: #5F94F7;
    border-radius: 2px;
}

.bar .pause {
    background-color: #f0ad4e;
    border-radius: 2px;
    height: 100%;
    top: 20%;
}

.bar  .absence{
	color: #a00;
}

.has-tooltip {
    position: relative;
    cursor: pointer;
}

.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
}

.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.has-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
    z-index: 9999;
}

.has-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

#fichajes-graph {
    width: 800;
    height: 1200px;
    display: block;
    margin: auto
}

.date-selector {
    margin: 15px 0;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

span.daily-hours {
    float: right;
}

/* ----- BOTÓN FICHAR ----- */
.button-primary,
.button,
input[type=submit],
#mis-fichajes .gform-theme--framework #gform_1 .gform-footer input[type=submit] {
    background: #017aa2;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 1rem 2rem;
    text-transform: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button-primary:hover,
.button:hover,
input[type=submit]:hover,
#mis-fichajes .gform-theme--framework #gform_1 .gform-footer input[type=submit]:hover {
    background: #003b56;
    transform: translateY(0); /*translateY(-2px)*/
    box-shadow: 0; /*0px 4px 12px rgba(0, 123, 255, 0.3)*/
}

/* ----- RELOJ Y HORAS TRABAJADAS ----- */
.dashboard-clock,
#worked-time {
    display: flex;
    flex-direction: column;
    background: #ecf0f1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
}

.dashboard-clock h6,
#worked-time h6 {
    margin: 0;
    font-weight: 600;
}

/* ----- TOTAL DEL MES ----- */
#month-total {
    margin-top: 20px;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.05);
}

/* ----- TABLAS ----- */
table thead th {
  background: #003b56;
  color: #fff;
  font-weight: 600;
  line-height: normal;
  padding: 10px 16px;
  text-transform: none;
}

table#myUsersTable tr td.dt-type-numeric {
  text-align: center;
}
table#myUsersTable tr th:last-child,
table#myUsersTable tr td:last-child {
  text-align: right;
}
table.dataTable th.dt-type-date,
table.dataTable td.dt-type-date {
  text-align: left;
}
/* ----- GRAFICO ----- */
#fichajes-graph {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.05);
}

#fichajes-graph {
    background: #ffffff;
    padding: 25px;
    border: 1px solid #ecf0f1;
}

/* ----- LOGIN ----- */
#wppb-login-wrap {
    margin: auto;
    padding: 5% 0 0;
    width: 320px;
}

/* ----- VACATIONS ----- */
.vacations-calendar-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4%;
  justify-content: flex-start;
  margin: 2rem 0;
  padding: 0 2rem;
  width: 100%;

}

.vacations-calendar-header .days-available {
    align-items: center;
    background-color: #e0e2e3;
    border: 1px solid #e0e2e3;
    border-radius: 4px;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1rem 1rem;
}

.vacations-calendar-header .days-available h3 {
  font-size: 1rem;
  margin: 0;
  text-align: center;
  }
.vacations-calendar-header .days-available p {
  font-size: 1.25rem;
  margin: 0;
  text-align: center;
  }
.content-dias h4 {
  margin: 0 0 .7rem;
}
.content-dias-flex {
  display: flex;
  gap: 6%;
  }
  .content-dias-flex select {
    padding: .25rem 1rem .25rem .5rem;
    }
#dias_escogidos_box {
    align-items: center;
    border: 1px solid #e6e6e6;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 1rem;
    width: 100%;
	max-width: 230px;
}

#vacations-calendar .calendar-table thead th {
  background-color: #8f8f8f;
}

#vacation-days-info {
    position: relative;
    display: inline-block;
    cursor: help;
}

#vacation-details-tooltip {
    visibility: hidden;
    width: max-content;
    max-width: 300px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%; /* Ajustar según el diseño */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
}

#vacation-days-info:hover #vacation-details-tooltip {
    visibility: visible;
    opacity: 1;
}


/* PERFIL DE USUARIO */
 /* Contenedor del loader centrado */
 #profile-loader {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 200px;
}
/* Estilo del spinner */
.spinner {
	border: 8px solid #f3f3f3;
	border-top: 8px solid #3498db;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
/* Ocultamos el contenedor de tabs hasta inicializar */
#tabs {
  background: transparent;
  border: 0;
	display: none;
  padding: 0;
  }
  #tabs.ui-tabs .ui-tabs-nav {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #ddd;
    margin: 0;
    padding: 0;
    }
    #tabs.ui-tabs .ui-tabs-nav li.ui-tabs-tab {
      background: transparent!important;
      border: 0;
      margin: 0;
      }
      #tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active {
        background: transparent;
        color: #017aa2;
        }
        #tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active a,
        #tabs.ui-tabs .ui-tabs-nav li.ui-tabs-tab a:hover,
        #tabs.ui-tabs .ui-tabs-nav li.ui-state-hover a,
        #tabs.ui-tabs .ui-tabs-nav li.ui-state-tab a:focus {
          background: transparent!important;
          color: #017aa2;
          outline: none;
          position: relative;
          }
          #tabs.ui-tabs .ui-tabs-nav li.ui-state-hover {
            background: transparent!important;
          }
          #tabs.ui-tabs .ui-tabs-nav li.ui-tabs-active a::before,
          #tabs.ui-tabs .ui-tabs-nav li.ui-state-hover a::before {
            background: #017aa2;
            content: "";
            height: 3px;
            left: 0;
            position: absolute;
            bottom: -2px;
            width: 100%;
          }
  #tabs.ui-tabs .ui-tabs-panel {
    background: #fff;
    }
    #tabs.ui-tabs .ui-tabs-panel ul {
      list-style: none;
      }
      #tabs.ui-tabs .ui-tabs-panel ul li,
      #tabs.ui-tabs .ui-tabs-panel p {
        border-bottom: 1px solid #EBEBEB;
        color: #017aa2;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        }
        #tabs.ui-tabs .ui-tabs-panel ul li strong,
        #tabs.ui-tabs .ui-tabs-panel p label,
        #mis-fichajes .gform-theme--framework #gform_1 .field_sublabel_above .gform-field-label--type-sub {
          color: #8f8f8f;
          display: block;
          font-size: 1rem;
          font-weight: 500;
        }

#tabs.ui-tabs .button-submit {
  display: block;
  margin-top: 1rem;
}


/* ----- CHECKS LIST ----- */

.ssm-checks-list-content li {
  background: #fff;
  list-style: none;
}

.calendar-table td {
	position: relative;
  }
  
  .tooltip-content {
	display: none;
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #333;
	color: #fff;
	padding: 6px 10px;
	border-radius: 5px;
	white-space: normal;
	font-size: 12px;
	z-index: 10;
	min-width: 200px;
	max-width: 300px;
	text-align: left;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
  
  .calendar-table td:hover .tooltip-content {
	display: block;
  }
  

/* ----- RESPONSIVE ----- */
@media (max-width: 1023px) {
  .calendar-month {
      width: 45%;
  }
}
@media (max-width: 768px) {
    .page {
        flex-direction: column;
    }
    .dashboard-menu {
        /*width: 100%;*/
        display: initial;
        flex-direction: row;
        justify-content: space-between;
        padding: 10px;
    }
    .dashboard-menu ul {
        display: initial;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
    }
    .dashboard-menu img {
        width: 250px;
    }
    .menu-toggle.open {
        right: 0;
        left: auto;
    }
    .dashboard-menu--closed {
        left: -2000px;
    }
    .page-content {
        padding: 20px;
    }
    .mis-fichajes__header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    .mis-fichajes__info {
        flex-direction: column;
        width: 100%;
        align-items: flex-start;
    }
    .dashboard-clock,
    #worked-time {
      width: 100%;
    }
    .button-primary {
        width: 100%;
        text-align: center;
    }
}


/* Formulario de consulta de estadísticas */
#form-consulta-estadisticas {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(100%, auto);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
}

#form-consulta-estadisticas div {
    display: flex;
    flex-direction: column;
}

#form-consulta-estadisticas label {
    margin-bottom: 8px;
    font-weight: 500;
}

#form-consulta-estadisticas input,
#form-consulta-estadisticas select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#graficos-estadisticas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;

    border-bottom: #666666 1px solid;
    gap: 10px;
    align-items: center;
    justify-items: center;

}

#graficos-estadisticas > div:not(:first-child) {

    border-left: #666666 1px solid;
}

#graficos-estadisticas #graph_1, #graficos-estadisticas #graph_2 {
    width: 100%;
    height: 400px;
    display: block;
    margin: auto;
    display: flex;
    flex-direction: row;
    justify-content: center;
}


/* ----- TOOLTIP ----- */
.tooltip {
    position: relative;
    display: block;
    border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
  }
  
  /* Tooltip text */
  .tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;;
    background-color: black;
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;

   
    /* Position the tooltip text - see examples below! */
    position: absolute;
    z-index: 1;
  }
  
  /* Show the tooltip text when you mouse over the tooltip container */
  .tooltip:hover .tooltiptext {
    visibility: visible;
  }