/* ========================= VARIABLES ========================= */
:root {
    --blue: #006bff;
    --light: #f4f7fa;
    --dark: #1a1a1a;
}

/* ========================= BASE ========================= */
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: #eef2f7;
    color: var(--dark);
}

input, select {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.2s;
    box-sizing: border-box;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(0,107,255,0.15);
}

/* ========================= BOTONES ========================= */
button {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.btn-primary {
    background: var(--blue);
    color: white;
}

.btn-primary:hover {
    background: #0056d2;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* ========================= HEADER ========================= */
.header {
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    border-bottom: 1px solid #ddd;
}

/* ========================= USER MENU ========================= */
.user-menu {
    position: relative;
}

.user-toggle {
    background: var(--blue);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    min-width: 220px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    visibility: hidden;
    transition: all 0.25s ease;
}

.user-dropdown.activo {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

/* ========================= INFO NEGOCIO ========================= */
#user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ========================= LOGIN ========================= */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ========================= DASHBOARD ========================= */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 25px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.columna {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
}

/* ========================= CARDS ========================= */
.card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);

    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card h3 {
    margin: 0 0 5px 0;
}


/* ========================= FORMULARIOS PRO ========================= */
.card form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card form input,
.card form select {
    width: 85%;
    max-width: 400px;
    height: 34px;
    padding: 4px 10px;
    font-size: 13px;
    box-sizing: border-box;
}

.card form .input-pass {
    width: 85%;
    max-width: 400px;
    position: relative;
}

.card form button {
    margin-top: 10px;
    width: 180px;
    height: 38px;
    font-size: 13px;
    font-weight: 600;
}

.card form input::placeholder {
    font-size: 12px;
    color: #999;
}



/* ========================= CALENDARIO ========================= */
.calendario-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#calendar {
    width: 100%;
    min-width: 0;
    min-height: 380px;
    font-size: 12px;
}

.fc, .fc-scrollgrid {
    width: 100%;
}

.fc-day-other {
    opacity: 0.4;
}

