/* ===========================
   Panel Juventud LLA — Identidad Partidaria
   La Libertad Avanza · Violeta + Dorado
   =========================== */

:root {
    /* === LLA Brand Colors === */
    /* Violeta principal (partido) */
    --lla-violet-50:  #f5f0ff;
    --lla-violet-100: #ede5ff;
    --lla-violet-200: #d4c1ff;
    --lla-violet-300: #b794f6;
    --lla-violet-400: #9b6deb;
    --lla-violet-500: #7c3aed;
    --lla-violet-600: #6d28d9;
    --lla-violet-700: #5b21b6;
    --lla-violet-800: #4c1d95;
    --lla-violet-900: #3b0d7e;
    --lla-violet-950: #2e0a63;
    
    /* Dorado acento (león del escudo) */
    --lla-gold-50:  #fffbeb;
    --lla-gold-100: #fef3c7;
    --lla-gold-200: #fde68a;
    --lla-gold-300: #fcd34d;
    --lla-gold-400: #fbbf24;
    --lla-gold-500: #f59e0b;
    --lla-gold-600: #d97706;
    --lla-gold-700: #b45309;
    
    /* === UI System === */
    --bg-body:    #0c0a12;
    --bg-card:    #13101c;
    --bg-sidebar: #0f0c18;
    --bg-hover:   #1a1525;
    --bg-input:   #161220;
    --bg-surface: #1e1830;
    
    --border-color:   #2a2240;
    --border-accent:  #3d2e6b;
    
    --text-primary:   #f4f0ff;
    --text-secondary: #b8b0cc;
    --text-muted:     #7a7294;
    --text-gold:      var(--lla-gold-400);
    
    --sidebar-width: 260px;
    
    /* Gradients */
    --grad-brand: linear-gradient(135deg, var(--lla-violet-700), var(--lla-violet-500));
    --grad-gold:  linear-gradient(135deg, var(--lla-gold-500), var(--lla-gold-300));
    --grad-glow:  linear-gradient(135deg, var(--lla-violet-800), var(--lla-violet-600));
}

/* ===========================
   Reset & Base
   =========================== */
* { box-sizing: border-box; }

body {
    background: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--lla-violet-300); }
a:hover { color: var(--lla-gold-400); }

::selection {
    background: var(--lla-violet-700);
    color: white;
}

/* ===========================
   Sidebar
   =========================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s ease;
}

/* Brand header — partido feel */
.sidebar-brand {
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--lla-violet-950)40, transparent);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--grad-brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--lla-gold-300);
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--lla-violet-800)60;
    border: 1px solid var(--lla-violet-600)40;
}

.brand-title {
    font-weight: 700;
    font-size: 1rem;
    display: block;
    color: white;
    letter-spacing: -0.01em;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--lla-gold-400);
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* === Scope Toggle === */
.scope-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background 0.15s;
    position: relative;
}

.scope-toggle:hover {
    background: var(--bg-hover);
}

.scope-label {
    font-size: 0.7rem;
    color: var(--lla-gold-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.scope-chevron {
    font-size: 0.55rem;
    color: var(--lla-gold-400);
    transition: transform 0.2s;
}

.scope-toggle.open .scope-chevron {
    transform: rotate(180deg);
}

.scope-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 10px;
    padding: 6px;
    z-index: 1100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    margin-top: 4px;
    min-width: 220px;
}

.scope-dropdown.show {
    display: block;
}

.scope-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.12s;
}

.scope-option:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.scope-option.active {
    background: var(--lla-violet-800)50;
    color: var(--lla-gold-300);
    font-weight: 600;
}

.scope-option.active::before {
    content: '✓';
    margin-right: 6px;
    font-size: 0.7rem;
}

.scope-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 4px;
}

.scope-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 4px 10px 2px;
    font-weight: 600;
}

.scope-localidades {
    max-height: 180px;
    overflow-y: auto;
}

.scope-localidad-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    margin: 2px;
    transition: all 0.12s;
}

.scope-localidad-chip:hover {
    background: var(--bg-hover);
    border-color: var(--lla-violet-500);
    color: var(--text-primary);
}

.scope-localidad-chip.active {
    background: var(--lla-violet-700)40;
    border-color: var(--lla-violet-500);
    color: var(--lla-gold-300);
    font-weight: 600;
}

