/* ============================================
   KAIZEN APP - EAGLE & LION THEME
   Versión: Profesional inspirada en logo Águila+León
   Colores: Marrón Oscuro + Dorado Vibrante
   ============================================ */

/* ============================================
   CSS VARIABLES - TEMA OSCURO (DEFAULT)
   Inspirado en logo: Águila + León + Escudo
   ============================================ */

   :root {
    /* TEMA OSCURO - BASADO EN LOGO */
    --bg-primary: linear-gradient(135deg, #2b2420 0%, #3d3228 50%, #2b2420 100%);
    --bg-card: linear-gradient(145deg, rgba(43, 36, 32, 0.95), rgba(61, 50, 40, 0.95));
    --bg-card-hover: linear-gradient(145deg, rgba(50, 42, 37, 0.98), rgba(70, 58, 47, 0.98));
    
    /* TEXTOS - DORADO COMO EN LOGO */
    --text-primary: #f5e6d3;      /* Crema claro */
    --text-secondary: #e6c45a;    /* Dorado vibrante (del logo) */
    --text-accent: #d4af37;       /* Dorado intenso */
    --text-muted: #a89575;        /* Dorado apagado */
    
    /* BORDES - DORADOS */
    --border-primary: #e6c45a;    /* Dorado vibrante */
    --border-secondary: #d4af37;  /* Dorado intenso */
    
    /* INPUTS */
    --input-bg: rgba(212, 175, 55, 0.12);
    --input-bg-focus: rgba(230, 196, 90, 0.2);
    --input-border: #d4af37;
    --input-border-focus: #e6c45a;
    
    /* BOTONES - DORADO BRILLANTE */
    --btn-primary-bg: linear-gradient(135deg, #d4af37 0%, #e6c45a 50%, #f4d56f 100%);
    --btn-primary-text: #2b2420;
    --btn-primary-border: #e6c45a;
    
    /* TAREAS */
    --task-bg: rgba(43, 36, 32, 0.7);
    --task-bg-hover: rgba(61, 50, 40, 0.9);
    --task-border-left: #e6c45a;
    
    /* SOMBRAS - MÁS SUAVES */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
    
    /* EFECTOS GLOW - DORADO */
    --glow-gold: 0 0 25px rgba(230, 196, 90, 0.6);
    --glow-gold-strong: 0 0 40px rgba(244, 213, 111, 0.8);
}

/* ============================================
   TEMA CLARO - BEIGE/CREMA
   Mantiene espíritu del logo pero más claro
   ============================================ */

[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f5ebe0 0%, #e8dcc8 50%, #f5ebe0 100%);
    --bg-card: linear-gradient(145deg, rgba(255, 250, 242, 0.98), rgba(250, 244, 235, 0.98));
    --bg-card-hover: linear-gradient(145deg, rgba(255, 252, 247, 1), rgba(252, 246, 238, 1));
    
    --text-primary: #2b2420;      /* Marrón oscuro del logo */
    --text-secondary: #8b7355;    /* Marrón dorado */
    --text-accent: #a0824f;       /* Dorado oscuro */
    --text-muted: #6b5d4f;        /* Marrón medio */
    
    --border-primary: #d4af37;    /* Dorado */
    --border-secondary: #a0824f;  /* Dorado oscuro */
    
    --input-bg: rgba(255, 250, 242, 0.9);
    --input-bg-focus: rgba(255, 255, 255, 1);
    --input-border: #d4af37;
    --input-border-focus: #8b7355;
    
    --btn-primary-bg: linear-gradient(135deg, #d4af37 0%, #e6c45a 50%, #f4d56f 100%);
    --btn-primary-text: #2b2420;
    --btn-primary-border: #c9a353;
    
    --task-bg: rgba(255, 250, 242, 0.8);
    --task-bg-hover: rgba(255, 252, 247, 0.95);
    --task-border-left: #d4af37;
    
    --shadow-sm: 0 2px 8px rgba(43, 36, 32, 0.12);
    --shadow-md: 0 5px 20px rgba(43, 36, 32, 0.18);
    --shadow-lg: 0 8px 32px rgba(43, 36, 32, 0.25);
    
    --glow-gold: 0 0 20px rgba(212, 175, 55, 0.4);
    --glow-gold-strong: 0 0 35px rgba(230, 196, 90, 0.6);
}

/* ============================================
   RESET Y BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cinzel', 'Georgia', serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    transition: all 0.3s ease;
}

/* Textura sutil de pergamino */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(230, 196, 90, 0.02) 2px,
            rgba(230, 196, 90, 0.02) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(230, 196, 90, 0.01) 2px,
            rgba(230, 196, 90, 0.01) 4px
        );
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   THEME TOGGLE - SWITCHER
   ============================================ */

.theme-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 25px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
    border-color: var(--border-secondary);
}

.theme-icon {
    font-size: 1.2em;
    transition: transform 0.3s;
    filter: drop-shadow(0 0 8px rgba(230, 196, 90, 0.5));
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg) scale(1.1);
}

