/* --- Variables & Reset --- */
:root {
    --ccv-brand: #0ea5e9;
    /* Se sobrescribe dinámicamente desde PHP */
    --ccv-sidebar-bg: #1e293b;
    --ccv-sidebar-text: #e2e8f0;
    --ccv-bg: #f1f5f9;
    --ccv-card: #ffffff;
    --ccv-text: #334155;
    --ccv-border: #e2e8f0;
    --ccv-radius: 8px;
    /* Radio más sutil para look pro */
    --ccv-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.ccv-dashboard-container * {
    box-sizing: border-box;
}

/* --- DASHBOARD LAYOUT (Flexible & Robusto) --- */
.ccv-dashboard-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    min-height: 80vh;
    background: var(--ccv-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ccv-text);
    border: 1px solid var(--ccv-border);
    margin: 0;
}

/* --- SIDEBAR --- */
.ccv-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--ccv-sidebar-bg);
    color: var(--ccv-sidebar-text);
    display: flex;
    flex-direction: column;
}

.ccv-brand-area {
    padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ccv-logo-img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 150px !important;
    /* Forzado y aumentado un poco más */
    object-fit: contain !important;
    display: inline-block !important;
}

.ccv-nav {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ccv-nav-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-right: 3px solid transparent;
}

.ccv-nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.ccv-nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-right-color: var(--ccv-brand);
}

.ccv-nav-item .dashicons {
    margin-right: 12px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* --- CONTENT AREA --- */
.ccv-content-area {
    flex-grow: 1;
    min-width: 0;
    padding: 40px;
    overflow-y: auto;
    height: auto;
    text-align: left;
    /* Asegurar alineación general */
}

.ccv-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ccv-border);
}

.ccv-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* FIX: FORZAR ESTILO "NOTAS" EN PESTAÑA SMTP */
#tab-smtp .ccv-card {
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    /* CLAVE: Quitar limite de ancho como en Notas */

    /* Copiado de .ccv-note-input-card */
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Sombra elevada */
    border: 1px solid #e2e8f0;
}

/* --- TABS --- */
.ccv-tab-content {
    display: none;
}

.ccv-tab-content.active {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- FULLCALENDAR OPTIMIZADO --- */
.ccv-calendar-wrapper {
    background: white;
    padding: 20px;
    border-radius: var(--ccv-radius);
    box-shadow: var(--ccv-shadow);
    overflow-x: auto;
    width: 100%;
}

.fc-view-harness {
    min-width: 800px;
}

.fc-col-header-cell-cushion {
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 4px !important;
}

.fc-button-primary {
    background-color: var(--ccv-brand) !important;
    border-color: var(--ccv-brand) !important;
}

/* --- ESTILOS VISIBILIDAD DE EVENTOS (POP-OUT) --- */
.fc-v-event {
    border: none !important;
    overflow: visible !important;
}

.fc-timegrid-event-harness {
    overflow: visible !important;
    /* Importante para que salga del wrapper */
}

.fc-timegrid-event .fc-event-main {
    padding: 0 !important;
    overflow: visible !important;
}

/* NUESTRA CLASE PROPIA - ESTILO POP-OUT */
.ccv-event-content-visible {
    /* Posicionamiento para flotar sobre la celda */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    /* Al menos el alto de la celda */
    height: auto;
    /* Crece si el texto es largo */

    /* Estilo visual tipo "bocadillo" o tarjeta */
    /* background-color inyectado por JS */
    color: #fff;
    /* Texto blanco por defecto */
    padding: 2px 4px;
    border-radius: 4px default;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    /* Sombra un poco más marcada */
    z-index: 999;
    /* Flota sobre todo */

    /* Tipografía */
    line-height: 1.2 !important;
    font-size: 10px !important;
    white-space: normal !important;
}

/* Ajuste de contraste automático simple */
.ccv-event-content-visible b {
    display: block;
    font-size: 9px;
    opacity: 0.9;
    margin-bottom: 2px;
}

.ccv-event-content-visible span {
    font-weight: 600;
    display: block;
}

/* Hover effect para traer al frente si se solapan mucho */
.ccv-event-content-visible:hover {
    z-index: 1000 !important;
    transform: scale(1.02);
    transition: all 0.1s ease;
}

/* --- CLASES NUEVAS: URGENCIA --- */
/* Esta clase la inyecta FullCalendar si logic.php detecta ccv_is_urgent='yes' */
.ccv-event-urgent {
    background-color: #ef4444 !important;
    /* Rojo Intenso */
    border: 1px solid #b91c1c !important;
    /* Borde rojo oscuro */
    color: white !important;
}

/* Forzar que el pop-out también sea rojo */
.ccv-event-urgent .ccv-event-content-visible {
    background-color: #ef4444 !important;
    color: white !important;
}

/* Puntos en vista mes también rojos si es urgente */
.ccv-event-urgent .ccv-dot {
    background-color: #ef4444 !important;
}

/* --- CLASES NUEVAS: VISTA MES --- */
.ccv-month-event {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1px 2px;
    overflow: hidden;
    /* Clave para no salirse */
}

.ccv-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    flex-shrink: 0;
    /* Evita que el punto se aplaste */
}

