/* ============================================================
   SBF — Swarm Brain Furniture — Dark Theme Stylesheet
   ============================================================ */

:root {
    /* Background */
    --bg: #0A0A0F;
    --bg-surface: #14141F;
    --bg-elevated: #1E1E2E;
    --bg-hover: #2A2A3E;
    --border: #2A2A3E;

    /* Text */
    --text-primary: #E8E8F0;
    --text-secondary: #8888A0;
    --text-muted: #5A5A70;

    /* Accents */
    --primary: #6C5CE7;
    --primary-glow: rgba(108, 92, 231, 0.3);
    --success: #00D9A3;
    --success-glow: rgba(0, 217, 163, 0.3);
    --warning: #FFB74D;
    --warning-glow: rgba(255, 183, 77, 0.3);
    --danger: #FF5C7C;
    --danger-glow: rgba(255, 92, 124, 0.4);
    --info: #4FC3F7;

    /* Fonts */
    --font-head: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Sizes */
    --sidebar-w: 240px;
    --topbar-h: 60px;
}

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

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    display: flex;
    overflow: hidden;
    height: 100vh;
    background-image:
        radial-gradient(ellipse at top left, rgba(108, 92, 231, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(0, 217, 163, 0.05), transparent 50%);
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 2rem;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

.logo-name {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.nav-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-elevated);
    color: var(--primary);
    border-left-color: var(--primary);
}

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

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    color: var(--danger);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    color: var(--success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* === TOPBAR === */
.topbar {
    height: var(--topbar-h);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(20, 20, 31, 0.8);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 600;
}

.topbar-actions {
    display: flex;
    gap: 0.75rem;
}

/* === BUTTONS === */
.btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-primary:hover {
    background: #5A4BD1;
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border);
}

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

/* ============================================================
   VIEWS
   ============================================================ */
.view {
    display: none;
    flex: 1;
    overflow: auto;
    padding: 1.5rem;
}

