/* CSS Variables - Premium Palette & Design System */
:root {
    --bg-main: #07060B;
    --bg-card: rgba(13, 10, 15, 0.7);
    --bg-card-hover: rgba(25, 15, 20, 0.8);
    --border-color: rgba(255, 43, 71, 0.15);
    --border-glow: rgba(255, 43, 71, 0.35);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FF2B47 0%, #FF7A33 100%);
    --gradient-secondary: linear-gradient(135deg, #1e0508 0%, #0a0102 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(255, 43, 71, 0.15) 0%, rgba(0, 0, 0, 0) 70%);

    /* Colors */
    --color-primary: #FF2B47;
    --color-secondary: #FF7A33;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    
    /* Text */
    --text-primary: #F1ECF4;
    --text-secondary: #ffbba1;
    --text-muted: #8c7379;
    
    /* Transition */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Base resets & theme settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* Background glowing blur effect */
.bg-gradient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    background: var(--gradient-glow);
    z-index: -1;
    pointer-events: none;
    filter: blur(100px);
}

/* Glassmorphism utility */
.glassmorphism {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

.glassmorphism:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Navbar styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    margin: 1.5rem auto;
    max-width: 1400px;
    width: 95%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-chef {
    background: var(--gradient-primary);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(255, 43, 71, 0.4);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 300;
    display: block;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 43, 71, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 43, 71, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

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

/* Layout container */
.main-container {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Workflow steps timeline */
.workflow-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    gap: 1rem;
}

.timeline-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
    flex: 1;
}

.timeline-step:hover {
    background: rgba(255, 255, 255, 0.03);
}

.timeline-step.active {
    background: rgba(255, 43, 71, 0.08);
    border: 1px solid rgba(255, 43, 71, 0.2);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.timeline-step.active .step-num {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 10px rgba(255, 43, 71, 0.4);
}

.step-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.step-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.timeline-divider {
    height: 1px;
    background: var(--border-color);
    flex: 0.5;
}

/* Bento Grid Layout (Controller + CV Profile) */
.bento-grid {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.grid-span-4 { flex: 1; }
.grid-span-5 { flex: 1; }
.grid-span-3 { flex: 1; }

.left-column-wrapper {
    flex: 0 0 288px !important;
    max-width: 288px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: auto;
    min-height: 0;
}

.workspace-modal .left-column-wrapper .cv-hero-card {
    padding: 0.65rem 0.75rem !important;
    gap: 0.35rem !important;
}

.workspace-modal .cv-hero-card.collapsed {
    padding: 0.5rem 0.65rem !important;
    gap: 0.15rem !important;
}

.workspace-modal .cv-hero-card .clickable-header {
    gap: 0.5rem;
    align-items: flex-start !important;
}

.workspace-modal .cv-hero-card .cv-hero-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.workspace-modal .cv-hero-avatar-frame .cv-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
    border-radius: 12px;
}

.workspace-modal .cv-hero-card .cv-hero-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-right: 0.2rem;
}

.workspace-modal .cv-hero-card .cv-agent-name {
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
    line-height: 1.2;
    font-size: 0.95rem;
    white-space: normal;
}

.workspace-modal .cv-hero-card .cv-agent-role {
    overflow-wrap: normal;
    word-break: normal;
    line-height: 1.25;
    font-size: 0.7rem;
}

.workspace-modal .cv-hero-card .clickable-header .collapse-icon {
    flex-shrink: 0;
    margin-top: 0.35rem;
}

.workspace-modal .left-column-wrapper .cv-card {
    padding: 0.65rem !important;
}

.workspace-modal .left-column-wrapper #agent-model-card {
    padding: 0.65rem !important;
}

.workspace-modal .left-scrollable {
    gap: 0.65rem;
    padding-right: 0.25rem;
    overflow-y: auto;
    max-height: calc(100vh - 7.5rem);
}

.controller-card {
    flex: none;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
}

/* GNIA Status Mini Card */
.gnia-status-card {
    padding: 0.5rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px;
    height: 48px;
    flex-shrink: 0;
}

.gnia-status-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gnia-status-logo .status-icon {
    color: var(--color-primary);
    font-size: 0.85rem;
    background: rgba(255, 43, 71, 0.1);
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.gnia-status-logo .status-title {
    font-weight: 700;
    font-size: 0.85rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

.gnia-status-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.gnia-status-actions .badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    border-radius: 6px;
}

.gnia-status-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    border-radius: 6px;
}

/* Agent CV Wrapper — replaces right-column-wrapper */
.agent-cv-wrapper {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow: visible;
    height: auto;
    padding-right: 0.25rem;
}

#cv-panel-control {
    flex: 0 0 auto;
    overflow: visible;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    align-items: start;
}

.agent-results-zone {
    flex: 0 0 auto;
    width: 100%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.agent-results-zone .result-panel-hidden {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: none !important;
    box-shadow: none !important;
}

.agent-results-zone > [id$="-results-container"].result-panel-visible,
.agent-results-zone > #banner-design-results-container.result-panel-visible,
.agent-results-zone > #analytics-workspace-container.result-panel-visible,
.agent-results-zone > #cv-results-section.result-panel-visible {
    flex-shrink: 0;
    overflow: visible;
    width: 100%;
}

/* --- Acceso rápido a agentes (galería compacta) --- */
.cv-right-column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    align-self: start;
}

.agent-quick-access {
    flex: 0 0 auto;
    width: 100%;
    padding: 0.5rem 0.6rem 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 43, 71, 0.18);
    background: rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: padding 0.25s ease, border-color 0.25s ease;
}

.agent-quick-access--slot-right:not(.expanded) .aqa-viewport {
    max-height: 68px;
    overflow: hidden;
}

.agent-quick-access--slot-right.expanded .aqa-viewport {
    max-height: none;
    overflow: visible;
}

.agent-quick-access.hidden {
    display: none !important;
}

.aqa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.5rem;
}

.aqa-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fda4af;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.aqa-title i {
    color: #fb7185;
    font-size: 0.65rem;
}

.aqa-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}

.aqa-scroll-btn,
.aqa-expand-btn {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
}

.aqa-scroll-btn:hover:not(:disabled),
.aqa-expand-btn:hover {
    background: rgba(255, 43, 71, 0.12);
    border-color: rgba(255, 43, 71, 0.35);
    color: #fecdd3;
}

.aqa-scroll-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.agent-quick-access.expanded .aqa-scroll-btn {
    display: none;
}

.aqa-viewport {
    width: 100%;
    min-width: 0;
}

.aqa-track {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.05rem 0.02rem 0.15rem;
}

.aqa-track::-webkit-scrollbar {
    display: none;
}

.agent-quick-access.expanded .aqa-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 0.4rem;
    overflow: visible;
    max-height: none;
}

.aqa-card {
    flex: 0 0 auto;
    width: 76px;
    min-height: 62px;
    padding: 0.35rem 0.3rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.agent-quick-access.expanded .aqa-card {
    width: auto;
}

.aqa-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 43, 71, 0.35);
    background: rgba(255, 43, 71, 0.08);
}

.aqa-card.active {
    border-color: rgba(251, 113, 133, 0.65);
    background: rgba(255, 43, 71, 0.14);
    box-shadow: 0 0 0 1px rgba(255, 43, 71, 0.2), 0 6px 18px rgba(255, 43, 71, 0.12);
}

.aqa-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aqa-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.aqa-card-fallback {
    display: none;
    font-size: 0.82rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.aqa-card-avatar.no-image .aqa-card-fallback {
    display: flex;
}

.aqa-card-name {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.15;
    color: #cbd5e1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.aqa-card.active .aqa-card-name {
    color: #fff1f2;
}

.agent-results-zone > [id$="-results-container"],
.agent-results-zone > #cv-results-section {
    flex-shrink: 0;
    overflow: visible;
    width: 100%;
}

/* Grillas semanales: ancho fijo al contenedor, altura según contenido */
.junior-weeks-grid,
[id$="-weeks-grid"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
    overflow: visible;
}

@media (max-width: 1100px) {
    .junior-weeks-grid,
    [id$="-weeks-grid"] {
        grid-template-columns: 1fr;
    }
}

.workspace-modal #cv-panel-control {
    gap: 1rem;
}

.workspace-modal .bento-grid {
    gap: 1rem;
}

.bento-item {
    display: flex;
    flex-direction: column;
    height: 680px;
    overflow: hidden;
    position: relative;
    transition: var(--transition-smooth);
}

/* Fullscreen expansion overlays */
.bento-item.fullscreen-active {
    position: fixed !important;
    top: 1.5rem !important;
    left: 1.5rem !important;
    right: 1.5rem !important;
    bottom: 1.5rem !important;
    width: calc(100vw - 3rem) !important;
    height: calc(100vh - 3rem) !important;
    z-index: 9999 !important;
    background: rgba(15, 5, 5, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 43, 71, 0.45) !important;
}

/* Fullscreen header button adjustment */
.btn-fullscreen {
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-fullscreen:hover {
    color: var(--color-primary);
    background: rgba(255, 43, 71, 0.08);
    border-color: rgba(255, 43, 71, 0.3);
}

/* Card Header & Body */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

textarea, input[type="text"], input[type="password"], input[type="number"] {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-smooth);
    resize: none;
}

textarea:focus, input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(255, 43, 71, 0.2);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label {
    cursor: pointer;
}

/* Console Box */
.console-box {
    margin-top: auto;
    background: #040508;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 180px;
}

.console-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 0.8rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

.console-body {
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #ffbba1;
    overflow-y: auto;
    flex: 1;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* Workspace / Editor Tabs */
.editor-body {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.editor-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
}

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

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.01);
}

.editor-container {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
}

#file-textarea {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1.5rem;
    overflow-y: auto;
    resize: none;
    line-height: 1.6;
}

#file-textarea:disabled {
    color: var(--text-muted);
}

/* Markdown Preview Area */
.markdown-preview {
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
    flex: 1;
}

.markdown-preview h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.markdown-preview h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.markdown-preview h3 {
    font-size: 1.1rem;
    margin-top: 1.2rem;
}

