/**
 * Task Progress Manager - General Styles
 * Actualizado según Manual de Identidad Corporativa ASKAL
 */

/* Tipografías según manual de marca */
@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@300;400;700&family=Dosis:wght@200;300;400;500;600;700;800&display=swap');

/* Variables CSS basadas en el Manual de Marca ASKAL */
:root {
    /* Colores principales según manual */
    --askal-primary-orange: #FFB703;     /* Color principal obligatorio */
    --askal-turquoise: #85D2D0;          /* Color secundario */
    --askal-navy: #333652;               /* Azul marino */
    --askal-yellow: #FFDA6C;             /* Amarillo */
    --askal-light-grey: #D9D9D9;         /* Gris */
    
    /* Colores de servicios según manual */
    --askal-service-pink: #EF7C8E;       /* Servicio discapacidad auditiva */
    --askal-service-green: #B3C792;      /* Servicio psiquiátrico */
    --askal-service-aqua: #B6E2D3;       /* Certificación */
    --askal-service-rose: #F1E1E3;       /* Formación */
    --askal-service-cream: #FFF7C5;      /* Cachorros */
    
    /* Colores de texto según identidad */
    --askal-text-dark: #333652;          /* Textos principales */
    --askal-text-medium: #4a5568;        /* Textos secundarios */
    --askal-text-light: #646970;         /* Textos suaves */
    
    /* Gradientes corporativos */
    --askal-gradient-primary: linear-gradient(135deg, #FFB703 0%, #FFDA6C 100%);
    --askal-gradient-secondary: linear-gradient(135deg, #85D2D0 0%, #B6E2D3 100%);
    
    /* Sombras y bordes corporativos */
    --askal-card-shadow: 0 15px 35px rgba(255, 183, 3, 0.15);
    --askal-card-border: 1px solid rgba(255, 183, 3, 0.3);
    --askal-hover-transform: translateY(-3px);
    --askal-border-radius: 15px;
    --askal-border-radius-small: 8px;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Contenedor principal del plugin */
.tpm-container,
body {
    font-family: 'Dosis', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--askal-text-dark);
}

/* Aplicar el gradiente ASKAL al body */
body {
    background: var(--askal-gradient-primary);
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Resetear el fondo para los contenedores */
.wrap,
main {
    background: transparent;
    flex: 1;
}

/* Header de la aplicación con identidad ASKAL */
header {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--askal-primary-orange);
    border-radius: 20px 20px 0 0;
}

header h1 {
    color: var(--askal-text-dark);
    font-size: 2.2rem;
    margin: 0;
    font-weight: 700;
    font-family: 'Kalam', cursive;
}

nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav a {
    background: var(--askal-primary-orange);
    color: white;
    border: 1px solid var(--askal-primary-orange);
    border-radius: var(--askal-border-radius-small);
    padding: 8px 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Dosis', sans-serif;
}

nav a:hover {
    background: #e6a503;
    border-color: #e6a503;
    transform: var(--askal-hover-transform);
    box-shadow: 0 8px 20px rgba(255, 183, 3, 0.3);
}

/* Header principal (WordPress style para compatibilidad) */
.tpm-header {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--askal-card-shadow);
    text-align: center;
    border: var(--askal-card-border);
    position: relative;
}

.tpm-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--askal-primary-orange);
    border-radius: 20px 20px 0 0;
}

