/* Estilos generales para DietManager3K */
html.wp-toolbar,
body.wp-admin,
#wpwrap,
#wpcontent {
    overflow-x: hidden !important;
}

.dietas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dietas-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.dietas-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.button-primary {
    background: #007cba;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.button-primary:hover {
    background: #005a87;
}

button.button.button-danger {
    background-color: transparent !important;
    padding: 0 7px !important;
}
button.button.button-danger:hover {
    background: #ffd5d5 !important;
}
.dashicons-trash{
    color: #d93030;
    padding: 4px 0;
}
/* Estilos para el área de login */

.dietas-login-form {
    max-width: 400px;
    margin: 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dietas-error {
    background: #ffeaa7;
    color: #d63031;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #d63031;
}

.dietas-success {
    background: #55efc4;
    color: #00b894;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #00b894;
}

.dietas-login-button{
     background: #5E5E4E;
    padding: .8rem 1rem;
    width: 100%;
    color: white;
    border: none;
    margin: .7rem 0;
}
/* Estilos para el área privada */
.dietas-area-privada {
    max-width: 1000px;
    margin: 50px auto;
}

.consulta-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.consulta-item h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.consulta-datos p {
    margin: 8px 0;
}

/* Grid de estadísticas */
.estadisticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.estadistica-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.estadistica-item .numero {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
    margin: 10px 0;
}

/* Tablas */
.dietas-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.dietas-table th,
.dietas-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.dietas-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.dietas-table tr:hover {
    background: #f8f9fa;
}

/* Dashboard nuevo diseño */
.dietas-dashboard {
    max-width: 1200px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.dashboard-welcome h1 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: #1d2327;
}

.dashboard-welcome p {
    margin: 0;
    color: #50575e;
    font-size: 15px;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.dashboard-actions .button-hero {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}

/* Card de estadísticas combinadas */
.dashboard-stats-card {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    background: linear-gradient(135deg, #b3b3b3 0%, #2ab2e5 100%);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
}

/* Card de gráfica */
.dashboard-chart-card {
    background: #fff !important;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-chart-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1d2327 !important;
    font-weight: 600;
}

.chart-container {
    width: 100%;
}

.chart-year-selector {
    position: absolute;
    top: -40px;
    right: 10px;
    z-index: 10;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.chart-year-selector:hover {
    border-color: #007cba;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.2);
}

.chart-year-selector:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

@media (max-width: 768px) {
    .chart-year-selector {
        top: -40px;
        right: 5px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Dashboard Cards legacy - Diseño moderno */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.dashboard-cards .card {
    background: linear-gradient(135deg, #eaeff3 0%, #fdfdfd 100%);
    border: none;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgb(81 81 81 / 20%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-stats-card {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }
    
    .stat-divider {
        width: 60px;
        height: 1px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

.dashboard-cards .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba 0%, #00a0d6 50%, #007cba 100%);
}

.dashboard-cards .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
}

.dashboard-cards .card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-cards .card p {
    font-size: 32px;
    font-weight: 700;
    color: #007cba;
    margin: 0;
    line-height: 1.2;
}

.dashboard-cards .card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-cards .card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-cards .card ul li:last-child {
    border-bottom: none;
}

.dashboard-cards .card ul li strong {
    color: #007cba;
    font-size: 18px;
    font-weight: 700;
}


/* Tarjeta de bienvenida mejorada */
.wrap > .card:first-of-type {
    background: linear-gradient(135deg, #b3b3b3 0%, #2ab2e5 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 16px rgba(0, 124, 186, 0.2);
}

.wrap > .card:first-of-type h2 {
    color: white;
    margin-top: 0;
    font-size: 24px;
    font-weight: 600;
}

.wrap > .card:first-of-type p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 0;
}

/* Mejoras generales para cards */
.card {
    background: linear-gradient(135deg, #b3b3b3 0%, #2ab2e5 100%) !important;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    min-width: 100%;
    max-width: 100%;
    color: white !important;
}
.card50 {
    min-width: 50%;
    max-width: 50%;
}

.card h2,
.card h3,
.card h4,
.card p,
.card label,
.card strong {
    color: white !important;
}

.card th[scope="row"] {
    color: #000 !important;
}

.card .description {
    color: rgba(255, 255, 255, 0.85) !important;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Asegurar fondo en cards del admin */
.wrap .card,
.wrap > .card,
body.wp-admin .card {
    background: linear-gradient(135deg, #b3b3b3 0%, #2ab2e5 100%) !important;
    color: white !important;
}

.card-consultas{
    min-width: 100%;
}

/* Clase para labels de configuración de primera entrevista */
.form-table th label.dietas-label-entrevista,
.form-table th .dietas-label-entrevista,
.form-table th[scope="row"] label.dietas-label-entrevista,
.form-table th[scope="row"] .dietas-label-entrevista,
table.form-table th label.dietas-label-entrevista,
table.form-table th .dietas-label-entrevista,
.dietas-label-entrevista {
    color: #000 !important;
    font-weight: 600 !important;
}

/* Botones mejorados */
.dashboard-cards .card .button {
    margin: 4px 8px 4px 0;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-cards .card .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .dietas-form-grid {
        grid-template-columns: 1fr;
    }
    
    .estadisticas-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-cards .card {
        padding: 20px;
    }
    
    .dashboard-cards .card p {
        font-size: 28px;
    }
}

/* Estilos para Mi Área Privada */

.dietas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    /*border-bottom: 2px solid #eee;*/
}
.dietas-header h2 {
    color: #757575;
}
/* Mismo tamaño y line-height para botón Cambiar contraseña y enlace Cerrar sesión */
.dietas-header #dietas-cambiar-password-btn,
.dietas-header .dietas-logout {
    padding: 12px 20px;
    line-height: 1.2;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    border-radius: 4px;
    text-decoration: none;
}
.dietas-logout {
    background: #f96c53;
    color: white;
}

.dietas-logout:hover {
    background: #d94b32;
    color: white;
}

/* Estilos para Tus Últimos Logros */
.dietas-ultimos-logros, .dietas-grafica-evolucion, .dietas-proximas-consultas, .dietas-consultas {
    margin: 30px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dietas-ultimos-logros h3, .dietas-grafica-evolucion h3, .dietas-proximas-consultas h3, .dietas-consultas h3 {
    text-align: left;
    margin:1rem 0 2rem 0;
    color: #757575;
    font-size: 1.3rem;
}

/* Contenedor con scroll horizontal para la tabla Tu historial de consultas (sin overflow visible) */
.dietas-consultas-tabla-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overflow-y: visible;
    max-width: 100%;
}

/* Responsive área paciente (versión móvil) */
@media (max-width: 768px) {
    .dietas-area-privada {
        padding-left: 28px;
        padding-right: 28px;
    }
    .dietas-area-privada .dietas-header h2 {
        font-size: 20px;
        padding-right: 4px;
        padding-top: 8px;
    }
}

.graficas-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.graficas-container .grafica-container {
    position: relative;
    height: 400px;
    max-height: 400px;
    overflow: hidden;
}

.graficas-container .grafica-container canvas {
    max-height: 100% !important;
    height: auto !important;
}

/* En móvil: gráficos de evolución uno debajo del otro y ancho completo */
@media (max-width: 768px) {
    .graficas-container {
        grid-template-columns: 1fr;
    }
    .graficas-container .grafica-container {
        width: 100%;
        min-width: 0;
    }
}
.logros-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.logro-caja {
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.logro-caja:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.logro-caja.excelente {
    background: linear-gradient(135deg, #e4f7e5, #85a987);
    color: white;
    border-color: #388e3c29;
}

.logro-caja.bueno {
    background: linear-gradient(135deg, #c6def1, #98c2eb);
    color: white;
    border-color: #1565c02b;
}

.logro-caja.mejora {
    background: linear-gradient(135deg, #f7f1de, #d5aa61);
    color: white;
    border-color: #ff8f0003;
}

.logro-caja.neutral {
    background: linear-gradient(135deg, #cbdbe3, #9ec7d9);
    color: white;
    border-color: #455a640f;
}

.logro-caja.alerta {
    background: linear-gradient(135deg, #f7cdc0, #ff8e6b);
    color: white;
    border-color: #bf360c12;
}

.logro-emoji {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
    opacity: .60;
}
.logro-titulo {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logro-valor {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 18px;
}

.logro-mensaje {
    font-size: 0.9em;
    opacity: 0.95;
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 768px) {
    .logros-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logros-container {
        grid-template-columns: 1fr;
    }
}

/* Estilos específicos para mensajes de email de prueba */
#email-prueba-resultado .notice.notice-success,
#email-prueba-resultado .notice.notice-success p,
#email-prueba-resultado .notice.notice-success strong {
    color: #000 !important;
    background-color: #fff !important;
}

#email-prueba-resultado .notice.notice-error,
#email-prueba-resultado .notice.notice-error p,
#email-prueba-resultado .notice.notice-error strong {
    color: #000 !important;
}

/* Configuración Calendario: grid responsive */
@media (max-width: 900px) {
    .dm3k-calendario-config-grid {
        grid-template-columns: 1fr !important;
    }
}