/* AI Marketing Department — minimal UI styles on top of Bootstrap 5 */
:root {
    --sidebar-w: 240px;
    --sidebar-bg: #111827;
    --accent: #4f46e5;
}
body { background: #f4f6fb; font-size: .925rem; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar-w); background: var(--sidebar-bg); color: #fff; position: fixed; inset: 0 auto 0 0;
    display: flex; flex-direction: column; z-index: 1030; transition: transform .2s;
}
.sidebar .brand { display: flex; gap: .6rem; align-items: center; padding: 1.1rem 1.2rem; color: #fff; text-decoration: none; font-weight: 700; line-height: 1.05; letter-spacing: .04em; }
.sidebar .brand i { font-size: 1.8rem; color: #818cf8; }
.sidebar .brand small { font-weight: 500; font-size: .7rem; color: #9ca3af; letter-spacing: .2em; }
.sidebar .nav-link { color: #cbd5e1; display: flex; align-items: center; gap: .6rem; padding: .55rem 1.2rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(129,140,248,.15); border-left-color: #818cf8; }
.sidebar-footer { margin-top: auto; padding: 1rem 1.2rem; border-top: 1px solid rgba(255,255,255,.08); }
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 1020; background: #fff; border-bottom: 1px solid #e5e7eb; padding: .7rem 1.5rem; display: flex; gap: .75rem; align-items: center; }
.content { padding: 1.5rem; }
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .main { margin-left: 0; }
}
.card { border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card-header { background: #fff; font-weight: 600; }
.stat-card .stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: #6b7280; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-card i { font-size: 1.6rem; opacity: .35; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.agent-card { background: #fff; border: 1px solid #e5e7eb; border-left: 4px solid #9ca3af; border-radius: .5rem; padding: .6rem .8rem; }
.agent-card.status-working { border-left-color: #0d6efd; }
.agent-card.status-working .agent-dot i { animation: pulse 1s infinite; }
.agent-card.status-waiting { border-left-color: #ffc107; }
.agent-card.status-error { border-left-color: #dc3545; }
@keyframes pulse { 50% { opacity: .3; } }
.pipeline { display: flex; gap: .5rem; flex-wrap: wrap; }
.pipeline .stage { flex: 1 1 140px; background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .6rem .8rem; position: relative; }
.pipeline .stage.done { border-color: #198754; background: #f0fdf4; }
.pipeline .stage.active { border-color: #0d6efd; background: #eff6ff; }
.pipeline .stage .stage-title { font-weight: 600; font-size: .85rem; }
.task-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.task-card { background: #fff; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .7rem .8rem; text-decoration: none; color: inherit; display: block; }
.task-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(79,70,229,.12); }
.task-card .code { font-family: ui-monospace, monospace; font-size: .8rem; color: #6b7280; }
.feed { max-height: 520px; overflow-y: auto; }
.feed-item { border-bottom: 1px dashed #e5e7eb; padding: .45rem 0; font-size: .85rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-item.level-error { color: #b02a37; }
.feed-item.level-warning { color: #997404; }
.md-content { line-height: 1.6; }
.md-content h2, .md-content h3, .md-content h4, .md-content h5, .md-content h6 { margin-top: 1.2rem; font-weight: 600; }
.md-content h2 { font-size: 1.35rem; border-bottom: 1px solid #e5e7eb; padding-bottom: .3rem; }
.md-content h3 { font-size: 1.15rem; }
.md-content h4 { font-size: 1.02rem; }
.md-content h5, .md-content h6 { font-size: .95rem; }
.md-content table { font-size: .85rem; }
.md-quote { border-left: 4px solid #c7d2fe; background: #f5f7ff; padding: .5rem 1rem; margin: .8rem 0; }
.md-code { background: #1f2937; color: #e5e7eb; padding: .8rem; border-radius: .4rem; white-space: pre-wrap; }
pre.json { background: #0f172a; color: #e2e8f0; padding: 1rem; border-radius: .4rem; max-height: 500px; overflow: auto; font-size: .78rem; white-space: pre-wrap; word-break: break-word; }
.untrusted { border: 1px dashed #dc3545; background: #fff5f5; }
.table td, .table th { vertical-align: middle; }
.guest { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg,#111827,#312e81); }
.guest-box { width: 100%; max-width: 420px; padding: 1rem; }
.guest-box h1, .guest-box .text-muted { color: #fff !important; }
.text-pre { white-space: pre-wrap; }
.progress-lg { height: 1.4rem; }
.mem-list li { margin-bottom: .35rem; }
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main { margin: 0; }
}