.theme-label {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(230, 196, 90, 0.3);
}

/* Language Selector */
.language-selector {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 25px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    position: relative;
}

.language-selector:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold);
    border-color: var(--border-secondary);
}

.current-language {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
}

.language-flag {
    font-size: 1.3em;
    filter: drop-shadow(0 0 5px rgba(230, 196, 90, 0.4));
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px;
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.language-dropdown.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.language-option:hover {
    background: var(--input-bg);
}

.language-option.active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    font-weight: bold;
    box-shadow: var(--glow-gold);
}

/* ============================================
   CONTENEDORES PRINCIPALES
   ============================================ */

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px 20px;
    position: relative;
    z-index: 2;
}

/* ============================================
   LOGIN / REGISTRO
   ============================================ */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}

.login-card {
    background: var(--bg-card);
    border: 3px solid var(--border-primary);
    border-radius: 15px;
    padding: 30px 35px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg), var(--glow-gold);
    position: relative;
    overflow: visible;
    transition: all 0.3s;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--border-primary), var(--border-secondary), var(--border-primary));
    border-radius: 15px;
    z-index: -1;
    opacity: 0.6;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
}

.logo {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
    filter: drop-shadow(var(--glow-gold-strong));
    transition: all 0.3s;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 50px rgba(244, 213, 111, 1));
}

.app-title {
    color: var(--text-secondary);
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    margin: 10px 0 5px 0;
    text-shadow: 0 0 20px rgba(230, 196, 90, 0.5);
    font-family: 'Cinzel', serif;
    letter-spacing: 4px;
}

.app-subtitle {
    color: var(--text-accent);
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9em;
    font-style: italic;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ============================================
   INPUTS Y FORMULARIOS
   ============================================ */

.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
    text-shadow: 0 0 8px rgba(230, 196, 90, 0.2);
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: var(--glow-gold);
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.input-group small {
    display: block;
    margin-top: 3px;
    font-size: 0.75em;
    color: var(--text-muted);
    font-style: italic;
}

/* Estados de validación */
.input-group input:valid {
    border-color: #4CAF50;
}

.input-group input:invalid:not(:placeholder-shown) {
    border-color: #ff6b6b;
}

.validation-indicator {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.9em;
}

.validation-indicator.success {
    color: #4CAF50;
}

.validation-indicator.error {
    color: #ff6b6b;
}

.validation-indicator.checking {
    color: var(--text-secondary);
}

/* ============================================
   MENSAJES DE ERROR/ÉXITO
   ============================================ */

.error-message {
    background: rgba(255, 107, 107, 0.15);
    border: 2px solid #ff6b6b;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #ff6b6b;
    text-align: center;
    font-weight: 600;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.success-message {
    background: rgba(76, 175, 80, 0.15);
    border: 2px solid #4CAF50;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #4CAF50;
    text-align: center;
    font-weight: 600;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BOTONES - DORADO BRILLANTE
   ============================================ */

.btn {
    width: 100%;
    padding: 12px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 2px solid var(--btn-primary-border);
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: var(--shadow-md), var(--glow-gold);
    text-shadow: 0 1px 2px rgba(43, 36, 32, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-gold-strong);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--border-primary);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--input-bg);
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-md), var(--glow-gold);
}

