/* ═══════════════════════════════════════════════════════════════
   ARCSIDE — Pipeline Orchestrator Design System
   Light mode · Glassmorphism · Pipeline Visualization
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Variables ────────────────────────────────────────── */
:root {
    /* Core Palette - Light (Standard) */
    --bg-void: #f1f5f9;
    --bg-deep: #e2e8f0;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #ffffff;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-strong: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-border-hover: rgba(0, 0, 0, 0.15);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-accent: #4f46e5;

    /* Accents */
    --accent-primary: #6366f1;
    --accent-primary-glow: rgba(99, 102, 241, 0.2);
    --accent-secondary: #a855f7;
    --accent-success: #16a34a;
    --accent-warning: #ea580c;
    --accent-danger: #dc2626;
    --accent-info: #2563eb;
    --accent-teal: #0d9488;

    /* Pipeline Stage Colors */
    --stage-a: #8b5cf6;
    --stage-b: #3b82f6;
    --stage-c-q: #ef4444;
    --stage-c-p: #22c55e;
    --stage-d: #f59e0b;
    --stage-e: #6366f1;
    --stage-f: #14b8a6;
    --stage-g: #64748b;
    --stage-h: #64748b;
    --stage-i: #eab308;
    --stage-j: #a855f7;
    --stage-k: #eab308;
    --stage-l: #0ea5e9;
    --stage-m: #f97316;
    --stage-n: #22c55e;

    /* Layout */
    --header-height: 60px;
    --sidebar-width: 260px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px var(--accent-primary-glow);

    /* Font */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}


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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-void);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ──────────────────────────────────────────────────── */
.arcside-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
}

