:root {
    --bg-dark: #0a0b10;
    --sidebar-bg: #11131a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --text-main: #f3f4f6;
    --text-dim: #9ca3af;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.nav-links li:hover {
    background-color: var(--card-bg);
    color: var(--text-main);
}

.nav-links li.active {
    background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator.online {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

/* Main Content */
.content {
    flex-grow: 1;
    padding: 2rem 3rem;
    max-width: calc(100vw - 260px);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

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

.avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Glassmorphism Cards */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.grow {
    transition: transform 0.3s ease;
}

.grow:hover {
    transform: translateY(-5px);
}

/* Tabs system */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

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

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.2);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.2);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.2);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.stat-info h2 {
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

/* Data Tables & Charts */
.data-row {
    display: flex;
    gap: 1.5rem;
}

.data-box {
    padding: 1.5rem;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}

.data-box canvas {
    flex-grow: 1;
    max-height: 320px;
}

.flex-2 {
    flex: 2;
}

.flex-1 {
    flex: 1;
}

h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.table-container {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    color: var(--text-dim);
    font-weight: 400;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
}

/* Admin Area */
.admin-container {
    display: flex;
    gap: 1.5rem;
    height: 70vh;
}

@media (max-width: 1200px) {
    .admin-container {
        flex-direction: column;
        height: auto;
    }
    .agent-list {
        width: 100%;
        height: 300px;
    }
}

.agent-list {
    width: 280px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Mantener la cabecera fija y el scroll en la lista */
}

.agent-list h3 {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

#agent-selector-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.5rem;
}

.agent-list ul {
    list-style: none;
    margin-top: 1rem;
}

.agent-list li {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.agent-list li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.agent-list li.selected {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.agent-list li.special-item {
    border: 1px dashed var(--glass-border);
    margin-bottom: 1rem;
}

.agent-list li.special-item:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.agent-list li.special-item.selected {
    border-style: solid;
    background: var(--accent-blue);
}

.custom-select,
input[type="text"],
input[type="password"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 0.95rem;
}

.custom-select:focus,
input:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.4);
}

hr {
    border: none;
    border-top: 1px solid var(--glass-border);
}

.alert {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
}

.alert.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-orange);
}