/* Link de cambio login/registro */
.auth-switch {
    margin-top: 15px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9em;
}

.auth-switch button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
    font-size: 1em;
    padding: 0;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-switch button:hover {
    color: var(--text-accent);
    text-shadow: 0 0 10px rgba(230, 196, 90, 0.5);
}

/* ============================================
   HEADER
   ============================================ */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid var(--border-primary);
    box-shadow: var(--shadow-md), var(--glow-gold);
    transition: all 0.3s;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 60px;
    height: 60px;
    filter: drop-shadow(var(--glow-gold));
    transition: all 0.3s;
}

.header-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(var(--glow-gold-strong));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.welcome-text {
    color: var(--text-secondary);
    font-size: 1em;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(230, 196, 90, 0.3);
    display: block;
}

.btn-ghost {
    width: auto;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-secondary);
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    box-shadow: none;
    text-transform: none;
}

.btn-ghost:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--border-primary);
    box-shadow: var(--glow-gold);
    transform: translateY(-1px);
}

.logout-btn {
    padding: 8px 18px;
    background: transparent;
    border: 2px solid rgba(165, 0, 0, 0.6);
    color: #e08080;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9em;
}

.logout-btn:hover {
    background: rgba(165, 0, 0, 0.2);
    border-color: #a50000;
    color: #f5e6d3;
    box-shadow: 0 0 15px rgba(165, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }
    .header-actions {
        justify-content: center;
    }
    .btn-ghost { font-size: 0.8em; padding: 7px 12px; }
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 196, 90, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-lg), var(--glow-gold);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.stat-value {
    color: var(--text-secondary);
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(230, 196, 90, 0.4);
}

.progress-ring {
    margin: 15px auto;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */

   .main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start; /* ← AGREGAR ESTA LÍNEA */
}
.tasks-section, .recommendations-section {
    background: var(--bg-card);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.section-title {
    color: var(--text-secondary);
    font-size: 1.8em;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--border-primary);
    padding-bottom: 15px;
    text-shadow: 0 0 15px rgba(230, 196, 90, 0.3);
}

/* ============================================
   INPUTS DE TAREAS
   ============================================ */

.task-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.task-input-row {
    display: flex;
    gap: 10px;
}

.task-description {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    transition: all 0.3s;
}

.task-description:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: var(--glow-gold);
}

.task-description::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.task-input {
    flex: 1;
    padding: 12px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
}

.task-input:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: var(--glow-gold);
}

.task-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.add-btn {
    padding: 12px 25px;
    background: var(--btn-primary-bg);
    border: 2px solid var(--btn-primary-border);
    border-radius: 6px;
    color: var(--btn-primary-text);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--glow-gold);
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md), var(--glow-gold-strong);
    filter: brightness(1.1);
}

.date-picker-btn {
    padding: 12px 20px;
    background: transparent;
    border: 2px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2em;
}

.date-picker-btn:hover {
    background: var(--input-bg);
    border-color: var(--border-secondary);
    box-shadow: var(--glow-gold);
}

/* ============================================
   MODAL DE FECHA
   ============================================ */

.date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 36, 32, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.date-picker-content {
    background: var(--bg-card);
    border: 3px solid var(--border-primary);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg), var(--glow-gold-strong);
}

.date-picker-title {
    color: var(--text-secondary);
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(230, 196, 90, 0.4);
}

.date-input {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 20px;
}

.date-input:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: var(--glow-gold);
}

.date-picker-buttons {
    display: flex;
    gap: 10px;
}

.cancel-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-weight: 600;
}

.cancel-btn:hover {
    border-color: var(--border-primary);
    color: var(--text-secondary);
    box-shadow: var(--glow-gold);
}

.confirm-btn {
    flex: 1;
    padding: 12px;
    background: var(--btn-primary-bg);
    border: 2px solid var(--btn-primary-border);
    color: var(--btn-primary-text);
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: var(--glow-gold);
}

.confirm-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md), var(--glow-gold-strong);
}