.arcside-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.arcside-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.arcside-logo .logo-badge {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-secondary);
    background: rgba(168, 85, 247, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.header-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.header-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: rgba(100, 100, 100, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

.user-info {
    font-size: 0.8rem;
    line-height: 1.3;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Main Layout ─────────────────────────────────────────────── */
.arcside-main {
    margin-top: var(--header-height);
    padding: 1.5rem;
    min-height: calc(100vh - var(--header-height));
}

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

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s;
}

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

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.purple {
    background: rgba(99, 102, 241, 0.15);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.15);
}

.stat-icon.green {
    background: rgba(34, 197, 94, 0.15);
}

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

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

.stat-icon.teal {
    background: rgba(20, 184, 166, 0.15);
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

/* ── Pipeline Board (Kanban) ─────────────────────────────────── */
.pipeline-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pipeline-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.pipeline-board {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.pipeline-board::-webkit-scrollbar {
    height: 6px;
}

.pipeline-board::-webkit-scrollbar-track {
    background: var(--bg-deep);
    border-radius: 3px;
}

.pipeline-board::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

.pipeline-stage {
    min-width: 220px;
    max-width: 260px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 280px);
}

.stage-header {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    background: var(--bg-card);
}

.stage-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

/* Stage color bars */
.pipeline-stage[data-stage="A"] .stage-header::before {
    background: var(--stage-a);
}

.pipeline-stage[data-stage="B"] .stage-header::before {
    background: var(--stage-b);
}

.pipeline-stage[data-stage="C_quarantine"] .stage-header::before {
    background: var(--stage-c-q);
}

.pipeline-stage[data-stage="C_promote"] .stage-header::before {
    background: var(--stage-c-p);
}

.pipeline-stage[data-stage="D"] .stage-header::before {
    background: var(--stage-d);
}

.pipeline-stage[data-stage="E"] .stage-header::before {
    background: var(--stage-e);
}

.pipeline-stage[data-stage="F"] .stage-header::before {
    background: var(--stage-f);
}

.pipeline-stage[data-stage="G"] .stage-header::before {
    background: var(--stage-g);
}

.pipeline-stage[data-stage="H"] .stage-header::before {
    background: var(--stage-h);
}

.pipeline-stage[data-stage="I"] .stage-header::before {
    background: var(--stage-i);
}

.pipeline-stage[data-stage="J"] .stage-header::before {
    background: var(--stage-j);
}

.pipeline-stage[data-stage="K"] .stage-header::before {
    background: var(--stage-k);
}

.pipeline-stage[data-stage="L"] .stage-header::before {
    background: var(--stage-l);
}

.pipeline-stage[data-stage="M"] .stage-header::before {
    background: var(--stage-m);
}

.pipeline-stage[data-stage="N"] .stage-header::before {
    background: var(--stage-n);
}

.stage-icon {
    font-size: 1.1rem;
}

.stage-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.stage-count {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.stage-body {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stage-body::-webkit-scrollbar {
    width: 4px;
}

.stage-body::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.stage-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-style: italic;
}

/* ── Project Card ────────────────────────────────────────────── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.project-card.hazardous {
    border-left: 3px solid var(--accent-warning);
}

.project-card.beta {
    border-left: 3px solid var(--accent-info);
}

.card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.card-slug {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.card-flags {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
}

.flag-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flag-badge.hazardous {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.flag-badge.beta {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-info);
}

.flag-badge.priority {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

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

.card-risk {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.risk-bar {
    width: 40px;
    height: 4px;
    background: var(--bg-deep);
    border-radius: 2px;
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.risk-low .risk-bar-fill {
    background: var(--accent-success);
}

.risk-medium .risk-bar-fill {
    background: var(--accent-warning);
}

.risk-high .risk-bar-fill {
    background: var(--accent-danger);
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.project-card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    font-size: 0.68rem;
    padding: 3px 8px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.card-action-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.card-action-btn.danger:hover {
    background: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* ── Activity Feed ───────────────────────────────────────────── */
.feed-section {
    margin-top: 1.5rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.feed-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.feed-item:hover {
    border-color: var(--glass-border-hover);
    background: var(--bg-card-hover);
}

.feed-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.feed-icon.stage-change {
    background: rgba(99, 102, 241, 0.15);
}

.feed-icon.gate-decision {
    background: rgba(34, 197, 94, 0.15);
}

.feed-icon.alert {
    background: rgba(239, 68, 68, 0.15);
}

.feed-icon.scan {
    background: rgba(59, 130, 246, 0.15);
}

.feed-icon.note {
    background: rgba(100, 116, 139, 0.15);
}

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

.feed-message {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.feed-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    display: flex;
    gap: 0.5rem;
}

.feed-actor {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ── Source Registry ─────────────────────────────────────────── */
.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.source-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    transition: all 0.25s;
}

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

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

.source-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.source-type.facebook {
    background: rgba(59, 89, 152, 0.2);
    color: #8b9dc3;
}

.source-type.linkedin {
    background: rgba(0, 119, 181, 0.2);
    color: #5db5e5;
}

.source-type.reddit {
    background: rgba(255, 69, 0, 0.2);
    color: #ff7043;
}

.source-type.hackernews {
    background: rgba(255, 102, 0, 0.2);
    color: #ff8a3c;
}

.source-type.github {
    background: rgba(110, 84, 148, 0.2);
    color: #ab8dd6;
}

.source-type.gitlab {
    background: rgba(226, 67, 41, 0.2);
    color: #e8715e;
}

.source-type.web {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

.source-type.rss {
    background: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
}

.source-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
}

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

.status-dot.idle {
    background: var(--text-muted);
}

.status-dot.running {
    background: var(--accent-success);
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background: var(--accent-danger);
}

.status-dot.disabled {
    background: var(--text-muted);
    opacity: 0.4;
}

.source-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.source-url {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    word-break: break-all;
    margin-bottom: 0.6rem;
}

.source-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Forms & Modals ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.88rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666688' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2rem;
}

.form-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

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

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* ── Gate Cards ──────────────────────────────────────────────── */
.gates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.gate-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.3rem;
    position: relative;
    overflow: hidden;
}

.gate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.gate-card.recette::before {
    background: var(--stage-l);
}

.gate-card.preprod::before {
    background: var(--stage-m);
}

.gate-card.prod::before {
    background: var(--stage-n);
}

.gate-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gate-decision {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gate-decision.pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.gate-decision.go {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-success);
}

.gate-decision.no_go {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.gate-decision.rollback {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.checklist {
    list-style: none;
    margin-top: 0.8rem;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(100, 100, 200, 0.06);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist-check {
    width: 16px;
    height: 16px;
    border: 2px solid var(--glass-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.checklist-check.checked {
    background: var(--accent-success);
    border-color: var(--accent-success);
    color: white;
    font-size: 0.6rem;
}

/* ── Pills / Tabs ────────────────────────────────────────────── */
.view-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    width: fit-content;
}

.view-tab {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    border: none;
    background: none;
    font-family: var(--font-family);
}

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

.view-tab.active {
    background: var(--accent-primary);
    color: white;
}

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.empty-state p {
    font-size: 0.88rem;
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ── Toast Notifications ─────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: slideInRight 0.3s ease-out;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
}

.toast.success {
    border-left: 3px solid var(--accent-success);
}

.toast.error {
    border-left: 3px solid var(--accent-danger);
}

.toast.warning {
    border-left: 3px solid var(--accent-warning);
}

.toast.info {
    border-left: 3px solid var(--accent-info);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

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

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

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .arcside-header {
        padding: 0 1rem;
    }

    .header-nav {
        display: none;
    }

    .arcside-main {
        padding: 1rem;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .pipeline-stage {
        min-width: 200px;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }
}

/* ── Utility ─────────────────────────────────────────────────── */
.text-center {
    text-align: center;
}

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

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

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

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

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

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

.flex {
    display: flex;
}

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

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.hidden {
    display: none !important;
}