.tpm-header h1.wp-heading-inline {
    color: var(--askal-text-dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: left;
    display: inline-block;
    font-family: 'Kalam', cursive;
}

.tpm-header .page-title-action {
    background: var(--askal-primary-orange);
    color: white;
    border: 1px solid var(--askal-primary-orange);
    border-radius: var(--askal-border-radius-small);
    padding: 8px 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 15px;
    font-family: 'Dosis', sans-serif;
}

.tpm-header .page-title-action:hover {
    background: #e6a503;
    border-color: #e6a503;
    transform: var(--askal-hover-transform);
    box-shadow: 0 8px 20px rgba(255, 183, 3, 0.3);
}

/* Panel de información de usuario con colores ASKAL */
.tpm-user-panel {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: var(--askal-border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--askal-turquoise);
}

.tpm-user-panel:hover {
    transform: var(--askal-hover-transform);
}

.tpm-user-panel h3 {
    color: var(--askal-text-dark);
    margin-bottom: 15px;
    font-size: 1.4rem;
    border-bottom: 3px solid var(--askal-primary-orange);
    padding-bottom: 8px;
    font-family: 'Kalam', cursive;
}

.tpm-user-panel p {
    color: var(--askal-text-medium);
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.tpm-user-panel strong {
    color: var(--askal-text-dark);
    font-weight: 600;
}

/* Grid de estadísticas con colores de servicios ASKAL */
.tpm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
    justify-items: center;
}

.tpm-stat-card {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: var(--askal-border-radius);
    padding: 25px;
    text-align: center;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 280px;
    border-top: 4px solid var(--askal-primary-orange);
}

.tpm-stat-card:hover {
    transform: var(--askal-hover-transform);
}

/* Colores específicos para cada tarjeta según servicios ASKAL */
.tpm-stat-card:nth-child(1) {
    border-top-color: var(--askal-service-pink);
}

.tpm-stat-card:nth-child(2) {
    border-top-color: var(--askal-service-green);
}

.tpm-stat-card:nth-child(3) {
    border-top-color: var(--askal-service-aqua);
}

.tpm-stat-card:nth-child(4) {
    border-top-color: var(--askal-service-rose);
}

.tpm-stat-card:nth-child(5) {
    border-top-color: var(--askal-service-cream);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--askal-text-dark);
    margin-bottom: 8px;
    line-height: 1;
    font-family: 'Kalam', cursive;
}

.stat-label {
    color: var(--askal-text-medium);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    font-family: 'Dosis', sans-serif;
}

/* Contenedor de tareas con identidad ASKAL */
.tpm-tasks-container {
    background: white;
    backdrop-filter: blur(10px);
    border-radius: var(--askal-border-radius);
    margin: 25px 0;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    overflow: hidden;
}

/* Header de tareas con filtros */
.tpm-tasks-header,
.tablenav.top {
    background: linear-gradient(135deg, #f7fafc 0%, #fff7f0 100%);
    border-bottom: var(--askal-card-border);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tpm-tasks-title {
    color: var(--askal-text-dark);
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Kalam', cursive;
}

/* Filtros y tabs con colores ASKAL */
.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--askal-light-grey);
    border-radius: var(--askal-border-radius-small);
    cursor: pointer;
    font-size: 13px;
    color: var(--askal-text-medium);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Dosis', sans-serif;
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--askal-primary-orange);
    color: white;
    border-color: var(--askal-primary-orange);
    transform: translateY(-2px);
}

/* Select de filtros */
#tpm-filter-status {
    padding: 8px 12px;
    border: 2px solid var(--askal-light-grey);
    border-radius: var(--askal-border-radius-small);
    background: white;
    color: var(--askal-text-dark);
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: 'Dosis', sans-serif;
}

#tpm-filter-status:focus {
    border-color: var(--askal-primary-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.1);
}

.button.action {
    background: var(--askal-primary-orange);
    color: white;
    border: 1px solid var(--askal-primary-orange);
    padding: 8px 16px;
    border-radius: var(--askal-border-radius-small);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: 'Dosis', sans-serif;
}

.button.action:hover {
    background: #e6a503;
    border-color: #e6a503;
    transform: translateY(-1px);
}

/* Tabla de tareas */
.wp-list-table {
    background: white;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.wp-list-table th,
.wp-list-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.wp-list-table th {
    background: linear-gradient(135deg, #f7fafc 0%, #fff7f0 100%);
    color: var(--askal-text-dark);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--askal-primary-orange);
    font-family: 'Dosis', sans-serif;
}

.wp-list-table tbody tr {
    transition: background-color 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background: #fff7f0;
}

/* Checkbox de tareas */
.tpm-task-checkbox {
    transform: scale(1.3);
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--askal-primary-orange);
}

