/* public/css/styles.css */

/* ========================================
   VARIABLES Y CONFIGURACIÓN GLOBAL
   ======================================== */

:root {
    /* Tema Claro - Gris (Default) */
    --primary-color: #6b7280;
    --primary-hover: #4b5563;
    --primary-light: #9ca3af;
    --primary-dark: #374151;
    
    --secondary-color: #9ca3af;
    --accent-color: #4b5563;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #6b7280;
    --text-muted: #9ca3af;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --success: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    --success-bg: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.1);
    
    --danger: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --info: #3b82f6;
    --info-light: #60a5fa;
    --info-dark: #2563eb;
    --info-bg: rgba(59, 130, 246, 0.1);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* Tema Claro - Azul */
[data-color-scheme="blue"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #60a5fa;
    --primary-dark: #1e40af;
    --secondary-color: #60a5fa;
    --accent-color: #2563eb;
}

/* Tema Claro - Marrón */
[data-color-scheme="brown"] {
    --primary-color: #92400e;
    --primary-hover: #78350f;
    --primary-light: #b45309;
    --primary-dark: #451a03;
    --secondary-color: #b45309;
    --accent-color: #78350f;
}

/* Tema Oscuro */
[data-theme="dark"] {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --bg-hover: #4b5563;
    
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-muted: #6b7280;
    
    --border-color: #4b5563;
    --border-light: #374151;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* ========================================
   RESET Y ESTILOS BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

small {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1.5rem;
}

.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
}

.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }

/* ========================================
   HEADER Y NAVEGACIÓN
   ======================================== */

.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* User Menu Dropdown */
.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-menu hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Task Cards */
.task-card {
    position: relative;
    transition: var(--transition);
}

.task-card.task-warning {
    background-color: var(--warning-bg);
    border-left: 4px solid var(--warning);
}

.task-card.task-overdue {
    background-color: var(--danger-bg);
    border-left: 4px solid var(--danger);
}

.task-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-meta > div {
    display: flex;
    flex-direction: column;
}

.task-meta strong {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.task-observations {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius);
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ========================================
   FORMULARIOS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: var(--bg-tertiary);
    opacity: 0.6;
    cursor: not-allowed;
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus,
.form-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.form-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger);
}

/* Checkbox y Radio */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    color: var(--text-secondary);
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    flex: 1;
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.input-group .form-control:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.input-group-text {
    padding: 0.625rem 0.875rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ========================================
   BOTONES
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Variantes de botones */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
}

