/* ============================================
   ORGANITZADOR ASTILLERO - NAUTICAL DESIGN
   Professional Maritime Theme
============================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { 
    height: 100%; 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 
    background: linear-gradient(135deg, #0A1929 0%, #132F4C 50%, #1A4D6F 100%);
    color: #ECEFF4; 
    font-size: 14px;
    line-height: 1.6;
}

/* === LAYOUT === */
.app-container { 
    display: flex; 
    height: 100vh; 
    padding: 12px; 
    gap: 12px;
    background: radial-gradient(ellipse at top, #1A4D6F 0%, #0A1929 100%);
}

/* === SIDEBAR === */
.sidebar {
    width: 280px; 
    min-width: 280px; 
    background: linear-gradient(180deg, #0D2137 0%, #06121F 100%);
    backdrop-filter: blur(10px);
    color: #E5E9F0; 
    display: flex; 
    flex-direction: column; 
    padding: 24px 18px; 
    border-radius: 12px;
    border: 1px solid rgba(136, 192, 208, 0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    overflow-y: auto;
}
.sidebar h2 { 
    font-size: 20px; 
    text-align: center; 
    margin-bottom: 8px; 
    letter-spacing: 2px; 
    color: #88C0D0; 
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 2px 20px rgba(136, 192, 208, 0.4);
}
.copyright {
    text-align: center;
    font-size: 10px;
    color: #81A1C1;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(136, 192, 208, 0.2);
    opacity: 0.8;
    letter-spacing: 0.5px;
}
.sidebar label { 
    font-size: 10px; 
    color: #81A1C1; 
    margin-bottom: 8px; 
    display: block; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: 600;
}
.sidebar input[type="text"] {
    width: 100%; 
    padding: 12px 14px; 
    border: 1px solid rgba(129, 161, 193, 0.2); 
    border-radius: 8px;
    background: rgba(13, 33, 55, 0.6); 
    color: #E5E9F0; 
    font-size: 13px; 
    margin-bottom: 16px; 
    outline: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar input[type="text"]::placeholder { color: #5E81AC; opacity: 0.6; }
.sidebar input[type="text"]:focus { 
    border-color: #88C0D0; 
    background: rgba(13, 33, 55, 0.9);
    box-shadow: 0 0 0 3px rgba(136, 192, 208, 0.15), 0 4px 12px rgba(0,0,0,0.2);
    background: #0f172a;
}

/* Language buttons */
.lang-group { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 14px;
}
.lang-btn {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid rgba(129, 161, 193, 0.3);
    border-radius: 6px;
    background: rgba(13, 33, 55, 0.3);
    color: #81A1C1;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lang-btn.active { 
    background: linear-gradient(135deg, #1A4D6F, #2E7D9A);
    color: #ECEFF4;
    border-color: rgba(136, 192, 208, 0.4);
    box-shadow: 0 2px 8px rgba(26, 77, 111, 0.3);
}
.lang-btn:hover:not(.active) { 
    background: rgba(136, 192, 208, 0.15);
    color: #88C0D0;
    border-color: rgba(136, 192, 208, 0.4);
}

/* Department section */
.dept-section { margin-bottom: 16px; }
.dept-section-title {
    font-size: 10px; color: #475569; text-transform: uppercase; 
    letter-spacing: 1px; margin-bottom: 8px; font-weight: 700;
}
.dept-list { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dept-btn {
    width: 100%; 
    padding: 14px 16px; 
    margin-bottom: 8px; 
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(13, 33, 55, 0.4); 
    color: #D8DEE9; 
    font-size: 13px; 
    cursor: pointer;
    text-align: left; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    font-weight: 500;
    position: relative;
    overflow: hidden;
}
.dept-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #88C0D0;
    transform: scaleY(0);
    transition: transform 0.3s;
}
.dept-btn:hover { 
    background: rgba(136, 192, 208, 0.15); 
    color: #ECEFF4;
    border-color: rgba(136, 192, 208, 0.3);
    transform: translateX(2px);
}
.dept-btn:hover::before { transform: scaleY(1); }
.dept-btn.active {
    background: linear-gradient(135deg, #1A4D6F 0%, #2E7D9A 100%);
    color: #ECEFF4;
    border-color: rgba(136, 192, 208, 0.4);
    box-shadow: 0 4px 16px rgba(26, 77, 111, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    font-weight: 600;
}
.dept-btn.active::before { transform: scaleY(1); }

/* Sidebar footer */
.sidebar-footer { 
    margin-top: auto; padding-top: 16px; 
    border-top: 1px solid #334155;
}
.sidebar-footer button {
    width: 100%; padding: 10px 14px; border: 1px solid #334155; 
    border-radius: 8px; background: rgba(96,165,250,0.1);
    color: #94a3b8; font-size: 12px; cursor: pointer; 
    transition: all 0.3s; margin-bottom: 8px; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.sidebar-footer button:hover { 
    background: rgba(96,165,250,0.2); 
    color: #60a5fa; border-color: #60a5fa;
    transform: translateY(-2px);
}

/* === MAIN AREA === */
.main-area {
    flex: 1; 
    background: linear-gradient(180deg, rgba(236, 239, 244, 0.98) 0%, rgba(229, 233, 240, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(136, 192, 208, 0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #0D2137 0%, #1A4D6F 100%);
    color: #ECEFF4; 
    padding: 16px 36px; 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    border-bottom: 2px solid rgba(136, 192, 208, 0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.header-left h1 { 
    font-size: 26px; 
    margin: 0;
    font-weight: 700;
    color: #88C0D0;
    text-shadow: 0 2px 10px rgba(136, 192, 208, 0.3);
    letter-spacing: 0.5px;
}
.header-left .subtitle {
    font-size: 13px; 
    opacity: 0.85; 
    font-weight: 500;
    color: #81A1C1;
    margin: 0;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.username-display {
    font-weight: 600;
    color: #88C0D0;
    font-size: 14px;
    padding: 4px 12px;
    background: rgba(136, 192, 208, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(136, 192, 208, 0.2);
}
.username-display-compact {
    font-weight: 600;
    color: #88C0D0;
    font-size: 13px;
    padding: 4px 8px;
    background: rgba(136, 192, 208, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(136, 192, 208, 0.2);
    margin-right: 8px;
    white-space: nowrap;
}
.icon-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}

/* Tab bar */
.tab-bar {
    display: flex; 
    background: linear-gradient(180deg, rgba(216, 222, 233, 0.5) 0%, rgba(229, 233, 240, 0.3) 100%);
    border-bottom: 2px solid rgba(129, 161, 193, 0.3); 
    padding: 0 24px; 
    box-shadow: inset 0 -1px 0 rgba(136, 192, 208, 0.1); 
    overflow-x: auto; 
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}
.tab-btn {
    padding: 16px 24px; 
    border: none; 
    background: transparent; 
    color: #4C566A; 
    font-size: 13px; 
    font-weight: 600; 
    cursor: pointer; 
    border-bottom: 3px solid transparent; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    white-space: nowrap; 
    flex-shrink: 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}
.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #88C0D0 0%, #5E81AC 100%);
    transform: translateX(-50%);
    transition: width 0.3s;
}
.tab-btn:hover { 
    color: #2E3440;
    background: rgba(136, 192, 208, 0.08);
}
.tab-btn:hover::before { width: 100%; }
.tab-btn.active { 
    color: #1A4D6F;
    font-weight: 700;
    border-bottom-color: transparent;
}
.tab-btn.active::before { width: 100%; }

/* Content area */
.content-area { 
    flex: 1; padding: 24px; overflow-y: auto; 
    background: linear-gradient(to bottom, #f8fafc 0%, #fff 100%);
}

/* === CARDS === */
.card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(236, 239, 244, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px; 
    padding: 24px; 
    box-shadow: 0 4px 16px rgba(10, 25, 41, 0.08), inset 0 1px 0 rgba(255,255,255,0.5);
    margin-bottom: 20px;
    border: 1px solid rgba(129, 161, 193, 0.15);
}
.card-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
    padding-bottom: 16px; 
    border-bottom: 2px solid rgba(129, 161, 193, 0.2);
}
.card-title { 
    font-size: 17px; 
    font-weight: 700; 
    color: #000000; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    letter-spacing: 0.3px;
}
.card-title .icon { font-size: 20px; }

/* === BUTTONS === */
.btn {
    padding: 11px 22px; 
    border: 1px solid transparent;
    border-radius: 8px; 
    font-size: 13px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn:hover::before { left: 100%; }
.btn-primary {
    background: linear-gradient(135deg, #1A4D6F 0%, #2E7D9A 100%);
    color: #ECEFF4; 
    box-shadow: 0 4px 12px rgba(26, 77, 111, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: rgba(136, 192, 208, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 77, 111, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2E7D9A 0%, #1A4D6F 100%);
}
.btn-secondary {
    background: rgba(216, 222, 233, 0.5);
    color: #2E3440;
    border-color: rgba(129, 161, 193, 0.2);
    backdrop-filter: blur(10px);
}
.btn-secondary:hover { 
    background: rgba(229, 233, 240, 0.7);
    border-color: rgba(129, 161, 193, 0.4);
    transform: translateY(-1px);
}
.btn-success { 
    background: linear-gradient(135deg, #2E7D9A 0%, #3A9BB5 100%);
    color: #ECEFF4;
    box-shadow: 0 4px 12px rgba(46, 125, 154, 0.3);
    border-color: rgba(136, 192, 208, 0.3);
}
.btn-success:hover { 
    background: linear-gradient(135deg, #3A9BB5 0%, #2E7D9A 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 154, 0.4);
}
.btn-danger { 
    background: linear-gradient(135deg, #7D4A3A 0%, #A56652 100%);
    color: #ECEFF4;
    box-shadow: 0 4px 12px rgba(125, 74, 58, 0.3);
    border-color: rgba(165, 102, 82, 0.3);
}
.btn-danger:hover { 
    background: linear-gradient(135deg, #A56652 0%, #7D4A3A 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(125, 74, 58, 0.4);
}

/* === STATS GRID === */
.stats-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px; 
    margin-bottom: 28px;
}
.stat-card {
    background: linear-gradient(135deg, #0D2137 0%, #1A4D6F 100%);
    padding: 24px; 
    border-radius: 12px; 
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(10, 25, 41, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(136, 192, 208, 0.2);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #88C0D0 0%, #5E81AC 100%);
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(102,126,234,0.4); }
.stat-card.green { background: linear-gradient(135deg, #2E7D9A 0%, #3A9BB5 100%); border-color: rgba(58, 155, 181, 0.3); }
.stat-card.blue { background: linear-gradient(135deg, #1A4D6F 0%, #2E7D9A 100%); border-color: rgba(136, 192, 208, 0.3); }
.stat-card.orange { background: linear-gradient(135deg, #7D8A5C 0%, #8F9D6A 100%); border-color: rgba(143, 157, 106, 0.3); }
.stat-label { 
    font-size: 11px; 
    opacity: 0.95; 
    margin-bottom: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1.5px;
    color: #D8DEE9;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(136, 192, 208, 0.4);
}
.stat-value { 
    font-size: 36px; 
    font-weight: 700;
    color: #FFFFFF;
    text-shadow: 0 0 20px rgba(136, 192, 208, 0.6), 0 0 40px rgba(136, 192, 208, 0.3), 0 2px 8px rgba(0,0,0,0.3);
}

/* === FILTERS === */
.filters-bar {
    display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; 
    padding: 16px; background: #f8fafc; border-radius: 10px;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 180px; }
.filter-group label { font-size: 11px; color: #475569; font-weight: 600; text-transform: uppercase; }
.filter-group select,
.filter-group input {
    padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 13px; outline: none; transition: all 0.2s; background: #fff;
}
.filter-group select:focus,
.filter-group input:focus { 
    border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* === PROJECTS & TASKS === */
.project-accordion {
    margin-bottom: 16px; border: 2px solid #e2e8f0; border-radius: 12px;
    overflow: hidden; transition: all 0.3s;
}
.project-accordion:hover { border-color: #cbd5e1; }
.project-header {
    padding: 16px 20px; background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: all 0.3s;
}
.project-header:hover { background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); }
.project-header.active { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.project-title {
    font-size: 16px; font-weight: 700; color: #1e293b;
    display: flex; align-items: center; gap: 12px;
}
.project-title .icon { font-size: 20px; }
.project-meta {
    display: flex; align-items: center; gap: 16px; font-size: 12px; color: #475569;
}
.project-body {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
    background: #fff;
}
.project-body.open { max-height: 3000px; }
.project-description {
    padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
    color: #475569; font-size: 13px; line-height: 1.6;
}

/* Task list */
.task-list { padding: 12px; }
.task-item {
    padding: 14px 16px; border-left: 4px solid #cbd5e1; 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(236, 239, 244, 0.85) 100%);
    backdrop-filter: blur(10px);
    border-radius: 10px; 
    padding: 16px; 
    margin-bottom: 14px; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; 
    gap: 14px; 
    align-items: flex-start;
    border-left: 4px solid #88C0D0;
    border: 1px solid rgba(129, 161, 193, 0.15);
    border-left-width: 4px;
    box-shadow: 0 2px 6px rgba(10, 25, 41, 0.06), inset 0 1px 0 rgba(255,255,255,0.4);
}
.task-item:hover { 
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(229, 233, 240, 0.9) 100%);
    box-shadow: 0 4px 12px rgba(10, 25, 41, 0.12), inset 0 1px 0 rgba(255,255,255,0.5); 
    transform: translateX(6px);
}
.task-item.priority-alta { border-left-color: #A56652; }
.task-item.priority-media { border-left-color: #7D8A5C; }
.task-item.priority-baja { border-left-color: #5E8C7D; }
.task-item.status-done { opacity: 0.6; }
.task-item.status-done .task-title { text-decoration: line-through; }
.task-main { flex: 1; }
.task-title { font-weight: 600; color: #1e293b; margin-bottom: 4px; font-size: 14px; }
.task-meta {
    display: flex; gap: 12px; font-size: 11px; color: #475569; flex-wrap: wrap;
}

/* === BADGES === */
.badge {
    padding: 5px 12px; 
    border-radius: 6px; 
    font-size: 10px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    display: inline-block;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.badge-alta, .badge-high { 
    background: linear-gradient(135deg, #A56652 0%, #8B4E3F 100%);
    color: #ECEFF4;
    border-color: rgba(139, 78, 63, 0.3);
}
.badge-media, .badge-medium { 
    background: linear-gradient(135deg, #7D8A5C 0%, #6B7549 100%);
    color: #ECEFF4;
    border-color: rgba(107, 117, 73, 0.3);
}
.badge-baja, .badge-low { 
    background: linear-gradient(135deg, #5E8C7D 0%, #4A7368 100%);
    color: #ECEFF4;
    border-color: rgba(74, 115, 104, 0.3);
}
.badge-pending { 
    background: linear-gradient(135deg, #7D8A5C 0%, #6B7549 100%);
    color: #ECEFF4;
    border-color: rgba(107, 117, 73, 0.3);
}
.badge-inProgress { 
    background: linear-gradient(135deg, #5E81AC 0%, #4C6A8F 100%);
    color: #ECEFF4;
    border-color: rgba(76, 106, 143, 0.3);
}
.badge-done { 
    background: linear-gradient(135deg, #5E8C7D 0%, #4A7368 100%);
    color: #ECEFF4;
    border-color: rgba(74, 115, 104, 0.3);
}

/* === MODAL === */
.modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(10, 25, 41, 0.9); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
    padding: 20px;
}
.modal-overlay.active { 
    display: flex !important;
}
.modal-content {
    background: linear-gradient(145deg, #ECEFF4 0%, #E5E9F0 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px; 
    padding: 32px; 
    max-width: 650px; 
    width: 90%; 
    max-height: 85vh; 
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.5);
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(136, 192, 208, 0.3);
    position: relative;
    color: #2E3440;
}
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: rgba(129, 161, 193, 0.1);
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #88C0D0 0%, #5E81AC 100%);
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5E81AC 0%, #88C0D0 100%);
}
.modal-content h3 { 
    margin-bottom: 24px; 
    font-size: 22px; 
    font-weight: 700; 
    color: #0D2137;
    border-bottom: 2px solid rgba(129, 161, 193, 0.3);
    padding-bottom: 12px;
    letter-spacing: 0.5px;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal {
    background: linear-gradient(145deg, #ECEFF4 0%, #E5E9F0 100%);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.5);
    border: 1px solid rgba(136, 192, 208, 0.3);
    position: relative;
    color: #2E3440;
}
.modal::-webkit-scrollbar {
    width: 8px;
}
.modal::-webkit-scrollbar-track {
    background: rgba(129, 161, 193, 0.1);
    border-radius: 4px;
}
.modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #88C0D0 0%, #5E81AC 100%);
    border-radius: 4px;
}
.modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5E81AC 0%, #88C0D0 100%);
}
.modal h3 { 
    margin-bottom: 20px; 
    color: #000000; 
    font-size: 22px; 
    font-weight: 700;
    padding-bottom: 12px; 
    border-bottom: 2px solid rgba(129, 161, 193, 0.3);
}
.modal/* === FORMS === */
.form-group { margin-bottom: 24px; }
.form-group label { 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 600; 
    color: #0D2137; 
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid rgba(129, 161, 193, 0.4); 
    border-radius: 8px; 
    font-size: 14px; 
    outline: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #0D2137;
    backdrop-filter: blur(10px);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: #88C0D0; 
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(136, 192, 208, 0.15), 0 4px 12px rgba(0,0,0,0.1);
}
.form-group textarea { 
    resize: vertical; 
    min-height: 100px;
    line-height: 1.6;
}
.modal-actions { 
    display: flex; gap: 10px; justify-content: flex-end; 
    margin-top: 24px; padding-top: 20px; border-top: 2px solid #f1f5f9;
}

/* === COMMENTS === */
/* Comments section */
.comments-section {
    margin-top: 24px; padding-top: 20px; border-top: 2px solid #e2e8f0;
}
.comments-section h4 {
    font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #1e293b;
    display: flex; align-items: center; gap: 8px;
}
.comment-card {
    background: #f8fafc; padding: 14px; border-radius: 10px; 
    margin-bottom: 12px; border-left: 3px solid #3b82f6;
}
.comment-header {
    display: flex; gap: 20px; margin-bottom: 8px;
    align-items: center;
}
.comment-author { 
    font-weight: 700; color: #1e293b; font-size: 13px;
    display: flex; align-items: center; gap: 6px;
    flex-shrink: 0;
}
.comment-time { 
    font-size: 11px; color: #94a3b8; 
    padding-left: 12px;
    border-left: 1px solid #e2e8f0;
}
.comment-text { 
    font-size: 13px; line-height: 1.6; color: #475569;
    word-wrap: break-word;
}
.mention {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 12px;
}
.comment-actions {
    margin-top: 8px; display: flex; gap: 8px;
}
.reply-card {
    margin-left: 24px; border-left-color: #94a3b8; background: #f1f5f9;
}
.comment-form {
    display: flex; flex-direction: column; gap: 10px; margin-top: 12px;
}
.comment-form input {
    width: 100%; padding: 10px 14px; border: 1px solid #cbd5e1;
    border-radius: 8px; font-size: 13px; outline: none;
}
.comment-form textarea {
    width: 100%; min-height: 80px; padding: 10px 14px; border: 1px solid #cbd5e1;
    border-radius: 8px; font-size: 13px; outline: none; resize: vertical;
    font-family: inherit;
}
.comment-form input:focus, .comment-form textarea:focus {
    border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.comment-form-actions {
    display: flex; gap: 8px; align-items: center;
}

/* === KANBAN === */
.kanban-board {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px; 
    padding: 24px; 
    min-height: 400px;
}
.kanban-column {
    background: linear-gradient(145deg, rgba(216, 222, 233, 0.4) 0%, rgba(229, 233, 240, 0.3) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px; 
    padding: 20px;
    border: 1px solid rgba(129, 161, 193, 0.25);
    display: flex; 
    flex-direction: column;
    min-height: 500px;
    box-shadow: 0 4px 16px rgba(10, 25, 41, 0.08), inset 0 1px 0 rgba(255,255,255,0.3);
}
.kanban-column h4 {
    font-size: 13px; 
    font-weight: 700; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
    letter-spacing: 1.2px; 
    color: #2E3440;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(129, 161, 193, 0.2);
}
.kanban-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95) 0%, rgba(236, 239, 244, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 10px; 
    padding: 16px; 
    margin-bottom: 14px; 
    box-shadow: 0 2px 8px rgba(10, 25, 41, 0.12), inset 0 1px 0 rgba(255,255,255,0.5);
    cursor: move; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    border-left: 4px solid #88C0D0;
    border: 1px solid rgba(129, 161, 193, 0.2);
    border-left-width: 4px;
}
.kanban-card:hover { 
    box-shadow: 0 6px 20px rgba(10, 25, 41, 0.2), inset 0 1px 0 rgba(255,255,255,0.6); 
    transform: translateY(-3px);
    border-left-color: #5E81AC;
}
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-card h5 { font-size: 14px; margin-bottom: 6px; font-weight: 600; color: #1e293b; }
.kanban-card p { font-size: 12px; color: #475569; margin-bottom: 8px; }
.kanban-card .card-meta { 
    font-size: 11px; color: #94a3b8; 
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px;
}
.kanban-card-title { 
    font-size: 14px; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #0f172a;
    line-height: 1.4;
}
.kanban-card-meta { 
    font-size: 11px; 
    color: #475569; 
    display: flex; 
    gap: 12px;
    flex-wrap: wrap;
}

/* === TASK TOOLTIP === */
@keyframes tooltipFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.94);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    }
    40% {
        opacity: 0.4;
        transform: translateY(-4px) scale(0.97);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
    }
}
@keyframes tooltipFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
    }
    30% {
        opacity: 0.75;
        transform: translateY(-2px) scale(0.99);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    }
    70% {
        opacity: 0.35;
        transform: translateY(-6px) scale(0.96);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.92);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    }
}
.task-tooltip {
    position: fixed;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    z-index: 10000;
    max-width: 320px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-10px) scale(0.94);
    will-change: opacity, transform;
    backdrop-filter: blur(8px);
}
.task-tooltip.visible {
    animation: tooltipFadeIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.task-tooltip.hiding {
    animation: tooltipFadeOut 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.task-tooltip-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}
.task-tooltip-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}
.task-tooltip-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.task-tooltip-meta-item .badge {
    font-size: 10px;
    padding: 2px 8px;
}

/* === CALENDAR === */
.calendar-container { max-width: 1100px; }
.calendar-nav { 
    display: flex; align-items: center; justify-content: space-between; 
    margin-bottom: 20px; padding: 16px; background: #f8fafc; 
    border-radius: 10px;
}
.calendar-nav h3 { font-size: 20px; color: #000000; font-weight: 700; }
.calendar-grid { 
    display: grid; grid-template-columns: repeat(7, 1fr); 
    gap: 2px; background: #cbd5e1; border-radius: 12px; overflow: hidden;
}
.calendar-header-cell { 
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff; padding: 12px; text-align: center; 
    font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.calendar-cell {
    background: #fff; min-height: 100px; padding: 8px; 
    font-size: 12px; position: relative; cursor: pointer;
    transition: all 0.2s;
}
.calendar-cell:hover { background: #f8fafc; }
.calendar-cell.other-month { background: #f8fafc; color: #cbd5e1; }
.calendar-cell.today { 
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    font-weight: 700;
}
.calendar-event {
    background: #3b82f6; color: #fff; padding: 3px 6px; 
    border-radius: 4px; font-size: 10px; margin-bottom: 3px; 
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; 
    cursor: pointer; font-weight: 600;
}
.calendar-event:hover { background: #2563eb; color: #fff; }

/* === CHECKLIST === */
.checklist-item { 
    display: flex; align-items: center; gap: 12px; 
    padding: 12px 0; border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.checklist-item:hover { background: #f8fafc; }
.checklist-item input[type="checkbox"] { 
    width: 20px; height: 20px; cursor: pointer; 
    accent-color: #3b82f6;
}
.checklist-item .cl-text { flex: 1; font-size: 14px; color: #1e293b; }
.checklist-item .cl-text.completed { 
    text-decoration: line-through; color: #94a3b8;
}

/* === DOCUMENTS === */
.doc-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 16px; 
}
.doc-card {
    background: #fff; border-radius: 12px; padding: 16px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    display: flex; flex-direction: column; gap: 10px;
    transition: all 0.3s; border: 2px solid #e2e8f0;
}
.doc-card:hover { 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    border-color: #3b82f6;
    transform: translateY(-4px);
}
.doc-card .doc-icon { font-size: 36px; text-align: center; }
.doc-card .doc-name { 
    font-weight: 600; font-size: 13px; word-break: break-all;
    color: #1e293b;
}
.doc-card .doc-meta { font-size: 11px; color: #94a3b8; }
.doc-card .doc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-card .doc-tag { 
    background: #dbeafe; color: #2563eb; padding: 3px 8px; 
    border-radius: 6px; font-size: 10px; font-weight: 600;
}
.doc-card .doc-actions { display: flex; gap: 8px; }
.doc-upload-zone {
    border: 3px dashed #cbd5e1; border-radius: 12px; 
    padding: 40px; text-align: center; color: #94a3b8;
    cursor: pointer; transition: all 0.3s; margin-bottom: 20px;
    background: #f8fafc;
}
.doc-upload-zone:hover { 
    border-color: #3b82f6; color: #3b82f6; 
    background: #f0f9ff;
}
.doc-upload-zone.drag-hover { 
    border-color: #3b82f6; background: #dbeafe; color: #1e40af;
}
.doc-upload-zone .icon { font-size: 48px; margin-bottom: 12px; }
.doc-upload-zone .text { font-size: 14px; font-weight: 600; }

/* Search bar */
.search-bar { margin-bottom: 20px; }
.search-bar input {
    width: 100%; max-width: 500px; padding: 12px 16px; 
    border: 2px solid #cbd5e1; border-radius: 10px;
    font-size: 14px; outline: none; transition: all 0.2s;
}
.search-bar input:focus { 
    border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Search Bar Container */
.search-bar-container {
    margin-bottom: 16px;
    padding: 0;
    max-width: 400px;
}

.search-input-modern {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
}

.search-input-modern::placeholder {
    color: #94a3b8;
}

.search-input-modern:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.15);
}

.search-input-modern:hover {
    border-color: #94a3b8;
}

/* Filter select dropdowns */
.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-weight: 500;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.filter-select:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.filter-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Toolbar */
.toolbar { 
    display: flex; gap: 10px; margin-bottom: 20px; 
    flex-wrap: wrap; align-items: center; 
}

/* Toast notifications */
.toast-container { 
    position: fixed; top: 20px; right: 20px; z-index: 2000; 
    display: flex; flex-direction: column; gap: 10px; 
}
.toast {
    background: #fff; padding: 16px 24px; border-radius: 10px; 
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-size: 14px; min-width: 300px; 
    animation: slideInRight 0.3s ease;
    border-left: 4px solid #3b82f6; font-weight: 500;
    color: #0D2137;
}
.toast.error { border-left-color: #ef4444; }
.toast.success { border-left-color: #10b981; }
@keyframes slideInRight { 
    from { transform: translateX(400px); opacity: 0; } 
    to { transform: translateX(0); opacity: 1; } 
}

/* Responsive */
@media (max-width: 768px) {
    .app-container { flex-direction: column; }
    .sidebar { width: 100%; min-width: auto; }
    .kanban-board { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* Loading spinner */
.spinner {
    border: 3px solid #f1f5f9;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #000;
}
.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}
.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
    color: #000;
}

/* === CALENDAR === */
.calendar-grid {
    display: grid; 
    grid-template-columns: repeat(7, 1fr); 
    grid-template-rows: auto repeat(6, 1fr); /* Header auto, 6 filas iguales */
    gap: 1px;
    background: #e2e8f0; 
    border-radius: 12px; 
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    height: calc(100vh - 220px); /* Altura adaptativa: viewport - header - toolbar - padding */
    max-height: 800px; /* Altura máxima para pantallas grandes */
    min-height: 500px; /* Altura mínima para pantallas pequeñas */
}

.calendar-day-header {
    background: #1e293b; 
    color: white; 
    padding: 10px; 
    text-align: center;
    font-weight: 700; 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-header-cell {
    background: #1e293b; 
    color: white; 
    padding: 10px; 
    text-align: center;
    font-weight: 700; 
    font-size: 12px; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    background: white; 
    padding: 6px; 
    position: relative;
    cursor: pointer; 
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Scroll si hay muchos eventos */
    overflow-x: hidden;
    min-height: 0; /* Permite que flex funcione correctamente */
}

.calendar-day:hover { background: #f8fafc; }
.calendar-day.empty { background: #f1f5f9; cursor: default; }
.calendar-day.today { 
    background: #eff6ff; 
    box-shadow: inset 0 0 0 2px #3b82f6; 
}

.calendar-day-number {
    font-size: 13px; 
    font-weight: 700; 
    color: #1e293b; 
    margin-bottom: 4px;
    flex-shrink: 0; /* No se comprime */
}

.calendar-day.today .calendar-day-number { color: #3b82f6; }

.calendar-cell {
    background: white; 
    padding: 6px; 
    position: relative;
    cursor: pointer; 
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.calendar-cell:hover { background: #f8fafc; }
.calendar-cell.empty { background: #f1f5f9; cursor: default; }
.calendar-cell.today { 
    background: #eff6ff; 
    box-shadow: inset 0 0 0 2px #3b82f6; 
}

.calendar-day-num {
    font-size: 13px; 
    font-weight: 700; 
    color: #1e293b; 
    margin-bottom: 4px;
    flex-shrink: 0;
}

.calendar-cell.today .calendar-day-num { color: #3b82f6; }

.calendar-event {
    font-size: 11px; 
    padding: 3px 6px; 
    border-radius: 4px; 
    margin-bottom: 2px;
    cursor: pointer; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    transition: transform 0.15s;
    flex-shrink: 0; /* No se comprime */
}

.calendar-event:hover { 
    transform: scale(1.02); 
    color: #fff; 
    z-index: 10;
}

.task-event { background: #dbeafe; color: #1e40af; border-left: 3px solid #3b82f6; }
.event-blue { background: #dbeafe; color: #1e40af; border-left: 3px solid #3b82f6; }
.event-green { background: #dcfce7; color: #166534; border-left: 3px solid #22c55e; }
.event-orange { background: #fff7ed; color: #9a3412; border-left: 3px solid #f97316; }
.event-red { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444; }
.event-purple { background: #f5f3ff; color: #5b21b6; border-left: 3px solid #8b5cf6; }
.calendar-event-blue { background: #dbeafe; color: #1e40af; border-left: 3px solid #3b82f6; }
.calendar-event-green { background: #dcfce7; color: #166534; border-left: 3px solid #22c55e; }
.calendar-event-orange { background: #fff7ed; color: #9a3412; border-left: 3px solid #f97316; }
.calendar-event-red { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444; }
.calendar-event-purple { background: #f5f3ff; color: #5b21b6; border-left: 3px solid #8b5cf6; }

/* Scrollbar personalizada para celdas del calendario */
.calendar-day::-webkit-scrollbar,
.calendar-cell::-webkit-scrollbar {
    width: 4px;
}

.calendar-day::-webkit-scrollbar-track,
.calendar-cell::-webkit-scrollbar-track {
    background: transparent;
}

.calendar-day::-webkit-scrollbar-thumb,
.calendar-cell::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.calendar-day::-webkit-scrollbar-thumb:hover,
.calendar-cell::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive para calendario */
@media (max-width: 1024px) {
    .calendar-grid {
        height: calc(100vh - 240px);
        max-height: 700px;
        min-height: 450px;
    }
    
    .calendar-event {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .calendar-day-number,
    .calendar-day-num {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        height: calc(100vh - 260px);
        max-height: 600px;
        min-height: 400px;
        gap: 0.5px;
    }
    
    .calendar-day,
    .calendar-cell {
        padding: 4px;
    }
    
    .calendar-day-header,
    .calendar-header-cell {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .calendar-event {
        font-size: 9px;
        padding: 2px 3px;
        margin-bottom: 1px;
    }
    
    .calendar-day-number,
    .calendar-day-num {
        font-size: 11px;
        margin-bottom: 2px;
    }
}

/* === CHECKLIST === */
.checklist-stats {
    display: flex; align-items: center; gap: 12px; flex: 1; margin-left: 16px;
}
.checklist-progress-bar {
    flex: 1; height: 10px; background: #e2e8f0; border-radius: 5px; overflow: hidden;
}
.checklist-progress-fill {
    height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 5px; transition: width 0.5s ease;
}
.checklist-progress-text { font-size: 13px; font-weight: 600; color: #475569; white-space: nowrap; }
.checklist-list { display: flex; flex-direction: column; gap: 2px; }
.checklist-section-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: #475569; padding: 12px 16px 6px; background: #f8fafc;
}
.checklist-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: white; border-radius: 8px;
    border: 1px solid #e2e8f0; transition: all 0.2s;
}
.checklist-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.checklist-item.completed { opacity: 0.6; }
.checklist-item.completed .checklist-item-text { text-decoration: line-through; color: #94a3b8; }
.checklist-item-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.checklist-item-left input[type="checkbox"] {
    width: 20px; height: 20px; cursor: pointer; accent-color: #22c55e; flex-shrink: 0;
}
.checklist-item-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.checklist-item-text { font-size: 14px; color: #1e293b; }
.checklist-item-content.priority-alta .checklist-item-text { color: #dc2626; font-weight: 600; }
.checklist-item-content.priority-baja .checklist-item-text { color: #6b7280; font-weight: 600; }
.checklist-item-meta { font-size: 12px; color: #94a3b8; }
.checklist-item-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* === DOCUMENTS === */
.doc-search-input {
    flex: 1; max-width: 300px; padding: 8px 14px; border: 1px solid #cbd5e1;
    border-radius: 8px; font-size: 13px; outline: none; transition: all 0.2s;
}
.doc-search-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.doc-drop-zone {
    border: 2px dashed #cbd5e1; border-radius: 12px; padding: 30px;
    text-align: center; transition: all 0.3s; margin-bottom: 16px; cursor: pointer;
}
.doc-drop-zone:hover, .doc-drop-zone.drag-active {
    border-color: #3b82f6; background: #eff6ff;
}
.drop-zone-content { color: #94a3b8; }
.drop-zone-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.drop-zone-content p { font-size: 14px; margin: 0; }
.doc-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.doc-card {
    display: flex; align-items: center; gap: 12px; padding: 16px;
    background: white; border-radius: 10px; border: 1px solid #e2e8f0;
    transition: all 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.doc-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.doc-icon { font-size: 32px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name {
    font-size: 14px; font-weight: 600; color: #1e293b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.doc-linked { font-size: 11px; color: #3b82f6; margin-top: 4px; }
.doc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.doc-tag {
    font-size: 10px; padding: 2px 8px; background: #f1f5f9;
    border-radius: 10px; color: #475569;
}
.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.doc-actions .btn-sm { padding: 4px 8px; font-size: 12px; }

/* === DOCUMENT VIEWER === */
.doc-viewer-header h3 { margin-bottom: 12px; }
.doc-viewer-content { margin-bottom: 16px; }
.doc-viewer-image {
    max-width: 100%; max-height: 60vh; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1); display: block; margin: 0 auto;
}
.doc-viewer-iframe {
    width: 100%; height: 60vh; border: 1px solid #e2e8f0; border-radius: 8px;
}
.doc-viewer-3d {
    width: 100%; min-height: 400px; background: #f1f5f9; border-radius: 8px;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.doc-viewer-3d canvas { border-radius: 8px; display: block; }
.doc-viewer-table { max-height: 50vh; overflow: auto; }
.csv-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.csv-table th {
    background: #1e293b; color: white; padding: 8px 10px; text-align: left;
    position: sticky; top: 0; font-weight: 600;
}
.csv-table td { padding: 6px 10px; border-bottom: 1px solid #e2e8f0; }
.csv-table tr:hover td { background: #f8fafc; }
.doc-viewer-info {
    text-align: center; padding: 40px; color: #475569;
}
.doc-viewer-info p { margin-bottom: 16px; font-size: 16px; }

/* Inline doc items in task modal */
.doc-inline-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; transition: all 0.2s; font-size: 13px;
}
.doc-inline-item:hover { background: #eff6ff; border-color: #3b82f6; }
.doc-inline-item span:first-child { font-size: 18px; }
.doc-inline-item span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === LOGIN SCREEN === */
.login-screen { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(135deg, #0A1929 0%, #0D2137 25%, #1A4D6F 75%, #2E7D9A 100%);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 9999;
    overflow: hidden;
}
.login-screen::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(136, 192, 208, 0.05) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}
.login-card {
    background: linear-gradient(145deg, #ECEFF4 0%, #E5E9F0 100%);
    backdrop-filter: blur(30px);
    padding: 48px 40px; 
    border-radius: 16px; 
    box-shadow: 0 40px 100px rgba(0,0,0,0.6), 
                0 0 0 1px rgba(136, 192, 208, 0.3),
                inset 0 1px 0 rgba(255,255,255,0.8); 
    width: 100%; 
    max-width: 420px;
    border: 1px solid rgba(136, 192, 208, 0.4);
    position: relative;
    z-index: 1;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #88C0D0 0%, #5E81AC 50%, #88C0D0 100%);
    border-radius: 16px 16px 0 0;
}
.login-card h2 {
    text-align: center; 
    margin-bottom: 8px;
    margin-top: 12px;
    color: #0D2137; 
    font-size: 32px; 
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.login-card h2::before {
    content: '⚓';
    font-size: 36px;
    color: #88C0D0;
    text-shadow: 0 0 20px rgba(136, 192, 208, 0.5);
}
.login-subtitle {
    text-align: center;
    color: #5E81AC;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(129, 161, 193, 0.2);
}
.login-card h3 { 
    font-size: 16px; 
    margin-bottom: 24px; 
    margin-top: 0;
    color: #0D2137;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-card input {
    width: 100%; 
    padding: 14px 16px; 
    margin-bottom: 18px; 
    border: 1px solid rgba(129, 161, 193, 0.3);
    border-radius: 8px; 
    font-size: 14px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    color: #0D2137;
    font-family: inherit;
}
.login-card input::placeholder {
    color: #81A1C1;
    opacity: 0.7;
}
.login-card input:focus {
    outline: none; 
    border-color: #88C0D0; 
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(136, 192, 208, 0.15),
                0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.login-card .btn { 
    width: 100%; 
    margin-bottom: 20px;
    margin-top: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #1A4D6F 0%, #2E7D9A 100%);
    border: none;
    box-shadow: 0 6px 20px rgba(26, 77, 111, 0.4),
                inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.login-card .btn:hover { 
    background: linear-gradient(135deg, #2E7D9A 0%, #3A9BB5 100%);
    box-shadow: 0 8px 30px rgba(26, 77, 111, 0.5),
                inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-2px);
}
.login-card .btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(26, 77, 111, 0.4);
}
.login-switch { 
    text-align: center; 
    font-size: 13px; 
    color: #5E81AC;
    margin-top: 24px;
}
.login-switch a { 
    color: #1A4D6F; 
    text-decoration: none; 
    font-weight: 700;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}
.login-switch a:hover { 
    color: #88C0D0;
    border-bottom-color: #88C0D0;
}

/* === MY TASKS BUTTON === */
.my-tasks-btn {
    margin-top: 8px; 
    border: 1px solid rgba(136, 192, 208, 0.3) !important;
    background: rgba(136, 192, 208, 0.1) !important;
}
.my-tasks-btn.active {
    background: linear-gradient(135deg, #2E7D9A 0%, #1A4D6F 100%) !important;
    color: #ECEFF4 !important; 
    border-color: rgba(136, 192, 208, 0.4) !important;
    box-shadow: 0 4px 16px rgba(46, 125, 154, 0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* === USER INFO === */
.user-info {
    padding: 10px 12px;
    background: rgba(136, 192, 208, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(136, 192, 208, 0.2);
}
.user-info label { 
    margin-bottom: 4px;
    font-size: 10px;
}
.user-info #currentUserDisplay {
    margin-bottom: 6px !important;
}
.user-info .btn {
    padding: 8px 16px;
    font-size: 11px;
}

/* === NOTIFICATION BELL === */
.notification-bell {
    position: relative;
    background: rgba(136, 192, 208, 0.15);
    border: 1px solid rgba(136, 192, 208, 0.3);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(10, 25, 41, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    align-self: center;
}
.notification-bell:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(10, 25, 41, 0.3);
    background: rgba(136, 192, 208, 0.25);
    border-color: rgba(136, 192, 208, 0.5);
}
.notification-badge {
    position: absolute; top: -4px; right: -4px; background: #ef4444;
    color: white; font-size: 11px; font-weight: 700; padding: 2px 6px;
    border-radius: 10px; min-width: 18px; text-align: center;
    box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}

/* === CALENDAR ICON BUTTON === */
.calendar-icon-btn {
    position: relative;
    background: rgba(136, 192, 208, 0.15);
    border: 1px solid rgba(136, 192, 208, 0.3);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(10, 25, 41, 0.2);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    align-self: center;
}
.calendar-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(10, 25, 41, 0.3);
    background: rgba(136, 192, 208, 0.25);
    border-color: rgba(136, 192, 208, 0.5);
}

/* === NOTIFICATION PANEL === */
.notification-panel {
    position: absolute; 
    top: 70px; 
    right: 20px; 
    background: linear-gradient(145deg, #ECEFF4 0%, #E5E9F0 100%);
    backdrop-filter: blur(20px);
    border-radius: 12px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(136, 192, 208, 0.2), inset 0 1px 0 rgba(255,255,255,0.8); 
    width: 380px; 
    max-height: 520px; 
    overflow: hidden;
    z-index: 9999; 
    display: none;
    border: 1px solid rgba(136, 192, 208, 0.3);
}
.notification-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #0D2137 0%, #1A4D6F 100%);
    border-bottom: 2px solid rgba(136, 192, 208, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}
.notification-header h4 {
    margin: 0;
    color: #ECEFF4;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.notification-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}
.notification-header .btn-icon,
.notification-header .btn-icon-sm {
    background: rgba(136, 192, 208, 0.15);
    border: 1px solid rgba(136, 192, 208, 0.3);
    color: #ECEFF4;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}
.notification-header .btn-icon-sm {
    padding: 4px 8px;
    font-size: 13px;
    opacity: 0.5;
}
.notification-header .btn-icon:hover,
.notification-header .btn-icon-sm:hover {
    background: rgba(136, 192, 208, 0.3);
    transform: scale(1.05);
}
.notification-list {
    max-height: 440px;
    overflow-y: auto;
}
.notification-list::-webkit-scrollbar {
    width: 6px;
}
.notification-list::-webkit-scrollbar-track {
    background: rgba(129, 161, 193, 0.1);
}
.notification-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #88C0D0 0%, #5E81AC 100%);
    border-radius: 3px;
}
.notification-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5E81AC 0%, #88C0D0 100%);
}
.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #475569;
    font-size: 13px;
}
.notification-item {
    padding: 16px 20px; 
    border-bottom: 1px solid rgba(129, 161, 193, 0.15); 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover { 
    background: rgba(136, 192, 208, 0.1);
}
.notification-item.unread { 
    background: linear-gradient(90deg, rgba(136, 192, 208, 0.15) 0%, rgba(136, 192, 208, 0.05) 100%);
    border-left: 3px solid #88C0D0;
    padding-left: 17px;
}
.notification-item.unread::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #88C0D0 0%, #5E81AC 100%);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(136, 192, 208, 0.6);
}
.notification-delete {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(191, 97, 106, 0.1);
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 6px 8px;
    color: #BF616A;
    line-height: 1;
}
.notification-item:hover .notification-delete {
    opacity: 1;
}
.notification-delete:hover {
    background: rgba(191, 97, 106, 0.2);
    transform: translateY(-50%) scale(1.05);
}
.notification-type {
    font-size: 10px;
    color: #5E81AC;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-weight: 700;
    display: inline-block;
    background: rgba(94, 129, 172, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}
.notification-message {
    font-size: 13px;
    color: #2E3440;
    padding-right: 45px;
    margin-bottom: 8px;
    line-height: 1.5;
    font-weight: 500;
}
.notification-time {
    font-size: 11px;
    color: #81A1C1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}
.notification-time::before {
    content: '🕐';
    font-size: 10px;
}
.notification-empty {
    padding: 40px 20px; text-align: center; color: #94a3b8;
}

/* === ADMIN USER TABLE === */
.user-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.user-table thead {
    background: linear-gradient(135deg, #1A4D6F, #2E7D9A);
}
.user-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #0D2137;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.user-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}
.user-table tbody tr:hover {
    background-color: #f8fafc;
}
.user-table td {
    padding: 12px;
    color: #1e293b;
    font-size: 14px;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   PANEL DE CONTROL - DASHBOARD STYLES
============================================ */
.control-panel-container { 
    padding: 0;
    margin: 0;
    position: relative;
}
.control-panel-tabs { 
    position: sticky;
    top: -24px;
    left: -24px;
    right: -24px;
    z-index: 100; 
    background: white; 
    display: flex; 
    gap: 8px; 
    border-bottom: 2px solid #e2e8f0; 
    padding: 12px 44px 12px 44px;
    margin: -24px -24px 0 -24px;
}
.cp-tab-btn { padding: 10px 20px; background: transparent; border: none; color: #475569; font-weight: 600; cursor: pointer; border-radius: 8px 8px 0 0; transition: all 0.3s; }
.cp-tab-btn:hover { background: #f1f5f9; color: #1e293b; }
.cp-tab-btn.active { background: #3b82f6; color: white; }
.control-panel-content { min-height: 400px; padding: 24px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.stat-card-blue { border-left: 4px solid #3b82f6; }
.stat-card-green { border-left: 4px solid #10b981; }
.stat-card-orange { border-left: 4px solid #f59e0b; }
.stat-card-red { border-left: 4px solid #ef4444; }
.stat-card-purple { border-left: 4px solid #8b5cf6; }
.stat-card-teal { border-left: 4px solid #14b8a6; }
.stat-icon { font-size: 36px; }
.stat-content { flex: 1; }
.stat-value { font-size: 32px; font-weight: 700; color: #1e293b; line-height: 1; }
.stat-label { font-size: 14px; color: #475569; margin-top: 4px; }
.stat-sublabel { font-size: 12px; color: #94a3b8; margin-top: 2px; }

.panel-section { background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.panel-section h3 { font-size: 18px; color: #000000; margin-bottom: 20px; }

.dept-progress-list { display: flex; flex-direction: column; gap: 16px; }
.dept-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dept-name { font-weight: 600; color: #1e293b; }
.dept-stats { font-size: 13px; color: #475569; }
.progress-bar-container { height: 10px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #3b82f6 0%, #10b981 100%); transition: width 0.3s; }

.priority-tasks-list { display: flex; flex-direction: column; gap: 12px; }
.priority-task-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f8fafc; border-radius: 8px; cursor: pointer; transition: all 0.2s; }
.priority-task-item:hover { background: #f1f5f9; transform: translateX(4px); }
.task-priority-badge { padding: 4px 12px; border-radius: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.task-priority-badge.priority-alta { background: #fee2e2; color: #dc2626; }
.task-info-mini { flex: 1; }
.task-title-mini { font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.task-meta-mini { display: flex; gap: 12px; font-size: 12px; color: #64748b; }
.task-meta-mini span { display: flex; align-items: center; gap: 4px; }

.dept-stats-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.dept-stats-container h3 { grid-column: 1 / -1; font-size: 20px; color: #000000; margin-bottom: 8px; }
.dept-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.dept-card-header h4 { font-size: 18px; color: #000000; margin-bottom: 12px; }
.dept-card-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.stat-badge-blue { background: #dbeafe; color: #1e40af; }
.stat-badge-green { background: #d1fae5; color: #065f46; }
.stat-badge-orange { background: #fed7aa; color: #c2410c; }
.stat-badge-gray { background: #e5e7eb; color: #374151; }
.dept-card-body { margin-top: 16px; }
.dept-metric { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.dept-metric:last-child { border-bottom: none; }
.metric-label { font-size: 14px; color: #475569; }
.metric-value { font-size: 16px; font-weight: 600; color: #1e293b; }
.dept-metric-warning { background: #fef3c7; padding: 8px; border-radius: 6px; border-left: 3px solid #f59e0b; }
.dept-metric-warning .metric-label { color: #92400e; }
.dept-metric-warning .metric-value { color: #b45309; }

.workload-container h3 { font-size: 20px; color: #000000; margin-bottom: 20px; }
.workload-list { display: flex; flex-direction: column; gap: 16px; }
.workload-item { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); border-left: 4px solid #94a3b8; }
.workload-item.high-load { border-left-color: #ef4444; }
.workload-item.medium-load { border-left-color: #f59e0b; }
.workload-item.low-load { border-left-color: #10b981; }
.workload-user { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.workload-avatar { width: 48px; height: 48px; background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.workload-info { flex: 1; }
.workload-name { font-size: 16px; font-weight: 600; color: #1e293b; }
.workload-summary { font-size: 13px; color: #475569; }
.workload-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.workload-stat { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f1f5f9; border-radius: 8px; }
.workload-stat-danger { background: #fee2e2; color: #991b1b; }
.stat-icon { font-size: 18px; }
.stat-text { font-size: 13px; font-weight: 500; color: #1e293b; }

.timeline-container h3 { font-size: 20px; color: #000000; margin-bottom: 20px; }
.standalone-header { color: #000000; font-weight: 600; }

/* Barra de búsqueda y filtros */
.timeline-search-bar { margin-bottom: 16px; }
.timeline-priority-filters { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 20px; 
    flex-wrap: wrap;
}
.timeline-priority-btn {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}
.timeline-priority-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.timeline-priority-btn.active {
    background: #2E7D9A;
    color: white;
    border-color: #2E7D9A;
}

/* Estadísticas */
.timeline-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    color: #64748b;
}

/* Botón de cargar más */
.timeline-load-more {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.timeline-view { display: flex; flex-direction: column; gap: 16px; }
.timeline-item { background: white; border-radius: 12px; padding: 20px; display: flex; gap: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); cursor: pointer; transition: all 0.2s; border-left: 4px solid #94a3b8; }
.timeline-item:hover { transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.timeline-item-overdue { border-left-color: #ef4444; background: #fef2f2; }
.timeline-item-today { border-left-color: #f59e0b; background: #fffbeb; }
.timeline-item-upcoming { border-left-color: #3b82f6; }
.timeline-item-nodate { border-left-color: #94a3b8; background: #f8fafc; }
.timeline-date { min-width: 140px; }
.timeline-day { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.timeline-status { font-size: 12px; color: #64748b; }
.timeline-content { flex: 1; }
.timeline-title { font-size: 16px; font-weight: 600; color: #1e293b; margin-bottom: 8px; }
.timeline-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #64748b; }
.timeline-meta span { display: flex; align-items: center; gap: 4px; }

/* === FORUM ENHANCEMENTS === */
.forum-quote {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 6px;
    font-style: italic;
}
.forum-quote-header {
    font-weight: 600;
    color: #1e40af;
    font-size: 13px;
    margin-bottom: 6px;
    font-style: normal;
}
.forum-quote-content {
    color: #475569;
    font-size: 14px;
}
.forum-mention {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}
.forum-pm-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

/* === NOVETATS (ACTIVITY FEED) === */
.novetats-container h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-section {
    margin-bottom: 32px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.activity-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f5f9;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.activity-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.activity-item .badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* Responsive para activity feed */
@media (max-width: 768px) {
    .activity-section {
        margin-bottom: 20px;
        padding: 16px;
    }
    
    .activity-section h4 {
        font-size: 16px;
    }
    
    .activity-item {
        padding: 10px;
    }
    
    .novetats-container h3 {
        font-size: 20px;
    }
}

/* === SEARCH INPUT WITH CLEAR BUTTON === */
.search-bar-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Contenedor específico para el input de documentos en el toolbar */
.toolbar .search-bar-container {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    min-width: 250px;
    margin: 0;
}

.search-input-modern,
#forumSearchInput,
#timelineSearchInput,
#docSearchInput,
#myTasksSearchInput,
.doc-search-input {
    padding-right: 35px !important; /* Espacio para el botón X */
}

/* Contenedor específico para el input de documentos en el toolbar */
.toolbar .doc-search-input {
    position: relative;
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none; /* Oculto por defecto */
    z-index: 10;
    pointer-events: auto;
}

.search-clear-btn:hover {
    background: rgba(100, 116, 139, 0.15);
    color: #0f172a;
}

.search-clear-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   CHAT PANEL
============================================ */
.chat-icon-btn {
    background: linear-gradient(135deg, #5E81AC 0%, #81A1C1 100%);
    border: none;
    border-radius: 50%;
    width: auto;
    height: auto;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(94, 129, 172, 0.3);
    position: relative;
    align-self: center;
}

.chat-icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(94, 129, 172, 0.5);
    background: linear-gradient(135deg, #81A1C1 0%, #5E81AC 100%);
}

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #BF616A;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(191, 97, 106, 0.4);
}

.chat-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 450px;
    background: #FFFFFF;
    border: 1px solid rgba(136, 192, 208, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #88C0D0 0%, #5E81AC 100%);
    border-bottom: 1px solid rgba(136, 192, 208, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.chat-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-online-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    max-height: 300px;
    background: #F8FAFC;
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: slideInChat 0.3s ease;
}

@keyframes slideInChat {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.chat-message-author {
    color: #5E81AC;
    font-weight: 600;
}

.chat-message-time {
    color: #94A3B8;
    font-size: 10px;
    margin-left: auto;
}

.chat-message-content {
    background: #FFFFFF;
    padding: 8px 12px;
    border-radius: 8px;
    color: #1E293B !important;
    word-wrap: break-word;
    border-left: 3px solid #88C0D0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 13px;
    line-height: 1.4;
}

.chat-message.own .chat-message-content {
    background: #E0F2FE;
    border-left: 3px solid #5E81AC;
    color: #1E293B !important;
}

.chat-input-area {
    padding: 12px;
    background: #FFFFFF;
    border-top: 1px solid rgba(136, 192, 208, 0.2);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
    padding: 8px 12px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    color: #1E293B;
    font-size: 13px;
    transition: all 0.3s ease;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #88C0D0;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(136, 192, 208, 0.1);
}

.chat-input-area input::placeholder {
    color: #94A3B8;
}

.chat-input-area .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94A3B8;
    text-align: center;
    padding: 30px 20px;
}

.chat-empty-state .icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.chat-empty-state p {
    font-size: 13px;
    line-height: 1.5;
}


/* ============================================
   DRAG & DROP SORTING STYLES
   ============================================ */

.dragging-sort {
    opacity: 0.5;
    cursor: grabbing !important;
    transform: rotate(2deg);
    transition: transform 0.2s ease;
}

.drag-placeholder {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border: 2px dashed #0ea5e9;
    border-radius: 8px;
    margin: 8px 0;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.task-item[draggable="true"],
.kanban-card[draggable="true"] {
    cursor: grab;
    transition: all 0.2s ease;
}

.task-item[draggable="true"]:hover,
.kanban-card[draggable="true"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.task-item[draggable="true"]:active,
.kanban-card[draggable="true"]:active {
    cursor: grabbing;
}

/* Indicador visual de que se puede arrastrar */
.task-item[draggable="true"]::before,
.kanban-card[draggable="true"]::before {
    content: '⋮⋮';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #cbd5e1;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item[draggable="true"]:hover::before,
.kanban-card[draggable="true"]:hover::before {
    opacity: 1;
}

/* Ajustar padding para hacer espacio al indicador */
.task-item[draggable="true"] .task-main,
.kanban-card[draggable="true"] {
    padding-left: 32px;
}