.ccv-month-text {
    font-size: 10px;
    /* Letra pequeña solicitada */
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    /* Todo en 1 línea */
    overflow: hidden;
    /* Cortar si sobra */
    text-overflow: ellipsis;
    /* Poner ... */
    line-height: 1.2;
}


/* --- FORMULARIOS --- */
/* --- PANEL CARD (Standardized container) --- */
.ccv-panel-card {
    background: #ffffff;
    box-shadow: var(--ccv-shadow);
    border-radius: var(--ccv-radius);
    padding: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    /* Enforce typography */
    box-sizing: border-box;
}

.ccv-card {
    background: var(--ccv-card);
    padding: 2rem;
    border-radius: var(--ccv-radius);
    box-shadow: var(--ccv-shadow);
    max-width: 800px;
}

.ccv-form-group {
    margin-bottom: 1.5rem;
}

.ccv-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.ccv-input,
.ccv-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--ccv-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.ccv-input:focus {
    outline: none;
    border-color: var(--ccv-brand);
    box-shadow: 0 0 0 3px #0ea5e91a;
}

/* NUEVO: Grid para formulario manual */
.ccv-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 600px) {
    .ccv-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ccv-btn-primary {
    background: var(--ccv-brand);
    color: lab(100% 0.01 -0.01);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.ccv-btn-primary:hover {
    filter: brightness(110%);
}

/* --- MODAL (POPUP) --- */
.ccv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.ccv-modal-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    width: 90%;
    max-width: 700px;
    /* MAS ANCHO */
    max-height: 85vh;
    /* ALTURA MAXIMA RELATIVA */
    display: flex;
    /* FLEXBOX PARA SCROLL INTERNO */
    flex-direction: column;
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ccv-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.ccv-modal-close:hover {
    color: #ef4444;
}

/* SCROLL INTERNO MODAL */
#ccv-modal-content {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
    /* Espacio para scrollbar */
    margin-bottom: 20px;
}

/* NUEVO: ESTILO PARA MOTIVO DE VISITA EN MODAL */
.ccv-modal-reason {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fff7ed;
    /* Orange-50 suave */
    border: 1px solid #ffedd5;
    /* Orange-100 */
    border-radius: 6px;
    color: #9a3412;
    /* Orange-800 */
}

.ccv-reason-text {
    margin: 0;
    font-style: italic;
    white-space: pre-wrap;
    /* Mantener saltos de línea */
}

.ccv-modal-actions {
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ccv-border);
    flex-shrink: 0;
    /* NO ENCOGER */
}

.ccv-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.95rem;
    color: white;
}

.ccv-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.ccv-btn-approve {
    background-color: #10b981;
}

.ccv-btn-trash {
    background-color: #ef4444;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .ccv-dashboard-container {
        flex-direction: column;
    }

    .ccv-sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 0 1rem;
        overflow-x: auto;
    }

    .ccv-brand-area {
        display: none;
    }

    .ccv-nav {
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        padding: 0;
    }

    .ccv-nav-item {
        padding: 1rem;
        border-right: none;
        border-bottom: 3px solid transparent;
        flex-direction: column;
        font-size: 0.8rem;
        gap: 4px;
    }

    .ccv-nav-item.active {
        border-right: none;
        border-bottom-color: var(--ccv-brand);
    }

    .ccv-nav-item .dashicons {
        margin: 0;
        font-size: 20px;
    }

    .ccv-content-area {
        padding: 20px;
    }
}

