:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-app: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    height: 100vh;
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow: hidden;
}

.text-muted {
    color: var(--text-muted);
}

/* SIDEBAR */
.sidebar {
    width: 320px;
    background: linear-gradient(180deg, var(--surface) 0%, #f8fafc 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 30px;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 50px;
}

.brand-icon {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.brand h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.context-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: var(--text-muted);
}

.glass-select {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    cursor: pointer;
}

.glass-select:focus,
.glass-select:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), #818cf8);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.mini-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 8px;
}

.mini-stats span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.mini-stats p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

/* MAIN DASHBOARD */
.dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px 40px;
    overflow-y: auto;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.dash-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.ghost-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.ghost-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}


/* TASKS CONTAINER */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 16px;
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Task Card Block */
.task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.task-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.task-header {
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: #fafbfc;
}

.task-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.task-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary);
}

.task-status-badg {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-status-badg.pendiente {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.task-status-badg.completado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.task-body {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 0;
}

.task-content {
    padding: 30px;
    border-right: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.task-sidebar {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
}

/* Drag & Drop Zone */
.dropzone {
    border: 2px dashed var(--primary);
    background: rgba(79, 70, 229, 0.02);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dropzone:hover {
    background: rgba(79, 70, 229, 0.05);
}

.dropzone p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
}

.dropzone span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File List */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-meta i {
    color: var(--text-muted);
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.file-author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-dl {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
}

.btn-dl:hover {
    color: var(--primary-hover);
}

/* Chat Module */
.chat-window {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
}

.chat-msg {
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.chat-msg-author {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
}

.chat-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-msg-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.chat-send-btn:hover {
    background: var(--primary-hover);
}


/* TOASTS */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    animation: slideInX 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    border-left: 4px solid var(--primary);
}

.toast i {
    color: var(--primary);
}

@keyframes slideInX {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}