/* Brand text needs relative positioning for dropdown */
.brand-text {
    position: relative;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--lla-violet-800)50, var(--lla-violet-700)25);
    color: var(--lla-gold-300);
    font-weight: 600;
    border: 1px solid var(--lla-violet-700)40;
}

.nav-item.active i {
    color: var(--lla-gold-400);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-divider {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lla-gold-600);
    padding: 1rem 0.85rem 0.4rem;
    font-weight: 700;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(0deg, var(--lla-violet-950)25, transparent);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--grad-brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--lla-gold-300);
    flex-shrink: 0;
    border: 1px solid var(--lla-violet-600)40;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    background: var(--lla-violet-700);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--lla-gold-300);
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
    color: white;
}
.user-details { overflow: hidden; }

/* Roles — cada uno con su color */
.badge-role {
    font-size: 0.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge-admin {
    background: linear-gradient(135deg, var(--lla-gold-500), var(--lla-gold-600));
    color: #1a1000;
}
.badge-coordinador {
    background: var(--lla-violet-600);
    color: white;
}
.badge-miembro {
    background: var(--lla-violet-800);
    color: var(--lla-violet-200);
}
.badge-colaborador {
    background: #164e63;
    color: #67e8f9;
}

/* Sidebar mobile */
.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1060;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--lla-gold-400);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1040;
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar.show ~ .sidebar-overlay { display: block; }
    .main-content { margin-left: 0; }
}

/* ===========================
   Main Content
   =========================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }
}

.page-header {
    margin-bottom: 1.75rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: white;
}

.page-header h1 i {
    color: var(--lla-gold-400);
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--lla-gold-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}

/* ===========================
   Stat Cards
   =========================== */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--lla-violet-600);
    box-shadow: 0 0 20px var(--lla-violet-800)20;
}

.stat-card.compact {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
    gap: 0.25rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bg-purple-soft {
    background: var(--lla-violet-700)25;
    color: var(--lla-violet-300);
}
.bg-warning-soft {
    background: var(--lla-gold-500)20;
    color: var(--lla-gold-400);
}
.bg-info-soft {
    background: #06b6d420;
    color: #22d3ee;
}
.bg-success-soft {
    background: #10b98120;
    color: #34d399;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    display: block;
    color: white;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: block;
    font-weight: 500;
}

/* ===========================
   Secretaría Cards — Tarjetas principales
   =========================== */
.sec-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.25s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sec-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-brand);
    opacity: 0;
    transition: opacity 0.25s;
}

.sec-card:hover {
    border-color: var(--lla-violet-600);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px var(--lla-violet-800)25;
    color: var(--text-primary);
}

.sec-card:hover::before {
    opacity: 1;
}

.sec-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.sec-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--lla-violet-700)20;
    color: var(--lla-violet-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--lla-violet-700)30;
}

.sec-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.sec-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.sec-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.sec-stats i { color: var(--lla-gold-500); }

.sec-aristas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.arista-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.55rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sec-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sec-progress .progress {
    flex: 1;
    background: var(--bg-surface);
    height: 4px;
    border-radius: 2px;
}

.sec-progress .progress-bar {
    background: var(--grad-brand) !important;
}

.sec-page-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: var(--lla-violet-700)20;
    color: var(--lla-violet-300);
    border: 1px solid var(--lla-violet-700)30;
}

/* ===========================
   Tareas — Task Cards
   =========================== */
.tareas-grid {
    display: grid;
    gap: 0.75rem;
}

.tarea-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.tarea-card:hover {
    border-color: var(--lla-violet-600);
    box-shadow: 0 4px 16px var(--lla-violet-900)20;
}

/* Priority borders — dorado para urgente */
.tarea-card.priority-urgente {
    border-left: 3px solid var(--lla-gold-400);
}
.tarea-card.priority-alta {
    border-left: 3px solid #ef4444;
}
.tarea-card.priority-media {
    border-left: 3px solid var(--lla-violet-500);
}
.tarea-card.priority-baja {
    border-left: 3px solid var(--text-muted);
}

.tarea-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.tarea-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: white;
}

