/* ==========================================================================
   DEFNE SANDBOX - ACADEMIC MINIMALIST COMPONENTS (css/components.css)
   ========================================================================== */

/* SIDEBAR LEFT - TEMPLATES */
.templates-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.template-card {
    background: #ffffff;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}
.template-card:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: none;
    box-shadow: none;
}
.template-avatar {
    font-size: 1.4rem;
    background: #f8fafc;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-clean);
}
.template-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.template-name {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.template-role {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: 1px;
}

.custom-agent-trigger {
    padding: 12px;
    border-top: 1px solid var(--color-border-clean);
    background: #f8fafc;
}

/* CENTRAL WORKSPACE */
.canvas-workspace {
    grid-column: 2;
    position: relative;
    background-color: #ffffff;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.nodes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

/* ACADEMIC FLAT FLOATING AGENT NODES */
.agent-node {
    position: absolute;
    width: 150px;
    background: #ffffff;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: grab;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    user-select: none;
    z-index: 5;
}
.agent-node:active {
    cursor: grabbing;
}
.agent-node.selected {
    border: 2px solid var(--color-border-active);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 8;
}

/* Node States - Subtle Indicators */
.agent-node.thinking {
    border: 1px double var(--color-warning);
}
.agent-node.working {
    border: 1px double var(--color-success);
}

.node-avatar {
    font-size: 1.4rem;
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: 1px solid var(--color-border-clean);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.node-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 9px;
    height: 9px;
    background-color: #cbd5e1;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
}
.agent-node.idle .node-status-dot { background-color: #cbd5e1; }
.agent-node.thinking .node-status-dot { background-color: var(--color-warning); }
.agent-node.working .node-status-dot { background-color: var(--color-success); }

.node-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.node-name {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.node-meta {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-top: 1px;
}

/* Static Central GitHub Node */
.github-hub-node {
    position: absolute;
    left: calc(50% - 75px);
    top: calc(50% - 45px); /* Balanced offset center */
    width: 150px;
    background: #ffffff;
    border: 1.5px solid var(--color-border-active); /* Clear Slate 900 frame */
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    user-select: none;
    z-index: 100;
}
.github-hub-node .hub-avatar {
    width: 38px;
    height: 38px;
    background: var(--color-border-active);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}
.github-hub-node .hub-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.github-hub-node .hub-name {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: 0.5px;
}
.github-hub-node .hub-status {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: 1px;
    text-transform: uppercase;
}

/* Hub Active Syncing states */
.github-hub-node.syncing {
    border-color: var(--color-success);
}
.github-hub-node.syncing .hub-avatar {
    background-color: var(--color-success);
    animation: hubPulse 1.2s infinite ease-in-out alternate;
}
.github-hub-node.syncing .hub-status {
    color: var(--color-success);
    font-weight: 700;
}

.github-hub-node.error {
    border-color: var(--color-danger);
}
.github-hub-node.error .hub-avatar {
    background-color: var(--color-danger);
}
.github-hub-node.error .hub-status {
    color: var(--color-danger);
}

@keyframes hubPulse {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

/* Canvas Helper overlay */
.canvas-helper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    text-align: center;
    max-width: 300px;
    opacity: 0.5;
}
.helper-content svg {
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.helper-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-text-main);
    margin-bottom: 4px;
}
.helper-content p {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--color-text-muted);
}

/* FLAT OBJECTIVE BAR */
.objective-bar {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid var(--color-border-clean);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.objective-input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    gap: 8px;
}
.objective-icon {
    color: var(--color-text-muted);
}
#global-objective {
    border: none;
    background: transparent;
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-size: 0.82rem;
    width: 100%;
    outline: none;
}
#global-objective::placeholder {
    color: #94a3b8;
}

/* SIDEBAR RIGHT - CONFIGURATOR Form Controls */
.config-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--color-text-muted);
    text-align: center;
    gap: 8px;
}
.config-empty-state p {
    font-size: 0.78rem;
}