.flex-row-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p-1 {
    padding: 1rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.text-xs {
    font-size: 0.75rem;
}

.agent-editor {
    flex: 1;
    padding: 2rem;
    position: relative;
    overflow-y: auto; /* Permitir scroll en el formulario largo */
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none;
}

#editor-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    padding: 1rem;
    font-family: inherit;
    resize: vertical;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

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

.btn.primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* Operations & Command Center - Horizontal Grouped */
.ops-container-full {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ops-section {
    padding: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Agent Health Status - Accordion Design */
.health-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.dept-accordion {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dept-header {
    background: rgba(168, 85, 247, 0.08);
    padding: 0.8rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.dept-header:hover {
    background: rgba(168, 85, 247, 0.15);
}

.dept-header h4 {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent-purple);
    letter-spacing: 1px;
    margin: 0;
}

.dept-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dept-accordion.open .dept-toggle-icon {
    transform: rotate(180deg);
}

.dept-agents-row {
    display: none;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.1);
}

.dept-accordion.open .dept-agents-row {
    display: flex;
}

/* Agent Health Cards (Optimized for wrap) */
.health-mini-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 0.8rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    min-width: 170px;
}

.health-card-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex-grow: 1;
}

.health-card-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-mini {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.btn-mini:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.btn-mini.restart:hover {
    background: rgba(34, 197, 94, 0.2);
}

.btn-mini.pause:hover {
    background: rgba(239, 68, 68, 0.2);
}

.health-mini-card.active .status-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.health-mini-card.idle .status-dot {
    background: var(--text-dim);
}

.health-mini-card.error .status-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.health-mini-card.active-filter {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.agent-code-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.activity-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge-filter {
    background: var(--accent-blue);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.activity-feed.compact {
    height: 350px;
    font-size: 0.8rem;
}

.activity-item {
    display: grid;
    grid-template-columns: 80px 100px 120px 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.activity-time {
    color: var(--text-dim);
}

.activity-agent {
    font-weight: 700;
    color: var(--accent-purple);
}

.activity-action {
    font-weight: 600;
    color: var(--text-main);
}

.activity-msg {
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden {
    display: none !important;
}

.btn-refresh {
    background: var(--accent-orange);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
}

/* Scrollbar styling for horizontal stripe */
.health-stripe::-webkit-scrollbar {
    height: 4px;
}

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

.health-stripe::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Decisions (Approvals) */
.decision-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.decision-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-orange);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.btn-approve {
    background: var(--accent-green);
    color: white;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.btn-reject {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
}

/* Global Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dim);
    white-space: pre-wrap;
    /* Mantiene saltos de línea del borrador */
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.hidden {
    display: none !important;
}

/* Global Admin Controls */
.global-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-left: 5px solid var(--accent-orange);
}

.control-info h3 {
    margin-bottom: 0.3rem;
    color: white;
}

.control-info p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.btn.warning {
    background: #f59e0b;
    color: #111;
    font-weight: 700;
}

.btn.warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn.large {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-icon {
    margin-right: 0.5rem;
}

/* Financial Results Specifics */
.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.finance-card {
    padding: 1.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.finance-card span {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.finance-card strong {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.finance-card.income strong {
    color: var(--accent-green);
}

.finance-card.expenses strong {
    color: var(--accent-red);
}

.finance-card.net.plus strong {
    color: var(--accent-blue);
}

.finance-card.net.minus strong {
    color: var(--accent-orange);
}

.category-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: var(--text-dim);
}

.text-green {
    color: var(--accent-green) !important;
}

.text-red {
    color: var(--accent-red) !important;
}

/* Operations Results Specifics */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.p-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.p-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.p-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
    color: var(--text-dim);
}

.agent-tag {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.priority-pill {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.priority-pill.high {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.priority-pill.normal {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.priority-pill.low {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.milestone-timeline {
    border-left: 2px solid var(--accent-blue);
    margin-left: 1rem;
    padding-left: 2rem;
}

.milestone-item {
    position: relative;
    margin-bottom: 2rem;
}

.milestone-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.2rem;
    width: 12px;
    height: 12px;
    background: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-blue);
}

.m-date {
    font-size: 0.8rem;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.m-content h6 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.m-content p {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Marketing Results Specifics */
.content-drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.content-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.platform-badge {
    background: var(--accent-purple);
    color: white;
    padding: 0.1rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.content-preview {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin: 1rem 0;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-blue);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.insight-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.priority-dot.high {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

.priority-dot.medium {
    background: var(--accent-orange);
}

.priority-dot.low {
    background: var(--accent-blue);
}

.insight-text strong {
    display: block;
    margin-bottom: 0.2rem;
}

.insight-text p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.ml-2 {
    margin-left: 2rem;
}

.scrape-list {
    list-style: none;
}

.scrape-list li {
    font-size: 0.8rem;
    padding: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.source-tag {
    font-weight: 800;
    color: var(--accent-green);
    margin-right: 0.5rem;
    font-size: 0.7rem;
}

.audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.audit-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 1.25rem;
    border-radius: 16px;
}

.audit-impact {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.audit-impact.high {
    color: var(--accent-red);
}

.recommendation {
    margin-top: 1rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

/* Funnel and Success Metrics */
.funnel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.funnel-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.stat-count {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.stat-name {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.border-green {
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.progress-bar-mini {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 2px;
}

/* Team Results View Styles */
.team-header {
    padding: 1.5rem;
}

.director-selector {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.director-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 260px;
    text-align: left;
}

.director-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
}

.director-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}

.d-icon {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.d-info {
    display: flex;
    flex-direction: column;
}

.d-info strong {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

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

.results-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.agent-result-box {
    padding: 2rem;
}

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

.result-header h4 {
    font-size: 1.2rem;
    color: var(--accent-blue);
}

.agent-role {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 700;
}

.prop-title {
    max-width: 400px;
}

.prop-title small {
    color: var(--text-dim);
    display: block;
    margin-top: 0.3rem;
}

.results-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.result-card.mini {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.4;
}

.mb-2 {
    margin-bottom: 1.5rem;
}

.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.new {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.status-pill.draft {
    background: rgba(156, 163, 175, 0.2);
    color: #d1d5db;
}

.status-pill.sent {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-pill.won {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.loading-state {
    text-align: center;
    padding: 4rem;
    font-size: 1.1rem;
    color: var(--text-dim);
}

.mt-1 {
    margin-top: 1.5rem;
}

.empty-msg {
    color: var(--text-dim);
    font-style: italic;
}

/* --- Switch Toggle --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    transition: .4s;
    border: 1px solid var(--glass-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-blue);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent-blue);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.flex-row-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.glass-lite {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.p-1 {
    padding: 0.75rem;
}

.mb-1 {
    margin-bottom: 0.75rem;
}

.text-xs {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Wizard Styles */
.wizard-step {
    animation: slideIn 0.4s ease-out;
}

.text-center {
    text-align: center;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

/* Custom Scrollbar for Glass Containers */
#agent-selector-list::-webkit-scrollbar,
.agent-editor::-webkit-scrollbar,
.console::-webkit-scrollbar {
    width: 6px;
}

#agent-selector-list::-webkit-scrollbar-track,
.agent-editor::-webkit-scrollbar-track,
.console::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

#agent-selector-list::-webkit-scrollbar-thumb,
.agent-editor::-webkit-scrollbar-thumb,
.console::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

#agent-selector-list::-webkit-scrollbar-thumb:hover,
.agent-editor::-webkit-scrollbar-thumb:hover,
.console::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}
/* Animations */
.pulse-blue {
    animation: pulse-blue-anim 1s ease-out;
}

@keyframes pulse-blue-anim {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
        border-color: var(--accent-blue);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Content Drafts Styles */
.agent-draft-section {
    border-left: 4px solid var(--accent-purple);
    margin-bottom: 2rem;
}

.agent-title {
    color: var(--accent-purple);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.type-title {
    color: var(--text-dim);
    margin: 1.5rem 0 1rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.draft-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.draft-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.platform-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.draft-date {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.draft-title {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.draft-preview {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.draft-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex { display: flex; }
.gap-1 { gap: 0.5rem; }

.btn.sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn.success {
    background: var(--accent-green);
    color: white;
}

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