.markdown-preview p {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.markdown-preview strong {
    color: white;
}

.markdown-preview code {
    background: rgba(255, 255, 255, 0.07);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.markdown-preview pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-preview pre code {
    background: transparent;
    padding: 0;
}

.markdown-preview li {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* File Hub Card styles */
.filehub-body {
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.category-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-header {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.3rem;
    margin-bottom: 0.2rem;
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.file-item {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.file-item.active {
    background: rgba(255, 43, 71, 0.08);
    border-color: rgba(255, 43, 71, 0.3);
    color: white;
}

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

/* Sub-categories for pieces folder */
.sub-category-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-left: 0.5rem;
}

.sub-category {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255,255,255,0.02);
}

.sub-category span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.sub-category.expanded ul {
    display: flex;
    margin-top: 0.3rem;
    padding-left: 1rem;
}

.sub-category ul {
    display: none;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    animation: zoomIn 0.3s ease;
}

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

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

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.close-btn:hover {
    color: white;
}

.hidden {
    display: none !important;
}

.pulse-glow {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.file-label {
    background: rgba(255,255,255,0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--color-primary);
}

.info-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Custom Scrollbar for premium visual finish */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   PREMIUM CONTENT CARDS SYSTEM — Card Grid Layout
   ========================================================================== */

/* Table Toolbar (Expand/Collapse controls) */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 1rem 0;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.table-summary-info {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.table-summary-info i {
    color: var(--color-primary);
    font-size: 1rem;
}

.toolbar-actions {
    display: flex;
    gap: 0.6rem;
}

/* ---- Card Grid Container ---- */
.ideas-card-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 0 2rem 0;
}

/* ---- Individual Idea Card ---- */
.idea-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0;
    background: rgba(10, 12, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.idea-card:hover {
    border-color: rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
    background: rgba(13, 16, 28, 0.7);
}

/* Card number sidebar */
.idea-card-number {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 1.2rem;
    background: rgba(6, 182, 212, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.idea-card-number .card-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

/* Card main content area */
.idea-card-content {
    padding: 1rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

/* Card top row: metadata badges */
.idea-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* Checkbox in card */
.idea-card-meta .idea-select-chk {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Segment badge */
.card-segment {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.card-segment i {
    font-size: 0.6rem;
}

/* Format badge */
.card-format {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.card-format-video {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.card-format-carrusel {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.card-format-infography {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.card-format-historia {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.card-format-default {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Function + Plan */
.card-function {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #e2e8f0;
    font-weight: 500;
}

.card-plan-pill {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 0.15rem;
}

.card-plan-flash {
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.card-plan-pro {
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

.card-plan-gold {
    background: rgba(234, 179, 8, 0.12);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.card-plan-elite {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.card-plan-enterprise {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.card-plan-default {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Hook Section ---- */
.card-hook-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.card-hook-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(245, 158, 11, 0.12) 100%);
    color: #f87171;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    letter-spacing: 0.04em;
}

.card-hook-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.45;
}

/* ---- Enfoque Section (Accordion) ---- */
.card-enfoque-section {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    padding-top: 0.7rem;
    margin-top: 0.1rem;
    animation: fadeInAccordion 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.idea-card.expanded .card-enfoque-section {
    display: flex;
}

.card-enfoque-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
    color: #22d3ee;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    letter-spacing: 0.04em;
}

.card-enfoque-text {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* ---- Toggle Button ---- */
.card-toggle-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    align-self: flex-start;
    transition: var(--transition-smooth);
}

.card-toggle-btn:hover {
    background: rgba(6, 182, 212, 0.08);
    color: var(--color-primary);
    border-color: rgba(6, 182, 212, 0.25);
}

.idea-card.expanded .card-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: white;
}

.card-toggle-btn i {
    transition: transform 0.2s ease;
    font-size: 0.6rem;
}

.idea-card.expanded .card-toggle-btn i {
    transform: rotate(180deg);
}

/* ==========================================================================
   TABLE FULLSCREEN VIEW
   ========================================================================== */

.table-wrapper.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #06070a;
    margin: 0;
    padding: 1.5rem 3rem 3rem 3rem;
    border-radius: 0;
    overflow-y: auto;
    border: none;
    box-shadow: none;
    animation: zoomInFullScreen 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomInFullScreen {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.table-wrapper.fullscreen::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrapper.fullscreen .table-toolbar {
    max-width: 1100px;
    margin: 0 auto 1rem auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.table-wrapper.fullscreen .ideas-card-grid {
    max-width: 1100px;
    margin: 0 auto;
}

.table-wrapper.fullscreen .idea-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Checkbox hover effects */
.idea-select-chk:hover {
    transform: scale(1.15);
}

/* ---- Legacy table fallback (non-ideas tables) ---- */
.table-container {
    overflow-x: auto;
    margin: 0.5rem 0 2rem 0;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.glassmorphism-table {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 12, 22, 0.4);
    backdrop-filter: blur(8px);
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    font-size: 0.825rem;
    color: var(--text-primary);
}

.premium-table th {
    background: rgba(13, 17, 30, 0.95);
    color: var(--color-primary);
    font-weight: 600;
    padding: 1rem 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.premium-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
    line-height: 1.5;
}

.premium-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.01);
}

.premium-table tr:hover td {
    background: rgba(6, 182, 212, 0.03);
}

/* Select All header checkbox */
#select-all-ideas-chk {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

/* Junior Agents Selector styles */
.junior-selector-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.6rem;
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.junior-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
}

.junior-chk-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    user-select: none;
}

.junior-chk-label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.junior-chk-label input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.junior-chk-label.select-all-label {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.2);
    font-weight: 500;
}

.junior-chk-label.select-all-label:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
}

.junior-chk-label input[type="checkbox"]:checked + span {
    color: var(--text-primary);
}

/* Notion-Style Agent Canvas Layout */
.agent-canvas-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--text-primary);
    overflow-y: auto;
    padding-bottom: 2rem;
}

.notion-cover {
    height: 120px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.notion-profile-header {
    padding: 0 1.5rem;
    margin-top: -40px;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.notion-emoji-icon {
    font-size: 3.5rem;
    width: 80px;
    height: 80px;
    background: #0f1322;
    border: 3px solid #1e293b;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.75rem;
}

.notion-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.notion-subtitle {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.notion-sub-selector {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.notion-sub-selector:hover {
    border-color: var(--color-primary);
    background: rgba(30, 41, 59, 0.9);
}

.notion-properties-table {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.notion-property-row {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    flex: 1 1 240px;
}

.notion-property-name {
    width: 140px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.notion-property-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.notion-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.notion-tag {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: default;
}

/* Colors for Notion tags */
.tag-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-green { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.tag-yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-gray { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.1); }

.btn-add-tag {
    background: transparent;
    border: 1px dashed var(--text-muted);
    color: var(--text-muted);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-add-tag:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(6, 182, 212, 0.05);
}

.notion-divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0;
}

.notion-editor-area {
    padding: 0 1.5rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.notion-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#agent-canvas-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1rem;
    font-family: var(--font-sans);
    font-size: 0.925rem;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    transition: var(--transition-smooth);
}

#agent-canvas-textarea:focus {
    border-color: var(--color-primary);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

.canvas-save-status, .cv-save-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================================================
   AGENT CV / RESUME PROFILE DESIGN SYSTEM
   ========================================================================== */

/* ---- HERO CARD ---- */
.cv-hero-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.cv-hero-card.collapsed {
    min-height: 0;
    padding: 0.55rem 0.75rem;
    gap: 0.2rem;
}

.cv-hero-card .clickable-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 0.5rem;
}

.cv-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 43, 71, 0.06) 0%, rgba(255, 122, 51, 0.06) 50%, rgba(255, 43, 71, 0.04) 100%);
    pointer-events: none;
    z-index: 0;
}

.cv-hero-avatar-frame {
    flex-shrink: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    padding-top: 0.25rem;
}

.cv-avatar {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    background: linear-gradient(135deg, #1e0508 0%, #0a0102 100%);
    border: 3px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 43, 71, 0.08);
    transition: var(--transition-smooth);
}

.cv-avatar:hover {
    border-color: rgba(255, 43, 71, 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 43, 71, 0.15);
    transform: scale(1.03);
}

.cv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 19px;
}

.cv-hero-content {
    flex: 1;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cv-agent-name {
    font-size: 1.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.cv-agent-role {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.cv-agent-bio {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.55;
    margin-top: 0.2rem;
    max-width: 600px;
}

.cv-interests-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.cv-interests-label {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.cv-interests-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cv-interest-tag {
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: default;
    transition: var(--transition-smooth);
}

.cv-interest-tag:hover {
    transform: translateY(-1px);
}

.cv-interest-tag .fa-xmark {
    cursor: pointer;
    opacity: 0.5;
    font-size: 0.6rem;
    margin-left: 4px;
    transition: opacity 0.2s;
}

.cv-interest-tag .fa-xmark:hover {
    opacity: 1;
}

/* ---- BENTO ROW ---- */
.cv-bento-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* ---- CV CARD (Skills / Outputs) ---- */
.cv-card {
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-smooth);
    position: relative;
}

.cv-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.cv-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.cv-card-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.cv-card-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cv-badge-active {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.cv-badge-results {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.cv-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-bullet-list li {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.35rem 0;
    padding-left: 0.75rem;
    position: relative;
    line-height: 1.4;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cv-bullet-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

.cv-bullet-list li .fa-xmark {
    cursor: pointer;
    opacity: 0;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: opacity 0.2s;
    padding: 4px;
}

.cv-bullet-list li:hover .fa-xmark {
    opacity: 0.7;
}

.cv-bullet-list li .fa-xmark:hover {
    opacity: 1;
    color: var(--color-danger);
}

.cv-add-btn {
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* ---- TOOLS ROW ---- */
.cv-tools-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.5rem;
    border-radius: 16px;
    flex-wrap: wrap;
}

.cv-tools-label-box {
    flex-shrink: 0;
}

.cv-tools-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.cv-tools-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.cv-tools-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

/* Knowledge Base Badges (like the colored app icons in the reference) */
.cv-kb-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: default;
    transition: var(--transition-smooth);
}

.cv-kb-badge:hover {
    transform: translateY(-1px);
}

.cv-kb-badge .fa-xmark {
    cursor: pointer;
    opacity: 0.4;
    font-size: 0.6rem;
    margin-left: 3px;
    transition: opacity 0.2s;
}

.cv-kb-badge .fa-xmark:hover {
    opacity: 1;
}

/* Tool Chip Buttons (System Prompt, Canvas, Results) */
.cv-tool-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.cv-tool-chip:hover {
    background: rgba(6, 182, 212, 0.08);
    border-color: rgba(6, 182, 212, 0.25);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.cv-tool-chip.active {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.35);
    color: var(--color-primary);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.1);
}

.cv-tool-chip-accent {
    background: rgba(139, 92, 246, 0.06);
    border-color: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.cv-tool-chip-accent:hover {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
}

/* ---- EXPANDABLE SECTIONS ---- */
.cv-expand-section {
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: cvSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
}

@keyframes cvSlideIn {
    from { opacity: 0; transform: translateY(-8px); max-height: 0; }
    to { opacity: 1; transform: translateY(0); max-height: 2000px; }
}

.cv-expand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-expand-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-expand-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.cv-expand-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: italic;
}

/* Prompt Editor */
.cv-prompt-editor-wrap {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.3);
    flex: 1;
    min-height: 250px;
}

.cv-prompt-editor-wrap textarea {
    width: 100%;
    min-height: 250px;
    resize: vertical;
    background: transparent;
    border: none;
    padding: 1rem;
    color: #cbd5e1;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    outline: none;
}

/* Canvas Editor */
.cv-canvas-editor-wrap {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.3);
    flex: 1;
    min-height: 150px;
}

.cv-canvas-editor-wrap textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    background: transparent;
    border: none;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.6;
    outline: none;
}

.cv-canvas-editor-wrap textarea:focus,
.cv-prompt-editor-wrap textarea:focus {
    box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.2);
}

/* Results Section */
.cv-results-body {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    min-height: 400px;
    height: 60vh;
    max-height: 800px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.cv-results-history {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.4);
    padding: 0.6rem;
}

.cv-results-history-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cv-results-history-scroll {
    flex: 1;
    overflow-y: auto;
}

.cv-results-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.2);
    min-width: 0;
}

.cv-editor-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.cv-editor-content textarea {
    width: 100%;
    height: 100%;
    min-height: 250px;
    resize: none;
    background: transparent;
    border: none;
    padding: 0.8rem;
    color: #cbd5e1;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.4;
    outline: none;
}

.cv-editor-content .markdown-preview {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    padding: 0.8rem;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 0.8rem;
}

/* ---- FOOTER BAR ---- */
.cv-footer-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    flex-wrap: wrap;
}

.cv-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.cv-footer-item i {
    font-size: 0.65rem;
}

/* ---- FULLSCREEN SUPPORT FOR CV SECTIONS ---- */
.cv-expand-section.fullscreen-active {
    position: fixed !important;
    top: 1.5rem !important;
    left: 1.5rem !important;
    right: 1.5rem !important;
    bottom: 1.5rem !important;
    width: calc(100vw - 3rem) !important;
    height: calc(100vh - 3rem) !important;
    max-height: none !important;
    z-index: 9999 !important;
    background: rgba(10, 12, 22, 0.98) !important;
    backdrop-filter: blur(25px) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.workspace-modal.fullscreen-active {
    padding: 0 !important;
}

.workspace-modal-content.fullscreen-active {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.expand-workspace-btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(255, 43, 71, 0.05);
    border: 1px solid rgba(255, 43, 71, 0.2);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
    margin-right: 0.5rem;
}
.expand-workspace-btn:hover {
    background: rgba(255, 43, 71, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 43, 71, 0.15);
}
.expand-workspace-btn:active {
    transform: translateY(0);
}

.cv-expand-section.fullscreen-active .cv-results-body {
    max-height: none;
    height: calc(100% - 60px);
}

.cv-expand-section.fullscreen-active .cv-prompt-editor-wrap,
.cv-expand-section.fullscreen-active .cv-canvas-editor-wrap {
    flex: 1;
    min-height: 0;
}

.cv-expand-section.fullscreen-active .cv-prompt-editor-wrap textarea,
.cv-expand-section.fullscreen-active .cv-canvas-editor-wrap textarea {
    min-height: 0;
    height: 100%;
}

.cv-expand-section.fullscreen-active .cv-image-feedback-body {
    max-height: none !important;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* =============================================
   JUNIOR AGENT CARDS (Step 3 - Workspace Entry)
   ============================================= */

.junior-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.junior-agent-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.7rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.junior-agent-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.0) 0%, rgba(139, 92, 246, 0.0) 100%);
    transition: background 0.3s ease;
    z-index: 0;
}

.junior-agent-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.12);
}

.junior-agent-card:hover::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.junior-agent-card.viewing {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.08);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.15), inset 0 0 30px rgba(6, 182, 212, 0.03);
}

.junior-agent-card.viewing::before {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(139, 92, 246, 0.06) 100%);
}

.junior-agent-card.viewing .junior-card-enter-btn {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border-color: rgba(6, 182, 212, 0.4);
}

.junior-card-avatar {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(139, 92, 246, 0.15);
    border: 2px solid rgba(139, 92, 246, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.junior-agent-card.viewing .junior-card-avatar {
    border-color: rgba(6, 182, 212, 0.5);
}

.junior-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.junior-card-info {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.junior-card-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.junior-card-role {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.junior-card-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.junior-card-chk {
    width: 15px;
    height: 15px;
    accent-color: #06b6d4;
    cursor: pointer;
}

.junior-card-enter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.junior-card-enter-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border-color: rgba(6, 182, 212, 0.3);
    transform: scale(1.1);
}

.junior-select-all-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.5rem;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.junior-select-all-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
}

.junior-select-all-row label input[type="checkbox"] {
    accent-color: #06b6d4;
    width: 14px;
    height: 14px;
}

.junior-viewing-indicator {
    font-size: 0.65rem;
    color: #22d3ee;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.junior-viewing-indicator.visible {
    opacity: 1;
}

/* =============================================
   ESTILOS TEMÁTICOS HABBO HOTEL & VIRTUAL OFFICE
   ============================================= */

/* Carga de la fuente retro para elementos específicos */
.habbo-isometric-scene,
.habbo-bubble,
.office-map-logo,
.habbo-desk-label,
.junior-agent-desk-pc,
.habbo-console-header {
    font-family: 'VT323', monospace;
}

.habbo-isometric-scene {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 1.5rem;
    border: none;
    outline: none;
    box-shadow: none;
    background: #0d0f1a;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.office-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.office-map-logo {
    font-size: 1.8rem;
    color: #06b6d4;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.05em;
}

.office-map-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
}

/* Viewport de la Oficina Isométrica */
.isometric-office-viewport {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    border: 3px solid #000;
    border-radius: 8px;
    background: #282c34;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.isometric-room {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Suelo de Baldosas Isométricas */
.isometric-floor {
    position: absolute;
    inset: 0;
    background-color: #555d6b;
    background-image: 
        linear-gradient(30deg, #3f4652 25%, transparent 25%), 
        linear-gradient(-30deg, #3f4652 25%, transparent 25%), 
        linear-gradient(30deg, transparent 75%, #3f4652 75%), 
        linear-gradient(-30deg, transparent 75%, #3f4652 75%);
    background-size: 60px 36px;
    background-position: 0 0, 0 0, 30px 18px, 30px 18px;
    z-index: 1;
}

/* Paredes Isométricas */
.isometric-wall {
    position: absolute;
    top: 0;
    height: 40%;
    z-index: 2;
    background-color: #798394;
    overflow: hidden;
}

.isometric-wall.wall-left {
    left: 0;
    width: 50%;
    transform: skewY(30deg);
    transform-origin: top right;
    border-right: 3px solid #000;
    border-bottom: 3px solid #000;
}

.isometric-wall.wall-right {
    right: 0;
    width: 50%;
    transform: skewY(-30deg);
    transform-origin: top left;
    border-left: 3px solid #000;
    border-bottom: 3px solid #000;
}

/* Franjas decorativas de las paredes estilo Habbo */
.isometric-wall::before {
    content: '';
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    height: 8px;
    background: #3b82f6; /* Línea azul */
    border-bottom: 3px solid #fff; /* Línea blanca */
}

/* Utilería / Decoración (Props) */
.habbo-prop {
    position: absolute;
    z-index: 3;
    transform: translate(-50%, -50%);
}

/* Dispensador de Agua */
.water-cooler {
    width: 20px;
    height: 40px;
}
.water-bottle {
    width: 14px;
    height: 18px;
    background: rgba(56, 189, 248, 0.7);
    border: 2px solid #000;
    border-radius: 50% 50% 3px 3px;
    margin: 0 auto;
    position: relative;
}
.water-bottle::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px; width: 4px; height: 10px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
}
.water-base {
    width: 18px;
    height: 22px;
    background: #cbd5e1;
    border: 2px solid #000;
    border-radius: 2px;
    box-shadow: inset -2px -2px 0 rgba(0,0,0,0.15);
}

/* Planta Decorativa */
.office-plant {
    width: 24px;
    height: 38px;
}
.plant-leaves {
    width: 28px;
    height: 24px;
    background: #166534;
    border: 2px solid #000;
    border-radius: 50%;
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    box-shadow: inset -3px -3px 0 rgba(0,0,0,0.2);
}
.plant-pot {
    width: 18px;
    height: 16px;
    background: #9a3412;
    border: 2px solid #000;
    border-radius: 0 0 4px 4px;
    margin-top: 18px;
}

/* Server Rack */
.server-rack {
    width: 36px;
    height: 52px;
    background: #1e293b;
    border: 2.5px solid #000;
    border-radius: 4px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
}
.server-leds {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(180deg, #ef4444 0px, #ef4444 4px, transparent 4px, transparent 8px),
                repeating-linear-gradient(180deg, #10b981 6px, #10b981 10px, transparent 10px, transparent 14px);
    opacity: 0.85;
    animation: serverBlink 0.8s infinite alternate;
}

@keyframes serverBlink {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* =============================================
   ESCRITORIOS ISOMÉTRICOS DE AGENTES
   ============================================= */
.habbo-desk-workspace {
    position: absolute;
    width: 90px;
    height: 85px;
    cursor: pointer;
    z-index: 5;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.habbo-desk-workspace:hover {
    transform: translate(-50%, -54px) scale(1.05);
}

/* Glow del escritorio activo */
.habbo-desk-workspace.active-desk {
    z-index: 10;
}

.habbo-desk-workspace.active-desk .habbo-desk-furniture {
    border-color: #06b6d4;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.45), 3px 3px 0 rgba(0,0,0,0.3) !important;
    background: #92400e; /* Tono de madera más claro si está activo */
}

.habbo-desk-workspace.active-desk .habbo-desk-label {
    border-color: #06b6d4;
    color: #22d3ee;
    background: rgba(6, 182, 212, 0.95);
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

/* Character Sitting Structure */
.habbo-character-sitting {
    position: relative;
    width: 60px;
    height: 46px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Avatar del Agente (Máx. 34px) */
.habbo-desk-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid #000;
    background: #cbd5e1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    animation: habboBob 2.5s ease-in-out infinite;
    transition: border-color 0.25s ease;
}

.habbo-desk-workspace.active-desk .habbo-desk-avatar {
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5), 2px 2px 0 rgba(0,0,0,0.3);
}

.habbo-desk-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mueble Escritorio */
.habbo-desk-furniture {
    width: 56px;
    height: 30px;
    background: #78350f; /* Color Madera */
    border: 2.5px solid #000;
    border-radius: 4px;
    position: relative;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
    z-index: 3;
    transition: all 0.25s ease;
}

/* Patas del escritorio */
.habbo-desk-furniture::before,
.habbo-desk-furniture::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 5px;
    height: 8px;
    background: #000;
}
.habbo-desk-furniture::before { left: 4px; }
.habbo-desk-furniture::after { right: 4px; }

/* Monitor de Computadora en el escritorio */
.desk-screen-glow {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 14px;
    background: #1e293b;
    border: 1.5px solid #000;
    border-radius: 2px;
    font-size: 8px;
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.05);
}

.habbo-desk-workspace.active-desk .desk-screen-glow {
    border-color: #06b6d4;
    background: #0c4a6e;
    color: #22d3ee;
}

.habbo-desk-workspace.executing .desk-screen-glow {
    background: #0284c7;
    color: #fff;
    animation: pcScreenBlink 0.5s infinite alternate;
    box-shadow: 0 0 8px #0ea5e9;
}

@keyframes pcScreenBlink {
    0% { background: #0c4a6e; }
    100% { background: #0ea5e9; }
}

/* Bocadillos de Chat Flotantes */
.habbo-desk-workspace .habbo-bubble {
    position: absolute;
    bottom: 78px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #000;
    border: 2.5px solid #000;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
    z-index: 15;
    opacity: 0.95;
    transition: all 0.25s ease;
    animation: habboFloat 3s ease-in-out infinite;
}

.habbo-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #000 transparent;
    display: block;
    width: 0;
}

.habbo-bubble::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: #fff transparent;
    display: block;
    width: 0;
    z-index: 16;
}

/* Estados de ejecución de los bocadillos */
.habbo-bubble.working {
    background: #a855f7 !important;
    color: #fff !important;
    border-color: #000 !important;
}
.habbo-bubble.working::before {
    border-color: #a855f7 transparent !important;
}

.habbo-bubble.success {
    background: #10b981 !important;
    color: #fff !important;
    border-color: #000 !important;
}
.habbo-bubble.success::before {
    border-color: #10b981 transparent !important;
}

/* Etiqueta del Escritorio */
.habbo-desk-label {
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border: 1.5px solid #000;
    border-radius: 4px;
    padding: 1px 6px;
    margin-top: 5px;
    white-space: nowrap;
    z-index: 4;
    box-shadow: 1.5px 1.5px 0 rgba(0,0,0,0.25);
    transition: all 0.2s ease;
}

/* =============================================
   JUNIOR CO-WORKING DESK LAYOUT (Step 3 Grid Option)
   ============================================= */
.junior-agents-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
    gap: 0.8rem !important;
}

.junior-agent-card.junior-desk-card {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 8px !important;
    height: 180px !important;
    background: rgba(30, 41, 59, 0.3) !important;
    border: 2px solid #1e293b !important;
    border-radius: 12px !important;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.15) !important;
}

.junior-agent-card.junior-desk-card:hover {
    border-color: rgba(6, 182, 212, 0.4) !important;
    transform: translateY(-4px) !important;
    background: rgba(30, 41, 59, 0.45) !important;
}

.junior-agent-card.junior-desk-card.viewing {
    border: 2px solid #06b6d4 !important;
    background: rgba(6, 182, 212, 0.06) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2), 4px 4px 0 rgba(0,0,0,0.2) !important;
}

/* The desk top */
.junior-agent-desk-top {
    width: 100%;
    height: 25px;
    background: #64748b; /* Desk color */
    border: 2px solid #000;
    border-radius: 4px;
    margin-top: auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.junior-agent-card.viewing .junior-agent-desk-top {
    background: #0ea5e9;
    border-color: #000;
}

/* Computer on the desk */
.junior-agent-desk-pc {
    position: absolute;
    bottom: 12px;
    width: 32px;
    height: 26px;
    background: #334155;
    border: 2px solid #000;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 6px rgba(255,255,255,0.1);
}

.junior-agent-desk-pc::after {
    content: '';
    position: absolute;
    bottom: -5px;
    width: 12px;
    height: 4px;
    background: #1e293b;
    border: 2px solid #000;
    border-top: none;
}

/* Screen glow indicating activity */
.pc-screen-glow {
    width: 22px;
    height: 16px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #10b981;
    overflow: hidden;
}

.junior-agent-card.executing .pc-screen-glow {
    background: #0284c7;
    color: #fff;
    animation: pcBlink 1s infinite alternate;
}

.junior-agent-card.viewing .pc-screen-glow {
    border-color: #06b6d4;
    background: #083344;
}

/* Desk controls (checkbox + view button) */
.junior-desk-controls {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    z-index: 2;
}

.junior-desk-actions {
    display: flex;
    gap: 0.3rem;
}


/* =============================================
   KEYFRAMES FOR ANIMATIONS
   ============================================= */

@keyframes habboBob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

@keyframes habboFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -4px); }
}

@keyframes pcBlink {
    0% { background: #083344; }
    100% { background: #0ea5e9; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 820px) {
    body {
        height: auto;
        overflow-y: auto;
    }
    .main-container {
        height: auto;
        margin-bottom: 3rem;
    }
    .bento-grid {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }
    .controller-card {
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
    }
    .agent-cv-wrapper {
        height: auto;
        max-height: none;
    }
    .cv-hero-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .cv-hero-content {
        align-items: center;
    }
    .cv-interests-row {
        justify-content: center;
    }
    .cv-bento-row {
        grid-template-columns: 1fr;
    }
    .cv-results-body {
        flex-direction: column;
    }
    .cv-results-history {
        flex: none;
    }
    
    /* Responsive Habbo elements */
    .habbo-isometric-scene {
        padding: 0.6rem !important;
    }
    .isometric-office-viewport {
        height: 280px !important;
    }
    .habbo-desk-workspace {
        transform: translate(-50%, -50%) scale(0.7) !important;
    }
    .habbo-desk-workspace:hover {
        transform: translate(-50%, -42px) scale(0.75) !important;
    }
    .habbo-desk-workspace .habbo-bubble {
        bottom: 66px !important;
        font-size: 0.9rem !important;
    }
    .habbo-prop {
        transform: translate(-50%, -50%) scale(0.7) !important;
    }
    .office-map-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .junior-agents-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    }
}

/* =============================================
   WORKSPACE MODAL OVERLAY (Tech Glassmorphism Style)
   ============================================= */
.workspace-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    transition: opacity 0.3s ease;
}

.workspace-modal.hidden {
    display: none !important;
}

.workspace-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    overflow: hidden;
    animation: workspaceModalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes workspaceModalPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.workspace-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.8rem;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
}

.workspace-modal-title {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.02em;
}

.close-workspace-btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(255, 43, 71, 0.1);
    border: 1px solid rgba(255, 43, 71, 0.3);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.close-workspace-btn:hover {
    background: rgba(255, 43, 71, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 43, 71, 0.2);
}

.close-workspace-btn:active {
    transform: translateY(0);
}

.workspace-modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    -webkit-overflow-scrolling: touch;
}

.workspace-modal-body .bento-grid {
    flex: 1 1 auto;
    height: auto;
    min-height: min-content;
    align-items: flex-start;
    margin: 0;
}

/* Modal Nav Timeline */
.modal-nav-timeline {
    display: flex;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.modal-nav-btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.modal-nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-nav-btn.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 43, 71, 0.4);
    border: 1px solid transparent;
}

.nav-step-num {
    display: inline-flex;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.modal-nav-btn.active .nav-step-num {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
    .workspace-modal {
        padding: 0;
    }
    .workspace-modal-content {
        width: 100vw;
        height: 100vh;
    }
    .workspace-modal-header {
        flex-direction: column;
        gap: 0.6rem;
        padding: 0.6rem;
    }
}

/* ---- CANVAS ISOMETRIC UI ---- */
#ui-wrap { 
    flex: 1; 
    position: relative; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: row; 
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    font-family: 'Press Start 2P', monospace;
}
#canvas-wrap { flex: 1; position: relative; overflow: hidden; background: #05070c; }
#c { display: block; width: 100%; height: 100%; cursor: crosshair; }
#minimap-wrap {
  position: absolute; top: 12px; left: 12px;
  background: rgba(2,6,23,0.8); border: 2px solid #334155;
  padding: 8px; border-radius: 8px; backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5); z-index: 10;
}
#minimap-wrap p {
  color: #94a3b8; font-size: 8px; font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px; letter-spacing: 1px;
}
#minimap { border: 1px solid #1e293b; background: #0f172a; display: block; }
#hud {
  position: absolute; top: 12px; right: 12px;
  background: rgba(2,6,23,0.8); border: 2px solid #334155;
  padding: 10px 14px; border-radius: 8px; backdrop-filter: blur(4px);
  display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.5); z-index: 10;
}
.hud-title {
  color: #e2e8f0; font-family: 'JetBrains Mono', monospace; font-size: 9px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.hud-sep { color: #475569; font-size: 10px; }
.hud-dropdown {
  position: relative;
  display: inline-block;
}

.hud-dropdown-content {
  display: none;
  position: absolute;
  top: 130%;
  right: 0;
  background-color: rgba(15, 23, 42, 0.95);
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 8px;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.hud-dropdown:hover .hud-dropdown-content {
  display: flex;
  flex-direction: column;
}

.hud-dropdown-content a {
  color: #cbd5e1;
  padding: 0.6rem 0.8rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  transition: all 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: left;
}

.hud-dropdown-content a:last-child {
  border-bottom: none;
}

.hud-dropdown-content a strong {
  color: #06b6d4;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.hud-dropdown-content a span {
  color: #94a3b8;
  font-size: 0.65rem;
}

.hud-dropdown-content a:hover {
  background-color: rgba(6, 182, 212, 0.15);
  transform: translateX(-4px);
}

.hud-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  padding: 5px 10px; border-radius: 4px; cursor: pointer; transition: 0.2s;
  border: 1px solid transparent;
  display: inline-block;
}
.hud-badge:hover { transform: translateY(-2px); filter: brightness(1.2); }
.b-exec   { background: rgba(233,196,106,0.15); color: #e9c46a; border-color: rgba(233,196,106,0.4); }
.b-redac  { background: rgba(72,202,228,0.15); color: #48cae4; border-color: rgba(72,202,228,0.4); }
.b-design { background: rgba(217,70,239,0.15); color: #d946ef; border-color: rgba(217,70,239,0.4); }
.b-hub    { background: rgba(16,185,129,0.15); color: #10b981; border-color: rgba(16,185,129,0.4); }
.b-lib    { background: rgba(167,201,87,0.15); color: #a7c957; border-color: rgba(167,201,87,0.4); }
#audio-ctrl {
  position: absolute; bottom: 12px; right: 12px; z-index: 10;
}
#zoom-ctrl {
  position: absolute; bottom: 12px; left: 12px; z-index: 10;
  display: flex; gap: 8px; align-items: center;
  background: rgba(2,6,23,0.8); padding: 6px 10px; border-radius: 6px;
  border: 1px solid #334155;
}
#zoom-ctrl button, #audio-ctrl button {
  background: #1e293b; color: #cbd5e1; border: 1px solid #475569;
  padding: 6px 10px; font-family: 'JetBrains Mono', monospace; font-size: 8px;
  border-radius: 4px; cursor: pointer; transition: 0.2s;
}
#zoom-ctrl button:hover, #audio-ctrl button:hover { background: #334155; color: #fff; }
#zoom-lbl { color: #f8fafc; font-family: 'JetBrains Mono', monospace; font-size: 9px; min-width: 40px; text-align: right; }
#hint {
  position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
  background: rgba(231,111,81,0.15); border: 1px solid rgba(231,111,81,0.5);
  color: #fff; padding: 10px 16px; font-family: 'JetBrains Mono', monospace;
  font-size: 9px; border-radius: 6px; letter-spacing: 1px; pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8); transition: 0.3s; z-index: 10;
}

/* ==========================================================================
   STORYGRAMER CUSTOM STYLES (FEEDBACK & CALENDAR)
   ========================================================================== */

/* Pestaña de Calendario */
#tab-calendar.active {
    background: rgba(14, 165, 233, 0.15) !important;
    border-bottom: 2px solid #0ea5e9 !important;
    color: #38bdf8 !important;
}

