@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- SISTEMA DE DISEÑO & VARIABLES --- */
:root {
    /* Colores base */
    --bg-main: #06070d;
    --bg-surface: #0e111a;
    --bg-surface-elevated: #161a26;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    /* Colores de marca y acentos (Glows neón) */
    --color-primary: #a855f7; /* Morado Violeta Neón */
    --color-primary-rgb: 168, 85, 247;
    --color-secondary: #06b6d4; /* Cian */
    --color-secondary-rgb: 6, 182, 212;
    --color-cyan: #00f5ff; /* Cian Neón */
    --color-cyan-rgb: 0, 245, 255;
    --color-yellow: #eab308; /* Amarillo */
    --color-yellow-rgb: 234, 179, 8;
    --color-red: #ef4444; /* Rojo */
    --color-red-rgb: 239, 68, 68;
    
    /* Estados de texto */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Tipografía */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Sombras y desenfoques */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 15px rgba(168, 85, 247, 0.35);
    --glow-secondary: 0 0 15px rgba(6, 182, 212, 0.35);
    --glow-cyan: 0 0 15px rgba(0, 245, 255, 0.35);
    
    /* Bordes y radios */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
}

/* --- RESET & ESTILOS BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- CONTENEDOR PRINCIPAL (LAYOUT) --- */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* --- SIDEBAR LATERAL --- */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.sidebar-logo img.logo-img {
    width: 32px;
    height: 32px;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

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

.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.08);
    border-color: rgba(var(--color-primary-rgb), 0.15);
    box-shadow: 0 4px 20px -5px rgba(var(--color-primary-rgb), 0.1);
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* --- CONTENIDO PRINCIPAL --- */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

/* --- HEADER SUPERIOR --- */
.header {
    height: var(--header-height);
    background-color: rgba(14, 17, 26, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
}

.header-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

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

/* --- USER SWITCHER (SIMULACIÓN DE ROLES) --- */
.user-selector {
    display: flex;
    align-items: center;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 30px;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.user-selector:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
}

.user-info {
    text-align: left;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.user-role {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-switcher-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 120;
    overflow: hidden;
    animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.dropdown-item.active {
    background-color: rgba(var(--color-primary-rgb), 0.05);
}

.dropdown-item.active .user-role {
    color: var(--color-primary);
}

/* --- BADGE DE NOTIFICACIONES --- */
.notification-bell {
    position: relative;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
}

.notification-bell:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: var(--color-red);
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

.notifications-panel {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 320px;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 120;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-panel.show {
    display: block;
}

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

.notifications-header h4 {
    font-size: 14px;
    font-weight: 700;
}

.notifications-header button {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}

.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.notification-item.unread {
    background-color: rgba(var(--color-primary-rgb), 0.03);
    border-left: 3px solid var(--color-primary);
}

.notification-text {
    font-size: 12.5px;
    color: var(--text-primary);
}

.notification-time {
    font-size: 10px;
    color: var(--text-muted);
}

.notification-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- VISTA CONTENEDORA (SPA) --- */
.view-container {
    flex: 1;
    padding: 32px;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DASHBOARD VISTA --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

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

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(var(--glow-color-rgb), 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-indicator {
    font-size: 11px;
    font-weight: 500;
}

/* Modificadores de color para KPIs */
.kpi-card.kpi-active { --glow-color-rgb: var(--color-cyan-rgb); }
.kpi-card.kpi-active .kpi-value { color: var(--color-cyan); }
.kpi-card.kpi-delivery { --glow-color-rgb: var(--color-primary-rgb); }
.kpi-card.kpi-delivery .kpi-value { color: var(--color-primary); }
.kpi-card.kpi-late { --glow-color-rgb: var(--color-red-rgb); }
.kpi-card.kpi-late .kpi-value { color: var(--color-red); }
.kpi-card.kpi-pending-team { --glow-color-rgb: var(--color-secondary-rgb); }
.kpi-card.kpi-pending-team .kpi-value { color: var(--color-secondary); }
.kpi-card.kpi-pending-client { --glow-color-rgb: var(--color-yellow-rgb); }
.kpi-card.kpi-pending-client .kpi-value { color: var(--color-yellow); }

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.dashboard-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
}

/* Lista de entregas */
.delivery-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.delivery-item:hover {
    border-color: var(--border-color-hover);
    background-color: rgba(255, 255, 255, 0.03);
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.proj-type-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.badge-lp { background-color: rgba(6, 182, 212, 0.1); color: var(--color-cyan); }
.badge-web { background-color: rgba(139, 92, 246, 0.1); color: var(--color-secondary); }
.badge-cr { background-color: rgba(57, 255, 20, 0.1); color: var(--color-primary); }
.badge-vid { background-color: rgba(234, 179, 8, 0.1); color: var(--color-yellow); }
.badge-custom { background-color: rgba(255, 255, 255, 0.05); color: var(--text-primary); }

.delivery-details h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.delivery-details p {
    font-size: 11.5px;
    color: var(--text-muted);
}

.delivery-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.days-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.days-badge.late { background-color: rgba(239, 68, 68, 0.1); color: var(--color-red); }
.days-badge.soon { background-color: rgba(234, 179, 8, 0.1); color: var(--color-yellow); }
.days-badge.ok { background-color: rgba(57, 255, 20, 0.1); color: var(--color-primary); }

/* Feed de Actividad */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 14px;
    position: relative;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 28px;
    bottom: -20px;
    width: 1px;
    background-color: var(--border-color);
}

.activity-item:last-child::before {
    display: none;
}

.activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 10;
}

.activity-details {
    flex: 1;
}

.activity-text {
    font-size: 12.5px;
    color: var(--text-primary);
    line-height: 1.4;
}

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

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

.activity-reason {
    font-size: 11.5px;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--color-yellow);
    padding: 6px 10px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 4px;
    font-style: italic;
}

/* --- SECCIÓN DE PROYECTOS --- */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    min-width: 240px;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px 10px 38px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: var(--glow-primary);
}

.select-filter {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.select-filter:focus {
    border-color: var(--color-primary);
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-sans);
    font-size: 13.5px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

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

.btn-primary:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    border-color: var(--border-color-hover);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border-color: rgba(239, 68, 68, 0.2);
}

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

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-lg);
}