.config-form {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.form-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.row-avatar-name {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}
.avatar-select-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
}
.avatar-display {
    font-size: 1.4rem;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.avatar-select-wrapper select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.input-name-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Standard Inputs styling */
.config-form input[type="text"],
.config-form select,
.config-form textarea {
    background: #ffffff;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    padding: 6px 10px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}
.config-form input[type="text"]:focus,
.config-form select:focus,
.config-form textarea:focus {
    border-color: var(--color-border-active);
    box-shadow: none;
}

.label-with-value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.label-with-value span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-main);
}
.config-form input[type="range"] {
    accent-color: var(--color-border-active);
    cursor: pointer;
    margin-top: 2px;
}

/* Flat Checkbox elements */
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 2px;
}
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    gap: 6px;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.custom-checkbox {
    height: 14px;
    width: 14px;
    background-color: #ffffff;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.checkbox-container:hover input ~ .custom-checkbox {
    border-color: var(--color-border-active);
}
.checkbox-container input:checked ~ .custom-checkbox {
    background-color: var(--color-border-active);
    border-color: var(--color-border-active);
}
.custom-checkbox:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .custom-checkbox:after {
    display: block;
}
.checkbox-container .custom-checkbox:after {
    left: 5px;
    top: 2px;
    width: 3px;
    height: 6px;
    border: solid #ffffff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.checkbox-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
}
.checkbox-container input:checked ~ .checkbox-label {
    color: var(--color-text-main);
}

.form-actions {
    margin-top: 8px;
    border-top: 1px solid var(--color-border-clean);
    padding-top: 12px;
}

/* BOTTOM PANEL - ACADEMIC CONSOLE LOGS */
.app-footer {
    grid-row: 3;
    display: grid;
    grid-template-rows: 32px 1fr;
}

.console-header {
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border-clean);
    background: #f8fafc;
    padding: 0 12px;
}

.console-tabs {
    display: flex;
    height: 100%;
}
.tab-btn {
    border: none;
    background: transparent;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 0 12px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}
.tab-btn:hover {
    color: var(--color-text-main);
}
.tab-btn.active {
    color: var(--color-text-main);
    border-bottom-color: var(--color-border-active);
}

.console-actions {
    display: flex;
    align-items: center;
}
.btn-icon {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    color: var(--color-danger);
    background: rgba(0, 0, 0, 0.05);
}

/* Terminal Console (Obsidian clean contrast) */
.console-screen {
    grid-row: 2;
    background: #0f172a; /* Slate 900 */
    padding: 12px 16px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.console-intro {
    color: #38bdf8;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.log-item {
    margin-bottom: 6px;
    animation: logFadeIn 0.15s ease-out;
}
.log-time {
    color: #64748b;
    font-weight: 400;
    margin-right: 6px;
    font-size: 0.7rem;
}
.log-meta {
    padding: 0px 4px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.65rem;
    margin-right: 6px;
}

.log-system .log-meta {
    background: #334155;
    color: #cbd5e1;
}
.log-system .log-content {
    color: #94a3b8;
}

.log-thought .log-meta {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.log-thought .log-content {
    color: #fcd34d;
    font-style: italic;
}

.log-action .log-meta {
    background: rgba(14, 165, 233, 0.2);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.log-action .log-content {
    color: #7dd3fc;
}

.log-observation .log-meta {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.log-observation .log-content {
    color: #86efac;
}

.log-message .log-meta {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}
.log-message .log-content {
    color: #ffffff;
}

/* Flat code blocks inside developer terminal */
.log-code-block {
    margin: 6px 0 6px 10px;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: var(--radius-sm);
    padding: 8px;
    font-family: var(--font-mono);
    color: #e2e8f0;
    overflow-x: auto;
    border-left: 2px solid #64748b;
}

/* ==========================================================================
   NEW GIT-OPS HUD BAR & CONNECTION MODAL (css/components.css overrides)
   ========================================================================== */

/* Git HUD Bar in Header */
.git-hud-bar {
    display: flex;
    gap: 16px;
    background: #f1f5f9;
    border: 1px solid var(--color-border-clean);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}
.hud-item {
    display: flex;
    flex-direction: column;
    min-width: 60px;
}
.hud-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}
.hud-value {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--color-text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* Modal Overlay & Academic Flat Content */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4); /* Dark translucent background */
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content {
    width: 90%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-clean);
    background: #f8fafc;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-main);
}
.btn-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    font-weight: 400;
    cursor: pointer;
    color: var(--color-text-muted);
}
.btn-close:hover {
    color: var(--color-danger);
}

.modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-desc {
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    border-top: 1px solid var(--color-border-clean);
    padding-top: 12px;
}

/* Simple fade/scale animations for modal */
@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   VISUAL GIT TERMINAL HUD & DYNAMIC MODEL SPEC DETAILS BADGES
   ========================================================================== */

/* Visual Git Terminal Monitor overlay */
.git-terminal-hud {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 320px;
    height: 180px;
    background: #0f172a; /* Clean high-contrast slate-900 */
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.git-term-header {
    background: #1e293b; /* Slate 800 */
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #334155;
    user-select: none;
}

.git-term-icon {
    color: #cbd5e1;
}

.git-term-title {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.5px;
    flex: 1;
}

.git-term-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-success);
    border-radius: 50%;
    animation: termDotBlink 1.5s infinite steps(2, start);
}