/* ============================================
   LISTA DE TAREAS
   ============================================ */

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: var(--task-bg);
    border: 2px solid var(--border-primary);
    border-left: 5px solid var(--task-border-left);
    border-radius: 8px;
    transition: all 0.3s;
}

.task-item:hover {
    background: var(--task-bg-hover);
    border-left-color: var(--border-secondary);
    box-shadow: var(--shadow-sm), var(--glow-gold);
    transform: translateX(5px);
}

.task-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
}

.task-description-text {
    color: var(--text-muted);
    font-size: 0.9em;
    padding-left: 39px;
    line-height: 1.4;
    word-wrap: break-word;
    font-style: italic;
}

.task-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.edit-btn {
    padding: 8px 15px;
    background: rgba(230, 196, 90, 0.2);
    border: 2px solid var(--border-primary);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: 600;
}

.edit-btn:hover {
    background: rgba(230, 196, 90, 0.4);
    box-shadow: var(--glow-gold);
}

.save-btn {
    padding: 8px 15px;
    background: var(--btn-primary-bg);
    border: 2px solid var(--btn-primary-border);
    color: var(--btn-primary-text);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
}

.save-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm), var(--glow-gold);
}

.edit-input, .edit-textarea {
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
}

.edit-input {
    flex: 1;
    padding: 8px;
    font-size: 16px;
    resize: vertical;
    min-height: 40px;
}

.edit-textarea {
    width: calc(100% - 39px);
    padding: 10px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    margin-left: 39px;
    line-height: 1.4;
}

.edit-textarea:focus,
.edit-input:focus {
    outline: none;
    background: var(--input-bg-focus);
    border-color: var(--input-border-focus);
    box-shadow: var(--glow-gold);
}

.task-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--border-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.task-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    word-wrap: break-word;
}

.task-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.6;
}

.task-date {
    color: var(--text-accent);
    font-size: 0.85em;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

.task-period-badge {
    padding: 4px 10px;
    background: rgba(230, 196, 90, 0.2);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.75em;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(230, 196, 90, 0.2);
}

.delete-btn {
    padding: 8px 15px;
    background: rgba(255, 107, 107, 0.2);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85em;
    font-weight: 600;
}

.delete-btn:hover {
    background: #ff6b6b;
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

/* ============================================
   TABS
   ============================================ */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-primary);
    padding-bottom: 10px;
}

.tab {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--border-primary);
    color: var(--text-primary);
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 0.9em;
}

.tab.active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-border);
    box-shadow: var(--glow-gold);
}

.tab:hover:not(.active) {
    background: var(--input-bg);
    border-color: var(--border-secondary);
    box-shadow: 0 0 15px rgba(230, 196, 90, 0.3);
}

/* ============================================
   RECOMENDACIONES
   ============================================ */

.recommendation-item {
    padding: 15px;
    background: var(--task-bg);
    border: 2px solid var(--border-primary);
    border-left: 4px solid var(--task-border-left);
    border-radius: 6px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.recommendation-item:hover {
    background: var(--task-bg-hover);
    border-left-color: var(--border-secondary);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm), var(--glow-gold);
}

.recommendation-title {
    color: var(--text-secondary);
    font-weight: bold;
    margin-bottom: 5px;
}

.recommendation-desc {
    color: var(--text-muted);
    font-size: 0.9em;
    font-style: italic;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3em;
    margin-bottom: 15px;
    filter: grayscale(1) opacity(0.5);
}

/* ============================================
   KAIZEN QUOTE
   ============================================ */

.kaizen-quote {
    text-align: center;
    margin: 15px 0 0 0;
    padding: 10px;
    background: rgba(230, 196, 90, 0.1);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85em;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    margin-top: 50px;
    padding: 30px 20px;
    background: var(--bg-card);
    border-top: 2px solid var(--border-primary);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-company {
    color: var(--text-secondary);
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(230, 196, 90, 0.4);
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 20px;
    font-style: italic;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(230, 196, 90, 0.2);
    border: 2px solid var(--border-primary);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.3em;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-color: var(--btn-primary-border);
    transform: translateY(-5px) scale(1.15);
    box-shadow: var(--shadow-md), var(--glow-gold-strong);
}

.footer-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--border-primary), var(--border-secondary), var(--border-primary), transparent);
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(230, 196, 90, 0.3);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-top: 15px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-accent);
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.footer-link:hover {
    color: var(--text-secondary);
    text-shadow: 0 0 10px rgba(230, 196, 90, 0.5);
}