.tpm-task-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contenido de celdas de tarea */
.wp-list-table td strong {
    color: var(--askal-text-dark);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.wp-list-table td small {
    color: var(--askal-text-medium);
    font-size: 13px;
    line-height: 1.5;
    display: block;
    margin-top: 5px;
}

/* Barra de progreso con gradiente ASKAL */
.tpm-progress-bar {
    width: 100%;
    height: 10px;
    background: #f0f0f1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.tpm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--askal-primary-orange), var(--askal-yellow));
    border-radius: 6px;
    transition: width 0.4s ease;
    position: relative;
}

.tpm-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: askal-shimmer 2s infinite;
}

@keyframes askal-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tpm-progress-text {
    font-size: 12px;
    color: var(--askal-text-medium);
    font-weight: 600;
    font-family: 'Dosis', sans-serif;
}

/* Badges de estado con colores de servicios ASKAL */
.tpm-status-badge {
    padding: 6px 12px;
    border-radius: var(--askal-border-radius-small);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    font-family: 'Dosis', sans-serif;
}

.status-completed {
    background: var(--askal-service-green);
    color: white;
    border: 1px solid var(--askal-service-green);
}

.status-in-progress {
    background: var(--askal-turquoise);
    color: white;
    border: 1px solid var(--askal-turquoise);
}

.status-pending {
    background: var(--askal-yellow);
    color: var(--askal-navy);
    border: 1px solid var(--askal-yellow);
}

.status-overdue {
    background: var(--askal-service-pink);
    color: white;
    border: 1px solid var(--askal-service-pink);
}

/* Badges de prioridad */
.tpm-priority-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    display: inline-block;
    font-family: 'Dosis', sans-serif;
}

.priority-high {
    background: var(--askal-service-pink);
    box-shadow: 0 2px 4px rgba(239, 124, 142, 0.3);
}

.priority-medium {
    background: var(--askal-primary-orange);
    box-shadow: 0 2px 4px rgba(255, 183, 3, 0.3);
}

.priority-low {
    background: var(--askal-service-green);
    box-shadow: 0 2px 4px rgba(179, 199, 146, 0.3);
}

/* Fechas de vencimiento */
.tpm-due-date {
    font-size: 13px;
    color: var(--askal-text-medium);
    font-weight: 500;
}

.tpm-due-soon {
    color: var(--askal-primary-orange);
    font-weight: 700;
}

.tpm-overdue {
    color: var(--askal-service-pink);
    font-weight: 700;
    animation: askal-pulse 2s infinite;
}

@keyframes askal-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Botones de acción con identidad ASKAL */
.tpm-actions-cell {
    white-space: nowrap;
}

.action-button,
.button.button-small {
    background: var(--askal-primary-orange);
    color: white;
    border: 1px solid var(--askal-primary-orange);
    border-radius: var(--askal-border-radius-small);
    cursor: pointer;
    font-size: 11px;
    line-height: 1.5;
    margin: 0 3px 5px 0;
    padding: 6px 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    display: inline-block;
    font-family: 'Dosis', sans-serif;
}

.action-button:hover,
.button.button-small:hover {
    background: #e6a503;
    border-color: #e6a503;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 183, 3, 0.3);
}

.action-button:disabled,
.button.button-small:disabled {
    background: var(--askal-light-grey);
    border-color: var(--askal-light-grey);
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.action-button.secondary,
.button.button-small.secondary {
    background: white;
    color: var(--askal-text-medium);
    border-color: var(--askal-light-grey);
}

.action-button.secondary:hover,
.button.button-small.secondary:hover {
    background: #fff7f0;
    border-color: var(--askal-primary-orange);
    color: var(--askal-text-dark);
}

.button-link-delete {
    background: var(--askal-service-pink) !important;
    border-color: var(--askal-service-pink) !important;
}

.button-link-delete:hover {
    background: #e56b7e !important;
    border-color: #e56b7e !important;
}

/* Modal con identidad ASKAL */
.tpm-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 54, 82, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpm-modal-content {
    background: white;
    border-radius: var(--askal-border-radius);
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border-top: 4px solid var(--askal-primary-orange);
}

.tpm-modal-content h2 {
    color: var(--askal-text-dark);
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--askal-primary-orange);
    padding-bottom: 10px;
    font-family: 'Kalam', cursive;
}

