@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --surface: #ffffff;
    --surface-elevated: #f9fafb;
    --surface-muted: #f3f4f6;
    --surface-strong: #1f2937;
    --surface-deep: #0f172a;
    --surface-inset: #111827;

    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    --text-soft: #9ca3af;
    --text-inverse: #f8fafc;

    --border-subtle: #d1d5db;
    --border-muted: #e5e7eb;
    --border-accent: #6366f1;
    --border-terminal: rgba(148, 163, 184, 0.25);
    --border-contrast: rgba(148, 163, 184, 0.35);
    --border-contrast-strong: rgba(148, 163, 184, 0.45);
    --accent-border-soft: #c7d2fe;

    --accent: #3b82f6;
    --accent-alt: #4f46e5;
    --accent-contrast: #ffffff;
    --accent-hover: #2563eb;
    --accent-soft: rgba(59, 130, 246, 0.12);
    --accent-soft-strong: rgba(59, 130, 246, 0.2);
    --accent-soft-hover: rgba(59, 130, 246, 0.25);
    --accent-soft-stronger: rgba(59, 130, 246, 0.35);
    --accent-soft-border: rgba(59, 130, 246, 0.45);
    --accent-soft-border-strong: rgba(59, 130, 246, 0.55);
    --accent-soft-border-stronger: rgba(59, 130, 246, 0.6);
    --accent-soft-border-strongest: rgba(59, 130, 246, 0.75);
    --accent-shadow: rgba(59, 130, 246, 0.25);
    --accent-alt-shadow: rgba(99, 102, 241, 0.35);
    --accent-ring: rgba(59, 130, 246, 0.15);

    --shadow-soft: rgba(15, 23, 42, 0.08);
    --shadow-strong: rgba(15, 23, 42, 0.15);
    --shadow-deep: rgba(15, 23, 42, 0.35);

    --muted-bg: #f3f4f6;
    --muted-hover-bg: #d1d5db;
    --muted-text: #4b5563;

    --info-bg: #eff6ff;
    --info-soft: #bfdbfe;
    --info-state-bg: #dbeafe;
    --info-text: #1d4ed8;

    --service-bg: #ede9fe;
    --service-text: #5b21b6;

    --success: #10b981;
    --success-contrast: #0f172a;
    --success-strong: #047857;
    --success-soft: #ecfdf5;
    --success-soft-border: #a7f3d0;
    --success-state-bg: #dcfce7;
    --success-state-text: #047857;

    --warning-bg: #fef3c7;
    --warning-text: #b45309;

    --danger: #ef4444;
    --danger-contrast: #ffffff;
    --danger-strong: #b91c1c;
    --danger-emphasis: #dc2626;
    --danger-soft: #fef2f2;
    --danger-soft-border: #fecaca;
    --danger-state-bg: #fee2e2;
    --danger-soft-strong: #fca5a5;

    --terminal-foreground: #e2e8f0;
    --terminal-muted: #9ca3af;
    --terminal-status: #60a5fa;
    --terminal-connected: #34d399;
    --terminal-connecting: #fbbf24;
    --terminal-error: #f87171;

    --terminal-header-bg: rgba(15, 23, 42, 0.85);
    --terminal-body-bg: rgba(8, 15, 31, 0.85);
    --terminal-session-bg: rgba(30, 41, 59, 0.85);
    --terminal-session-hover-bg: rgba(59, 130, 246, 0.25);
    --terminal-session-active-bg: rgba(37, 99, 235, 0.45);
    --terminal-session-border-hover: rgba(59, 130, 246, 0.4);
    --terminal-session-border-active: rgba(59, 130, 246, 0.75);
    --terminal-session-border-action: rgba(148, 163, 184, 0.45);
    --terminal-session-border-action-hover: rgba(59, 130, 246, 0.55);

    --terminal-dock-bg: rgba(15, 23, 42, 0.95);
    --terminal-dock-hover: rgba(59, 130, 246, 0.25);

    --terminal-output-bg: rgba(55, 65, 81, 0.6);
    --terminal-output-block-bg: rgba(17, 24, 39, 0.6);
    --terminal-playbook-shadow: rgba(255, 255, 255, 0.05);

    --overlay-backdrop: rgba(15, 23, 42, 0.6);

    --terminal-success-shadow: rgba(16, 185, 129, 0.25);
    --terminal-danger-shadow: rgba(239, 68, 68, 0.25);
}