/* Lector de Feedback Visual (Imágenes) */
.cv-image-feedback-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 550px;
    overflow-y: auto;
}

.feedback-upload-area {
    border: 2px dashed rgba(14, 165, 233, 0.4);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.feedback-upload-area:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.05);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
}

.feedback-upload-area i {
    font-size: 2.5rem;
    color: #38bdf8;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.feedback-upload-area span {
    font-size: 0.85rem;
    color: #94a3b8;
}

.stories-images-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.stories-feedback-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.stories-feedback-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feedback-card-img-wrap {
    width: 100%;
    height: 140px;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.feedback-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.stories-feedback-card:hover .feedback-card-img-wrap img {
    transform: scale(1.05);
}

.feedback-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.feedback-delete-btn {
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    transition: background 0.2s;
}

.feedback-delete-btn:hover {
    background: #ef4444;
}

.feedback-card-info {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.feedback-card-info textarea {
    width: 100%;
    height: 60px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.4rem;
    color: #e2e8f0;
    font-size: 0.75rem;
    resize: none;
    outline: none;
    box-sizing: border-box;
}

.feedback-card-info textarea:focus {
    border-color: #38bdf8;
    background: rgba(15, 23, 42, 0.8);
}

.btn-save-feedback-desc {
    align-self: flex-end;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    background: #0ea5e9;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s;
}

.btn-save-feedback-desc:hover {
    background: #0284c7;
}

/* Calendario Mensual de Stories */
.cv-calendar-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    padding: 0.75rem;
    box-sizing: border-box;
    background: rgba(10, 15, 30, 0.4);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-width: 750px;
    width: 100%;
}

/* Headers de Días de Semana (Día 1 - 7 en columnas) */
.calendar-grid-header {
    grid-column: span 7;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.calendar-header-day {
    font-family: var(--font-primary);
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.calendar-day-cell {
    aspect-ratio: 1 / 1.1;
    min-height: 110px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.calendar-day-cell.drag-over {
    background: rgba(14, 165, 233, 0.08);
    border: 1px dashed #38bdf8;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

.calendar-day-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

/* Tarjeta draggable del plan de Story */
.stories-calendar-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.7);
    border-radius: 6px;
    padding: 6px;
    cursor: grab;
    transition: all 0.2s ease;
    border-top-width: 3px;
    border-top-style: solid;
    user-select: none;
    box-sizing: border-box;
}

.stories-calendar-card:active {
    cursor: grabbing;
}

.stories-calendar-card:hover {
    background: rgba(30, 41, 59, 0.95);
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Colores de los Pilares */
.pilar-dolor { border-top-color: #f43f5e !important; } /* Coral */
.pilar-deseo { border-top-color: #a855f7 !important; } /* Púrpura */
.pilar-educativo { border-top-color: #14b8a6 !important; } /* Teal */
.pilar-conexion { border-top-color: #6366f1 !important; } /* Indigo */
.pilar-venta { border-top-color: #eab308 !important; } /* Oro */

/* WhatsApp Manager Pilares */
.pilar-gt-community { border-top-color: #10b981 !important; } /* Verde Esmeralda */
.pilar-gnia-class { border-top-color: #0284c7 !important; } /* Azul Celeste */
.pilar-remarketing { border-top-color: #f43f5e !important; } /* Coral */

.story-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3px;
    margin-bottom: 2px;
}

.story-pilar-badge {
    font-size: 0.55rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}

/* Pilar badges text colors */
.pilar-badge-dolor { background: rgba(244, 63, 94, 0.15); color: #fda4af; }
.pilar-badge-deseo { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.pilar-badge-educativo { background: rgba(20, 184, 166, 0.15); color: #99f6e4; }
.pilar-badge-conexion { background: rgba(99, 102, 241, 0.15); color: #c7d2fe; }
.pilar-badge-venta { background: rgba(234, 179, 8, 0.15); color: #fef08a; }

/* WhatsApp Manager Pilar Badges */
.pilar-badge-gt-community { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.pilar-badge-gnia-class { background: rgba(2, 132, 199, 0.15); color: #7dd3fc; }
.pilar-badge-remarketing { background: rgba(244, 63, 94, 0.15); color: #fda4af; }

.story-status-badge {
    font-size: 0.55rem;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 3px;
    border: 1px solid transparent;
}

/* Status tags style */
.tag-publicado { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.tag-aprobado { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border-color: rgba(14, 165, 233, 0.3); }
.tag-diseñando { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.tag-denegado { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }

.story-card-copy-preview {
    font-size: 0.65rem;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    margin: 4px 0;
    word-break: break-word;
}

.story-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 2px;
}

.story-card-edit-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.65rem;
    padding: 2px;
    transition: color 0.2s;
}

.story-card-edit-btn:hover {
    color: #38bdf8;
}

/* Responsive grid for smaller screens */
/* Keep 7 columns scrollable horizontally for a professional calendar view */

/* ==========================================================================
   WALLET DASHBOARD (FINANCE AGENTS)
   ========================================================================== */

.wallet-dashboard {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 1.5rem;
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
    color: white;
}

.wallet-left-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-right-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wallet-right-col > * {
    flex: 0 0 auto;
}

.wallet-card {
    background: rgba(13, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
    padding: 1rem;
}

.wallet-card:hover {
    border-color: rgba(255, 43, 71, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 43, 71, 0.05);
}

.glass-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 0.6rem 1rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    font-family: var(--font-sans);
    color-scheme: dark;
}

.glass-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(255, 43, 71, 0.2) !important;
    outline: none;
}

.glass-input option,
.clientes-filter-select option,
.cliente-estado-pago-select option {
    background-color: #0d0a0f !important;
    color: #f1ecf4 !important;
}

select.glass-input,
select.clientes-filter-select,
select.cliente-estado-pago-select {
    color-scheme: dark;
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.wallet-table th {
    text-align: left;
    padding: 0.8rem 0.5rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.wallet-table td {
    padding: 0.8rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.tx-info {
    flex: 1;
}

.tx-info p {
    margin: 0;
    font-weight: 500;
    color: white;
    font-size: 0.95rem;
}

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

.tx-amount {
    font-weight: 600;
    font-size: 1rem;
}

.tx-amount.positive {
    color: #10b981;
}

.tx-amount.negative {
    color: #FF2B47;
}

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

/* Wallet finance agents (Gestor / Analista): hide content-agent bento UI entirely */
.workspace-modal-body.wallet-workspace-active .bento-grid {
    display: none !important;
}

.workspace-modal-body.wallet-workspace-active {
    display: block;
}

.workspace-modal-body.wallet-workspace-active #wallet-dashboard-wrapper {
    display: block !important;
    width: 100%;
}

@media (max-width: 768px) {
    #wallet-dashboard-wrapper {
        width: 100%;
        height: auto !important;
        min-height: 0;
        overflow: visible;
    }

    .workspace-modal-body:has(#wallet-dashboard-wrapper:not(.hidden)) {
        padding: 0.35rem 0 0.75rem;
        overflow-x: hidden;
    }

    .wallet-dashboard {
        padding: 0.5rem 0.75rem 1rem;
        gap: 0.75rem;
    }

    #finance-dashboard-container {
        padding: 0.5rem 0.75rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Finance panels (Auditor / Director) */
.finance-panel {
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(13, 10, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.finance-panel-title {
    margin: 0 0 0.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.finance-panel-desc {
    margin: 0;
    color: var(--text-muted);
}

.finance-alert {
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid;
    border-radius: 8px;
    line-height: 1.45;
}

.finance-alert strong {
    color: #fff;
}

.finance-alert--warning {
    background: rgba(255, 122, 51, 0.1);
    border-left-color: #FF7A33;
    color: #FF7A33;
}

.finance-alert--info {
    background: rgba(255, 43, 71, 0.1);
    border-left-color: #FF2B47;
    color: #FF2B47;
}

.finance-panel-metrics {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.finance-metric-card {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.finance-metric-card h4 {
    margin: 0 0 0.5rem;
}

.finance-metric-card h2 {
    margin: 0;
    color: #fff;
}

.finance-metric-card--cash {
    background: rgba(255, 122, 51, 0.1);
    border: 1px solid rgba(255, 122, 51, 0.3);
}

.finance-metric-card--cash h4 {
    color: #FF7A33;
}

.finance-metric-card--expense {
    background: rgba(255, 43, 71, 0.1);
    border: 1px solid rgba(255, 43, 71, 0.3);
}

.finance-metric-card--expense h4 {
    color: #FF2B47;
}

.finance-panel-form {
    margin-top: 1.5rem;
}

.finance-panel-form textarea {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.finance-panel-action {
    margin-top: 1rem;
}


.add-fixed-expense-form {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr auto;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    align-items: center;
}

.add-fixed-expense-form.hidden {
    display: none !important;
}

.client-db-item .tx-info {
    min-width: 0;
}

.client-db-item .badge {
    margin-left: 0.25rem;
}

/* Base de Clientes — compact filter toolbar */
.clientes-card { overflow: hidden; }

.clientes-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.clientes-toolbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.clientes-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.clientes-card-title i { color: #06b6d4; font-size: 0.9rem; }

.clientes-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.clientes-filter-count {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    padding-right: 0.35rem;
}

.clientes-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.clientes-action-chip:hover {
    background: rgba(6, 182, 212, 0.22);
    border-color: rgba(6, 182, 212, 0.65);
    transform: translateY(-1px);
}

.clientes-action-chip--ghost {
    padding: 0.22rem 0.45rem;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
}

.clientes-action-chip--ghost:hover {
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.clientes-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.clientes-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.clientes-search-wrap {
    flex: 1 1 12rem;
    min-width: 10rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.55rem;
    height: 1.65rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    color: #94a3b8;
}

.clientes-search-wrap:focus-within {
    border-color: rgba(6, 182, 212, 0.45);
}

.clientes-search-wrap i {
    font-size: 0.68rem;
    flex-shrink: 0;
}

.clientes-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: inherit;
    outline: none;
    padding: 0;
    height: 100%;
}

.clientes-search-input::placeholder {
    color: #64748b;
    font-weight: 500;
}

.clientes-search-input::-webkit-search-cancel-button {
    filter: invert(0.7);
}

.clientes-filter-select {
    flex: 1 1 auto;
    min-width: 7.5rem;
    max-width: 11rem;
    padding: 0.22rem 0.45rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 600;
    font-family: inherit;
    height: 1.65rem;
    cursor: pointer;
    color-scheme: dark;
}

.clientes-filter-select:focus {
    outline: none;
    border-color: rgba(6, 182, 212, 0.45);
}

.clientes-date-range-panel {
    display: none;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.55rem;
    padding-left: 0.1rem;
}

.clientes-date-range-panel.open { display: flex; }

.client-db-item {
    align-items: center;
    padding: 0.55rem 0.7rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.45rem;
}

.client-db-avatar {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.75rem;
}

.client-db-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
    min-width: 0;
}

.client-db-copy { flex: 1; min-width: 0; }

.client-db-name {
    margin: 0;
    font-weight: 500;
    font-size: 0.82rem;
    color: #fff;
}

.client-db-badge {
    font-size: 0.62rem !important;
    margin-left: 0.2rem;
}

.client-db-badge--plan {
    font-size: 0.74rem !important;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.55rem !important;
    border: 1px solid transparent;
    text-transform: uppercase;
}

.client-db-badge--plan-flash {
    background: rgba(6, 182, 212, 0.22);
    color: #67e8f9;
    border-color: rgba(6, 182, 212, 0.45);
}

.client-db-badge--plan-pro {
    background: rgba(59, 130, 246, 0.22);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.45);
}

.client-db-badge--plan-gold,
.client-db-badge--plan-gold-tienda {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.45);
}

.client-db-badge--plan-elite {
    background: rgba(236, 72, 153, 0.22);
    color: #f9a8d4;
    border-color: rgba(236, 72, 153, 0.45);
}

.client-db-badge--plan-enterprise {
    background: rgba(255, 43, 71, 0.22);
    color: #fda4af;
    border-color: rgba(255, 43, 71, 0.45);
}

.client-db-badge--plan-tester {
    background: rgba(139, 92, 246, 0.22);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.45);
}

.client-db-badge--negocio {
    font-size: 0.56rem !important;
    font-weight: 500;
    padding: 0.12rem 0.38rem !important;
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-transform: none;
    letter-spacing: normal;
}

.client-db-badge--tester {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.client-db-badge--migracion {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

.client-db-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.client-db-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.cliente-estado-pago-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.18rem 1.4rem 0.18rem 0.45rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 0.55rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    max-width: 9rem;
}

.cliente-estado-pago--mes {
    color: #064e3b;
    background-color: rgba(16, 185, 129, 0.85);
    border-color: rgba(16, 185, 129, 0.5);
}

.cliente-estado-pago--anio {
    color: #0c4a6e;
    background-color: rgba(14, 165, 233, 0.85);
    border-color: rgba(14, 165, 233, 0.5);
}

.cliente-estado-pago--pendiente {
    color: #7f1d1d;
    background-color: rgba(255, 43, 71, 0.82);
    border-color: rgba(255, 43, 71, 0.45);
    color: #fff;
}

.cliente-estado-pago--retirado {
    color: #e2e8f0;
    background-color: rgba(100, 116, 139, 0.55);
    border-color: rgba(100, 116, 139, 0.45);
}

.cliente-estado-pago--vencido {
    color: #fff;
    background-color: rgba(245, 158, 11, 0.82);
    border-color: rgba(245, 158, 11, 0.45);
}

.cliente-estado-pago--vitalicio {
    color: #fff;
    background-color: rgba(168, 85, 247, 0.82);
    border-color: rgba(168, 85, 247, 0.45);
}

.cliente-estado-pago--cuota {
    color: #fff;
    background-color: rgba(249, 115, 22, 0.82);
    border-color: rgba(249, 115, 22, 0.45);
}

.cliente-estado-pago--cancelado {
    color: #e2e8f0;
    background-color: rgba(71, 85, 105, 0.75);
    border-color: rgba(100, 116, 139, 0.55);
}

.cliente-action-icon {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    padding: 0.2rem 0.25rem;
    font-size: 0.72rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.cliente-action-icon:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.cliente-action-icon--danger:hover {
    color: #fda4af;
}

.clientes-filter-section {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.clientes-filter-label {
    flex: 0 0 auto;
    min-width: 2.6rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.clientes-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    align-items: center;
}

.clientes-filter-chip {
    --chip-color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--chip-color) 28%, transparent);
    background: color-mix(in srgb, var(--chip-color) 8%, transparent);
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.clientes-filter-chip i { font-size: 0.62rem; opacity: 0.85; }

.clientes-filter-chip:hover {
    color: #e2e8f0;
    border-color: color-mix(in srgb, var(--chip-color) 45%, transparent);
    background: color-mix(in srgb, var(--chip-color) 16%, transparent);
}

.clientes-filter-chip.active {
    color: #fff;
    border-color: color-mix(in srgb, var(--chip-color) 70%, transparent);
    background: color-mix(in srgb, var(--chip-color) 24%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--chip-color) 35%, transparent);
}

.clientes-date-input {
    padding: 0.16rem 0.4rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: #cbd5e1;
    font-size: 0.66rem;
    font-family: inherit;
    height: 1.55rem;
    color-scheme: dark;
}

.clientes-date-input:focus {
    outline: none;
    border-color: rgba(6, 182, 212, 0.45);
}

.clientes-date-sep {
    font-size: 0.65rem;
    color: #475569;
}

.clientes-list-scroll {
    overflow-y: auto;
    max-height: 400px;
}

@media (max-width: 640px) {
    .clientes-search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .clientes-search-wrap {
        width: 100%;
    }
    .clientes-filter-select {
        min-width: calc(50% - 0.2rem);
        max-width: none;
    }
    .client-db-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .client-db-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Collapsible Containers */
.left-scrollable > * {
    flex-shrink: 0;
}
.left-scrollable {
    padding-bottom: 2rem !important;
}
.left-scrollable::-webkit-scrollbar {
    width: 6px;
}
.left-scrollable::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.cv-card.collapsed .cv-bullet-list,
.cv-card.collapsed .btn-add-tag,
.cv-hero-card.collapsed .cv-hero-content,
.cv-tools-row.collapsed .cv-tools-separator,
.cv-tools-row.collapsed .cv-tools-content,
.cv-tools-row.collapsed .btn-add-tag,
.console-box.collapsed .console-body,
.tool-accordion.collapsed .tool-accordion-content,
.cv-panel-group.collapsed .cv-panel-content,
.cv-sub-panel.collapsed .cv-sub-panel-content {
    display: none !important;
}
.collapse-icon {
    transition: transform 0.3s ease;
    cursor: pointer;
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.collapsed .collapse-icon {
    transform: rotate(-90deg);
}
.clickable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
}

/* =========================================================
   RESPONSIVE DESIGN (MOBILE)
   ========================================================= */
@media (max-width: 768px) {
    /* WORKSPACE MODAL */
    .workspace-modal {
        padding: 0;
    }
    .workspace-modal-content {
        height: 100vh;
        width: 100vw;
        max-width: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    
    /* WORKSPACE MODAL HEADER */
    .workspace-modal-header {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    .workspace-modal-header > div:last-child {
        display: flex;
        justify-content: flex-end;
        width: 100%;
    }
    .workspace-modal-title {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }
    .workspace-modal-title i {
        font-size: 1rem;
    }
    .expand-workspace-btn, .close-workspace-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .workspace-modal-body {
        padding: 0.8rem;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    /* BENTO GRID & LEFT COLUMN */
    .bento-grid {
        flex-direction: column;
        gap: 0.8rem;
        height: auto;
        min-height: min-content;
    }
    .left-column-wrapper {
        flex: 1 1 auto !important;
        width: 100%;
        height: auto;
    }

    /* CARDS & AVATAR */
    .cv-hero-card {
        padding: 0.45rem 0.55rem !important;
        gap: 0.2rem !important;
    }
    .cv-hero-card.collapsed {
        padding: 0.4rem 0.5rem !important;
        gap: 0 !important;
        margin-bottom: 0 !important;
    }
    .cv-hero-card .clickable-header {
        align-items: center !important;
    }
    .cv-avatar {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
        border-radius: 8px !important;
    }
    .cv-agent-name {
        font-size: 0.92rem !important;
        line-height: 1.15 !important;
    }
    .cv-agent-role {
        font-size: 0.65rem !important;
    }
    .cv-agent-bio {
        font-size: 0.7rem !important;
        line-height: 1.15 !important;
    }
    .cv-interests-row {
        gap: 0.3rem !important;
    }
    .cv-interests-label {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    .cv-interests-tags {
        gap: 0.3rem !important;
    }
    .cv-interest-tag {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
    }
    .btn-add-tag {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.4rem !important;
    }

    /* SCROLLING FIX */
    .left-scrollable {
        height: auto !important;
        overflow-y: visible !important;
        flex: none !important;
        padding-right: 0 !important;
    }

    /* RESULTS EDITOR SECTION */
    .cv-results-body {
        flex-direction: column !important;
        height: auto !important;
        min-height: 600px;
        max-height: none !important;
    }
    .cv-results-history {
        flex: 0 0 120px !important; /* Smaller height for history on mobile */
    }
    .cv-results-editor {
        flex: 1 !important;
        min-height: 400px;
    }

    /* TIMELINE */
    .workflow-timeline {
        overflow-x: auto;
        padding-bottom: 8px;
        justify-content: flex-start;
    }
    .timeline-step {
        flex: 0 0 auto;
    }

    /* SKILLS & OUTPUTS SIDE-BY-SIDE */
    .cv-bento-row {
        flex-direction: row !important;
        gap: 0.5rem !important;
    }
    .cv-card {
        padding: 0.6rem !important;
        flex: 1;
        min-width: 0;
    }
    .cv-card-title {
        font-size: 0.85rem !important;
    }
    .cv-card-subtitle {
        font-size: 0.6rem !important;
    }
    .cv-card-badge {
        font-size: 0.55rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    /* CONSOLE SIZES */
    .console-box {
        margin-top: 0.5rem !important;
    }
    .console-header {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    .gnia-status-card {
        margin: 0.3rem !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
    }
    .gnia-status-logo .status-title {
        font-size: 0.85rem !important;
    }
    .gnia-status-logo .status-icon {
        font-size: 0.9rem !important;
    }
    #api-status-badge {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    #btn-env-config {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.4rem !important;
    }
    .console-body {
        font-size: 0.75rem !important;
        padding: 0.5rem !important;
    }

    /* CHAT & EDITOR */
    .editor-area {
        height: 50vh;
        min-height: 400px;
    }

    /* DOM FLATTENING FOR MOBILE REORDERING
       Keep #agent-results-zone as a single flex item (do NOT use display:contents)
       so results stay together at order 3. */
    .left-column-wrapper,
    .left-scrollable,
    #agent-cv-wrapper,
    #cv-panel-control,
    .cv-right-column {
        display: contents !important;
    }

    .bento-grid {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 0.75rem !important;
    }

    /* Hide original info panels — opened via mobile grid modal buttons */
    #agent-model-card:not(.mobile-info-panel-active),
    .cv-bento-row,
    #cv-knowledge-base-container:not(.mobile-info-panel-active),
    #cv-visual-library-container:not(.mobile-info-panel-active),
    .mobile-info-placeholder {
        display: none !important;
    }

    /* Show mobile info grid (2 cols × up to 3 rows) */
    .mobile-agent-info-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: minmax(2.65rem, auto);
        gap: 0.5rem;
        width: 100%;
        order: 2;
        margin-bottom: 0.15rem;
    }

    .mobile-agent-info-grid--extended {
        gap: 0.45rem;
    }

    /* REORDERING — mobile workspace stack */
    #cv-hero-card-container { order: 1; margin-bottom: 0; width: 100%; }
    #mobile-agent-info-grid { order: 2; }
    #agent-results-zone {
        order: 3;
        margin-bottom: 0;
        width: 100%;
        min-height: 0;
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }
    #agent-quick-access { order: 4; margin-bottom: 0; width: 100%; }
    #real-cv-panel-control { order: 5; margin-bottom: 0; width: 100%; }
    #cv-herramientas-container { order: 6; margin-bottom: 0; width: 100%; }
    #agent-console { order: 7; margin-bottom: 0; }

    /* Mobile dropdowns: Acceso Rápido, Instrucciones, Herramientas */
    .mobile-dropdown-chevron {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        flex-shrink: 0;
        font-size: 0.75rem;
        color: #fda4af;
        transition: transform 0.25s ease;
    }

    .mobile-dropdown.mobile-collapsed .mobile-dropdown-chevron {
        transform: rotate(-90deg);
    }

    #real-cv-panel-control .card-header.mobile-dropdown-toggle {
        cursor: pointer;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.4rem;
        width: 100%;
    }

    #real-cv-panel-control.mobile-collapsed .card-header {
        border-bottom: none;
    }

    #real-cv-panel-control.mobile-collapsed .card-body {
        display: none !important;
    }

    #cv-herramientas-container .mobile-dropdown-toggle {
        cursor: pointer;
    }

    #cv-herramientas-container.mobile-collapsed > .tool-accordion {
        display: none !important;
    }

    #cv-herramientas-container.mobile-collapsed {
        gap: 0 !important;
        padding-bottom: 1rem !important;
    }

    #agent-quick-access.mobile-collapsed .aqa-viewport,
    #agent-quick-access.mobile-collapsed .aqa-controls {
        display: none !important;
    }

    #agent-quick-access .aqa-header.mobile-dropdown-toggle {
        cursor: pointer;
    }

    #agent-quick-access.mobile-collapsed {
        padding-bottom: 0.15rem;
    }

    #cv-herramientas-container {
        padding: 1rem !important;
    }

    /* TRASH MODAL */
    #trash-modal {
        width: 95%;
        max-width: none;
    }
}

/* ── Mobile agent info grid + modal (base: hidden on desktop) ── */
.mobile-agent-info-grid {
    display: none;
}

.mobile-dropdown-chevron {
    display: none;
}

.mobile-info-placeholder {
    display: none;
}

.mobile-info-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.mobile-info-modal.hidden {
    display: none !important;
}

.mobile-info-modal-dialog {
    width: 100%;
    max-width: 560px;
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
    border-radius: 18px 18px 0 0;
    border: 1px solid rgba(255, 43, 71, 0.28);
    background: rgba(12, 10, 14, 0.97);
    overflow: hidden;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
}

.mobile-info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.mobile-info-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #fecdd3;
    font-weight: 700;
}

.mobile-info-modal-close {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 43, 71, 0.35);
    background: rgba(255, 43, 71, 0.1);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-info-modal-body {
    padding: 0.85rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.mobile-info-modal-body .mobile-info-panel-active {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    margin: 0 !important;
    max-height: none !important;
}

.mobile-info-modal-body .cv-card.mobile-info-panel-active .cv-bullet-list,
.mobile-info-modal-body .cv-card.mobile-info-panel-active .btn-add-tag,
.mobile-info-modal-body .cv-tools-row.mobile-info-panel-active .cv-tools-separator,
.mobile-info-modal-body .cv-tools-row.mobile-info-panel-active .cv-tools-content,
.mobile-info-modal-body .cv-tools-row.mobile-info-panel-active .btn-add-tag {
    display: block !important;
}

.mobile-info-modal-body .cv-tools-row.mobile-info-panel-active .cv-tools-content {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.4rem;
}

@media (max-width: 768px) {
    .mobile-agent-info-grid--extended .mobile-info-btn {
        min-height: 3.75rem;
        padding: 0.5rem 0.35rem;
        font-size: 0.68rem;
    }

    .mobile-info-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        min-height: 4.4rem;
        padding: 0.7rem 0.5rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 43, 71, 0.28);
        background: rgba(255, 255, 255, 0.04);
        color: #f8fafc;
        cursor: pointer;
        font-size: 0.72rem;
        font-weight: 600;
        letter-spacing: 0.01em;
        text-align: center;
        transition: background 0.2s, border-color 0.2s, transform 0.15s;
    }

    .mobile-info-btn i {
        font-size: 1.05rem;
        color: #fb7185;
    }

    .mobile-info-btn:active {
        transform: scale(0.97);
        background: rgba(255, 43, 71, 0.12);
        border-color: rgba(255, 43, 71, 0.5);
    }

    body.mobile-info-modal-open {
        overflow: hidden;
    }
}

/* --- Control de costos IA --- */
.badge-exploration {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-production {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.cost-control-panel {
    margin: 0.5rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 10px;
    font-size: 0.82rem;
}
.cost-control-panel.collapsed .cost-budget-track,
.cost-control-panel.collapsed .cost-mode-toggle,
.cost-control-panel.collapsed .cost-budget-form,
.cost-control-panel.collapsed .cost-gcp-hint,
.cost-control-panel.collapsed .cost-by-agent-title,
.cost-control-panel.collapsed #cost-by-agent-list,
.cost-control-panel.collapsed #cost-recent-logs {
    display: none;
}
.cost-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    cursor: pointer;
    color: #e2e8f0;
    font-weight: 600;
}
.cost-budget-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    margin: 0.65rem 0 0.85rem;
    overflow: hidden;
}
.cost-budget-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.cost-fill-ok { background: linear-gradient(90deg, #22c55e, #4ade80); }
.cost-fill-warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cost-fill-danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.cost-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.cost-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.8rem;
    text-align: left;
}
.cost-mode-btn small {
    color: #64748b;
    font-size: 0.68rem;
}
.cost-mode-btn.active {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.1);
    color: #f8fafc;
}
.cost-mode-btn.active:last-child {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.1);
}
.cost-budget-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    align-items: end;
    margin-bottom: 0.5rem;
}
.cost-budget-form label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #94a3b8;
    font-size: 0.72rem;
}
.cost-budget-form input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #f8fafc;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
}
.cost-gcp-hint {
    color: #64748b;
    font-size: 0.72rem;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}
.cost-gcp-hint a { color: #38bdf8; }
.cost-by-agent-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.cost-agent-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.15rem 0.75rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cost-agent-name { color: #e2e8f0; font-weight: 500; }
.cost-agent-meta { grid-column: 1; color: #64748b; font-size: 0.72rem; }
.cost-agent-amount { grid-column: 2; grid-row: 1 / span 2; color: #4ade80; font-family: var(--font-mono, monospace); align-self: center; }
.cost-log-row {
    display: grid;
    grid-template-columns: 9rem 1fr 1fr auto;
    gap: 0.35rem;
    font-size: 0.72rem;
    padding: 0.25rem 0;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.cost-log-amount { color: #38bdf8; text-align: right; }

/* --- Selector modelo por agente --- */
#agent-model-card .cv-card-title { font-size: 0.95rem; }
.agent-model-hint { line-height: 1.35; }
.agent-model-hint.model-tier-economy { color: #4ade80 !important; }
.agent-model-hint.model-tier-balanced { color: #38bdf8 !important; }
.agent-model-hint.model-tier-premium { color: #c084fc !important; }
.agent-model-hint.model-tier-auto { color: #94a3b8 !important; }
.agent-model-thinking {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 20px;
    font-weight: 600;
}
.agent-model-thinking.yes {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.agent-model-thinking.no {
    background: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.3);
}
.agents-model-overview {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}
.agents-model-overview-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.9fr;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.72rem;
}
.agents-model-overview-name { color: #e2e8f0; }
.agents-model-overview-select {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.1);
    color: #f8fafc;
    border-radius: 4px;
    padding: 0.2rem 0.35rem;
    font-size: 0.68rem;
}
.agents-model-overview-eff {
    color: #64748b;
    font-family: var(--font-mono, monospace);
    font-size: 0.65rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Toast notifications --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20050;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: rgba(15, 10, 12, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    animation: toast-in 0.28s ease-out;
    backdrop-filter: blur(10px);
}

.toast-out {
    animation: toast-out 0.22s ease-in forwards;
}

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

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

.toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.toast-body { flex: 1; min-width: 0; }

.toast-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.3;
}

.toast-message {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
    white-space: pre-line;
}

.toast-close {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 0.15rem;
}

.toast-close:hover { color: #e2e8f0; }

.toast-success { border-color: rgba(74, 222, 128, 0.35); }
.toast-success .toast-icon { color: #4ade80; }

.toast-error { border-color: rgba(248, 113, 113, 0.35); }
.toast-error .toast-icon { color: #f87171; }

.toast-warning { border-color: rgba(251, 191, 36, 0.35); }
.toast-warning .toast-icon { color: #fbbf24; }

.toast-info { border-color: rgba(56, 189, 248, 0.35); }
.toast-info .toast-icon { color: #38bdf8; }

.toast-loading { border-color: rgba(167, 139, 250, 0.35); }
.toast-loading .toast-icon { color: #a78bfa; }

.btn.is-loading {
    opacity: 0.85;
    cursor: wait;
}

#distribute-status-msg {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0 0 0.75rem;
    min-height: 1.2rem;
}

/* --- Activity feed panel (social-style) --- */
.activity-feed-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #FF2B47;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 43, 71, 0.6);
}

.activity-feed-badge.hidden { display: none !important; }

.activity-feed-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 19900;
    backdrop-filter: blur(2px);
}

.activity-feed-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    z-index: 19950;
    background: rgba(10, 8, 10, 0.98);
    border-left: 1px solid rgba(255, 43, 71, 0.25);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.28s ease;
}

.activity-feed-panel.hidden {
    transform: translateX(105%);
    pointer-events: none;
    visibility: hidden;
}

.activity-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-feed-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #f8fafc;
}

.activity-feed-header p {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.activity-feed-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}

.activity-feed-close:hover { color: #f8fafc; }

.activity-feed-filters {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-filter-btn {
    flex: 1;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-filter-btn.active {
    background: rgba(255, 43, 71, 0.15);
    border-color: rgba(255, 43, 71, 0.45);
    color: #fda4af;
}

.activity-filter-btn[data-sector="finance"].active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.45);
    color: #6ee7b7;
}

.activity-feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.activity-feed-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.activity-feed-error { color: #f87171; }

.activity-feed-card {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.activity-feed-card:hover {
    border-color: rgba(255, 43, 71, 0.35);
    background: rgba(255, 43, 71, 0.06);
    transform: translateY(-1px);
}

.activity-feed-card.is-unread {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.05);
}

.activity-feed-card-inner {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 0.95rem;
}

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

.activity-feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.25rem;
}

.activity-agent-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
}

.activity-sector-pill {
    font-size: 0.62rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.activity-sector-pill.content {
    background: rgba(255, 43, 71, 0.15);
    color: #fda4af;
}

.activity-sector-pill.finance {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.activity-time {
    font-size: 0.68rem;
    color: #64748b;
    margin-left: auto;
}

.activity-action {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 600;
    line-height: 1.35;
}

.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.35rem;
}

.activity-tag {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.activity-tag.tag-success { color: #4ade80; background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.3); }
.activity-tag.tag-info { color: #60a5fa; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
.activity-tag.tag-purple { color: #c084fc; background: rgba(192, 132, 252, 0.12); border-color: rgba(192, 132, 252, 0.3); }
.activity-tag.tag-warn { color: #facc15; background: rgba(250, 204, 21, 0.12); border-color: rgba(250, 204, 21, 0.3); }
.activity-tag.tag-finance { color: #34d399; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.3); }
.activity-tag.tag-default { color: #94a3b8; background: rgba(148, 163, 184, 0.1); }

.activity-details {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-go-hint {
    display: inline-block;
    margin-top: 0.45rem;
    font-size: 0.68rem;
    color: #FF2B47;
    opacity: 0.85;
}

.toast-clickable {
    cursor: pointer;
}

.toast-clickable:hover {
    border-color: rgba(255, 43, 71, 0.4);
}

.toast-action-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.68rem;
    color: #94a3b8;
    opacity: 0.9;
}

body.activity-feed-open { overflow: hidden; }
body.console-modal-open { overflow: hidden; }

/* ═══ Consola de Ejecución — Modal global ═══ */
.execution-console-modal-content {
    max-width: 920px;
    width: 94%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.execution-console-modal-header {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.execution-console-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.execution-console-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.execution-console-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.25rem 1.25rem;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
}

.execution-console-status {
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px;
    flex-shrink: 0;
}

.execution-console-body .cost-control-panel {
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
}

.console-box--modal {
    margin-top: 0;
    height: auto;
    min-height: 320px;
    max-height: min(52vh, 480px);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #040508;
}

.console-box--modal .execution-console-log-header {
    flex-shrink: 0;
    padding: 0.65rem 1rem;
}

.console-box--modal .console-body {
    flex: 1;
    min-height: 240px;
    max-height: none;
    padding: 1rem 1.1rem 1.1rem;
    font-size: 0.8rem;
    line-height: 1.55;
    overflow-y: auto;
    overflow-x: hidden;
    word-break: break-word;
}

.console-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
    font-size: 0;
    line-height: 0;
    padding: 0;
}

#execution-console-modal.modal {
    z-index: 10050;
}

#knowledge-library-modal.modal {
    z-index: 10055;
}

@media (max-width: 640px) {
    .execution-console-modal-content {
        width: 98%;
        max-height: 94vh;
    }
    .execution-console-body {
        padding: 0.75rem;
    }
    .console-box--modal {
        min-height: 260px;
        max-height: 45vh;
    }
    .gnia-status-actions {
        flex-wrap: wrap;
    }
}

/* ═══ Biblioteca de Conocimiento — Modal ═══ */
.knowledge-library-modal-content {
    max-width: 1180px;
    width: 96%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.knowledge-library-header {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    align-items: flex-start;
    gap: 1rem;
}

.knowledge-library-header h2 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.knowledge-library-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
    max-width: 52ch;
}

.knowledge-library-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.knowledge-library-body {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 240px;
    gap: 0.85rem;
    padding: 0 1.25rem 1.25rem;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.kb-lib-sidebar,
.kb-lib-assign {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.75rem;
    overflow: hidden;
}

.kb-lib-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-lib-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.kb-lib-item.active .kb-lib-item-btn {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #f8fafc;
}

.kb-lib-item-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    color: #cbd5e1;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.kb-lib-item-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.kb-lib-item-title {
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.kb-lib-item-meta {
    font-size: 0.68rem;
    color: #64748b;
}

.kb-lib-empty,
.kb-lib-hint,
.kb-lib-footnote {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.kb-lib-footnote {
    margin: 0.5rem 0 0;
    font-size: 0.72rem;
    font-style: italic;
}

.kb-lib-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    min-width: 0;
}

.kb-lib-editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.kb-lib-editor-toolbar h3 {
    margin: 0;
    font-size: 1rem;
    color: #f1f5f9;
}

.kb-lib-editor-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.kb-lib-editor-actions .btn.active {
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #38bdf8 !important;
}

.kb-lib-editor-pane {
    flex: 1;
    min-height: 280px;
    max-height: min(52vh, 460px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
}

.kb-lib-preview {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.15rem;
    margin: 0;
}

.kb-lib-editor {
    flex: 1;
    width: 100%;
    min-height: 260px;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #f8fafc;
    padding: 1rem 1.15rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.55;
    resize: none;
    outline: none;
}

.kb-lib-status {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    font-family: var(--font-mono);
}

.kb-lib-agents {
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.kb-lib-agent-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #e2e8f0;
}

.kb-lib-agent-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.kb-lib-agent-row input {
    accent-color: #38bdf8;
}

.kb-lib-agent-icon {
    width: 1.25rem;
    text-align: center;
}

.kb-lib-agent-name {
    line-height: 1.25;
}

.kb-lib-assign-footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.kb-lib-assign-status {
    margin: 0;
    min-height: 1.1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.kb-lib-btn-save-assign {
    width: 100%;
    justify-content: center;
}

.kb-lib-btn-save-assign:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.kb-lib-agent-row.dirty {
    background: rgba(56, 189, 248, 0.08);
    outline: 1px solid rgba(56, 189, 248, 0.25);
}

body.knowledge-library-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .knowledge-library-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .kb-lib-sidebar,
    .kb-lib-assign {
        max-height: 200px;
    }
    .kb-lib-editor-pane {
        max-height: 40vh;
    }
}

/* ═══ Analytic Content — Workspace dedicado ═══ */
.analytics-workspace {
    width: 100%;
    padding: 1.25rem 1.5rem 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(56, 189, 248, 0.15);
    background: rgba(0, 0, 0, 0.25);
}

.analytics-ws-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.analytics-ws-title {
    margin: 0;
    font-size: 1.35rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-ws-title i { color: #38bdf8; }

.analytics-ws-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #94a3b8;
    max-width: 52ch;
}

.analytics-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.35rem;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-mode-tab {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.analytics-mode-tab:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}

.analytics-mode-tab.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(56, 189, 248, 0.2) 100%);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.analytics-ws-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.analytics-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
    animation: analyticsPanelIn 0.2s ease;
}

.analytics-panel.active {
    display: flex;
}

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

.analytics-panel-desc {
    margin: 0;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    background: rgba(56, 189, 248, 0.06);
    border-radius: 8px;
    border-left: 3px solid #38bdf8;
}

.analytics-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.analytics-form-grid-span2 {
    grid-column: 1 / -1;
}

.analytics-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-run-btn {
    align-self: flex-start;
    padding: 0.85rem 1.5rem;
    margin-top: 0.25rem;
}

.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
}

.analytics-results-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
    min-height: 380px;
}

.analytics-results-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem;
    max-height: 520px;
    overflow: hidden;
}

.analytics-results-sidebar-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.analytics-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.analytics-file-item {
    border-radius: 6px;
    overflow: hidden;
}

.analytics-file-item.active {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.analytics-file-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
}

.analytics-file-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

.analytics-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-file-empty {
    padding: 1rem 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    list-style: none;
}

.analytics-results-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.analytics-results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.analytics-current-file {
    font-size: 0.82rem;
    color: #94a3b8;
    font-family: var(--font-mono);
}

.analytics-results-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.analytics-view-tab.active {
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #38bdf8 !important;
}

.analytics-result-editor {
    flex: 1;
    min-height: 320px;
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #f8fafc;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.55;
    resize: vertical;
}

.analytics-result-preview {
    flex: 1;
    min-height: 320px;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.analytics-result-preview.hidden,
.analytics-result-editor.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .analytics-form-grid,
    .analytics-metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .analytics-results-layout {
        grid-template-columns: 1fr;
    }
    .analytics-results-sidebar {
        max-height: 180px;
    }
}

@media (max-width: 640px) {
    .analytics-metrics-grid {
        grid-template-columns: 1fr;
    }
    .analytics-mode-tab {
        min-width: 100%;
    }
}

/* Selectores y date picker — tema oscuro integrado */
.analytics-workspace select.cv-select,
.analytics-workspace .cv-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 0.65rem 2.35rem 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background-color: rgba(10, 12, 20, 0.92);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 12px 8px;
    color: #f1f5f9;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    line-height: 1.4;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.analytics-workspace select.cv-select:hover,
.analytics-workspace .cv-select:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background-color: rgba(15, 23, 42, 0.95);
}

.analytics-workspace select.cv-select:focus,
.analytics-workspace .cv-select:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.analytics-workspace select.cv-select option,
.analytics-workspace .cv-select option {
    background: #0f172a;
    color: #f8fafc;
    padding: 0.5rem;
}

.analytics-workspace input.cv-date-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 12, 20, 0.92);
    color: #f1f5f9;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color-scheme: dark;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.analytics-workspace input.cv-date-input:hover,
.analytics-workspace input.cv-date-input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.analytics-workspace input.cv-date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.85) brightness(1.1);
    cursor: pointer;
    opacity: 0.85;
}

/* Capturas de métricas — Rendimiento Pieza */
.analytics-metrics-upload-wrap {
    margin-top: 0.25rem;
}

.analytics-metrics-upload {
    padding: 1.5rem;
    margin-top: 0.35rem;
}

.analytics-metrics-upload.drag-over {
    border-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}

.analytics-metrics-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.analytics-metric-thumb {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.analytics-metric-thumb img {
    width: 100%;
    height: 88px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.analytics-metric-name {
    font-size: 0.68rem;
    color: #94a3b8;
    padding: 0.35rem 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-metric-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 1;
    transition: background 0.15s ease, color 0.15s ease;
}

.analytics-metric-remove:hover {
    background: rgba(239, 68, 68, 0.85);
}

/* --- Banner Design Studio (Generador de Imágenes embebido) --- */
.banner-design-ws-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
    flex-shrink: 0;
}

.banner-design-ws-title-wrap {
    flex: 1;
    min-width: 200px;
}

.banner-design-ws-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

.banner-design-ws-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.banner-design-expand-btn {
    white-space: nowrap;
    border-color: rgba(217, 70, 239, 0.35) !important;
    color: #e879f9 !important;
    background: rgba(217, 70, 239, 0.08) !important;
}

.banner-design-expand-btn:hover {
    background: rgba(217, 70, 239, 0.18) !important;
    border-color: rgba(217, 70, 239, 0.55) !important;
}

.banner-design-workspace.result-panel-visible {
    display: flex !important;
    flex-direction: column;
    min-height: min(78vh, 900px);
}

.banner-design-iframe {
    width: 100%;
    flex: 1;
    min-height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #0a0a12;
}

/* Overlay portal — escapa del overflow del workspace modal */
.banner-design-fs-overlay {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    flex-direction: column;
    background: rgba(4, 5, 10, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 0.65rem;
    box-sizing: border-box;
}

.banner-design-fs-overlay.hidden {
    display: none !important;
}

.banner-design-fs-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 10102;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #f8fafc;
    background: rgba(217, 70, 239, 0.22);
    border: 1px solid rgba(217, 70, 239, 0.55);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.banner-design-fs-close:hover {
    background: rgba(217, 70, 239, 0.38);
    transform: translateY(-1px);
}

.banner-design-fs-slot {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    width: 100%;
    padding-top: 2.5rem;
    box-sizing: border-box;
}

.banner-design-workspace.fullscreen-active {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 1rem 1.25rem 1.25rem !important;
    background: rgba(8, 10, 18, 0.98) !important;
    border: 1px solid rgba(217, 70, 239, 0.38) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    flex: 1;
}

body.banner-design-fs-lock {
    overflow: hidden;
}

.banner-design-workspace.fullscreen-active .banner-design-ws-header {
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.banner-design-workspace.fullscreen-active .banner-design-iframe {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    height: auto !important;
}

.banner-design-unavailable {
    padding: 1.25rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    font-size: 0.9rem;
}

.banner-design-status.ok {
    color: #86efac;
}

.banner-design-status.error {
    color: #fca5a5;
}

/* Biblioteca visual compartida (agentes de diseño) */
.visual-library-panel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.35rem 0.5rem 0.5rem;
}

.visual-lib-summary {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.visual-lib-tabs,
.visual-lib-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.visual-lib-tab,
.visual-lib-subtab {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    border-radius: 6px;
    padding: 0.28rem 0.55rem;
    font-size: 0.72rem;
    cursor: pointer;
}

.visual-lib-tab.active,
.visual-lib-subtab.active {
    border-color: rgba(6, 182, 212, 0.45);
    background: rgba(6, 182, 212, 0.12);
    color: #67e8f9;
}

.visual-lib-toolbar {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.visual-lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.visual-lib-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.visual-lib-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.visual-lib-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.25rem 0.35rem;
}

.visual-lib-card-name {
    font-size: 0.62rem;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.visual-lib-empty {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

#cv-visual-library-container.collapsed .visual-library-panel,
#cv-visual-library-container.collapsed .cv-tools-separator {
    display: none !important;
}

/* ════════════════════════════════════════════════
   AGENDA DEL MES — tarjeta + ventana ampliada
   ════════════════════════════════════════════════ */
#month-agenda-modal {
    position: fixed;
    inset: 0;
    z-index: 9990;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.2vh 1.5vw;
}
#month-agenda-modal.hidden { display: none !important; }

.ma-shell {
    width: 100%;
    max-width: 1500px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
}

.ma-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(139, 92, 246, 0.08));
    flex-wrap: wrap;
    flex-shrink: 0;
}
.ma-title { display: flex; align-items: center; gap: 0.9rem; }
.ma-title-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}
.ma-title h2 { margin: 0; color: #f8fafc; font-size: 1.35rem; letter-spacing: 0.3px; }
.ma-title p { margin: 0.15rem 0 0; color: #94a3b8; font-size: 0.82rem; }

.ma-header-actions { display: flex; align-items: center; gap: 0.7rem; }
.ma-month-label {
    display: flex; align-items: center; gap: 0.45rem;
    color: #cbd5e1; font-size: 0.82rem; font-weight: 600;
}
.ma-month-label select {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.82rem;
    cursor: pointer;
}
#month-agenda-modal .close-btn {
    font-size: 1.7rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 0.3rem;
    transition: color 0.15s ease;
}
#month-agenda-modal .close-btn:hover { color: #f87171; }

.ma-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    flex-shrink: 0;
}
.ma-summary-stats { display: flex; gap: 1.6rem; }
.ma-stat { display: flex; flex-direction: column; align-items: flex-start; }
.ma-stat-val { font-size: 1.4rem; font-weight: 800; color: #f8fafc; line-height: 1; }
.ma-stat-label { font-size: 0.72rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 0.2rem; }
.ma-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.ma-legend-empty { font-size: 0.78rem; color: #64748b; font-style: italic; }

.ma-filter-chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.72rem; color: #cbd5e1; font-weight: 600;
    background: color-mix(in srgb, var(--c) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
    padding: 0.28rem 0.6rem; border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.ma-filter-chip i { color: var(--c); }
.ma-filter-chip b { color: #fff; }
.ma-filter-chip:hover {
    background: color-mix(in srgb, var(--c) 22%, transparent);
    border-color: color-mix(in srgb, var(--c) 60%, transparent);
}
.ma-filter-chip.active {
    background: color-mix(in srgb, var(--c) 28%, transparent);
    border-color: var(--c);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent), 0 0 12px color-mix(in srgb, var(--c) 25%, transparent);
    color: #fff;
    transform: translateY(-1px);
}

.ma-body { flex: 1; overflow-y: auto; padding: 1.3rem 1.5rem; }
.ma-loading { text-align: center; color: #94a3b8; padding: 3rem 1rem; font-size: 0.95rem; }
.ma-loading i { margin-right: 0.5rem; color: #38bdf8; }

.ma-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}
@media (max-width: 1200px) { .ma-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .ma-grid { grid-template-columns: 1fr; } }

.ma-week {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.ma-week-head {
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-bottom: 0.5rem;
}
.ma-week-head h3 { margin: 0; font-size: 0.98rem; color: #38bdf8; display: flex; align-items: center; gap: 0.4rem; }
.ma-week-count {
    font-size: 0.72rem; font-weight: 700; color: #e2e8f0;
    background: rgba(56, 189, 248, 0.18); border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.15rem 0.5rem; border-radius: 999px;
}
.ma-week-meta { font-size: 0.72rem; color: #94a3b8; display: flex; align-items: center; gap: 0.35rem; }
.ma-week-body { display: flex; flex-direction: column; gap: 0.45rem; }

.ma-empty {
    text-align: center; color: #64748b; font-style: italic; font-size: 0.8rem;
    border: 1px dashed rgba(255, 255, 255, 0.1); border-radius: 8px;
    padding: 1.2rem 0.5rem;
}

.ma-channel { display: flex; flex-direction: column; gap: 0; }
.ma-channel-toggle {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--c);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    color: var(--c);
    font-size: 0.76rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.ma-channel-toggle:hover {
    background: color-mix(in srgb, var(--c) 12%, rgba(0, 0, 0, 0.35));
    border-color: color-mix(in srgb, var(--c) 40%, transparent);
}
.ma-channel.open .ma-channel-toggle {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: color-mix(in srgb, var(--c) 14%, rgba(0, 0, 0, 0.35));
}
.ma-channel-toggle-left { display: inline-flex; align-items: center; gap: 0.4rem; }
.ma-channel-toggle-right { display: inline-flex; align-items: center; gap: 0.45rem; color: #94a3b8; }
.ma-channel-count {
    font-size: 0.7rem; font-weight: 700; color: #cbd5e1;
    background: rgba(255, 255, 255, 0.08); padding: 0.1rem 0.45rem; border-radius: 999px;
}
.ma-chevron { font-size: 0.7rem; opacity: 0.85; }
.ma-channel-panel {
    display: flex; flex-direction: column; gap: 0.4rem;
    padding: 0.55rem 0.45rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: rgba(0, 0, 0, 0.2);
}
.ma-channel-panel[hidden] { display: none !important; }

.ma-piece {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--c);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ma-piece-top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ma-piece-month {
    font-size: 0.65rem; font-weight: 700; color: #fbbf24;
    background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.1rem 0.4rem; border-radius: 4px;
}
.ma-piece-fmt { font-size: 0.68rem; color: #94a3b8; font-weight: 600; }
.ma-piece-snippet {
    font-size: 0.78rem; color: #cbd5e1; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ma-piece-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.72rem; font-weight: 600; color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px; padding: 0.3rem 0.55rem; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.ma-piece-btn:hover { background: rgba(56, 189, 248, 0.18); border-color: rgba(56, 189, 248, 0.4); }


/* ═══ Auth gate (Google Sign-In) ═══ */
.auth-gate {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(122, 15, 34, 0.45), transparent 70%),
        rgba(7, 6, 11, 0.96);
    backdrop-filter: blur(10px);
}
.auth-gate.hidden { display: none !important; }
body.auth-locked { overflow: hidden; }
#app-root.auth-blurred {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}
.auth-card {
    width: min(420px, 92vw);
    padding: 2rem 1.75rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 43, 71, 0.28);
    background: linear-gradient(160deg, rgba(20, 16, 28, 0.98), rgba(12, 10, 18, 0.98));
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 43, 71, 0.12);
    text-align: center;
}
.auth-brand h1 {
    margin: 0.85rem 0 0.35rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.55rem;
    letter-spacing: 0.08em;
    color: #f1ecf4;
}
.auth-brand p {
    margin: 0 0 1.4rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #8b7f96;
}
.auth-logo-mark { display: flex; justify-content: center; }
.auth-google-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #fff;
    color: #1f2937;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.auth-google-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,0.12); }
.auth-google-btn:disabled { opacity: 0.7; cursor: wait; transform: none; }
.auth-error {
    margin: 1rem 0 0;
    padding: 0.7rem 0.8rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.82rem;
    line-height: 1.4;
}
.auth-hint {
    margin: 1rem 0 0;
    font-size: 0.72rem;
    color: #6b6175;
}
.auth-user-chip {
    display: none;
    align-items: center;
    gap: 0.55rem;
    max-width: 240px;
    padding: 0.25rem 0.45rem 0.25rem 0.25rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}
.auth-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.auth-user-avatar.fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 43, 71, 0.2);
    color: #ff6b81;
    font-size: 0.75rem;
}
.auth-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;
}
.auth-user-name {
    font-size: 0.72rem;
    color: #f1ecf4;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-user-email {
    font-size: 0.62rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-logout-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
}
.auth-logout-btn:hover { color: #ff6b81; background: rgba(255,43,71,0.12); }