@keyframes termDotBlink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1.0; }
}

.git-term-body {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.git-term-line {
    margin-bottom: 4px;
    word-break: break-all;
}

.git-term-line .time-prefix {
    color: #64748b; /* Subtle slate-500 prefix timestamp */
    margin-right: 4px;
}

.git-term-line.cmd {
    color: #38bdf8; /* sky-400 */
}

.git-term-line.success {
    color: #4ade80; /* green-400 */
}

.git-term-line.info {
    color: #94a3b8; /* slate-400 */
}

.git-term-line.danger {
    color: #f87171; /* red-400 */
}

.git-term-line.warning {
    color: #fbbf24; /* amber-400 */
}

/* Dynamic Model Specifications Card Badge */
.model-spec-badge {
    margin-top: 8px;
    background: #f8fafc;
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    line-height: 1.4;
}

.spec-label {
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.spec-value {
    font-family: var(--font-mono);
    color: var(--color-text-main);
    font-weight: 600;
}

.spec-desc {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    border-top: 1px dashed var(--color-border-clean);
    margin-top: 4px;
    padding-top: 4px;
    line-height: 1.3;
}

/* ==========================================================================
   OPENSERVER SIMULATED STAGING VIEWPORT HUD & ACTIVE STATES
   ========================================================================== */
.staging-sandbox-hud {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 320px;
    height: 180px;
    background: #0f172a; /* Slate 900 */
    border: 1px solid var(--color-border-clean);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    overflow: hidden;
}

.sandbox-header {
    background: #1e293b; /* Slate 800 */
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #334155;
    user-select: none;
}

.browser-dots {
    display: flex;
    gap: 5px;
}

.browser-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.browser-dots .dot.red { background: #f87171; }
.browser-dots .dot.yellow { background: #fbbf24; }
.browser-dots .dot.green { background: #4ade80; }

.sandbox-url {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: #94a3b8;
    background: #0f172a;
    padding: 2px 8px;
    border-radius: 10px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    border: 1px solid #334155;
}

.sandbox-status-pill {
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sandbox-status-pill.idle {
    background: #334155;
    color: #cbd5e1;
}

.sandbox-status-pill.building {
    background: #0284c7; /* sky-600 */
    color: #e0f2fe;
    animation: pulseBuilding 1.5s infinite ease-in-out;
}

.sandbox-status-pill.live {
    background: #16a34a; /* green-600 */
    color: #dcfce7;
}

.sandbox-status-pill.error {
    background: #dc2626; /* red-600 */
    color: #fee2e2;
}

.sandbox-status-pill.recovered {
    background: #ea580c; /* orange-600 */
    color: #ffedd5;
}

@keyframes pulseBuilding {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1.0; }
}

.sandbox-body {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.4;
    color: #e2e8f0;
}

.sandbox-line {
    margin-bottom: 4px;
    word-break: break-all;
}

.sandbox-line.success {
    color: #4ade80; /* green-400 */
}

.sandbox-line.warning {
    color: #fbbf24; /* amber-400 */
}

.sandbox-line.danger {
    color: #f87171; /* red-400 */
}

.sandbox-line.info {
    color: #38bdf8; /* sky-400 */
}

/* Premium Academic Poor Mode Floating Button */
.poor-mode-btn {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    height: 32px;
    font-size: 0.72rem;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1px solid var(--color-border-clean);
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.poor-mode-btn:hover {
    background: #fef2f2;
    border-color: var(--color-danger);
    color: var(--color-danger);
}
.poor-mode-btn.active {
    background: var(--color-danger);
    color: #ffffff;
    border-color: var(--color-danger);
    box-shadow: 0 0 10px rgba(185, 28, 28, 0.2);
}
.poor-mode-icon {
    font-size: 1rem;
}



/* ── Setup Wizard ────────────────────────────────────────────────────────── */
.wizard-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(15,23,42,0.55); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}
.wizard-overlay.hidden { display: none; }
.wizard-panel {
    background: #fff; border-radius: 16px;
    width: 100%; max-width: 640px; max-height: 90vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(15,23,42,0.25);
    overflow: hidden; position: relative;
    border-top: 4px solid #5C8060;
}
.wizard-close {
    position: absolute; top: 12px; right: 14px;
    background: transparent; border: none;
    font-size: 1.6rem; color: #64748b; cursor: pointer;
    width: 32px; height: 32px; border-radius: 50%;
    transition: background 0.15s;
}
.wizard-close:hover { background: rgba(15,23,42,0.06); color: #0f172a; }
.wizard-header {
    padding: 28px 32px 16px; border-bottom: 1px solid rgba(15,23,42,0.06);
}
.wizard-stepdots {
    display: flex; gap: 6px; margin-bottom: 14px;
}
.wizard-stepdots .dot {
    flex: 1; height: 4px; border-radius: 2px;
    background: rgba(15,23,42,0.08);
    transition: background 0.25s;
}
.wizard-stepdots .dot.active { background: #5C8060; }
.wizard-stepdots .dot.done { background: rgba(92,128,96,0.5); }
.wizard-title {
    font-size: 1.5rem; font-weight: 700; color: #0f172a;
    margin: 0 0 6px; letter-spacing: -0.01em;
}
.wizard-subtitle {
    font-size: 0.88rem; color: #64748b; margin: 0;
}
.wizard-body {
    flex: 1; overflow-y: auto;
    padding: 24px 32px;
    font-size: 0.92rem; color: #1e293b; line-height: 1.55;
}
.wizard-body h3 {
    font-size: 1.05rem; margin: 0 0 10px; color: #0f172a;
}
.wizard-body p { margin: 0 0 12px; }
.wizard-body ol { padding-left: 20px; margin: 0 0 12px; }
.wizard-body ol li { margin-bottom: 8px; }
.wizard-body .wiz-hint {
    background: rgba(92,128,96,0.08); border-left: 3px solid #5C8060;
    padding: 10px 14px; border-radius: 6px; margin: 12px 0;
    font-size: 0.85rem; color: #1e293b;
}
.wizard-body .wiz-link {
    display: inline-block; padding: 10px 16px; margin: 6px 0;
    background: #0f172a; color: #fff;
    border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 0.85rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.wizard-body .wiz-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15,23,42,0.2);
}
.wizard-body .wiz-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid rgba(15,23,42,0.15);
    border-radius: 8px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem; margin: 8px 0 4px;
    background: #fff; color: #0f172a;
    transition: border 0.15s;
}
.wizard-body .wiz-input:focus { outline: none; border-color: #5C8060; box-shadow: 0 0 0 3px rgba(92,128,96,0.18); }
.wizard-body .wiz-test-result {
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem;
    margin-top: 8px; padding: 8px 12px; border-radius: 6px;
}
.wizard-body .wiz-test-result.ok { background: rgba(16,185,129,0.12); color: #047857; }
.wizard-body .wiz-test-result.err { background: rgba(239,68,68,0.12); color: #b91c1c; }
.wizard-footer {
    padding: 16px 32px; border-top: 1px solid rgba(15,23,42,0.06);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #fafafa;
}
.wizard-progress-text {
    font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: #64748b;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