.dark {
    --surface: #1e293b;
    --surface-elevated: #111827;
    --surface-muted: #16213d;
    --surface-strong: #0b1120;
    --surface-deep: #020617;
    --surface-inset: #020617;

    --text-primary: #e2e8f0;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --text-inverse: #0f172a;

    --border-subtle: #334155;
    --border-muted: #475569;
    --border-accent: #818cf8;
    --border-terminal: rgba(148, 163, 184, 0.35);
    --border-contrast: rgba(148, 163, 184, 0.45);
    --border-contrast-strong: rgba(148, 163, 184, 0.6);
    --accent-border-soft: rgba(129, 140, 248, 0.6);

    --accent: #3b82f6;
    --accent-alt: #818cf8;
    --accent-contrast: #ffffff;
    --accent-hover: #60a5fa;
    --accent-soft: rgba(59, 130, 246, 0.2);
    --accent-soft-strong: rgba(59, 130, 246, 0.28);
    --accent-soft-hover: rgba(59, 130, 246, 0.35);
    --accent-soft-stronger: rgba(59, 130, 246, 0.45);
    --accent-soft-border: rgba(96, 165, 250, 0.6);
    --accent-soft-border-strong: rgba(96, 165, 250, 0.7);
    --accent-soft-border-stronger: rgba(129, 199, 255, 0.8);
    --accent-soft-border-strongest: rgba(147, 197, 253, 0.9);
    --accent-shadow: rgba(59, 130, 246, 0.35);
    --accent-ring: rgba(59, 130, 246, 0.35);

    --shadow-soft: rgba(2, 6, 23, 0.2);
    --shadow-strong: rgba(2, 6, 23, 0.45);
    --shadow-deep: rgba(2, 6, 23, 0.65);

    --muted-bg: rgba(148, 163, 184, 0.12);
    --muted-hover-bg: rgba(148, 163, 184, 0.2);
    --muted-text: #cbd5f5;

    --info-bg: rgba(37, 99, 235, 0.18);
    --info-soft: #60a5fa;
    --info-state-bg: rgba(37, 99, 235, 0.25);
    --info-text: #bfdbfe;

    --service-bg: rgba(139, 92, 246, 0.2);
    --service-text: #ddd6fe;

    --success: #34d399;
    --success-contrast: #022c22;
    --success-strong: #bbf7d0;
    --success-soft: rgba(34, 197, 94, 0.2);
    --success-soft-border: rgba(134, 239, 172, 0.5);
    --success-state-bg: rgba(34, 197, 94, 0.2);
    --success-state-text: #bbf7d0;

    --warning-bg: rgba(234, 179, 8, 0.2);
    --warning-text: #facc15;

    --danger: #ef4444;
    --danger-contrast: #0b1120;
    --danger-strong: #fecaca;
    --danger-emphasis: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.18);
    --danger-soft-border: rgba(248, 113, 113, 0.5);
    --danger-state-bg: rgba(248, 113, 113, 0.18);
    --danger-soft-strong: #fca5a5;

    --terminal-foreground: #f8fafc;
    --terminal-muted: #cbd5f5;
    --terminal-status: #93c5fd;
    --terminal-connected: #6ee7b7;
    --terminal-connecting: #facc15;
    --terminal-error: #fca5a5;

    --terminal-header-bg: rgba(8, 15, 31, 0.9);
    --terminal-body-bg: rgba(2, 6, 23, 0.9);
    --terminal-session-bg: rgba(2, 6, 23, 0.85);
    --terminal-session-hover-bg: rgba(59, 130, 246, 0.35);
    --terminal-session-active-bg: rgba(37, 99, 235, 0.55);
    --terminal-session-border-hover: rgba(96, 165, 250, 0.6);
    --terminal-session-border-active: rgba(96, 165, 250, 0.85);
    --terminal-session-border-action: rgba(148, 163, 184, 0.6);
    --terminal-session-border-action-hover: rgba(96, 165, 250, 0.75);

    --terminal-dock-bg: rgba(2, 6, 23, 0.95);
    --terminal-dock-hover: rgba(59, 130, 246, 0.35);

    --terminal-output-bg: rgba(15, 23, 42, 0.75);
    --terminal-output-block-bg: rgba(15, 23, 42, 0.7);
    --terminal-playbook-shadow: rgba(15, 23, 42, 0.6);

    --overlay-backdrop: rgba(2, 6, 23, 0.8);

    --terminal-success-shadow: rgba(34, 197, 94, 0.35);
    --terminal-danger-shadow: rgba(248, 113, 113, 0.35);
    --accent-alt-shadow: rgba(129, 140, 248, 0.35);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--surface-muted);
}