.tarea-meta {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.tarea-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.tarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tarea-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tarea-actions {
    display: flex;
    gap: 0.35rem;
}

/* Status bar at bottom */
.tarea-status-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.tarea-status-bar.status-pendiente {
    background: var(--lla-gold-500);
}
.tarea-status-bar.status-en_progreso {
    background: linear-gradient(90deg, var(--lla-violet-500), #06b6d4);
}
.tarea-status-bar.status-completada {
    background: #10b981;
}

/* Priority badges — dorado para urgente */
.badge-priority-urgente {
    background: var(--lla-gold-500)30;
    color: var(--lla-gold-300);
    font-weight: 700;
}
.badge-priority-alta {
    background: #ef444430;
    color: #fca5a5;
}
.badge-priority-media {
    background: var(--lla-violet-700)30;
    color: var(--lla-violet-300);
}
.badge-priority-baja {
    background: #6b728030;
    color: #9ca3af;
}

/* ===========================
   Forms
   =========================== */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
}

.form-control, .form-select {
    background: var(--bg-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--lla-violet-500) !important;
    box-shadow: 0 0 0 0.2rem var(--lla-violet-700)35 !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.75rem;
}

.secretarias-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
}

.form-check-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    transition: border-color 0.2s;
}

.form-check-card:has(input:checked) {
    border-color: var(--lla-violet-500);
    background: var(--lla-violet-800)15;
}

.form-check-input:checked {
    background-color: var(--lla-violet-600) !important;
    border-color: var(--lla-violet-500) !important;
}

/* ===========================
   Activity Log
   =========================== */
.activity-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.activity-item:hover {
    background: var(--bg-hover);
}

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

.activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-user {
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 0.35rem;
    color: white;
}

.activity-detail {
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.activity-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.text-purple { color: var(--lla-violet-400) !important; }

/* ===========================
   Members
   =========================== */
.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.member-badge.coordinador {
    border-color: var(--lla-gold-600)50;
    background: var(--lla-gold-500)08;
}

.member-avatar {
    width: 28px;
    height: 28px;
    background: var(--grad-brand);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--lla-gold-300);
}

/* ===========================
   Tables — Dark LLA style
   =========================== */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: var(--bg-hover);
}

.table-dark thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--lla-gold-500);
    font-weight: 700;
    border-bottom: 2px solid var(--border-accent);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.table-dark td {
    color: var(--text-secondary);
    vertical-align: middle;
}

/* ===========================
   Buttons — LLA branded
   =========================== */
.btn-primary {
    background: var(--grad-brand);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--lla-violet-600), var(--lla-violet-400));
    box-shadow: 0 6px 20px var(--lla-violet-700)50;
    color: white;
}

.btn-purple {
    background: var(--lla-violet-700);
    color: white;
    border: none;
    border-radius: 10px;
}

.btn-purple:hover {
    background: var(--lla-violet-600);
    color: white;
}

.btn-outline-primary {
    border-color: var(--lla-violet-600);
    color: var(--lla-violet-300);
}

.btn-outline-primary:hover {
    background: var(--lla-violet-700);
    border-color: var(--lla-violet-500);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
    border-radius: 10px;
}

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

.btn-outline-success {
    border-color: #059669;
    color: #34d399;
}

.btn-outline-success:hover {
    background: #059669;
    color: white;
}

.btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-outline-light:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    color: white;
}

.badge.bg-purple-soft {
    background: var(--lla-violet-700)30 !important;
    color: var(--lla-violet-200) !important;
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--lla-violet-700);
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ===========================
   Login — Pantalla de ingreso LLA
   =========================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background:
        radial-gradient(ellipse at 30% 20%, var(--lla-violet-900)30, transparent 60%),
        radial-gradient(ellipse at 70% 80%, var(--lla-violet-950)25, transparent 50%),
        var(--bg-body);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 24px 64px rgba(0,0,0,0.4),
        0 0 80px var(--lla-violet-800)15;
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 72px;
    height: 72px;
    background: var(--grad-brand);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--lla-gold-300);
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px var(--lla-violet-800)50;
    border: 1px solid var(--lla-violet-500)30;
}

.login-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: white;
}

.login-brand p {
    color: var(--lla-gold-400) !important;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer small {
    color: var(--text-muted) !important;
    font-weight: 500;
}

/* ===========================
   Filter Bar
   =========================== */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.75rem 1rem;
}

