/* Variables de color para el tema claro */
:root {
    /* Colores originales del planificador */
    --color-marzo: #F97316; /* Orange 500 */
    --color-abril: #F59E0B; /* Amber 500 */
    --color-mayo:  #EF4444; /* Red 500 */
    --color-junio: #EAB308; /* Yellow 500 */
    --color-julio: #EC4899; /* Pink 500 */
    --color-agosto: #D97706;/* Amber 600 */
    --color-septiembre: #FACC15;/* Yellow 400 */
    --color-octubre: #DC2626;/* Red 600 */
    --color-noviembre: #F87171;/* Red 400 */
    --color-diciembre: #E11D48;/* Rose 600 */
    --primary-color: var(--color-abril);
    --primary-dark: var(--color-agosto);
    --secondary-color: var(--color-mayo);
    --accent-color: #10B981; /* Emerald 500 */
    --info-color: #3B82F6; /* Blue 500 */
    --background-light: #F0F9FF; /* Sky 50 */
    --background-page: #F8FAFC; /* Slate 50 */
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --card-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --text-primary: #374151; /* Gray 700 */
    --text-secondary: #6B7280; /* Gray 500 */
    --text-light: #FFFFFF;
    --border-color: #E5E7EB; /* Gray 200 */
    --modal-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --input-bg: #FFFFFF; /* Added for inputs */
    --input-text: #374151; /* Added for inputs */
    --placeholder-text: #9CA3AF; /* Added for inputs */
    /* Nuevos colores vibrantes para gráficos y elementos clave (de DOCTYPE html.docx) */
    --color-economico-vibrant: #FF9800; /* Vibrant Orange */
    --color-social-vibrant: #2196F3; /* Vibrant Blue */
    --color-ambiental-vibrant: #4CAF50; /* Vibrant Green */
    --color-operacional-vibrant: #9C27B0; /* Vibrant Purple */
    --color-critical-vibrant: #F44336; /* Vibrant Red for critical status */
    --color-warning-vibrant: #FFEB3B; /* Vibrant Yellow for warning status */
    --color-remaining-kpis: #4DB6AC; /* Teal 400 - un color vibrante y distintivo */
    /* RGB values for rgba colors in charts */
    --primary-color-rgb: 245, 158, 11; /* Amber 500 */
    --secondary-color-rgb: 239, 68, 68; /* Red 500 */
    --accent-color-rgb: 16, 185, 129; /* Emerald 500 */
    --info-color-rgb: 59, 130, 246; /* Blue 500 */
    --color-economico-vibrant-rgb: 255, 152, 0;
    --color-social-vibrant-rgb: 33, 150, 243;
    --color-ambiental-vibrant-rgb: 76, 175, 80;
    --color-operacional-vibrant-rgb: 156, 39, 176;
    --color-critical-vibrant-rgb: 244, 67, 54;
    --color-warning-vibrant-rgb: 255, 235, 59;
}
/* Variables del tema oscuro */
/* Estilos personalizados para mensajes de la aplicación */
.app-message-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.app-message {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
.app-message.fade-out {
    opacity: 0;
}
.app-message.success {
    background-color: #4CAF50; /* Verde */
}
.app-message.error {
    background-color: #F44336; /* Rojo */
}
.app-message.info {
    background-color: #2196F3; /* Azul */
}
/* Estilos para el modal */
.modal {
    background-color: rgba(0, 0, 0, 0.6); /* Fondo más oscuro */
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50; /* Un poco menos que los mensajes */
}
.modal-content {
    background-color: var(--modal-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    width: auto;
    position: relative;
}
@media (min-width: 768px) {
    .modal-content {
        width: 700px;
    }
}
/* Estilos para los botones de las pestañas */
.accounts-tab-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--background-light);
    transition: all 0.2s ease-in-out;
}
.accounts-tab-button.active {
    color: var(--primary-color);
    background-color: var(--modal-bg);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 2px solid var(--primary-color);
}
.accounts-tab-button:hover:not(.active) {
    background-color: var(--border-color);
}
/* Estilos para los botones de acción */
.action-button {
    background-image: linear-gradient(to right, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}
.action-button:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
.action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.action-button.secondary {
    background-image: linear-gradient(to right, var(--secondary-color) 0%, var(--secondary-color) 100%);
}
.action-button.danger {
    background-image: linear-gradient(to right, var(--color-critical-vibrant) 0%, var(--color-critical-vibrant) 100%);
}
/* Estilos para el campo de entrada */
.input-field {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: var(--input-bg);
    color: var(--input-text);
}
.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.2);
}
/* Variables del tema oscuro */
html[data-theme="dark"] {
    --background-light: #1F2937; /* Dark Gray */
    --background-page: #111827; /* Darker Blue-Gray */
    --text-primary: #F3F4F6; /* Light Gray */
    --text-secondary: #D1D5DB; /* Lighter Gray */
    --text-light: #F3F4F6; /* Light Gray */
    --border-color: #374151; /* Darker Gray */
    --modal-bg: #1F2937; /* Dark Gray */
    --card-bg: #1F2937; /* Dark Gray */
    --input-bg: #2D3748; /* Slightly lighter dark for inputs */
    --input-text: #F3F4F6; /* Light text for inputs */
    --placeholder-text: #9CA3AF; /* Gray placeholder */
    /* Asegura que el color de los KPIs restantes sea visible en modo oscuro */
    --color-remaining-kpis: #80CBC4; /* Teal 200 - un tono más claro para el modo oscuro */
    
    /* Ajustes para colores vibrantes en modo oscuro si es necesario */
    --primary-color: #FCD34D; /* Amber 300 for dark mode */
    --primary-dark: #FBBF24; /* Amber 400 for dark mode */
    --secondary-color: #F87171; /* Red 400 for dark mode */
    --accent-color: #6EE7B7; /* Emerald 300 for dark mode */
    --info-color: #60A5FA; /* Blue 300 for dark mode */
    --primary-color-rgb: 252, 211, 77;
    --secondary-color-rgb: 248, 113, 113;
    --accent-color-rgb: 110, 231, 183;
    --info-color-rgb: 96, 165, 250;
}
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-page);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Global theme toggle styles */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
    flex-shrink: 0; /* Prevent shrinking on small screens */
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}
.theme-toggle i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
html[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
html:not([data-theme="dark"]) .theme-toggle .fa-sun { display: none; }
/* General Dark Mode Adjustments */
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .control-panel,
html[data-theme="dark"] #completed-log-section,
html[data-theme="dark"] footer,
html[data-theme="dark"] .circular-canvas-section,
html[data-theme="dark"] .month-content-card,
html[data-theme="dark"] .timeline-item-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2); /* Slightly stronger shadow for dark mode contrast */
}