.tab-default,
.tab-active {
    flex: 1;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-default {
    background: transparent;
    color: var(--text-muted);
}

.tab-default:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
}

.tab-active {
    background: var(--surface-strong);
    color: var(--text-inverse);
    box-shadow: inset 0 -3px 0 var(--accent-soft-border-stronger);
}

.dark .tab-active {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: inset 0 -3px 0 var(--accent-soft-border-strongest);
}

pre {
    padding: 0.75rem;
}

.chart-card {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px var(--shadow-soft);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chart-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.chart-canvas {
    position: relative;
    height: 220px;
}

.chart-canvas.zoom-enabled canvas {
    cursor: crosshair;
}

.chart-selection-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    display: none;
    pointer-events: none;
    background: var(--accent-soft);
    border: 1px solid var(--accent-soft-border);
}

.filter-button,
.filter-button-active {
    border-radius: 9999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.filter-button {
    background: var(--muted-bg);
    color: var(--muted-text);
}

.filter-button:hover {
    background: var(--muted-hover-bg);
}

.filter-button-active {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 10px 18px var(--accent-shadow);
}

.dark .filter-button-active {
    color: var(--accent-contrast);
    box-shadow: 0 10px 18px var(--accent-shadow);
}

.filter-input {
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-primary);
    background: var(--surface);
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.telemetry-picker-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .telemetry-picker-wrapper {
        width: auto;
    }
}

.telemetry-picker-trigger {
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    background: var(--surface);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.telemetry-picker-trigger:hover,
.telemetry-picker-trigger:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.telemetry-picker-trigger-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-muted);
}

.telemetry-picker-trigger-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.telemetry-picker-trigger-placeholder {
    color: var(--text-soft);
    font-weight: 500;
}

.telemetry-picker-popover {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    box-shadow: 0 25px 55px var(--shadow-soft);
    padding: 1.25rem;
    width: min(100vw - 2rem, 640px);
    max-width: 640px;
    z-index: 30;
}

@media (max-width: 640px) {
    .telemetry-picker-popover {
        left: 0;
    }
}

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

.telemetry-picker-month-labels {
    display: flex;
    gap: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.telemetry-picker-month-label {
    white-space: nowrap;
}

.telemetry-picker-nav {
    border: 1px solid var(--border-subtle);
    border-radius: 0.65rem;
    background: var(--surface-muted);
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.telemetry-picker-nav:hover,
.telemetry-picker-nav:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
}

.telemetry-picker-months {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.telemetry-picker-month {
    flex: 1 1 260px;
}

.telemetry-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-align: center;
}

.telemetry-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.telemetry-calendar-day {
    border: none;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.telemetry-calendar-day:hover,
.telemetry-calendar-day:focus-visible {
    background: var(--surface-muted);
}

.telemetry-calendar-day--muted {
    color: var(--text-soft);
}

.telemetry-calendar-day--in-range {
    background: var(--accent-soft);
    color: var(--accent);
}

.telemetry-calendar-day--start,
.telemetry-calendar-day--end {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 10px 20px var(--accent-shadow);
}

.telemetry-calendar-day--start {
    border-top-left-radius: 1.25rem;
    border-bottom-left-radius: 1.25rem;
}

.telemetry-calendar-day--end {
    border-top-right-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
}

.telemetry-picker-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.telemetry-picker-time-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 160px;
}

.telemetry-picker-time-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-muted);
}

.telemetry-time-input {
    width: 100%;
}

