/* styles.css - Diseño Corporativo Premium para Soporte */

/* System font stack - no CDN */

:root {
    /* Colores base */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    
    /* Textos */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-on-dark: #f8fafc;
    
    /* Estados y Acentos */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --success: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    
    --warning: #d97706;
    --warning-light: #fef3c7;
    --warning-border: #fde68a;
    
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fca5a5;
    
    --info: #0891b2;
    --info-light: #ecfeff;
    --info-border: #cffafe;

    /* Sombras y Bordes */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    
    /* Transiciones */
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- VISTA DE LOGIN --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 1) 0%, rgba(30, 41, 59, 1) 90.1%);
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bg-sidebar);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.demo-credentials {
    background-color: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.815rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.demo-credentials code {
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(37, 99, 235, 0.08);
    padding: 2px 4px;
    border-radius: 4px;
}

/* --- LAYOUT DE LA APLICACIÓN --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 16px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 64px;
    padding: 24px 8px;
    align-items: center;
}

/* Base styles for elements that transition when sidebar collapses */
.sidebar .sidebar-link span,
.sidebar .sidebar-category-label,
.sidebar .sidebar-caret,
.sidebar .profile-action-btn span,
.sidebar .profile-info .user-name {
    opacity: 1;
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    transition: opacity 0.15s ease, width 0.2s ease, margin 0.2s ease, padding 0.2s ease;
}

/* Collapsed state transitions */
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-category-label,
.sidebar.collapsed .sidebar-caret,
.sidebar.collapsed .profile-action-btn span,
.sidebar.collapsed .profile-info .user-name {
    opacity: 0;
    width: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
}

.sidebar.collapsed .sidebar-link {
    gap: 0;
    justify-content: center;
    padding: 10px 8px;
}

.sidebar.collapsed .profile-info {
    gap: 0;
    flex-direction: column;
    align-items: center;
}

.sidebar.collapsed .profile-actions {
    flex-direction: column;
    width: 100%;
}

.sidebar.collapsed .profile-action-btn {
    gap: 0;
    padding: 8px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav {
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed .sidebar-category-header {
    gap: 0;
    justify-content: center;
    padding: 12px 8px;
}

/* Toggle button */
.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    margin-left: auto; /* Push to the right side of the profile info */
}

.sidebar-toggle:hover {
    color: var(--text-on-dark);
    background-color: var(--bg-sidebar-hover);
}

.sidebar-toggle i {
    transition: transform 0.25s ease;
}

.sidebar.collapsed .sidebar-toggle {
    margin-left: 0;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%; /* Ensure it spans the full width of the sidebar */
}

.profile-info .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.profile-info .user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-on-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.profile-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: var(--bg-sidebar-hover);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.profile-action-btn:hover {
    color: var(--text-on-dark);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.profile-action-btn i {
    font-size: 0.9rem;
}

.profile-action-btn.active {
    color: var(--text-on-dark);
    background-color: var(--primary);
    border-color: var(--primary);
}

.profile-action-btn.btn-logout:hover {
    color: white;
    background-color: var(--danger);
    border-color: var(--danger);
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Scrollbar personalizada para el menú */
.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Categorías Colapsables en Sidebar */
.sidebar-category {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.sidebar-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.825rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-category-header:hover {
    color: var(--text-on-dark);
    background-color: var(--bg-sidebar-hover);
}

.sidebar-category-header.active-group {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-on-dark);
}

.sidebar-category-header.active-group:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.sidebar-category-header i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidebar-category-label {
    flex-grow: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.sidebar-caret {
    font-size: 1rem !important;
    transition: transform 0.2s ease;
}

.sidebar-category.collapsed .sidebar-submenu {
    display: none;
}

.sidebar-category.collapsed .sidebar-caret {
    transform: rotate(-90deg);
}

.sidebar-submenu {
    list-style: none;
    padding-left: 16px;
    margin: 4px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* When collapsed, submenus are displayed vertically without indentation */
.sidebar.collapsed .sidebar-submenu {
    padding-left: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.925rem;
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-link:hover {
    color: var(--text-on-dark);
    background-color: var(--bg-sidebar-hover);
}

.sidebar-link.active {
    color: var(--text-on-dark);
    background-color: var(--primary);
    border-left-color: transparent !important;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* --- RESPONSIVIDAD PARA MÓVILES (SIDEBAR DRAWER) --- */
.mobile-menu-toggle {
    display: none; /* Oculto en escritorio */
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Hide desktop collapse toggle on mobile */
    .sidebar-toggle {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 990;
        width: 44px;
        height: 44px;
        background-color: var(--bg-sidebar);
        color: var(--text-on-dark);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
        transition: all 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background-color: var(--bg-sidebar-hover);
        transform: scale(1.05);
    }
    
    .mobile-menu-toggle i {
        font-size: 1.4rem;
    }
    
    header {
        padding: 12px 16px !important;
        padding-left: 76px !important; /* Make room for the fixed circular menu toggle button */
        display: flex;
        justify-content: flex-start !important;
        align-items: center;
        gap: 8px;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
    
    .content-body {
        padding: 16px !important;
    }
}

/* Área de Contenido Principal */
.main-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
    height: 100vh;
}

header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-body {
    padding: 32px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
}

/* Vistas */
.view-panel {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.view-panel.active {
    display: block;
}

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

/* --- COMPONENTES GLOBALES --- */

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    transition: var(--transition);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-secondary);
    background-color: var(--bg-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-primary:disabled {
    background-color: #93c5fd;
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    pointer-events: none;
}

.btn-secondary {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Insignias (Badges) */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-primary { background-color: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-success { background-color: var(--success-light); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background-color: var(--warning-light); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-danger { background-color: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.badge-info { background-color: var(--info-light); color: var(--info); border: 1px solid var(--info-border); }

/* --- SECCIÓN RESUMEN (DASHBOARD) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-content h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary { background-color: var(--primary-light); color: var(--primary); }
.stat-icon.warning { background-color: var(--warning-light); color: var(--warning); }
.stat-icon.success { background-color: var(--success-light); color: var(--success); }

/* Grilla de Actividad */
.activity-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

.panel-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.activity-item {
    display: flex;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-details {
    flex-grow: 1;
}

.activity-desc {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.activity-desc strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- GESTIÓN DE TICKETS --- */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.search-filter-group {
    display: flex;
    gap: 12px;
    flex-grow: 1;
    max-width: 600px;
}

.table-wrapper {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.enterprise-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.enterprise-table th {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.enterprise-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.enterprise-table tr:last-child td {
    border-bottom: none;
}

.enterprise-table tr:hover td {
    background-color: rgba(248, 250, 252, 0.6);
}

.ticket-title-cell {
    font-weight: 600;
    color: var(--text-primary);
}

.ticket-desc-muted {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.linked-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--primary);
    background-color: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.linked-badge:hover {
    background-color: var(--primary-border);
}

/* Acciones en la tabla */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--primary);
    background-color: var(--primary-light);
    border-color: var(--primary-border);
}

.btn-icon.btn-icon-danger:hover {
    color: var(--danger);
    background-color: var(--danger-light);
    border-color: var(--danger-border);
}

/* --- TABLERO KANBAN DE TAREAS --- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background-color: #f1f5f9;
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--border-color);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.kanban-column-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-task-count {
    background-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.kanban-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.kanban-card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: grab;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--text-muted);
}

.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 8px;
}

.kanban-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.kanban-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 10px;
}

.card-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.assignee-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* --- RECURSOS / EQUIPO --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.resource-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.resource-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.resource-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.resource-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 16px;
}

.resource-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 8px;
}

.resource-stat-item {
    text-align: center;
}

.resource-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.resource-stat-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- MODAL DIALOG --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-out;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 550px;
    box-shadow: var(--shadow-lg), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--bg-primary);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInUp {
    from { transform: translateY(100%) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.toast.success {
    border-left: 4px solid var(--success);
}
.toast.info {
    border-left: 4px solid var(--primary);
}
.toast.danger {
    border-left: 4px solid var(--danger);
}

/* Attachment Links styled as modern minimal chips */
a[href*="ver_adjunto/"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--primary) !important;
    padding: 4px 10px !important;
    border-radius: var(--radius-md) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    margin: 2px 4px !important;
    text-decoration: none !important;
    user-select: none !important;
    vertical-align: middle !important;
    transition: all 0.2s ease !important;
}

a[href*="ver_adjunto/"]:hover {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-border) !important;
    color: var(--primary-hover) !important;
    text-decoration: none !important;
}

/* Add a clip emoji indicator inside the chip */
a[href*="ver_adjunto/"]::before {
    content: "📎" !important;
    font-size: 0.9rem !important;
}

/* Attachment Chip spans (used inside modal detail views) */
.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    margin: 2px 4px;
    user-select: none;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.attachment-chip:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.attachment-chip i {
    color: var(--primary);
    font-size: 1rem;
}

/* Spinner animation for loading states */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