/* ===========================
   Cards (Bootstrap override)
   =========================== */
.card.bg-dark {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    border-radius: 14px;
}

.card-header {
    background: var(--bg-surface) !important;
    border-color: var(--border-color) !important;
    border-radius: 14px 14px 0 0 !important;
}

.card-header h5 {
    color: white;
}

.card-header h5 i {
    color: var(--lla-gold-400);
}

/* ===========================
   Badge overrides
   =========================== */
.badge.bg-warning {
    background: var(--lla-gold-500) !important;
    color: #1a1000 !important;
    font-weight: 700;
}

.badge.bg-success { background: #059669 !important; }
.badge.bg-info { background: #0891b2 !important; }
.badge.bg-danger { background: #dc2626 !important; }

.badge.bg-dark {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color);
    color: var(--text-secondary) !important;
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--lla-violet-800);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--lla-violet-600);
}

/* ===========================
   Alerts
   =========================== */
.alert-success {
    background: #10b98118;
    border-color: #10b98140;
    color: #34d399;
    border-radius: 12px;
}

.alert-danger {
    background: #ef444418;
    border-color: #ef444440;
    color: #fca5a5;
    border-radius: 12px;
}

/* ===========================
   Toast Notifications
   =========================== */
.toast-container-fixed {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-notification {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid #10b981;
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: toast-in 0.3s ease;
    pointer-events: auto;
    max-width: 400px;
}

.toast-notification.hiding {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(1rem); }
}

/* ===========================
   Nav Badge (pending count)
   =========================== */
.nav-badge {
    background: var(--lla-gold-500);
    color: #1a1000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

/* ===========================
   Opacity helpers
   =========================== */
.opacity-60 { opacity: 0.6; }

/* ===========================
   Input group fixes
   =========================== */
.input-group-text {
    border-color: var(--border-color) !important;
}

/* ===========================
   Alert link
   =========================== */
.alert-link {
    color: inherit !important;
    font-weight: 600;
    text-decoration: underline;
}

/* ===========================
   WhatsApp link in tables
   =========================== */
td a.text-decoration-none {
    color: var(--text-secondary);
}
td a.text-decoration-none:hover {
    color: #25D366;
}

/* ===========================
   Utilities
   =========================== */
.text-gold { color: var(--lla-gold-400) !important; }

/* Gold accent line for h2 section titles */
.section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--lla-gold-400);
    border-radius: 2px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ===========================
   Bottom Navigation Bar (Mobile)
   =========================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 1055;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 6px 0;
    min-height: 48px;
    min-width: 48px;
    position: relative;
    transition: color 0.15s ease;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i {
    font-size: 1.4rem;
    line-height: 1;
}

.bottom-nav-item.active {
    color: var(--lla-gold-400);
}

.bottom-nav-item.active i {
    color: var(--lla-gold-400);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: var(--lla-gold-400);
    border-radius: 0 0 3px 3px;
}

.bottom-nav-item:hover,
.bottom-nav-item:active {
    color: var(--lla-violet-300);
    text-decoration: none;
}

.bottom-nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    background: var(--lla-gold-500);
    color: #1a1000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

/* ===========================
   Mobile-First Styles (< 992px)
   =========================== */