.telemetry-picker-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.telemetry-picker-button {
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 1.2rem;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.telemetry-picker-button--muted {
    background: var(--muted-bg);
    color: var(--muted-text);
    border: 1px solid var(--border-subtle);
}

.telemetry-picker-button--muted:hover,
.telemetry-picker-button--muted:focus-visible {
    background: var(--muted-hover-bg);
}

.telemetry-picker-button--primary {
    background: var(--accent);
    color: var(--accent-contrast);
    border: 1px solid var(--accent);
    box-shadow: 0 10px 18px var(--accent-shadow);
}

.telemetry-picker-button--primary:hover,
.telemetry-picker-button--primary:focus-visible {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.terminal-window {
    background: var(--surface-deep);
    border-radius: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-terminal);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.terminal-screen {
    position: relative;
    flex: 1;
    min-height: 260px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.terminal-screen .xterm {
    height: 100%;
    padding: 0.25rem 0.5rem;
}

.terminal-screen .xterm-viewport {
    border-radius: 0.5rem;
}

.terminal-screen .xterm-screen {
    padding: 0 !important;
}

.terminal-log {
    margin-top: 0;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.terminal-line {
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.terminal-status {
    color: var(--terminal-status);
}

.terminal-error {
    color: var(--terminal-error);
}

.terminal-output-block {
    background: var(--terminal-output-block-bg);
    border-left: 3px solid var(--terminal-status);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.terminal-output-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.terminal-output-section {
    margin-bottom: 0.5rem;
}

.terminal-output-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--terminal-muted);
    margin-bottom: 0.25rem;
}

.terminal-output {
    background: var(--terminal-output-bg);
    border-radius: 0.5rem;
    padding: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
    color: var(--terminal-foreground);
}

.terminal-stream {
    white-space: pre-wrap;
    font-family: 'Fira Code', 'Fira Mono', monospace;
    font-size: 0.9rem;
    color: var(--terminal-foreground);
    line-height: 1.45;
}

.explorer-action {
    background: var(--muted-bg);
    border-radius: 0.375rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted-text);
    transition: background 0.2s ease, color 0.2s ease;
}

.ansible-stat-card {
    background: var(--surface-elevated);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-muted);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ansible-stat-card__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.ansible-stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ansible-stat-card__hint {
    font-size: 0.7rem;
    color: var(--text-soft);
}

.ansible-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--info-bg);
    color: var(--info-text);
}

.ansible-chip--muted {
    background: var(--muted-bg);
    color: var(--muted-text);
}

.ansible-chip--service {
    background: var(--service-bg);
    color: var(--service-text);
}

.ansible-upload-item {
    border: 1px solid var(--border-muted);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-elevated);
}

.ansible-playbook-preview {
    background: #020617;
    color: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    font-family: 'Fira Code', 'Fira Mono', monospace;
    max-height: 320px;
    overflow: auto;
    box-shadow: inset 0 0 0 1px var(--terminal-playbook-shadow);
}

.ansible-playbook-preview code {
    display: block;
    white-space: pre;
}

.ansible-status {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--muted-bg);
    color: var(--muted-text);
}

.ansible-status--info {
    background: var(--info-state-bg);
    color: var(--info-text);
}

.ansible-status--warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.ansible-status--success {
    background: var(--success-state-bg);
    color: var(--success-state-text);
}

.ansible-status--danger {
    background: var(--danger-state-bg);
    color: var(--danger-strong);
}

.dark .ansible-status {
    background: var(--muted-bg);
    color: var(--text-secondary);
}

.dark .ansible-status--info {
    background: var(--info-state-bg);
    color: var(--info-text);
}

.dark .ansible-status--warning {
    background: var(--warning-bg);
    color: var(--warning-text);
}

.dark .ansible-status--success {
    background: var(--success-state-bg);
    color: var(--success-state-text);
}

.dark .ansible-status--danger {
    background: var(--danger-state-bg);
    color: var(--danger-strong);
}

.explorer-action:hover {
    background: var(--muted-hover-bg);
    color: var(--text-primary);
}

.ansible-selection-checkbox {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: var(--accent-alt);
    margin-right: 0.25rem;
}

.ansible-library-item {
    border: 1px solid var(--border-muted);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ansible-library-item:hover {
    border-color: var(--accent-border-soft);
    background: var(--surface-elevated);
}

.ansible-library-item--active {
    border-color: var(--border-accent);
    background: var(--surface-elevated);
    box-shadow: inset 0 0 0 1px var(--accent-alt-shadow);
}

.ansible-output-log {
    background: var(--surface-deep);
    color: var(--terminal-foreground);
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    font-family: 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 50;
}

.modal-content {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 2rem;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 45px var(--shadow-strong);
}

.console-output {
    background: #020617;
    color: #f8fafc;
    border-radius: 0.5rem;
    padding: 1rem;
    max-height: 240px;
    overflow-y: auto;
    font-family: 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.console-output code,
.console-output span {
    color: inherit;
}

.terminal-modal {
    background: var(--surface-deep);
    border-radius: 0.75rem;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 45px var(--shadow-deep);
}

.terminal-modal--fullscreen {
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.terminal-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem 1rem;
    background: var(--terminal-header-bg);
}

.terminal-modal__close {
    background: transparent;
    border: none;
    color: var(--terminal-muted);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
}

.terminal-modal__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.terminal-modal__icon {
    background: transparent;
    border: none;
    color: var(--terminal-muted);
    font-size: 1.35rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.terminal-modal__icon:hover {
    color: var(--terminal-foreground);
}

.terminal-modal__close:hover {
    color: var(--terminal-foreground);
}

.terminal-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.75rem 1rem;
    border-top: 1px solid var(--border-terminal);
}

.terminal-modal__action {
    background: var(--success);
    color: var(--success-contrast);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.terminal-modal__action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px var(--terminal-success-shadow);
}

.terminal-modal__action--danger {
    background: var(--danger);
    color: var(--danger-contrast);
}

.terminal-modal__action--danger:hover {
    box-shadow: 0 10px 20px var(--terminal-danger-shadow);
}

.terminal-modal__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.75rem;
    background: var(--terminal-body-bg);
    flex: 1;
    overflow: hidden;
}

.terminal-modal__input {
    margin-top: 0.5rem;
}

.terminal-session-tabs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.75rem 0.75rem;
    flex-wrap: wrap;
}