.tpm-close {
    color: var(--askal-text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.tpm-close:hover {
    color: var(--askal-service-pink);
}

/* Formularios con estilo ASKAL */
.form-table th {
    color: var(--askal-text-dark);
    font-weight: 600;
    padding: 15px 10px 15px 0;
    width: 150px;
    font-family: 'Dosis', sans-serif;
}

.form-table td {
    padding: 15px 0;
}

.form-table input[type="text"],
.form-table input[type="datetime-local"],
.form-table textarea,
.form-table select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--askal-light-grey);
    border-radius: var(--askal-border-radius-small);
    background: white;
    color: var(--askal-text-dark);
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: 'Dosis', sans-serif;
}

.form-table input[type="text"]:focus,
.form-table input[type="datetime-local"]:focus,
.form-table textarea:focus,
.form-table select:focus {
    border-color: var(--askal-primary-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.1);
}

.form-table textarea {
    resize: vertical;
    min-height: 80px;
}

/* Botones principales con identidad ASKAL */
.button-primary {
    background: var(--askal-primary-orange) !important;
    border-color: var(--askal-primary-orange) !important;
    color: white !important;
    border-radius: var(--askal-border-radius-small) !important;
    padding: 10px 25px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    font-family: 'Dosis', sans-serif !important;
}

.button-primary:hover {
    background: #e6a503 !important;
    border-color: #e6a503 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(255, 183, 3, 0.3) !important;
}

.button {
    border-radius: var(--askal-border-radius-small) !important;
    transition: all 0.2s ease !important;
    font-family: 'Dosis', sans-serif !important;
}

.button:hover {
    transform: translateY(-1px) !important;
}

/* Notice/Alertas con colores ASKAL */
.notice {
    border-left-width: 4px !important;
    border-radius: 0 var(--askal-border-radius-small) var(--askal-border-radius-small) 0 !important;
    padding: 15px 20px !important;
    margin: 15px 0 !important;
    box-shadow: var(--askal-card-shadow) !important;
}

.notice-success {
    border-left-color: var(--askal-service-green) !important;
    background: #f0fff4 !important;
}

.notice-error {
    border-left-color: var(--askal-service-pink) !important;
    background: #fff5f5 !important;
}

.notice-warning {
    border-left-color: var(--askal-primary-orange) !important;
    background: #fff7f0 !important;
}

/* Estados de carga con colores ASKAL */
.tpm-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.tpm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--askal-light-grey);
    border-radius: 50%;
    border-top-color: var(--askal-primary-orange);
    animation: askal-spin 1s ease-in-out infinite;
}

@keyframes askal-spin {
    to { transform: rotate(360deg); }
}

/* Animaciones de entrada */
.tpm-fade-in {
    animation: askal-fadeIn 0.6s ease-out;
}

@keyframes askal-fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.tpm-scale-in {
    animation: askal-scaleIn 0.4s ease-out;
}