.proj-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.proj-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.proj-card-client {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.prio-badge {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2.5px 8px;
    border-radius: 12px;
}

.prio-baja { background-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.prio-normal { background-color: rgba(6, 182, 212, 0.1); color: var(--color-cyan); }
.prio-alta { background-color: rgba(139, 92, 246, 0.1); color: var(--color-secondary); }
.prio-urgente { background-color: rgba(239, 68, 68, 0.1); color: var(--color-red); }

.proj-card-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 6px;
    background-color: var(--bg-surface-elevated);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-cyan));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.proj-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-item-val {
    font-size: 12.5px;
    font-weight: 500;
}

.state-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

/* Modificadores de estados generales */
.st-solicitud { background-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.st-info { background-color: rgba(234, 179, 8, 0.1); color: var(--color-yellow); }
.st-planificado { background-color: rgba(139, 92, 246, 0.1); color: var(--color-secondary); }
.st-proceso { background-color: rgba(6, 182, 212, 0.1); color: var(--color-cyan); }
.st-interna { background-color: rgba(139, 92, 246, 0.1); color: var(--color-secondary); }
.st-cliente { background-color: rgba(234, 179, 8, 0.1); color: var(--color-yellow); }
.st-cambios { background-color: rgba(239, 68, 68, 0.1); color: var(--color-red); }
.st-aprobado { background-color: rgba(57, 255, 20, 0.1); color: var(--color-primary); }
.st-publicado { background-color: rgba(57, 255, 20, 0.1); color: var(--color-primary); }
.st-completado { background-color: rgba(57, 255, 20, 0.15); color: var(--color-primary); box-shadow: var(--glow-primary); }
.st-pausado { background-color: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.st-cancelado { background-color: rgba(239, 68, 68, 0.1); color: var(--color-red); }

/* --- VISTA DETALLADA DEL PROYECTO --- */
.detail-header {
    margin-bottom: 24px;
}

.detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.detail-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    background: none;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.back-btn:hover {
    background-color: var(--bg-surface-elevated);
    border-color: var(--border-color-hover);
}

.detail-title-block h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.detail-title-block p {
    font-size: 13px;
    color: var(--text-muted);
}

.detail-actions {
    display: flex;
    gap: 12px;
}

.detail-grid-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

/* Línea de progreso de fases */
.phases-timeline-wrapper {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.phases-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 10px 0;
    overflow-x: auto;
}

.phases-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 20px;
    right: 20px;
    height: 4px;
    background-color: var(--bg-surface-elevated);
    z-index: 1;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 90px;
    z-index: 10;
    cursor: pointer;
    position: relative;
}

.timeline-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-surface-elevated);
    border: 3px solid var(--bg-surface);
    box-shadow: 0 0 0 2px var(--border-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.timeline-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    max-width: 110px;
    transition: var(--transition-smooth);
}