/* ============================================
   RESPONSIVE - TABLETS
   ============================================ */

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .theme-controls {
        top: 10px;
        right: 10px;
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
/* ============================================
   RESPONSIVE - MÓVILES
   ============================================ */

@media (max-width: 768px) {
    .app-container {
        padding: 70px 10px 10px;
    }
    
    .theme-controls {
        top: 10px;
        right: 10px;
        gap: 8px;
    }
    
    .theme-toggle,
    .language-selector {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    /* Header mejorado */
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .header-left {
        width: 100%;
        justify-content: center;
    }

    .user-info {
        width: 100%;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .user-info .btn,
    .logout-btn {
        width: 100%;
        padding: 10px;
        font-size: 0.9em;
    }

    /* Login */
    .login-container {
        padding: 10px;
    }

    .login-card {
        padding: 20px;
    }

    /* Dashboard */
    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 2em;
    }

    /* Tabs mejorados - 2 por fila */
    .tabs {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }

    .tab {
        flex: 1 1 calc(50% - 8px);
        min-width: 140px;
        font-size: 0.85em;
        padding: 10px 8px;
    }
    
    .tab span {
        font-size: 0.75em;
        padding: 2px 6px;
        margin-left: 5px;
    }

    /* Input de tareas */
    .task-input-container {
        padding: 15px;
    }

    .task-input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .task-input,
    .add-btn,
    .date-picker-btn {
        width: 100%;
    }

    /* Tareas mejoradas */
    .task-item {
        padding: 12px;
    }

    .task-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    .task-checkbox {
        align-self: flex-start;
        margin-right: 10px;
    }
    
    .task-text {
        width: 100%;
        font-size: 0.95em;
        word-break: break-word;
    }
    
    .task-period-badge,
    .task-date {
        font-size: 0.75em;
    }
    
    .task-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        gap: 8px;
    }
    
    .task-actions button {
        flex: 1;
        font-size: 0.8em;
        padding: 8px 10px;
    }

    /* Recomendaciones */
    .recommendations-section {
        padding: 20px 15px;
    }

    .recommendation-item {
        padding: 12px;
    }

    .recommendation-title {
        font-size: 0.95em;
    }

    .recommendation-desc {
        font-size: 0.85em;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5em;
    }

    /* Footer */
    .footer {
        padding: 30px 15px;
    }
}


/* ============================================
   RESPONSIVE - MÓVILES PEQUEÑOS
   ============================================ */

@media (max-width: 480px) {
    .app-container {
        padding: 60px 5px 5px;
    }
    
    .theme-controls {
        flex-direction: row;
        gap: 5px;
    }
    
    .theme-toggle {
        padding: 5px 8px;
    }
    
    .theme-label {
        display: none;
    }
    
    .language-selector {
        padding: 5px 8px;
    }

    .logo {
        width: 70px;
        height: 70px;
    }

    .stat-value {
        font-size: 1.8em;
    }

    .section-title {
        font-size: 1.3em;
    }
}

/* ============================================
   ANIMACIONES CUSTOM
   ============================================ */

@keyframes glow {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: var(--shadow-md), var(--glow-gold);
    }
}

.stat-card:hover {
    animation: glow 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

 
.btn:hover::after {
    left: 100%;
}

/* ============================================
   MODO OFFLINE INDICATOR
   ============================================ */

.offline-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-card);
    color: #ff6b6b;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85em;
    z-index: 1000;
    border: 2px solid #ff6b6b;
    box-shadow: var(--shadow-lg);
}
.feedback-btn, .my-feedback-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #d4af37, #e6c45a);
    color: #2b2420;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 10px;
}