html[data-theme="dark"] .objective-item {
    background-color: rgba(255, 255, 255, 0.05); /* Lighter shade for items */
    border-color: var(--border-color);
}
html[data-theme="dark"] .objective-item:hover:not(.completed) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color); /* Use primary color for hover border */
}
html[data-theme="dark"] .objective-item.completed {
    background-color: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color);
}
html[data-theme="dark"] .objective-item.completed .objective-title {
    color: var(--text-secondary);
}
html[data-theme="dark"] .objective-title {
    color: var(--text-primary);
}
html[data-theme="dark"] .objective-details {
    color: var(--text-secondary);
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="number"], /* Added for new inputs */
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background-color: var(--input-bg);
    border-color: var(--border-color);
    color: var(--input-text);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--placeholder-text);
}
html[data-theme="dark"] .control-panel label {
    color: var(--text-primary);
}
/* Custom select arrow for dark mode */
html[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23D1D5DB' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); /* Lighter arrow for dark mode */
}
html[data-theme="dark"] .month-marker.text-dark-forced { color: var(--text-primary) !important; }
html[data-theme="dark"] .month-marker.text-light-forced { color: var(--text-primary) !important; } /* Ensure light text is readable in dark mode */
/* Header and Logo */
.header {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.logo-wrapper {
    background-color: rgba(255, 255, 255, 0.25); border-radius: 50%;
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
}
.logo-inner {
    background-color: var(--text-light); color: var(--primary-dark); border-radius: 50%;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
/* Month Markers */
.month-markers-wrapper { position: relative; padding: 0 10px; }
#month-markers-container {
    display: flex; overflow-x: auto; position: relative; padding-top: 20px; padding-bottom: 20px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #FCD34D var(--border-color);
}
#month-markers-container::-webkit-scrollbar { height: 6px; }
#month-markers-container::-webkit-scrollbar-track { background: var(--border-color); border-radius: 3px; }
#month-markers-container::-webkit-scrollbar-thumb { background: #FCD34D; border-radius: 3px; }
#month-markers-container::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }
.timeline-line-horizontal {
    position: absolute; top: 50%; left: 0; height: 3px;
    background-color: #FDBA74; border-radius: 1.5px; z-index: 0; transform: translateY(-50%);
}
.month-marker {
    min-width: 110px; padding: 0 12px; height: 36px; border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 500; font-size: 0.85rem; margin: 0 6px; flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07), 0 1px 1.5px rgba(0,0,0,0.05);
    cursor: default; position: relative; z-index: 1;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s;
}
.month-marker:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1), 0 1.5px 3px rgba(0,0,0,0.06);
}
.month-marker.text-dark-forced { color: var(--text-primary) !important; }
.month-marker.text-light-forced { color: var(--text-light) !important; }
/* Month Content Cards */
.month-content-card {
    border-radius: 10px; padding: 18px; background-color: var(--card-bg); /* Use var for background */
    box-shadow: 0 3px 10px rgba(0,0,0,0.05); border-top-width: 4px;
    border-top-style: solid; transition: box-shadow 0.3s ease;
}
.month-content-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
/* Objective Items */
.objective-item {
    padding: 10px 12px; margin-bottom: 8px; border-radius: 6px;
    background-color: var(--background-light); border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.objective-item:hover:not(.completed) {
    transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    border-color: #FCD34D; /* Amber 300 */
}
.objective-item.dragging { opacity: 0.6; background-color: #FEF3C7; /* Amber 100 */ }
.objective-item.completed {
    background-color: #F9FAFB; /* Gray 50 */ border-color: #E5E7EB; /* Gray 200 */
}
.objective-item.completed .objective-title {
    text-decoration: line-through; color: #9CA3AF; /* Gray 400 */ font-style: italic;
}
.objective-item-main { display: flex; align-items: center; }
.objective-checkbox {
    margin-right: 10px; width: 16px; height: 16px;
    accent-color: var(--primary-color); cursor: pointer; flex-shrink: 0;
}
.objective-title-wrapper { flex-grow: 1; cursor: pointer; margin-right: 8px; }
.objective-title { font-size: 0.9rem; color: var(--text-primary); }
.objective-details {
    font-size: 0.7rem; color: var(--text-secondary); margin-top: 3px; padding-left: 26px;
}
.objective-due-date.overdue { color: var(--secondary-color); font-weight: 500; }
.objective-due-date.due-soon { color: var(--primary-color); font-weight: 500; }
.delete-objective-btn, .team-member-item button {
    color: #F87171; cursor: pointer; padding: 4px;
    margin-left: auto; flex-shrink: 0; border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
}
.delete-objective-btn:hover, .team-member-item button:hover { 
    color: var(--secondary-color); background-color: #FEE2E2; 
}
/* Styled Buttons */
.styled-button {
    font-weight: 500; padding: 0.5rem 0.9rem; border-radius: 6px;
    text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em;
    transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.styled-button:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.button-primary { background-color: var(--primary-color); color: var(--text-light); }
.button-primary:hover { background-color: var(--primary-dark); }
.button-secondary { background-color: var(--secondary-color); color: var(--text-light); }
.button-secondary:hover { background-color: #DC2626; } /* Red 600 */
.button-accent { background-color: var(--accent-color); color: var(--text-light); }
.button-accent:hover { background-color: #059669; } /* Emerald 600 */
.button-info { background-color: var(--info-color); color: var(--text-light); }
.button-info:hover { background-color: #2563EB; } /* Blue 600 */
/* Modals */
.modal-content {
    background-color: var(--modal-bg); /* Use var for background */
    border-radius: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
#report-modal-content, #interactive-progress-modal-content, #circular-canvas-modal-content, #mindmap-timeline-modal-content, #accounts-modal-content { max-height: 90vh; overflow-y: auto; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: var(--background-light); border-radius: 2.5px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #FCD34D; border-radius: 2.5px; }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: #FCD34D var(--background-light); }
.empty-month-placeholder { color: #A1A1AA; font-style: italic; font-size: 0.8rem; }
#completed-log-section { background-color: var(--card-bg); } /* Use var for background */
.pdf-button { padding: 0.25rem 0.5rem; line-height: 1; }
.critical-item { opacity: 0; transform: translateY(10px); animation: fadeInUp 0.5s ease-out forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
/* Team Member List */
.team-member-item .email { color: #6B7280; font-size: 0.7rem; margin-left: 8px; }
.team-member-item button {
    opacity: 0.3;
    transition: opacity 0.2s;
    padding: 2px 4px;
    line-height: 1;
}
.team-member-item:hover button { opacity: 1; }
/* Google Calendar Sync Button */
.add-to-calendar-btn { margin-left: 4px; }
.google-calendar-btn {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem;
    border-radius: 0.375rem; font-weight: 500; transition: all 0.2s;
    background-color: #4285f4 !important; color: white !important; border: none !important;
}
.google-calendar-btn:hover {
    background-color: #357abd !important; transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.google-calendar-btn i { font-size: 1.1rem; color: white !important; }
.calendar-sync-status {
    font-size: 0.875rem; margin-top: 0.5rem; padding: 0.5rem;
    border-radius: 0.375rem; display: none;
}
.calendar-sync-status.success { background-color: #D1FAE5; color: #065F46; display: block; }
.calendar-sync-status.error { background-color: #FEE2E2; color: #991B1B; display: block; }
/* Circular Canvas Specific Styles */
.circular-canvas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.circular-canvas-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}
.circular-canvas-section:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.circular-canvas-section label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.circular-canvas-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--input-bg); /* Use input background */
    color: var(--input-text); /* Use input text color */
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}
.circular-canvas-section textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.2);
}
/* Mind Map & Timeline Specific Styles */
.mindmap-timeline-tabs, .accounts-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}
.mindmap-timeline-tab-button, .accounts-tab-button {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-grow: 1; /* Make tabs fill available space */
    text-align: center;
}
.mindmap-timeline-tab-button.active, .accounts-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.mindmap-timeline-tab-button:hover:not(.active), .accounts-tab-button:hover:not(.active) {
    color: var(--text-primary);
    background-color: var(--background-light);
}
.mindmap-container {
    position: relative;
    width: 100%;
    min-height: 400px; /* Flexible height for the mind map area */
    height: 600px; /* Fixed height for larger screens */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-light);
    overflow: hidden;
    touch-action: none;
    user-select: none; /* Prevent text selection during drag */
}
.mindmap-node {
    position: absolute;
    background-color: var(--color-economico-vibrant);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    cursor: grab;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    font-size: 0.9rem;
    min-width: 100px;
    min-height: 40px;
    z-index: 10;
}
.mindmap-node.root {
    background-color: var(--color-ambiental-vibrant);
    font-weight: bold;
    font-size: 1.1rem;
}
.mindmap-node.selected {
    outline: 3px solid var(--info-color);
    outline-offset: 2px;
}
.mindmap-node:active {
    cursor: grabbing;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transform: scale(1.02);
}
.mindmap-node-actions {
    position: absolute;
    top: -10px;
    right: -10px;
    display: flex;
    gap: 5px;
    z-index: 20;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.mindmap-node-actions button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}
.mindmap-node-actions button:hover {
    background-color: var(--background-light);
    color: var(--primary-color);
}
.mindmap-node-actions button.delete-node-btn:hover {
    color: var(--secondary-color);
}
.mindmap-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}
/* Timeline Specific Styles */
.timeline-container {
    position: relative;
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--primary-color);
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}
.timeline-item-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    border: 2px solid var(--background-page); /* Added border for contrast */
}
.timeline-item:hover .timeline-item-dot {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.2);
}
.timeline-item-content {
    position: relative;
    width: calc(50% - 30px);
    padding: 20px;
    background: var(--card-bg); /* Use var for background */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.timeline-item-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 2px;
    background: var(--primary-color);
}
.timeline-item.justify-end .timeline-item-content::before {
    left: -20px; /* For items on the right, arrow points left */
    transform: translateX(0);
}
.timeline-item.justify-start .timeline-item-content::before {
    right: -20px; /* For items on the left, arrow points right */
    left: auto;
    transform: translateX(0);
}
.timeline-item-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.timeline-item-date {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.timeline-item-date i {
    color: var(--primary-color);
}
.timeline-item-title {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    position: relative;
}
.timeline-item-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}
.timeline-item-description {
    color: var(--text-secondary);
    line-height: 1.5;
}
.timeline-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.timeline-item:hover .timeline-item-actions {
    opacity: 1;
}
.timeline-item-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.timeline-item-actions button:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}
.timeline-item-actions button.delete-timeline-event-btn:hover {
    color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.1);
}
/* Companies Tabs Styles */
.companies-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}
#main-tabs-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    width: 100%;
    display: flex;
}
#main-tabs-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
.main-tab-btn {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.main-tab-btn:hover {
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.05);
}
.main-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.sia-panel, .ecoparque-panel {
    display: block;
}
.sia-panel.hidden, .ecoparque-panel.hidden {
    display: none;
}
.company-tab {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    background: none;
    border: none;
    position: relative;
}
.company-tab:hover {
    color: var(--primary-color);
    background-color: var(--background-light);
}
.company-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.company-content {
    display: none;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.company-content.active {
    display: block;
}
.company-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 2px solid #e0e7ff;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    position: relative;
    overflow: hidden;
}
.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}
.company-card:hover {
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
    transform: translateY(-4px);
    border-color: #818cf8;
}
.company-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.traffic-light {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
/* Estilos mejorados para inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="number"],
textarea,
select {
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

.traffic-light.red {
    background-color: #EF4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.traffic-light.yellow {
    background-color: #F59E0B;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.traffic-light.green {
    background-color: #10B981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}
.validation-checkbox {
    cursor: pointer;
    accent-color: #6366F1;
}
.validation-checkbox:checked {
    accent-color: #10B981;
}
.company-content {
    animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}
.document-item:hover {
    background-color: var(--background-light);
}
.document-item:last-child {
    border-bottom: none;
}
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--background-light);
}
.file-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

/* Accounts Section Specific Styles */
.accounts-tab-content .entry-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background-color 0.2s;
}
.accounts-tab-content .entry-list-item:last-child {
    border-bottom: none;
}
.accounts-tab-content .entry-list-item:hover {
    background-color: var(--background-light);
}
.accounts-tab-content .entry-list-item .amount {
    font-weight: 600;
}
.accounts-tab-content .entry-list-item .date, .accounts-tab-content .entry-list-item .debtor-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}
.accounts-tab-content .entry-list-item .actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.accounts-tab-content .entry-list-item .actions button:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}
.accounts-tab-content .entry-list-item .actions button.delete-btn:hover {
    color: var(--secondary-color);
    background: rgba(var(--secondary-color-rgb), 0.1);
}
/* Dark mode adjustments for new elements */
html[data-theme="dark"] .mindmap-node {
    background-color: var(--primary-dark);
    color: var(--text-light);
}
html[data-theme="dark"] .mindmap-node.root {
    background-color: var(--accent-color);
    color: var(--text-light);
}
html[data-theme="dark"] .mindmap-node-actions {
    background-color: rgba(31, 41, 55, 0.9);
}
html[data-theme="dark"] .mindmap-node-actions button {
    color: var(--text-secondary);
}
html[data-theme="dark"] .mindmap-node-actions button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
html[data-theme="dark"] .mindmap-container {
    background-color: #1F2937;
}
html[data-theme="dark"] .timeline-item-dot {
    border-color: var(--background-page);
}
html[data-theme="dark"] .timeline-item-title,
html[data-theme="dark"] .timeline-item-description,
html[data-theme="dark"] .timeline-item-date {
    color: var(--text-primary);
}
html[data-theme="dark"] .mindmap-timeline-tab-button,
html[data-theme="dark"] .accounts-tab-button {
    color: var(--text-secondary);
}
html[data-theme="dark"] .mindmap-timeline-tab-button.active,
html[data-theme="dark"] .accounts-tab-button.active {
    color: var(--primary-color);
}
html[data-theme="dark"] .mindmap-timeline-tab-button:hover:not(.active),
html[data-theme="dark"] .accounts-tab-button:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
html[data-theme="dark"] .accounts-tab-content .entry-list-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}
html[data-theme="dark"] .accounts-tab-content .entry-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}
html[data-theme="dark"] .accounts-tab-content .entry-list-item .description,
html[data-theme="dark"] .accounts-tab-content .entry-list-item .amount {
    color: var(--text-primary);
}
html[data-theme="dark"] .accounts-tab-content .entry-list-item .date,
html[data-theme="dark"] .accounts-tab-content .entry-list-item .debtor-name {
    color: var(--text-secondary);
}
/* Responsive Adjustments */
@media (max-width: 1024px) { /* Adjust for larger tablets and small laptops */
    .mindmap-container {
        height: 500px;
    }
}
@media (max-width: 768px) { /* Tablet and Mobile Adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .main-tab-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
        flex: 1;
    }
    #main-tabs-container {
        overflow-x: auto;
        scrollbar-width: thin;
        width: 100%;
    }
    .control-panel {
        padding: 1rem;
    }
    .control-panel .grid {
        grid-template-columns: 1fr; /* Single column layout for control panel */
        gap: 1.5rem;
    }
    .control-panel .md:pl-6,
    .control-panel .md:border-l {
        padding-left: 0;
        border-left: none;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color); /* Add top border for separation */
    }
    .month-markers-wrapper {
        padding: 0;
    }
    #month-markers-container {
        padding-left: 10px; /* Keep some padding for scroll */
        padding-right: 10px;
    }
    #month-contents-container {
        grid-template-columns: 1fr; /* Single column for monthly cards */
        gap: 1rem;
    }
    .month-content-card {
        padding: 1rem;
    }
    .modal-content {
        padding: 1rem;
        max-width: 95vw; /* Allow modals to take more width on small screens */
    }
    #report-modal-content, #interactive-progress-modal-content, #circular-canvas-modal-content, #mindmap-timeline-modal-content, #accounts-modal-content {
        max-height: 85vh; /* Adjust max height for smaller screens */
    }
    .circular-canvas-grid {
        grid-template-columns: 1fr; /* Single column for circular canvas sections */
        gap: 1rem;
    }
    .mindmap-container {
        min-height: 300px; /* Smaller min-height for mobile */
        height: 400px; /* Adjust fixed height for mobile */
    }
    .mindmap-timeline-tab-button, .accounts-tab-button {
        padding: 0.75rem 0.75rem; /* Reduce padding for tabs */
        font-size: 0.8rem;
    }
    .timeline-container::before {
        left: 20px; /* Move timeline line to the left */
    }
    .timeline-item {
        padding-left: 40px; /* Make space for the line */
        justify-content: flex-start !important; /* Force single column layout */
    }
    .timeline-item-dot {
        left: 17px; /* Align dot with the line */
        width: 18px;
        height: 18px;
    }
    .timeline-item-content {
        width: calc(100% - 40px); /* Adjust content width */
        margin-left: 0; /* Remove margin */
    }
    .timeline-item-content::before {
        left: -18px; /* Arrow points from left for all items */
        transform: translateX(0);
    }
    .timeline-item-actions {
        top: 5px; /* Adjust action button position */
        right: 5px;
    }
}
@media (max-width: 480px) { /* Extra small screens */
    .header h1 {
        font-size: 1.1rem; /* Smaller title */
    }
    .header h4 {
        font-size: 0.7rem; /* Smaller subtitle */
    }
    .logo-wrapper {
        width: 48px;
        height: 48px;
    }
    .logo-inner {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .styled-button {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }
    .month-marker {
        min-width: 90px;
        font-size: 0.8rem;
    }
    .objective-item {
        padding: 8px 10px;
    }
    .objective-title {
        font-size: 0.85rem;
    }
    .objective-details {
        font-size: 0.65rem;
    }
    .delete-objective-btn, .add-to-calendar-btn {
        padding: 2px;
        font-size: 0.8rem;
    }
    .google-calendar-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    .calendar-sync-status {
        font-size: 0.75rem;
    }
}