/* Modificadores de la línea de tiempo */
.timeline-step.active .timeline-node {
    background-color: var(--color-cyan);
    color: black;
    box-shadow: 0 0 0 2px var(--color-cyan), var(--glow-cyan);
}
.timeline-step.active .timeline-label {
    color: var(--color-cyan);
}

.timeline-step.completed .timeline-node {
    background-color: var(--color-primary);
    color: black;
    box-shadow: 0 0 0 2px var(--color-primary), var(--glow-primary);
}
.timeline-step.completed .timeline-label {
    color: var(--text-primary);
}

.timeline-step.blocked .timeline-node {
    background-color: var(--color-red);
    color: white;
    box-shadow: 0 0 0 2px var(--color-red);
}
.timeline-step.blocked .timeline-label {
    color: var(--color-red);
}

/* Grid del cuerpo del Detalle */
.detail-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* PESTAÑAS (TABS) EN EL DETALLE */
.detail-tabs-bar {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.detail-tab {
    padding: 10px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 13.5px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.detail-tab:hover {
    color: var(--text-primary);
}

.detail-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* TABLERO KANBAN DE FASE */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.kanban-column {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.kanban-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.kanban-col-title {
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kanban-col-count {
    background-color: var(--bg-surface-elevated);
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
}

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

.kanban-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: grab;
    transition: var(--transition-smooth);
}

.kanban-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.kanban-card-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.kanban-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: var(--text-muted);
}

/* PENDIENTES (TAREAS DUALES) */
.tasks-dual-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tasks-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.tasks-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.tasks-box-title {
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasks-box-title.team { color: var(--color-cyan); }
.tasks-box-title.client { color: var(--color-yellow); }

.task-list-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.task-item-row:hover {
    border-color: var(--border-color-hover);
}

.task-checkbox-wrapper {
    padding-top: 2px;
}

.task-checkbox-custom {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--text-muted);
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.task-checkbox-custom:checked {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
}

.task-checkbox-custom:checked::after {
    content: '✓';
    position: absolute;
    color: black;
    font-size: 11px;
    font-weight: 800;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-item-label {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.task-item-row.completed .task-item-label {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition-smooth);
}

.task-item-delete:hover {
    color: var(--color-red);
}

.add-task-form {
    margin-top: 14px;
    display: flex;
    gap: 8px;
}

.add-task-input {
    flex: 1;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 12.5px;
}

.add-task-input:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* GESTIÓN DE ARCHIVOS */
.files-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.file-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition-smooth);
    position: relative;
}

.file-card:hover {
    border-color: var(--border-color-hover);
    background-color: rgba(255, 255, 255, 0.02);
}

.file-icon-box {
    height: 48px;
    width: 48px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.file-info-box h6 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    word-break: break-all;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-info-box p {
    font-size: 10px;
    color: var(--text-muted);
}

.file-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 9px;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

.file-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.file-action-link {
    color: var(--color-cyan);
    text-decoration: none;
    font-size: 11.5px;
    font-weight: 600;
}

.file-version-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.03);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Conversión de Comentarios */
.comments-box {
    display: flex;
    flex-direction: column;
    height: 450px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.comments-header-panel {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 700;
}

.comments-list-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-row {
    display: flex;
    gap: 12px;
}

.comment-content {
    flex: 1;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
}

.comment-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-user {
    font-size: 12.5px;
    font-weight: 700;
}

.comment-time-ago {
    font-size: 10px;
    color: var(--text-muted);
}

.comment-text-body {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.45;
}

.mention-highlight {
    color: var(--color-primary);
    font-weight: 600;
    background-color: rgba(57, 255, 20, 0.08);
    padding: 1px 4px;
    border-radius: 3px;
}

.comment-composer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.comment-composer-input {
    flex: 1;
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
}

.comment-composer-input:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* Barra Lateral Derecha del Detalle de Proyecto */
.detail-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.date-logs-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.date-log-title {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 12px;
}

.date-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-log-entry {
    font-size: 11.5px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.date-log-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

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

/* --- VISTA DE CALENDARIO --- */
.calendar-layout {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
}

.calendar-header-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

.calendar-day-cell {
    min-height: 100px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition-smooth);
}

.calendar-day-cell:hover {
    border-color: var(--border-color-hover);
    background-color: rgba(255, 255, 255, 0.02);
}

.calendar-day-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.calendar-day-cell.current-month .calendar-day-number {
    color: var(--text-primary);
}

.calendar-day-cell.today {
    border-color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.02);
}

.calendar-day-cell.today .calendar-day-number {
    color: var(--color-primary);
}

.calendar-event {
    font-size: 9.5px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-inicio { background-color: rgba(6, 182, 212, 0.15); color: var(--color-cyan); }
.event-limite { background-color: rgba(239, 68, 68, 0.15); color: var(--color-red); }
.event-revision { background-color: rgba(234, 179, 8, 0.15); color: var(--color-yellow); }
.event-publicacion { background-color: rgba(139, 92, 246, 0.15); color: var(--color-secondary); }

/* --- VISTA DE REPORTES --- */
.reports-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reports-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.report-chart-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.report-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Gráficos simulados */
.bar-chart-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.bar-chart-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-chart-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.bar-chart-bg {
    height: 8px;
    background-color: var(--bg-surface-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.bar-chart-fill {
    height: 100%;
    border-radius: 4px;
}

/* Modales */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.25s cubic-bezier(0.4, 0, 0.2, 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: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 20px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
}

.form-control:focus {
    border-color: var(--color-primary);
    outline: none;
}

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

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

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

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* --- RESPONSIVIDAD (MOBILE FIRST) --- */
@media (max-width: 1024px) {
    .detail-main-layout {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 100%;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .view-container {
        padding: 16px;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
    .tasks-dual-layout {
        grid-template-columns: 1fr;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .user-name {
        display: none;
    }
}

/* --- ESTILOS ADICIONALES CREATIVOS BABEL --- */
.btn-company-tab {
    background: none;
    border: none;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-company-tab:hover {
    color: var(--text-primary);
}

.btn-company-tab.active {
    background-color: var(--color-primary);
    color: #000;
    box-shadow: var(--glow-primary);
}

.copy-body {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    color: var(--text-primary);
}

#blog-markdown-preview h3 {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 6px;
    margin-top: 20px;
    margin-bottom: 10px;
}

#blog-markdown-preview h4 {
    margin-top: 16px;
    margin-bottom: 8px;
}

#blog-markdown-preview h5 {
    margin-top: 12px;
    margin-bottom: 6px;
}

#blog-markdown-preview li {
    margin-left: 20px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.mention-highlight {
    color: var(--color-primary);
    font-weight: 600;
    background-color: rgba(168, 85, 247, 0.05);
    padding: 0 4px;
    border-radius: 3px;
}

/* --- BARRA DE NAVEGACIÓN MÓVIL (LIQUID GLASS) --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 480px;
    background: rgba(14, 17, 26, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 10px 16px;
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 6px 12px;
    border-radius: 20px;
}

.mobile-nav-item i {
    font-size: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.mobile-nav-item.active {
    color: var(--color-primary);
    background: rgba(168, 85, 247, 0.1);
    box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.1);
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
    color: var(--color-primary);
    filter: drop-shadow(0 0 5px rgba(168, 85, 247, 0.5));
}

/* --- MEDIA QUERIES PARA ADAPTACIÓN MÓVIL --- */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .sidebar {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        padding-bottom: 90px !important; /* Espacio para que la barra inferior no tape el contenido */
    }

    .header {
        padding: 0 16px !important;
    }

    .menu-toggle {
        display: none !important; /* Ya no necesitamos el menú hamburguesa */
    }

    .view-container {
        padding: 16px !important;
    }

    /* Optimización de Fases / Timeline */
    .phases-timeline {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 16px !important;
        padding: 10px 4px 15px 4px !important;
        justify-content: flex-start !important;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Ocultar scrollbar en Firefox */
    }
    
    .phases-timeline::-webkit-scrollbar {
        display: none; /* Ocultar scrollbar en Chrome/Safari */
    }

    .timeline-step {
        flex: 0 0 auto !important;
        width: 110px !important;
        scroll-snap-align: start;
    }

    /* Grillas a Una Columna */
    .projects-grid,
    .team-grid,
    .reports-kpi-row,
    .tasks-dual-layout {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .reports-kpi-row {
        display: flex;
        flex-direction: column;
    }

    /* Layout Unificado de Babel */
    .creatives-grid,
    .reels-list-wrapper {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .detail-header-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* Modales Estilo Bottom Sheet (iOS) */
    .modal-overlay {
        align-items: flex-end !important;
    }

    .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 24px 24px 0 0 !important;
        margin: 0 !important;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1) !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 24px 16px !important;
    }

    .modal-overlay.show .modal-box {
        transform: translateY(0) !important;
    }

    /* Calendario en Móvil */
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr) !important;
    }

    .calendar-day-cell {
        min-height: 55px !important;
        padding: 2px !important;
    }

    .calendar-event-texts-container {
        display: none !important;
    }

    .calendar-day-dots {
        display: flex !important;
    }

    /* Corrección de Barras de Pestañas en Móvil */
    .detail-tabs-bar {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 6px !important;
        scrollbar-width: none;
    }
    .detail-tabs-bar::-webkit-scrollbar {
        display: none;
    }
    .detail-tab {
        flex: 0 0 auto !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }

    /* Corrección de la Cabecera de Detalle en Móvil */
    .detail-header {
        padding: 16px !important;
        margin-bottom: 12px !important;
    }
    .detail-header-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .detail-title-group {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
    }
    .detail-title-block h2 {
        font-size: 18px !important;
    }
    .detail-header-actions {
        display: flex !important;
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    .detail-header-actions button, .detail-header-actions select {
        flex: 1 1 auto !important;
        font-size: 11.5px !important;
        padding: 6px 10px !important;
    }

    /* Ajuste Cabecera Creativos Babel Unificada en Móvil */
    .detail-header div[style*="justify-content:space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    .detail-header div[style*="display:flex; gap:8px"] {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
    }

    .detail-header select#babel-month-select {
        width: 100% !important;
    }

    .detail-header div[style*="background-color:var(--bg-surface-elevated)"] {
        width: 100% !important;
        justify-content: space-around !important;
    }

    /* Tarjetas de Posts de Babel */
    .creative-post-card {
        padding: 16px !important;
    }

    .creative-post-card div[style*="display:grid; grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .creative-post-card div[style*="display:flex; justify-content:space-between"] {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    /* Formularios de Posts y Reels en Babel */
    #babel-post-form, #babel-reel-form {
        gap: 10px !important;
    }

    /* Kanban e Items de Tareas */
    .kanban-column {
        min-height: auto !important;
        padding: 12px !important;
    }
    
    .kanban-item {
        padding: 10px !important;
    }

    /* Contenedor de Comentarios */
    .comment-row {
        padding: 10px !important;
    }

    .comment-composer {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .comment-composer-input {
        width: 100% !important;
    }

    .comment-composer button {
        width: 100% !important;
    }

    /* Ajustes generales del Dashboard */
    .stats-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .project-card {
        padding: 16px !important;
    }
}

/* --- ESTILOS DE INTERRUPTORES (TOGGLES NEÓN) --- */
.switch-container input:checked + .switch-slider {
    background-color: var(--color-cyan) !important;
    border-color: var(--color-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
}

.switch-container input:checked + .switch-slider::before {
    transform: translateX(16px) !important;
    background-color: #0e111a !important;
}

.switch-slider::before {
    content: "" !important;
    position: absolute !important;
    height: 12px !important;
    width: 12px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: var(--text-muted) !important;
    border-radius: 50% !important;
    transition: .3s !important;
}