.terminal-session-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--terminal-session-bg);
    color: var(--terminal-foreground);
    border: 1px solid transparent;
    border-radius: 9999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.terminal-session-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-soft-stronger);
}

.terminal-session-tab:hover {
    background: var(--terminal-session-hover-bg);
    border-color: var(--terminal-session-border-hover);
}

.terminal-session-tab--active {
    background: var(--terminal-session-active-bg);
    border-color: var(--terminal-session-border-active);
    color: var(--accent-contrast);
}

.terminal-session-tab--minimized {
    opacity: 0.65;
}

.terminal-session-tab--action {
    border-style: dashed;
    border-color: var(--terminal-session-border-action);
    background: transparent;
    color: var(--info-soft);
}

.terminal-session-tab--action:hover {
    background: var(--accent-soft);
    border-color: var(--terminal-session-border-action-hover);
    color: var(--info-state-bg);
}

.terminal-session-tab__label {
    font-weight: 600;
}

.terminal-session-tab__status {
    font-size: 0.7rem;
}

.terminal-session-tab__status--connecting {
    color: var(--terminal-connecting);
}

.terminal-session-tab__status--connected {
    color: var(--terminal-connected);
}

.terminal-session-tab__close {
    background: transparent;
    border: none;
    color: var(--terminal-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.terminal-session-tab__close:hover {
    color: var(--danger-soft-strong);
}

.terminal-modal--fullscreen .terminal-screen {
    min-height: 0;
}

.terminal-modal--fullscreen .terminal-log {
    max-height: 40vh;
}

.modal-overlay--fullscreen {
    padding: 0;
}

.modal-overlay--fullscreen .terminal-modal {
    border-radius: 0;
}

.terminal-dock {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    display: flex;
    gap: 0.75rem;
    z-index: 60;
}

.terminal-dock__item {
    display: flex;
    align-items: center;
    background: var(--terminal-dock-bg);
    border: 1px solid var(--border-contrast);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 12px 30px var(--shadow-deep);
}

.terminal-dock__restore {
    background: transparent;
    border: none;
    color: var(--terminal-foreground);
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.terminal-dock__restore:hover {
    background: var(--terminal-dock-hover);
}

.terminal-dock__close {
    background: transparent;
    border: none;
    color: var(--terminal-muted);
    padding: 0.35rem 0.6rem;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.terminal-dock__close:hover {
    color: var(--terminal-error);
}

.welcome-card {
    @apply bg-white rounded-xl shadow-sm border border-gray-100 p-6 cursor-pointer hover:border-blue-300 hover:bg-blue-50/50 transition-all;
    background: var(--surface);
    border-color: var(--border-muted);
    color: var(--text-primary);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.action-link {
    @apply mt-4 inline-block text-blue-600 font-semibold;
    color: var(--accent);
    transition: color 0.2s ease;
}

.welcome-card:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 12px 24px var(--shadow-soft);
}

.action-link:hover {
    color: var(--accent-hover);
}

.dark .welcome-card {
    background: var(--surface);
    border-color: var(--border-muted);
    color: var(--text-primary);
}

.dark .welcome-card:hover {
    background: var(--accent-soft-strong);
    box-shadow: 0 12px 24px var(--shadow-strong);
}

.dark .action-link {
    color: var(--info-soft);
}

.dark .action-link:hover {
    color: var(--accent-hover);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-input,
.form-textarea {
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

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

.form-error {
    font-size: 0.75rem;
    color: var(--danger-emphasis);
    margin-top: 0.25rem;
}

.form-feedback {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.form-feedback-success {
    background: var(--success-soft);
    color: var(--success-strong);
    border: 1px solid var(--success-soft-border);
}

.form-feedback-error {
    background: var(--danger-soft);
    color: var(--danger-strong);
    border: 1px solid var(--danger-soft-border);
}
[v-cloak] { display: none; }