/* --- MÓDULO NOTAS (CENTRED & WIDE) --- */
.ccv-notes-wrapper {
    width: 100%;
    max-width: 1100px;
    /* Ancho máximo amplio */
    margin: 0 auto;
    /* Centrado en pantalla */
    text-align: left !important;
}

/* Header Action */
.ccv-header-action {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    /* Borde más visible */
    gap: 1rem;
}

.ccv-header-action h2 {
    font-size: 1.85rem;
    color: #1e293b;
    margin: 0;
    text-align: left;
}

/* Área de Input (Generator Card) */
.ccv-note-input-card {
    background: #ffffff;
    padding: 2.5rem;
    /* Padding amplio */
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* Sombra elevada */
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid #e2e8f0;
    width: 100%;
}

.ccv-note-input-card textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1.1rem;
    /* Texto un poco más grande para comodidad */
    resize: vertical;
    min-height: 120px;
    transition: all 0.2s;
    display: block;
}

.ccv-note-input-card textarea:focus {
    border-color: var(--ccv-brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.ccv-note-input-card button {
    background-color: #10b981;
    color: white;
    font-weight: 700;
    padding: 0.85rem 2.5rem;
    /* Botón más grande */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
    align-self: center;
    /* CENTRADO COMO PIDIÓ EL USUARIO */
    font-size: 1rem;
}

.ccv-note-input-card button:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

/* Grid de Notas (Fluido) */
.ccv-notes-grid {
    display: grid;
    /* Grid que llena el espacio: minimo 300px, pero se estira */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
    text-align: left;
}

/* Tarjeta de Nota Individual */
.ccv-note-card {
    background: #fffbef;
    /* Amarillo Post-it clásico suave */
    border-left: 5px solid var(--ccv-brand);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    /* Borde cuadrado izq, redondo dcha */
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.ccv-note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ccv-note-content {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Segoe UI', sans-serif;
    padding-right: 25px;
    flex-grow: 1;
}

.ccv-delete-note {
    position: absolute;
    top: 8px;
    right: 8px;
    background: white;
    /* Fondo blanco para resaltar */
    border: 1px solid #fee2e2;
    cursor: pointer;
    font-size: 1.2rem;
    color: #ef4444;
    padding: 0;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    opacity: 0.8;
    /* Más visible por defecto */
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ccv-delete-note:hover {
    opacity: 1;
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

.ccv-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #94a3b8;
    background: white;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    font-size: 1.2rem;
}

/* =========================================
   --- FRONTEND BOOKING FORM STYLES ---
   ========================================= */

/* Wrapper Principal (Frontend) */
.ccv-wrap {
    max-width: 700px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ccv-text);
}

.ccv-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Títulos de Pasos */
.ccv-card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- PASO 1: SELECCIÓN DE SERVICIOS (Grid Interactivo) --- */
.ccv-grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.ccv-service-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    /* Gris muy suave */
    border: 2px solid transparent;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.ccv-service-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Checkbox oculto visualmente pero accesible */
.ccv-service-check {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    margin-right: 12px;
    display: grid;
    place-content: center;
    transition: all 0.2s;
    background: white;
    flex-shrink: 0;
}

.ccv-service-check::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
    box-shadow: inset 1em 1em white;
    background-color: white;
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* Estado Seleccionado */
.ccv-service-item:has(.ccv-service-check:checked) {
    border-color: var(--ccv-brand);
    background-color: rgba(14, 165, 233, 0.04);
    /* Tinte suave marca */
}

.ccv-service-check:checked {
    background-color: var(--ccv-brand);
    border-color: var(--ccv-brand);
}

.ccv-service-check:checked::before {
    transform: scale(1);
    box-shadow: none;
    /* Icono check blanco puro */
    background: white;
}

.ccv-service-item span {
    font-weight: 500;
    color: #334155;
    font-size: 0.95rem;
}

.ccv-service-item:has(:checked) span {
    color: var(--ccv-brand);
    font-weight: 600;
}

/* --- PASO 2: DATE & TIME --- */
.ccv-slots-container {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    min-height: 60px;
    /* Evita saltos de layout */
    align-items: center;
}

/* Botones de Hora (Pills) */
.ccv-slot-btn {
    appearance: none;
    background: white;
    border: 1px solid #cbd5e1;
    color: #64748b;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    /* Pill shape */
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ccv-slot-btn:hover:not(.selected) {
    border-color: var(--ccv-brand);
    color: var(--ccv-brand);
    background: #f0f9ff;
}

.ccv-slot-btn.selected {
    background: var(--ccv-brand);
    color: white;
    border-color: var(--ccv-brand);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
    transform: scale(1.05);
}

/* --- PASO 3: DATOS --- */
.ccv-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--ccv-border);
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

.ccv-textarea:focus {
    outline: none;
    border-color: var(--ccv-brand);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* --- BOTÓN SUBMIT --- */
.ccv-submit-btn {
    background: linear-gradient(135deg, var(--ccv-brand) 0%, #0284c7 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.ccv-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    filter: brightness(110%);
}

.ccv-submit-btn:active {
    transform: translateY(0);
}

/* Mensajes de Estado */
.ccv-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.ccv-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.ccv-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 2px solid #34d399;
    /* Borde más visible */
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
    /* Glow verde */
    padding: 2rem;
    font-size: 1.1rem;
    animation: popIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Icono Check GRANDE */
.ccv-message.success::before {
    content: "✓";
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #10b981;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ccv-message.success h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #064e3b;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ccv-card {
        padding: 1.5rem;
    }

    .ccv-grid-services {
        grid-template-columns: 1fr;
    }

    .ccv-row-group {
        flex-direction: column;
        gap: 0;
    }

    .ccv-row-group>div {
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* --- PASO 1: SELECCIÓN DE SERVICIOS (Nuevo Dropdown Estilizado) --- */
.ccv-service-select {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    color: var(--ccv-text);
    background-color: var(--ccv-card);
    border: 1px solid var(--ccv-border);
    border-radius: var(--ccv-radius);
    box-shadow: var(--ccv-shadow);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    transition: all 0.2s ease;
}

.ccv-service-select:focus {
    outline: none;
    border-color: var(--ccv-brand);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.ccv-service-select:hover {
    border-color: #cbd5e1;
}

/* --- ESTILOS GESTIÓN DE SERVICIOS (SaaS v3.1) --- */
.ccv-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ccv-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.ccv-table th,
.ccv-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ccv-border);
}

.ccv-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.ccv-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Botón XS para acciones de tabla */
.ccv-btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--ccv-border);
    transition: all 0.2s;
}

.ccv-btn-xs:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Ajustes Modal Servicios */
.ccv-service-modal-close {
    color: #94a3b8;
    transition: color 0.2s;
}

.ccv-service-modal-close:hover {
    color: #ef4444;
}

/* --- SLOTS ADMIN MODAL (v3.2) --- */
.ccv-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.ccv-slot-btn {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ccv-slot-btn:hover {
    border-color: var(--ccv-brand);
    background: #e0f2fe;
}

.ccv-slot-btn.active {
    background: var(--ccv-brand);
    color: white;
    border-color: var(--ccv-brand);
}

.ccv-admin-slot {
    font-size: 0.85rem;
    padding: 5px 10px;
    width: auto;
}

/* --- ACORDEÓN DE AJUSTES (DETAILS/SUMMARY) --- */
.ccv-details {
    margin-bottom: 1rem;
    border: 1px solid var(--ccv-border);
    border-radius: var(--ccv-radius);
    background: white;
    overflow: hidden;
    transition: all 0.2s ease;
}

.ccv-details[open] {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    border-color: #cbd5e1;
}

.ccv-summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--ccv-text);
    background: #f8fafc;
    list-style: none;
    /* Ocultar triángulo default */
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.ccv-summary:hover {
    background: #f1f5f9;
}

/* Custom Marker (Flecha) */
.ccv-summary::after {
    content: '›';
    font-size: 1.5rem;
    line-height: 0;
    color: #94a3b8;
    transform: rotate(90deg);
    transition: transform 0.2s;
}

.ccv-details[open] .ccv-summary::after {
    transform: rotate(270deg);
    color: var(--ccv-brand);
}

.ccv-details-content {
    padding: 1.5rem;
    border-top: 1px solid var(--ccv-border);
    animation: slideDown 0.2s ease-out;
    background: white;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ocultar marker default en Safari/Webkit */
.ccv-summary::-webkit-details-marker {
    display: none;
}

/* --- SCHEDULE SETTINGS GRID --- */
.ccv-schedule-grid {
    background: #fff;
    border-radius: 4px;
}

.ccv-day-row:last-child {
    border-bottom: none !important;
}

.ccv-input-sm {
    width: 120px !important;
    /* Forzado y aumentado */
    padding: 2px 5px !important;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.85em !important;
    height: 32px !important;
    box-sizing: border-box !important;
}

.ccv-shifts {
    margin-top: 5px;
}

@media (max-width: 600px) {
    .ccv-day-row>div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }

    .ccv-shifts {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================ */
/* ACORDEONES DE SERVICIOS (CATÁLOGO 2026) */
/* ============================================ */

.ccv-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ccv-accordion {
    background: #fff;
    border: 1px solid var(--ccv-border);
    border-radius: var(--ccv-radius);
    overflow: hidden;
    transition: all 0.2s ease;
}

.ccv-accordion[open] {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ccv-accordion-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    list-style: none;
    user-select: none;
    transition: background 0.2s;
}

.ccv-accordion-header::-webkit-details-marker {
    display: none;
}

.ccv-accordion[open] .ccv-accordion-header {
    border-bottom-color: var(--ccv-border);
    background: #f1f5f9;
}

.ccv-accordion-header:hover {
    background: #e2e8f0;
}

.ccv-accordion-icon {
    font-size: 1.4rem;
    margin-right: 12px;
}

.ccv-accordion-title {
    flex: 1;
    font-weight: 600;
    color: var(--ccv-text);
    font-size: 0.95rem;
}

.ccv-accordion-count {
    font-size: 0.75rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 3px 8px;
    border-radius: 10px;
}

.ccv-accordion-content {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Servicios individuales */
.ccv-service-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 10px;
}

.ccv-service-item:hover {
    background: #f8fafc;
}

.ccv-service-item.selected {
    background: #eff6ff;
    border: 1px solid #3b82f6;
}

.ccv-service-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.ccv-service-item.hidden {
    display: none !important;
}

.ccv-service-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ccv-brand);
    cursor: pointer;
    flex-shrink: 0;
}

.ccv-service-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--ccv-text);
}

.ccv-service-duration {
    font-size: 0.8rem;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Badge "Servicio Único" */
.ccv-badge-unique {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Mensaje de bloqueo */
.ccv-lock-message {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #92400e;
    font-size: 0.9rem;
}

.ccv-lock-message.error {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Resumen de selección */
.ccv-selection-summary {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: var(--ccv-radius);
    padding: 15px;
    margin-top: 15px;
    font-size: 0.9rem;
}

#ccv_selected_services {
    color: var(--ccv-brand);
    font-weight: 500;
}

#ccv_total_duration {
    font-weight: 700;
    color: var(--ccv-brand);
}

/* Responsive acordeones */
@media (max-width: 480px) {
    .ccv-accordion-header {
        padding: 12px;
    }

    .ccv-accordion-icon {
        font-size: 1.2rem;
        margin-right: 8px;
    }

    .ccv-accordion-title {
        font-size: 0.85rem;
    }

    .ccv-service-item {
        padding: 8px 10px;
        flex-wrap: wrap;
    }

    .ccv-service-name {
        width: calc(100% - 28px);
        order: 1;
    }

    .ccv-service-duration,
    .ccv-badge-unique {
        order: 2;
        margin-top: 5px;
    }
}

/* ============================================
   ESTILOS CALENDARIO ESTILO GOOGLE CALENDAR (COMPACTO)
   ============================================ */

/* Hacer invisibles los contenedores de duración de FullCalendar */
.fc-v-event,
.fc-timegrid-event,
.fc-daygrid-event,
.fc-h-event,
.fc-event-main,
.fc-event-main-frame {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* El "Pill" real que abraza el texto */
.ccv-gcal-compact-pill {
    padding: 5px 10px !important;
    border-radius: 6px !important;
    color: white !important;
    display: block !important;
    /* Ocupa el ancho disponible */
    width: auto !important;
    height: auto !important;
    /* ESTO ES LA CLAVE: No se estira */
    max-height: fit-content !important;
    margin: 1px 2px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
    line-height: 1.3 !important;
    border-left: 4px solid rgba(0, 0, 0, 0.2) !important;
}

.ccv-gcal-title {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: white !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ccv-gcal-time {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* Vista Mensual (Mantener limpia) */
.ccv-month-event {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ccv-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ccv-month-text {
    font-size: 0.75rem;
    color: #334155;
}

/* Asegurar que las celdas del calendario no se deformen */
.fc-timegrid-event-harness {
    pointer-events: none;
    /* Permitir clicar debajo si es necesario, pero FullCalendar lo maneja */
}

.fc-timegrid-event {
    pointer-events: auto;
}

/* --- CONFIRMACIÓN ASISTENCIA (Indicador Visual Calendario) --- */
.ccv-event-confirmed {
    border-left: 3px solid #22c55e !important;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 8px rgba(34, 197, 94, 0.15) !important;
}

/* Mes: Dot verde brillante para confirmadas */
.ccv-month-event .ccv-event-confirmed {
    border-left: none;
}

/* ============================================================
   REFACTORIZACIÓN CSS: Estilos extraídos de PHP
   ============================================================ */

/* --- SHORTCODE: Gestionar Cita (manage-card) --- */
.ccv-manage-card {
    max-width: 500px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    text-align: center;
    font-family: sans-serif;
}

.ccv-manage-card--wide {
    text-align: left;
    max-width: 600px;
}

.ccv-icon {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

/* --- Ocultar Títulos del Tema (Divi, blockthemes, etc.) --- */
.ccv-wrap h1.entry-title,
.ccv-wrap .entry-header,
.ccv-wrap .et_pb_title_container,
.ccv-wrap .page-header,
.ccv-wrap .wp-block-post-title,
.ccv-wrap .page-title {
    display: none !important;
}

/* Dashboard: ocultar cualquier H1 que no sea el nuestro */
.ccv-dashboard-wrapper h1:not(.ccv-welcome-title) {
    display: none !important;
}

.ccv-dashboard-wrapper .entry-title,
.ccv-dashboard-wrapper .page-title,
.ccv-dashboard-wrapper .post-title,
.ccv-dashboard-wrapper .et_pb_title_container {
    display: none !important;
}

/* --- Login Form (Dashboard + Shortcode login) --- */
#ccv-login-submit {
    width: 100%;
    padding: 12px !important;
    background: var(--ccv-brand, #3b82f6) !important;
    border: none !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    margin-top: 15px !important;
    height: auto !important;
}

.ccv-login-form-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

.ccv-login-form-container input[type="text"],
.ccv-login-form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* --- Login Page Standalone (logic.php shortcode) --- */
.ccv-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 20px 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.ccv-login-card {
    background: white;
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    border: 1px solid #e2e8f0;
}

.ccv-login-logo-area {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ccv-login-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.ccv-login-title {
    color: var(--ccv-brand);
    margin: 0;
    font-size: 2rem;
}

.ccv-input-group {
    text-align: left;
    margin-bottom: 20px;
}

.ccv-input-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
}

.ccv-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ccv-form-control:focus {
    outline: none;
    border-color: var(--ccv-brand);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.ccv-submit-btn {
    background-color: var(--ccv-brand);
    color: white;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
}

.ccv-submit-btn:hover {
    opacity: 0.9;
}

.ccv-footer-links {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.ccv-footer-links a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.ccv-footer-links a:hover {
    color: var(--ccv-brand);
    text-decoration: underline;
}

/* --- Formulario Cliente: Selector de Especie --- */
.ccv-species-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.ccv-species-option {
    flex: 1;
    min-width: 120px;
    cursor: pointer;
}

.ccv-species-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
}

.ccv-species-icon {
    font-size: 2.5rem;
}

.ccv-species-label {
    margin: 10px 0 0;
    font-weight: 600;
    color: #334155;
}

.ccv-hidden-radio {
    display: none;
}

/* --- Títulos de Paso (h3 del formulario) --- */
.ccv-step-title {
    color: var(--ccv-brand);
}

/* --- Checkbox Primera Visita / RGPD --- */
.ccv-checkbox-group {
    margin-bottom: 15px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.ccv-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.ccv-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--ccv-brand);
}

.ccv-rgpd-section {
    margin-top: 20px;
    font-size: 0.9em;
    color: #64748b;
}

.ccv-rgpd-label {
    display: flex;
    gap: 10px;
    align-items: start;
    cursor: pointer;
}

.ccv-rgpd-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ccv-brand);
}

/* --- Acceso Denegado --- */
.ccv-access-denied {
    text-align: center;
    padding: 50px;
    font-family: system-ui, sans-serif;
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    margin: 40px auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.ccv-access-denied-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.ccv-access-denied h3 {
    color: #ef4444;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.ccv-access-denied p {
    color: #64748b;
    font-size: 1.1rem;
}

.ccv-access-denied-actions {
    margin-top: 30px;
}

.ccv-btn-back {
    display: inline-block;
    padding: 12px 24px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.ccv-btn-back:hover {
    background: #e2e8f0;
}

/* --- Welcome Title --- */
.ccv-welcome-title {
    font-size: 2.5rem;
    color: #1e293b;
    margin: 0 0 30px 0;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
}

/* --- Sidebar: Logout --- */
.ccv-nav-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #fda4af;
}

/* --- Sidebar: Brand Fallback --- */
.ccv-brand-fallback {
    color: white;
    margin: 0;
}

.ccv-brand-area {
    padding: 0 !important;
    text-align: center;
}

/* --- Schedule Grid (Horario Semanal) --- */
.ccv-day-row {
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 0;
}

.ccv-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.ccv-day-name {
    width: 100px;
    font-weight: bold;
}

.ccv-day-closed-label {
    font-size: 0.85em;
    cursor: pointer;
}

.ccv-shifts {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ccv-shift-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ccv-shift-group--t2 {
    margin-left: 10px;
}

.ccv-shift-label {
    font-size: 0.8em;
    color: #64748b;
}

/* --- Accordion (Tab SMTP) --- */
.ccv-accordion {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    background: #fff;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

.ccv-accordion summary {
    cursor: pointer;
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.ccv-accordion summary::-webkit-details-marker {
    display: none;
}

.ccv-accordion summary::before {
    content: '▶';
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.3s;
}

.ccv-accordion[open] summary::before {
    transform: rotate(90deg);
}

.ccv-accordion[open] summary {
    border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
}

.ccv-accordion summary:hover {
    background: #e2e8f0;
}

.ccv-accordion .ccv-accordion-body {
    padding: 24px;
}

/* Full-width fix for SMTP tab */
#tab-smtp {
    width: 100% !important;
    max-width: none !important;
}

#tab-smtp>* {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/* --- Toggle Switch (SMTP on/off) --- */
.ccv-toggle-group {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ccv-toggle-group .ccv-label {
    margin-bottom: 0;
}

.ccv-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.ccv-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ccv-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ef4444;
    transition: .4s;
    border-radius: 34px;
}

.ccv-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.ccv-switch input:checked+.ccv-switch-slider {
    background-color: #10b981 !important;
}

.ccv-switch input:checked+.ccv-switch-slider:before {
    transform: translateX(22px);
}

/* --- Info Box (Notas informativas en forms) --- */
.ccv-info-box {
    background: #f0f9ff;
    padding: 15px;
    border-left: 4px solid #0ea5e9;
    color: #0c4a6e;
    margin-bottom: 25px;
}

/* --- Utilidades de Layout/Formularios --- */
.ccv-form-actions {
    margin-top: 20px;
    text-align: right;
}

.ccv-hint-text {
    margin-bottom: 15px;
    color: #64748b;
    font-size: 0.9em;
}

.ccv-text-muted {
    color: #64748b;
}

.ccv-text-muted-sm {
    color: #64748b;
    display: block;
    margin-top: 5px;
}

.ccv-input-with-btn {
    display: flex;
    gap: 10px;
}

.ccv-btn-nowrap {
    white-space: nowrap;
}

.ccv-color-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ccv-slots-placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* --- Section Title (h3 con borde inferior) --- */
.ccv-section-title {
    margin-top: 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #1e293b;
}

/* --- Full Width Card (SMTP / Recordatorios) --- */
.ccv-full-width-card {
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

.ccv-full-width-card+.ccv-full-width-card {
    margin-top: 0 !important;
}

/* --- Monospace Textarea --- */
.ccv-monospace {
    font-family: monospace;
    line-height: 1.5;
}

/* --- Variables Help Block --- */
.ccv-variables-help {
    margin-top: 10px;
    padding: 15px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #475569;
}

.ccv-code-tag {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.ccv-variables-note {
    margin-top: 8px;
    display: block;
}

/* --- Test Email Result --- */
.ccv-test-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* --- Button Secondary --- */
.ccv-btn-secondary {
    background: #64748b;
    color: white;
}

/* --- Flex Between (form actions) --- */
.ccv-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Utility: margin-top 20px --- */
.ccv-mt-20 {
    margin-top: 20px;
}

/* --- Privacy Link --- */
.ccv-privacy-link {
    color: var(--ccv-brand);
    text-decoration: underline;
}

/* --- Security Tab --- */
.ccv-security-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ccv-security-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ccv-security-wrapper {
    text-align: left;
    max-width: 600px;
}

.ccv-current-pwd-group {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

/* --- Warning Box --- */
.ccv-warning-box {
    background-color: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 10px;
    margin: 20px 0;
    font-size: 0.9em;
    color: #7c2d12;
}

/* --- Modal Titles --- */
.ccv-modal-title {
    color: var(--ccv-brand);
    margin-top: 0;
}

/* --- Inline Checkbox (Services) --- */
.ccv-inline-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.ccv-checkbox-auto {
    width: auto;
    margin-right: 10px;
}

/* --- Utility: margin-left 25px --- */

/* --- Login Card (Restricted Access) --- */
.ccv-login-card {
    text-align: center;
    padding: 40px;
}

.ccv-login-heading {
    color: #0f172a;
    margin-bottom: 10px;
}

.ccv-login-subtitle {
    margin-bottom: 30px;
}

/* --- Species Other Wrapper --- */
.ccv-species-other-wrapper {
    margin-top: 15px;
}

/* --- Shift Label --- */
.ccv-shift-label {
    cursor: pointer;
}

/* --- Text Muted Small --- */
.ccv-text-muted-sm {
    display: block;
    color: #64748b;
}

/* --- Input with Button Group --- */
.ccv-input-with-btn {
    display: flex;
    gap: 10px;
}

.ccv-btn-nowrap {
    white-space: nowrap;
}

/* --- Color Group --- */
.ccv-color-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- GOLD STANDARD STANDARDIZATION --- */

/* 1. Layout Wrapper: Global container for each page content */
.ccv-layout-wrapper {
    width: 100%;
    margin-bottom: 30px;
    /* Spacing at bottom */
    display: block;
}

/* 2. Page Header: Forced Typography (Roboto) and Alignment */
.ccv-page-header {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 700 !important;
    font-size: 2rem !important;
    /* Standard H1/H2 size */
    color: #333 !important;
    /* Dark grey standard */
    text-align: left !important;
    /* Force left alignment (fixes Security page) */
    margin-top: 0 !important;
    /* Fixes Email page spacing */
    margin-bottom: 20px !important;
    /* Standard spacing */
    line-height: 1.2 !important;
    width: 100% !important;
    text-transform: none !important;
    /* Prevent theme uppercase */
    letter-spacing: normal !important;
}

/* 3. Card Container: Clone of Calendar Wrapper */
.ccv-card-container {
    background: white !important;
    padding: 20px !important;
    border-radius: var(--ccv-radius) !important;
    box-shadow: var(--ccv-shadow) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
    position: relative !important;
    /* Ensure context */
}