/* ========================= LEYENDA ========================= */
.leyenda-colores {
    font-weight: 600;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.leyenda-colores span {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.verde { background: #d4edda; color: #155724; }
.amarillo { background: #fff3cd; color: #856404; }
.rojo { background: #f8d7da; color: #721c24; }
.negro { background: #e2e3e5; color: #383d41; }

/* ========================= AGENDA DEL DIA ========================= */
#agenda-dia {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 5px;
    flex-grow: 1;
}

.acciones-agenda {
    display: flex;
    gap: 10px;
}

/* ========================= ITEM AGENDA ========================= */
.item-agenda {
    display: grid;
    grid-template-columns: 70px 1fr 1fr 120px 120px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    gap: 10px;
}

.item-agenda:hover {
    background: #f8f9fb;
    border-radius: 6px;
}

.hora { font-weight: 700; }
.nombre { font-weight: 600; }
.telefono { color: #555; }
.estado { font-weight: 600; }

.acciones-item {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ========================= BOTONES ITEM ========================= */
.btn-cancelar {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-reagendar {
    background: var(--blue);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

/* ========================= COLORES ========================= */
.estado-disponible { color: #28a745; }
.estado-ocupado { color: #ffc107; }
.estado-cancelado { color: #dc3545; }
.estado-atendida { color: #28a745; }

/* ========================= AGENDA PUBLICA ========================= */
.agenda-publica input {
    width: 85%;
    max-width: 400px;
    height: 34px;
    padding: 4px 10px;
    font-size: 13px;
    margin: 0 auto;
    display: block;
}

.acciones-publica {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.acciones-publica button {
    width: 85%;
    max-width: 300px;
    height: 40px;
    font-size: 13px;
}

/* ========================= MODAL ========================= */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal.activo {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    position: relative;
}

/* ========================= EXTRAS ========================= */
.dia-seleccionado {
    background-color: #f5e6c8 !important;
    border: 2px solid #d4b483;
    border-radius: 6px;

    /* mejoras */
    box-shadow: 0 0 0 2px rgba(212, 180, 131, 0.3);
    transition: all 0.2s ease;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .item-agenda {
        grid-template-columns: 1fr;
    }
}

/* ========================= DROPDOWN PRO ========================= */

.user-dropdown {
    border-radius: 14px !important;
    border: none !important;
    padding: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
    min-width: 250px;
}

/* ITEM */
.dropdown-item {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* HOVER BONITO */
.dropdown-item:hover {
    background: #f3f6fb;
    transform: translateX(3px);
}

/* DIVISOR */
.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 6px 0;
}

/* ========================= CONFIG PRO ========================= */

.form-config-pro {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* GRUPOS */
.grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grupo label {
    font-weight: 600;
    font-size: 14px;
}

/* HORAS */
.horas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.horas-grid small {
    display: block;
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

/* SELECT */
.form-config-pro select {
    height: 38px;
}

/* DIAS GRID */
.dias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* ITEM DIA */
.dia-item {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 8px;
    width: 100%;
    height: 42px; /*MISMO TAMAÑO */
    padding: 0 10px;

    border-radius: 10px;
    background: #f7f9fc;

    cursor: pointer;
    transition: 0.2s;

    text-align: center;
}

.dia-item span {
    font-size: 13px;
    white-space: nowrap;
}

/* HOVER */
.dia-item:hover {
    background: #eef3ff;
}

/* CHECK */
.dia-item input {
    width: auto;
    transform: scale(1.2);
}

/* ACTIVO */
.dia-item input:checked + span {
    font-weight: 600;
    color: var(--blue);
}

/* BOTON */
.btn-guardar-config {
    margin-top: 10px;
    height: 42px;
    font-size: 14px;
}

/* ========================= BOTON CERRAR ========================= */

.btn-cerrar {
    position: absolute;
    top: 10px;
    right: 12px;

    width: 32px;
    height: 32px;

    border: none;
    border-radius: 8px;

    background: transparent;
    color: #666;

    font-size: 16px;
    cursor: pointer;

    transition: all 0.2s ease;
}

/* HOVER ROJO  */
.btn-cerrar:hover {
    background: #ff4d4f;
    color: white;
}

/*Estilos de validaciones generales*/
.error {
    color: red;
    font-size: 12px;
    display: none;
    margin-top: 4px;
}

.input-error {
    border: 2px solid red !important;
    background: #ffe6e6;
}

.input-ok {
    border: 2px solid green !important;
    background: #e6ffe6;
}

.input-pass input.input-error {
    border: 2px solid red;
}

.input-pass input.input-ok {
    border: 2px solid green;
}

/* ===== FIX PASSWORD INPUT ===== */
.input-pass {
    position: relative;
    width: 85%;
    max-width: 400px;
}

.input-pass input {
    width: 100%;
    padding-right: 40px;
}

.toggle-pass {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    z-index: 10;
}

.error.ok {
    color: green;
}

/* Ocultar ojito nativo (Edge / Chrome) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

/* FIX inputs en modales */
.grupo .input-pass {
    width: 100%;
}

.grupo .input-pass input {
    height: 38px; /* igualar altura del modal */
    padding-right: 45px;
}

/* ajustar ojito */
.grupo .toggle-pass {
    right: 10px;
    font-size: 14px;
}

/*lineas de tabla*/
table {
  border-collapse: collapse;
  width: 100%;
  font-family: Arial, sans-serif;
}

th {
  background-color: #f4f4f4;
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

td {
  border: 1px solid #ddd;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #fafafa;
}

tr:hover {
  background-color: #f1f1f1;
}

/*Boton habilitar*/
/* Botón rojo (Inhabilitar) */
.btn-danger {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin: 2px;
  transition: 0.2s;
}

.btn-danger:hover {
  background-color: #c0392b;
}

/* Botón verde (Activar) */
.btn-success {
  background-color: #2ecc71;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin: 2px;
  transition: 0.2s;
}

.btn-success:hover {
  background-color: #27ae60;
}
/*modal bloqueo hora*/
.modal-content {
    animation: fadeInScale 0.2s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
/*Botones de agenda*/
.btn-recordatorio,
.btn-reagendar,
.btn-cancelar{

    border:none;
    border-radius:8px;
    padding:6px 8px;
    cursor:pointer;
    font-size:13px;
}

.plan-info{

    padding:12px 16px;

    display:flex;
    flex-direction:column;
    gap:4px;

    background:#f8f9fa;
    border-radius:10px;

    margin:8px;
}

.plan-info strong{
    color:#212529;
    font-size:14px;
}

.plan-info small{
    color:#6c757d;
    font-size:12px;
}

/* MODAL GRANDE SOLO ADMINS */
.modal-admins-large .modal-content {

    width: 850px;
    max-width: 95%;

    max-height: 80vh;
    overflow-y: auto;
}

/* TABLA ADMINS */
#tabla-admins td,
#tabla-admins th {

    font-size: 13px;
    padding: 10px;
}