@keyframes askal-scaleIn {
    from { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Estados especiales */
.tpm-completed-task {
    animation: askal-checkmark 0.5s ease-out;
}

@keyframes askal-checkmark {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.tpm-permission-denied {
    background: #fff5f5 !important;
    border: 2px solid var(--askal-service-pink) !important;
    color: var(--askal-service-pink) !important;
    padding: 15px 20px !important;
    margin: 15px 0 !important;
    border-radius: var(--askal-border-radius) !important;
    text-align: center;
    font-weight: 600;
}

/* ============ ESTILOS ADICIONALES PARA APLICACIÓN INDEPENDIENTE ============ */

/* Secciones de la aplicación */
.section {
    display: none;
    background: white;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--askal-primary-orange);
    border-radius: 20px 20px 0 0;
}

.section.active {
    display: block;
}

/* Auth Section con identidad ASKAL */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: var(--askal-border-radius-small);
    overflow: hidden;
    background: var(--askal-light-grey);
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: var(--askal-light-grey);
    color: var(--askal-text-medium);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Dosis', sans-serif;
}

.tab-btn.active {
    background: var(--askal-primary-orange);
    color: white;
}

.auth-tab {
    display: none;
}

.auth-tab.active {
    display: block;
}

.auth-tab h2 {
    color: var(--askal-text-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-family: 'Kalam', cursive;
}

/* Formularios con identidad ASKAL */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--askal-light-grey);
    border-radius: var(--askal-border-radius-small);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Dosis', sans-serif;
    color: var(--askal-text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--askal-primary-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.1);
}

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

button[type="submit"],
.btn {
    background: var(--askal-primary-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--askal-border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Dosis', sans-serif;
}

button[type="submit"]:hover,
.btn:hover {
    background: #e6a503;
    transform: var(--askal-hover-transform);
    box-shadow: 0 8px 20px rgba(255, 183, 3, 0.3);
}

.btn-primary {
    background: var(--askal-primary-orange);
}

.btn-danger {
    background: var(--askal-service-pink);
}

.btn-danger:hover {
    background: #e56b7e;
    box-shadow: 0 8px 20px rgba(239, 124, 142, 0.3);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* Dashboard Stats con colores de servicios ASKAL */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: var(--askal-border-radius);
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid var(--askal-primary-orange);
    position: relative;
}

.stat-card:nth-child(1) { border-top-color: var(--askal-service-pink); }
.stat-card:nth-child(2) { border-top-color: var(--askal-service-green); }
.stat-card:nth-child(3) { border-top-color: var(--askal-service-aqua); }
.stat-card:nth-child(4) { border-top-color: var(--askal-service-rose); }
.stat-card:nth-child(5) { border-top-color: var(--askal-service-cream); }

.stat-card:hover {
    transform: var(--askal-hover-transform);
}

.stat-card h3 {
    color: var(--askal-text-medium);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-weight: 600;
    font-family: 'Dosis', sans-serif;
}

.stat-card span {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--askal-primary-orange);
    font-family: 'Kalam', cursive;
}

/* Tasks Header */
.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.tasks-header h2 {
    color: var(--askal-text-dark);
    margin: 0;
    font-family: 'Kalam', cursive;
}

/* Tasks Filters */
.tasks-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* Tasks List con identidad ASKAL */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-item {
    background: white;
    border-radius: var(--askal-border-radius);
    padding: 25px;
    box-shadow: var(--askal-card-shadow);
    border: var(--askal-card-border);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--askal-primary-orange);
}

.task-item:hover {
    transform: var(--askal-hover-transform);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.task-header h3 {
    color: var(--askal-text-dark);
    margin: 0;
    flex: 1;
    font-family: 'Kalam', cursive;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.task-content p {
    color: var(--askal-text-medium);
    margin-bottom: 15px;
}

.task-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.priority,
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Dosis', sans-serif;
}

.priority-low { 
    background: var(--askal-service-green); 
    color: white; 
}
.priority-medium { 
    background: var(--askal-primary-orange); 
    color: white; 
}
.priority-high { 
    background: var(--askal-service-pink); 
    color: white; 
}

.status-pending { 
    background: var(--askal-yellow); 
    color: var(--askal-navy); 
}
.status-in-progress { 
    background: var(--askal-turquoise); 
    color: white; 
}
.status-completed { 
    background: var(--askal-service-green); 
    color: white; 
}

.progress {
    color: var(--askal-text-medium);
    font-weight: 600;
    font-family: 'Dosis', sans-serif;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--askal-light-grey);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--askal-primary-orange), var(--askal-yellow));
    transition: width 0.3s ease;
}