@media (max-width: 991.98px) {
    /* === Layout adjustments for bottom nav === */
    .main-content {
        margin-left: 0;
        padding: 1rem 0.75rem;
        padding-top: 1rem;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Hide old hamburger toggle — bottom nav replaces it */
    .sidebar-toggle {
        display: none !important;
    }

    /* === Touch targets: minimum 44px === */
    .btn {
        min-height: 44px;
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        min-height: 38px;
        font-size: 0.82rem;
    }

    .btn-lg {
        min-height: 52px;
        font-size: 1rem;
    }

    .nav-item {
        min-height: 44px;
        padding: 0.65rem 0.85rem;
    }

    .form-control, .form-select {
        min-height: 48px;
        font-size: 1rem !important;
    }

    .form-control-lg {
        min-height: 52px;
        font-size: 1.05rem !important;
    }

    /* === Task action buttons — bigger on mobile === */
    .tarea-actions .btn {
        min-height: 40px;
        min-width: 40px;
        padding: 0.4rem 0.65rem;
        font-size: 0.9rem;
    }

    .tarea-actions {
        gap: 0.5rem;
    }

    /* === Cards full-width on mobile === */
    .sec-card {
        border-radius: 12px;
    }

    /* Secretarías: force full-width */
    .row > .col-12.col-md-6.col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Stat cards — tighter */
    .stat-card {
        padding: 0.85rem;
        gap: 0.65rem;
        border-radius: 12px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        border-radius: 11px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    /* === Font sizes — legible on mobile === */
    .page-header h1 {
        font-size: 1.25rem;
    }

    .page-header p {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 0.8rem;
    }

    .tarea-title {
        font-size: 0.9rem;
    }

    .tarea-desc {
        font-size: 0.8rem;
    }

    .tarea-card {
        padding: 0.85rem 1rem;
        border-radius: 12px;
    }

    /* Task cards — ensure good touch space */
    .tarea-footer {
        gap: 0.75rem;
        padding-top: 0.5rem;
    }

    /* === Activity list — mobile friendly === */
    .activity-item {
        padding: 0.65rem 0.75rem;
    }

    .activity-detail {
        font-size: 0.78rem;
    }

    /* === Tables — responsive scroll === */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .table td, .table th {
        white-space: nowrap;
        padding: 0.65rem;
    }

    /* === Filter bar === */
    .filter-bar {
        padding: 0.65rem;
        border-radius: 12px;
    }

    .filter-bar .form-control,
    .filter-bar .form-select {
        min-height: 44px;
    }

    /* === Form card — less padding === */
    .form-card {
        padding: 1.25rem;
        border-radius: 14px;
    }

    /* === Cards (Bootstrap) === */
    .card.bg-dark {
        border-radius: 12px;
    }

    .card-body {
        padding: 0.85rem;
    }

    /* === Badges — slightly larger for touch === */
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.55rem;
    }

    .tarea-meta .badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.5rem;
    }

    /* === Alert on mobile === */
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem;
        border-radius: 12px;
    }

    /* === Toast — full width on mobile === */
    .toast-container-fixed {
        left: 0.5rem;
        right: 0.5rem;
        top: 0.5rem;
    }

    .toast-notification {
        max-width: 100%;
    }

    /* === Sidebar close button on mobile === */
    .sidebar-footer .btn {
        min-height: 44px;
    }

    /* === Empty state — compact === */
    .empty-state {
        padding: 2rem 0.75rem;
    }

    .empty-state i {
        font-size: 2.5rem;
    }

    /* === Secretarias checkboxes === */
    .secretarias-checkboxes {
        grid-template-columns: 1fr;
    }

    .form-check-card {
        padding: 0.85rem;
        min-height: 44px;
    }

    /* Progress bar in cards */
    .sec-progress {
        margin-bottom: 0;
    }

    /* === User info in sidebar === */
    .user-info {
        gap: 0.5rem;
    }

    /* === Quick action buttons on dashboard === */
    .d-flex.gap-2 .btn {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }
}

/* ===========================
   Login Mobile Optimization
   =========================== */
@media (max-width: 575.98px) {
    .login-container {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
        max-width: 100%;
    }

    .login-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        border-radius: 16px;
    }

    .login-brand h1 {
        font-size: 1.3rem;
    }

    .login-brand p {
        font-size: 0.75rem;
    }

    .login-brand {
        margin-bottom: 1.5rem;
    }

    .login-card .form-control-lg {
        min-height: 52px;
        font-size: 1rem !important;
        border-radius: 12px;
    }

    .login-card .btn-lg {
        min-height: 52px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .login-card .form-label {
        font-size: 0.75rem;
    }

    .login-footer {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }

    .login-card .mb-3 {
        margin-bottom: 0.85rem !important;
    }
}

/* ===========================
   Extra small screens (< 360px)
   =========================== */