.btn-session {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    border-color: #ffc107;
    color: white;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

.btn-session:hover {
    background: linear-gradient(135deg, #ffb300, #ff8f00);
    border-color: #ffb300;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-dark);
    border-color: var(--success-dark);
}

.btn-warning {
    background-color: var(--warning);
    border-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: var(--warning-dark);
    border-color: var(--warning-dark);
}

.btn-danger {
    background-color: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-dark);
    border-color: var(--danger-dark);
}

.btn-info {
    background-color: var(--info);
    border-color: var(--info);
    color: white;
}

.btn-info:hover {
    background-color: var(--info-dark);
    border-color: var(--info-dark);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Tamaños de botones */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Grupo de botones */
.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn {
    flex: 0 1 auto;
    border-radius: 0;
}

.btn-group > .btn:first-child {
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
}

.btn-group > .btn:last-child {
    border-top-right-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

.btn-icon {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--bg-tertiary);
}

/* ========================================
   TABLAS
   ======================================== */

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
}

.table thead {
    background-color: var(--bg-tertiary);
}

.table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.75rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

.table-striped tbody tr:nth-child(odd) {
    background-color: var(--bg-tertiary);
}

.table-sortable th {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.table-sortable th::after {
    content: '↕';
    position: absolute;
    right: 0.5rem;
    opacity: 0.3;
}

.table-sortable th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.table-sortable th.sort-desc::after {
    content: '↓';
    opacity: 1;
}

/* ========================================
   BADGES Y ESTADOS
   ======================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-EnProgreso {
    background-color: var(--info-bg);
    color: var(--info);
}

.status-Atrasada {
    background-color: var(--danger-bg);
    color: var(--danger);
}

.status-Completada {
    background-color: var(--success-bg);
    color: var(--success);
}

/* ========================================
   ALERTAS
   ======================================== */

.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: var(--success-bg);
    border-left: 4px solid var(--success);
    color: var(--success-dark);
}

.alert-warning {
    background-color: var(--warning-bg);
    border-left: 4px solid var(--warning);
    color: var(--warning-dark);
}

.alert-danger {
    background-color: var(--danger-bg);
    border-left: 4px solid var(--danger);
    color: var(--danger-dark);
}

.alert-info {
    background-color: var(--info-bg);
    border-left: 4px solid var(--info);
    color: var(--info-dark);
}

.alert-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    transition: var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* Alert Container */
#alert-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

/* ========================================
   MODALES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--success-bg);
    color: var(--success);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-change.negative {
    background-color: var(--danger-bg);
    color: var(--danger);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ========================================
   UPLOAD DE ARCHIVOS
   ======================================== */

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    background-color: var(--bg-secondary);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.file-upload-label.drag-over {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    opacity: 0.1;
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.file-upload-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.file-preview {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.file-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.file-list {
    margin-top: 1rem;
    list-style: none;
}

.file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.file-list-name {
    flex: 1;
    color: var(--text-primary);
}

.file-list-size {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-left: 1rem;
}

.file-list-remove {
    color: var(--danger);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: var(--transition-fast);
}

.file-list-remove:hover {
    color: var(--danger-dark);
}

/* ========================================
   VISTA KANBAN
   ======================================== */

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.kanban-column {
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    min-height: 400px;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.kanban-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.task-count {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.kanban-cards {
    min-height: 350px;
    transition: var(--transition);
}

.kanban-cards.drag-over {
    background-color: var(--bg-hover);
    border-radius: var(--radius);
}

.kanban-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    cursor: move;
    transition: var(--transition);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.kanban-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.kanban-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.kanban-leader {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.kanban-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.kanban-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

/* ========================================
   VISTAS DE TAREAS
   ======================================== */

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tasks-list .task-card {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.tasks-list .task-card .card-header {
    flex: 1;
    border: none;
    padding: 0;
}

.tasks-list .task-card .card-body {
    padding: 0;
}

.view-switcher {
    display: flex;
    gap: 0.25rem;
}

.view-switcher button {
    padding: 0.5rem;
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.view-switcher button:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.view-switcher button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ========================================
   PAGINACIÓN
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 2rem;
}

.page-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.page-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   TOOLTIPS
   ======================================== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ========================================
   LOADING Y SPINNERS
   ======================================== */

.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.spinner-lg {
    width: 3rem;
    height: 3rem;
    border-width: 4px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.skeleton-box {
    height: 100px;
    border-radius: var(--radius);
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    text-align: center;
    color: var(--text-tertiary);
    margin: 0;
}

/* ========================================
   PANTALLAS DE AUTENTICACIÓN
   ======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-primary);
}

.auth-card .card-header {
    text-align: center;
    padding: 2rem 1.5rem 1rem;
    border-bottom: none;
}

.auth-card .card-title {
    font-size: 1.75rem;
}

.auth-form {
    padding: 0 1.5rem 2rem;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

.empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

/* ========================================
   UTILIDADES
   ======================================== */

/* Texto */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--text-muted) !important; }

.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.font-weight-normal { font-weight: 400; }
.font-weight-bold { font-weight: 600; }
.font-weight-bolder { font-weight: 700; }

/* Espaciado */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

/* Display */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Borders */
.border { border: 1px solid var(--border-color) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-left { border-left: 1px solid var(--border-color) !important; }
.border-right { border-right: 1px solid var(--border-color) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-circle { border-radius: 50% !important; }

/* Shadows */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Width & Height */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* Position */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Overflow */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

/* Visibility */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        width: 100%;
        flex-direction: column;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group > .btn {
        width: 100%;
        border-radius: var(--radius);
    }
    
    /* Hide columns on mobile */
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .card {
        border-radius: 0;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-menu,
    .btn,
    .modal,
    .alert-close,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}




/* ========================================
   MENÚ RESPONSIVE MOBILE
   ======================================== */

/* Botón hamburger para móvil */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 2rem;
    height: 0.25rem;
    background: var(--text-primary);
    border-radius: 10px;
    transition: var(--transition);
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:first-child {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Overlay para cerrar menú al hacer click fuera */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.nav-overlay.active {
    display: block;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Mostrar botón hamburger */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Header responsive */
    .header-content {
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        flex-direction: row; /* Mantener horizontal */
    }

    /* Logo permanece visible */
    .logo {
        z-index: 1001;
    }

    /* Menú móvil */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 5rem 2rem 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    /* Enlaces de navegación en móvil */
    .nav-link {
        width: 100%;
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        font-size: 1.1rem;
        display: block;
        margin-bottom: 0;
    }

    .nav-link:last-of-type {
        border-bottom: none;
        margin-bottom: 2rem;
    }

    /* Menú de usuario en móvil */
    .nav-user-menu {
        width: 100%;
        flex-direction: column;
        gap: 0;
        border-top: 2px solid var(--border-color);
        padding-top: 1rem;
        margin-top: auto;
    }

    .dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        box-shadow: none;
        border: 1px solid var(--border-color);
        background-color: var(--bg-tertiary);
        display: none;
    }

    .dropdown-menu.show {
        display: block;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    /* Ocultar hover en móvil para dropdown */
    .dropdown:hover .dropdown-menu {
        display: none;
    }

    /* Resto de estilos responsive */
    .tasks-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group > .btn {
        width: 100%;
        border-radius: var(--radius);
    }
    
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .card {
        border-radius: 0;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }
    
    .auth-container {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-menu,
    .btn,
    .modal,
    .alert-close,
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: black;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}