/* Task Controls */
.task-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.progress-slider {
    flex: 1;
    min-width: 150px;
}

.due-date {
    background: #fff7f0;
    padding: 8px 15px;
    border-radius: var(--askal-border-radius-small);
    font-size: 0.9rem;
    color: var(--askal-text-medium);
    margin-top: 10px;
    border-left: 4px solid var(--askal-primary-orange);
}

/* Modal independiente */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 54, 82, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: var(--askal-border-radius);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: var(--askal-card-border);
    border-top: 4px solid var(--askal-primary-orange);
}

.modal-content h3 {
    color: var(--askal-text-dark);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-family: 'Kalam', cursive;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.form-actions button[type="button"] {
    background: var(--askal-light-grey);
    color: var(--askal-text-medium);
}

.form-actions button[type="button"]:hover {
    background: #cbd5e0;
    transform: none;
    box-shadow: none;
}

/* Profile Section */
.profile-info p {
    color: var(--askal-text-medium);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.profile-info strong {
    color: var(--askal-text-dark);
    font-weight: 600;
}

/* No tasks message */
.no-tasks {
    text-align: center;
    padding: 60px 20px;
    color: var(--askal-text-medium);
    font-size: 1.1rem;
    background: white;
    border-radius: var(--askal-border-radius);
    border: 2px dashed var(--askal-light-grey);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tpm-stats-grid,
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 782px) {
    #wpbody-content,
    body {
        padding: 15px;
    }
    
    .tpm-header,
    header {
        padding: 20px;
        text-align: left;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .tpm-header h1.wp-heading-inline,
    header h1 {
        font-size: 1.8rem;
        display: block;
        margin-bottom: 15px;
    }
    
    .tpm-header .page-title-action {
        display: block;
        text-align: center;
        margin-left: 0;
    }
    
    .tpm-stats-grid,
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tpm-tasks-header,
    .tablenav.top,
    .tasks-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-tabs,
    .tasks-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .wp-list-table {
        font-size: 13px;
    }
    
    .wp-list-table th,
    .wp-list-table td {
        padding: 10px 8px;
    }
    
    .tpm-modal-content,
    .modal-content {
        margin: 20px;
        padding: 20px;
        width: calc(100% - 40px);
    }
    
    .form-table th {
        width: auto;
        display: block;
        padding-bottom: 5px;
    }
    
    .form-table td {
        display: block;
        padding-top: 0;
    }
    
    .task-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-actions {
        justify-content: flex-start;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .auth-tabs {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .wp-list-table,
    .wp-list-table thead,
    .wp-list-table tbody,
    .wp-list-table th,
    .wp-list-table td,
    .wp-list-table tr {
        display: block;
    }
    
    .wp-list-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .wp-list-table tr {
        border: var(--askal-card-border);
        border-radius: var(--askal-border-radius-small);
        margin-bottom: 15px;
        padding: 15px;
        background: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .wp-list-table td {
        border: none !important;
        position: relative;
        padding: 8px 0 8px 120px !important;
    }
    
    .wp-list-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 110px;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--askal-text-dark);
    }
}

/* Mejoras de accesibilidad */
.tpm-task-checkbox:focus,
.button:focus,
.filter-tab:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--askal-primary-orange);
    outline-offset: 2px;
}

/* Estados de hover mejorados */
@media (hover: hover) {
    .tpm-stat-card:hover,
    .stat-card:hover,
    .tpm-user-panel:hover,
    .filter-tab:hover,
    .action-button:hover,
    .task-item:hover {
        cursor: pointer;
    }
}

/* Print styles */
@media print {
    .tpm-modal,
    .modal,
    .filter-tabs,
    .tpm-actions-cell,
    .page-title-action,
    nav {
        display: none !important;
    }
    
    .tpm-tasks-container,
    .wp-list-table,
    .task-item {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    body {
        background: white !important;
    }
}