.view.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* === GLASS PANEL === */
.glass {
    background: rgba(20, 20, 31, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.panel-header {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   DESIGNER
   ============================================================ */
.editor-active { background: var(--primary) !important; color: #fff !important; }
.editor-toolbar {
    display: flex; gap: 0.4rem; padding: 0.4rem 0.6rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 8px 8px 0 0; border-bottom: none;
}
.tool-btn.active { background: var(--primary); color: #fff; }
.editor-hint {
    font-size: 0.72rem; color: var(--text-secondary);
    padding: 0.5rem; background: var(--bg-elevated);
    border-radius: 6px; margin-top: 0.5rem; line-height: 1.4;
}
.lib-item { cursor: pointer; user-select: none; }
.lib-item:hover { background: var(--primary-glow); color: #fff; }

.prop-form { display: flex; flex-direction: column; gap: 0.5rem; }
.prop-input {
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-primary); border-radius: 6px; padding: 0.3rem 0.5rem;
    font-size: 0.82rem; font-family: var(--font-mono); width: 100%;
}
.prop-input:focus { outline: none; border-color: var(--primary); }
.prop-row { display: flex; flex-direction: column; gap: 0.2rem; }
.prop-actions { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.btn-sm { font-size: 0.78rem; padding: 0.3rem 0.7rem; }
.btn-danger { background: var(--danger); color: #fff; }

.designer-layout {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 1rem;
    flex: 1;
    min-height: 400px;
    min-height: 0;
}

.panel-left, .panel-right {
    overflow-y: auto;
}

.panel-center {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.canvas-3d {
    flex: 1;
    min-height: 350px;
    height: 100%;
    background:
        linear-gradient(var(--bg) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, var(--bg) 1px, transparent 1px) 0 0 / 40px 40px,
        radial-gradient(ellipse at center, var(--bg-elevated), var(--bg));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.canvas-3d canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.canvas-3d.loaded .canvas-placeholder { display: none; }

.canvas-3d .canvas-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 0.6rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.canvas-3d.loaded .canvas-hint { opacity: 1; }

.canvas-placeholder {
    text-align: center;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.placeholder-icon { font-size: 3rem; }

.part-library {
    list-style: none;
}

/* Inline-Bibliothek im Produktionsbaum-Header */
.part-library#partLibrary {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.part-library .lib-hint { font-size: 0.75rem; color: var(--text-secondary); margin-right: 0.2rem; }
.part-library .lib-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    text-align: left;
    cursor: grab;
}
.part-library .lib-item:hover { background: var(--bg-hover); border-color: var(--primary); }

.lib-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    background: var(--bg-elevated);
    border-radius: 6px;
    cursor: grab;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.lib-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

/* Möbel-Liste (linke Sidebar) */
.furniture-list { display: flex; flex-direction: column; gap: 0.25rem; }
.furniture-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.6rem; border-radius: 6px; cursor: pointer;
    background: var(--bg-elevated); border: 1px solid transparent;
    transition: all 0.15s; font-size: 0.85rem;
}
.furniture-item:hover { background: var(--bg-hover); }
.furniture-item.active { border-color: var(--primary); background: var(--bg-hover); }
.furniture-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.furn-delete { cursor: pointer; color: var(--danger); font-size: 0.9rem; padding: 0 0.2rem; opacity: 0.6; }
.furn-delete:hover { opacity: 1; }
.furn-locked { font-size: 0.8rem; opacity: 0.4; }

.furniture-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.furniture-name {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.property-panel {
    font-size: 0.85rem;
}

.property-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 0;
}

.prop-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.prop-label { color: var(--text-secondary); }
.prop-value { color: var(--text-primary); font-weight: 500; }

.feasibility-badge {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.fea-green { background: rgba(0, 217, 163, 0.15); color: var(--success); border: 1px solid var(--success); }
.fea-yellow { background: rgba(255, 183, 77, 0.15); color: var(--warning); border: 1px solid var(--warning); }
.fea-orange { background: rgba(255, 87, 124, 0.12); color: var(--warning); border: 1px solid var(--warning); }
.fea-red { background: rgba(255, 92, 124, 0.15); color: var(--danger); border: 1px solid var(--danger); }

.panel-bottom {
    max-height: 200px;
    overflow-y: auto;
}

.part-tree {
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.tree-empty { color: var(--text-muted); text-align: center; padding: 1.5rem; }

.tree-node {
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.tree-node:hover { background: var(--bg-elevated); }
.tree-node.selected { background: var(--bg-hover); border-left: 2px solid var(--primary); }

.tree-assembly { font-weight: 600; color: var(--primary); }
.tree-part { color: var(--text-primary); }
.tree-risk-high { color: var(--danger); }
.tree-risk-medium { color: var(--warning); }

/* ============================================================
   DIGITAL TWIN
   ============================================================ */
.twin-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1rem;
    flex: 1;
    min-height: 400px;
}

.twin-main { display: flex; flex-direction: column; min-height: 0; }
.twin-log { overflow-y: auto; max-height: 500px; }

.twin-controls { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

.twin-speed { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-secondary); }
.twin-speed input[type=range] { width: 90px; accent-color: var(--primary); }
.twin-speed #twinSpeedVal { font-family: var(--font-mono); color: var(--primary); min-width: 2.6rem; }

.machine-park {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    flex: 1;
    align-content: start;
}

.machine-park-3d {
    flex: 1;
    min-height: 380px;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: radial-gradient(ellipse at center, var(--bg-elevated), var(--bg));
}
.machine-park-3d canvas { display: block; width: 100% !important; height: 100% !important; }
.machine-park-3d.loaded .canvas-placeholder { display: none; }

.twin-timeline {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.twin-time-track {
    position: relative;
    flex: 1;
    height: 10px;
    background: var(--bg-hover);
    border-radius: 5px;
    cursor: pointer;
}
.twin-time-cursor {
    position: absolute;
    top: -2px;
    left: 0;
    width: 4px;
    height: 14px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
    transition: left 0.1s linear;
}
.twin-time-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }

.twin-util { margin-top: 1rem; }
.util-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; }
.util-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem;
}
.util-card .util-name { font-weight: 600; font-size: 0.85rem; margin-bottom: 0.35rem; }
.util-card .util-bar {
    height: 8px; background: var(--bg-hover); border-radius: 4px; overflow: hidden; margin-bottom: 0.3rem;
}
.util-card .util-bar-fill { height: 100%; transition: width 0.3s; }
.util-card .util-meta { font-size: 0.72rem; color: var(--text-secondary); font-family: var(--font-mono); }

.machine-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.machine-card.busy {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.machine-card.error {
    border-color: var(--danger);
    box-shadow: 0 0 20px var(--danger-glow);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.machine-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.machine-name { font-size: 0.85rem; font-weight: 600; }
.machine-type { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

.machine-status {
    margin-top: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.machine-status.idle { background: rgba(136, 136, 160, 0.2); color: var(--text-secondary); }
.machine-status.busy { background: rgba(108, 92, 231, 0.2); color: var(--primary); }
.machine-status.error { background: rgba(255, 92, 124, 0.2); color: var(--danger); }

/* Swarm Log */
.swarm-log {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    overflow-y: auto;
}

.log-empty { color: var(--text-muted); text-align: center; padding: 2rem; }

.log-entry {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.3rem;
    border-radius: 4px;
    border-left: 2px solid var(--border);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-entry.scan { border-left-color: var(--info); }
.log-entry.conflict { border-left-color: var(--warning); }
.log-entry.resolved { border-left-color: var(--success); }
.log-entry.unresolved { border-left-color: var(--danger); }
.log-entry.system { border-left-color: var(--primary); }

.log-time { color: var(--text-muted); }
.log-sender { color: var(--primary); font-weight: 500; }
.log-content { color: var(--text-primary); margin-top: 0.15rem; }

/* ============================================================
   RADAR
   ============================================================ */
.radar-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    flex: 1;
    min-height: 350px;
}

.radar-empty { color: var(--text-muted); text-align: center; padding: 3rem; }

.heatmap-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-content: start;
}

.heat-card {
    width: 120px;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid;
}

.heat-card:hover { transform: scale(1.05); }

.heat-green { border-color: var(--success); background: rgba(0, 217, 163, 0.1); }
.heat-yellow { border-color: var(--warning); background: rgba(255, 183, 77, 0.1); }
.heat-orange { border-color: #FF8A50; background: rgba(255, 138, 80, 0.1); }
.heat-red { border-color: var(--danger); background: rgba(255, 92, 124, 0.1); }

.heat-card .heat-name { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
.heat-card .heat-prob { font-size: 1.4rem; font-family: var(--font-head); font-weight: 700; }
.heat-card .heat-prob.green { color: var(--success); }
.heat-card .heat-prob.yellow { color: var(--warning); }
.heat-card .heat-prob.orange { color: #FF8A50; }
.heat-card .heat-prob.red { color: var(--danger); }

.risk-details { font-size: 0.85rem; }
.risk-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid;
}
.risk-item.high { border-color: var(--danger); background: rgba(255, 92, 124, 0.08); }
.risk-item.medium { border-color: var(--warning); background: rgba(255, 183, 77, 0.08); }
.risk-item.low { border-color: var(--success); background: rgba(0, 217, 163, 0.08); }

.risk-title { font-weight: 600; margin-bottom: 0.25rem; }
.risk-desc { color: var(--text-secondary); font-size: 0.8rem; }

.suggestion-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-elevated);
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.suggestion-part { font-weight: 600; color: var(--primary); }
.suggestion-desc { color: var(--text-primary); margin: 0.25rem 0; }
.suggestion-feas { color: var(--success); font-size: 0.8rem; }

/* ============================================================
   LEARNING
   ============================================================ */
.learning-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================================
   EXPLANATION VIEW
   ============================================================ */
.explain-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}
.explain-main { overflow-y: auto; max-height: calc(100vh - 120px); }
.explain-toc { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
.explain-toc-list { list-style: none; padding: 0; }
.explain-toc-list li { padding: 0.3rem 0; border-bottom: 1px solid var(--border); }
.explain-toc-list a { color: var(--text-secondary); text-decoration: none; font-size: 0.82rem; }
.explain-toc-list a:hover { color: var(--primary); }

.explain-doc { color: var(--text-primary); line-height: 1.7; font-size: 0.92rem; max-width: 720px; }
.explain-doc h2 {
    font-family: var(--font-head); font-size: 1.3rem; margin-top: 2rem; margin-bottom: 0.75rem;
    color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 0.4rem;
}
.explain-doc h2:first-child { margin-top: 0; }
.explain-doc p { margin-bottom: 0.8rem; color: var(--text-secondary); }
.explain-doc strong { color: var(--text-primary); }
.explain-doc ul, .explain-doc ol { margin: 0 0 1rem 1.5rem; color: var(--text-secondary); }
.explain-doc li { margin-bottom: 0.3rem; }
.explain-doc code {
    font-family: var(--font-mono); font-size: 0.82rem; background: var(--bg-elevated);
    padding: 0.1rem 0.35rem; border-radius: 4px; color: var(--info);
}
.explain-table {
    width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.2rem; font-size: 0.82rem;
}
.explain-table th { text-align: left; color: var(--text-primary); padding: 0.4rem; border-bottom: 2px solid var(--border); }
.explain-table td { padding: 0.4rem; border-bottom: 1px solid var(--border); color: var(--text-secondary); }
.explain-table tr:hover td { background: var(--bg-elevated); }
.explain-card {
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 8px;
    padding: 0.8rem 1rem; margin: 0.6rem 0;
}
.explain-card h3 { font-size: 0.9rem; color: var(--primary); margin-bottom: 0.4rem; }
.explain-card p { margin-bottom: 0; }
.explain-code {
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
    padding: 0.8rem; font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--success); overflow-x: auto; margin: 0.5rem 0 1rem;
}
@media (max-width: 900px) { .explain-layout { grid-template-columns: 1fr; } }

.learning-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stat-value.green { color: var(--success); }
.stat-value.red { color: var(--danger); }
.stat-value.yellow { color: var(--warning); }

.knowledge-rules {
    overflow-y: auto;
    max-height: 500px;
}

.knowledge-card {
    background: var(--bg-elevated);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
}

.knowledge-agent {
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.78rem;
}

.knowledge-rule {
    color: var(--text-primary);
    margin-top: 0.3rem;
}

.knowledge-conf {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    font-size: 0.72rem;
    margin-top: 0.3rem;
}

.conf-high { background: rgba(0, 217, 163, 0.2); color: var(--success); }
.conf-medium { background: rgba(255, 183, 77, 0.2); color: var(--warning); }
.conf-low { background: rgba(136, 136, 160, 0.2); color: var(--text-secondary); }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.warning { border-color: var(--warning); color: var(--warning); }
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.info { border-color: var(--info); color: var(--info); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .designer-layout { grid-template-columns: 180px 1fr 240px; }
    .twin-layout { grid-template-columns: 1fr; }
    .radar-layout { grid-template-columns: 1fr; }
    .learning-layout { grid-template-columns: 1fr; }
}