@media (max-width: 359.98px) {
    .main-content {
        padding: 0.5rem;
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .stat-value {
        font-size: 1.15rem;
    }

    .bottom-nav-item i {
        font-size: 1.2rem;
    }

    .bottom-nav-item span {
        font-size: 0.58rem;
    }

    .page-header h1 {
        font-size: 1.1rem;
    }
}

/* ===========================
   PWA Standalone Mode Fixes
   =========================== */
@media all and (display-mode: standalone) {
    .main-content {
        padding-top: env(safe-area-inset-top, 1rem);
    }
}

/* ===========================
   FAB (Floating Action Button)
   =========================== */
.fab {
    position: fixed;
    bottom: calc(72px + 16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--grad-brand);
    color: var(--lla-gold-300);
    border: none;
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.fab:hover {
    background: linear-gradient(135deg, var(--lla-violet-600), var(--lla-violet-400));
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.6);
    transform: translateY(-1px);
    color: var(--lla-gold-300);
}

.fab:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.5);
}

/* Desktop FAB (larger) */
@media (min-width: 992px) {
    .fab {
        bottom: 24px;
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
}

/* ===========================
   Bottom Sheet (Create Task)
   =========================== */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    border-top: 1px solid var(--border-color);
    max-height: 90vh;
    z-index: 1060;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-header {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bottom-sheet-drag-handle {
    width: 32px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 2px;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}

.bottom-sheet-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.bottom-sheet-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-hover);
    color: var(--text-muted);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bottom-sheet-close:hover {
    background: var(--text-muted);
    color: white;
}

.bottom-sheet-body {
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1055;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Priority Chips */
.priority-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.priority-chip {
    padding: 0.6rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}

.priority-chip:hover {
    border-color: var(--lla-violet-500);
    background: var(--lla-violet-800)15;
}

.priority-chip.selected {
    border-color: var(--lla-violet-500);
    background: var(--lla-violet-700)25;
    color: var(--lla-violet-300);
}

.priority-chip.urgente.selected {
    border-color: var(--lla-gold-500);
    background: var(--lla-gold-500)20;
    color: var(--lla-gold-300);
}

.priority-chip.alta.selected {
    border-color: #ef4444;
    background: #ef444420;
    color: #fca5a5;
}

.priority-chip.baja.selected {
    border-color: #6b7280;
    background: #6b728020;
    color: #9ca3af;
}

/* Expandable section */
.expandable-section {
    margin-top: 1.5rem;
}

.expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
    -webkit-tap-highlight-color: transparent;
}

.expandable-header h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.expandable-header i {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.expandable-section.expanded .expandable-header i {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.expandable-section.expanded .expandable-content {
    max-height: 500px;
    opacity: 1;
}

/* ===========================
   Swipe Actions
   =========================== */
.swipe-container {
    position: relative;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.swipe-actions {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    display: flex;
    z-index: 1;
}

.swipe-action-left,
.swipe-action-right {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.swipe-action-left {
    background: #10b981; /* Verde completar */
}

.swipe-action-right {
    background: #06b6d4; /* Azul empezar */
}

.swipe-action-left:hover {
    background: #059669;
}

.swipe-action-right:hover {
    background: #0891b2;
}

.swipe-content {
    position: relative;
    background: var(--bg-card);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.swipe-content.swiping {
    transition: none;
}

.swipe-threshold {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 1.2rem;
    font-weight: 700;
    pointer-events: none;
}

.swipe-threshold-left {
    left: 20px;
    color: white;
}

.swipe-threshold-right {
    right: 20px;
    color: white;
}

.swipe-container.swipe-left-active .swipe-threshold-left,
.swipe-container.swipe-right-active .swipe-threshold-right {
    opacity: 1;
}

/* Disable swipe on desktop */
@media (min-width: 992px) {
    .swipe-container {
        overflow: visible;
        -webkit-user-select: auto;
        -moz-user-select: auto;
        -ms-user-select: auto;
        user-select: auto;
    }
    
    .swipe-actions {
        display: none;
    }
}

/* ===========================
   Pull to Refresh
   =========================== */
.pull-to-refresh {
    position: relative;
    overflow: hidden;
}

.pull-indicator {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    z-index: 10;
}

.pull-indicator-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.pull-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--lla-violet-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pull-to-refresh.pulling .pull-indicator {
    transform: translateY(60px);
}

.pull-to-refresh.refreshing .pull-indicator {
    transform: translateY(60px);
}

/* ===========================
   Skeleton Loading
   =========================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.skeleton-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    border-radius: 4px;
}

.skeleton-badge {
    height: 18px;
    width: 60px;
    border-radius: 8px;
    margin-left: auto;
}

.skeleton-text {
    height: 14px;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}

.skeleton-text.w-100 { width: 100%; }
.skeleton-text.w-75 { width: 75%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-25 { width: 25%; }

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.skeleton-info {
    height: 12px;
    width: 80px;
    border-radius: 3px;
}

.skeleton-button {
    height: 32px;
    width: 80px;
    border-radius: 6px;
}

/* ===========================
   Chips de filtro horizontales
   =========================== */
.filter-chips {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.filter-chip:hover {
    border-color: var(--lla-violet-500);
    background: var(--lla-violet-800)15;
}

.filter-chip.active {
    border-color: var(--lla-violet-500);
    background: var(--lla-violet-600);
    color: white;
}

/* ===========================
   Content Approval Flow
   =========================== */

/* Content type card highlight */
.tarea-card.tarea-contenido {
    border-left: 3px solid var(--bs-info) !important;
}

/* Approval section inside card */
.approval-section {
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

/* Approval badges */
.approval-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.approval-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.approval-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.approval-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Feedback display */
.approval-feedback {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.approval-feedback-success {
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid #22c55e;
    color: rgba(255, 255, 255, 0.85);
}

.approval-feedback-danger {
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
    color: rgba(255, 255, 255, 0.85);
}

/* Approval action buttons */
.approval-actions .approval-btn {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
}

/* Mobile: make buttons even bigger */
@media (max-width: 768px) {
    .approval-actions .approval-btn {
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
    }
    
    .approval-detail-actions .btn-lg {
        padding: 1.25rem;
        font-size: 1.2rem;
    }
}

/* Approval form container */
.approval-form-container {
    animation: slideDown 0.2s ease-out;
}

.approval-inline-form {
    padding: 0.75rem;
    background: var(--bg-surface);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

/* Content preview (expandable description) */
.contenido-preview {
    padding: 0.75rem 0;
}

.contenido-text {
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    white-space: pre-wrap;
}

.contenido-text.expanded {
    max-height: none;
}

/* Full content text (detail page) */
.contenido-full-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-wrap;
}

/* ===========================
   Onboarding Checklist
   =========================== */
.onboarding-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.onboarding-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.onboarding-item.completed {
    color: var(--text-primary);
}

.onboarding-item.completed span {
    text-decoration: line-through;
    opacity: 0.7;
}

/* ===========================
   Achievement Toast
   =========================== */
.achievement-toast {
    background: linear-gradient(135deg, #1a1000, #2a1800) !important;
    border: 1px solid var(--lla-gold-500) !important;
    border-left: 4px solid var(--lla-gold-400) !important;
    animation: achievementPulse 0.6s ease-out;
    text-align: center;
    padding: 1.25rem !important;
}

.achievement-toast .achievement-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.25rem;
}

.achievement-toast .achievement-title {
    color: var(--lla-gold-300);
    font-size: 1rem;
}

@keyframes achievementPulse {
    0% { transform: scale(0.8) translateY(-20px); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ===========================
   Guided Tour
   =========================== */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px var(--lla-violet-500), 0 0 20px rgba(124, 58, 237, 0.5) !important;
    border-radius: 12px;
}

.tour-tooltip {
    position: fixed;
    z-index: 10000;
    background: var(--bg-card);
    border: 1px solid var(--lla-violet-500);
    border-radius: 16px;
    padding: 1.25rem;
    max-width: 320px;
    width: calc(100vw - 24px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(124, 58, 237, 0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tour-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.tour-tooltip-step {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--lla-violet-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

.tour-tooltip-title {
    font-size: 1rem;
    font-weight: 800;
    color: white;
    margin: 0 0 0.35rem 0;
}

.tour-tooltip-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0 0 1rem 0;
}

.tour-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.tour-btn-skip {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
}

.tour-btn-skip:hover {
    color: var(--text-secondary);
}

.tour-btn-next {
    background: var(--lla-violet-600);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.tour-btn-next:hover {
    background: var(--lla-violet-500);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===========================
   Print styles
   =========================== */
@media print {
    .sidebar, .sidebar-toggle, .sidebar-overlay, .toast-container-fixed, .bottom-nav, .fab { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
    .btn { display: none !important; }
}
