/* New project wizard, playground, header create/import */
/* --- New Project Wizard --- */
.new-project-page {
    display: flex;
    justify-content: center;
    padding-top: 16px;
}

.wizard-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.wizard-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.wizard-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: background var(--transition-speed), color var(--transition-speed);
}

.wizard-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.wizard-playground-hint {
    color: var(--danger);
    font-size: 14px;
    margin: -10px 0 18px;
}

/* Personal-account guidance callout in the Create flow (Step 2). */
.wizard-owner-hint {
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin: -6px 0 18px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.wizard-owner-hint-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.wizard-owner-hint p {
    margin: 0 0 8px;
}

.wizard-owner-hint-paths {
    /* display:flex on a <ul> suppresses the default list markers, so drop the
       list indent too and lay the two paths out as clean flush-left lines. */
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wizard-owner-hint-paths a {
    color: var(--accent);
    text-decoration: none;
}

.wizard-owner-hint-paths a:hover {
    text-decoration: underline;
}

.reserved-playground-org-callout {
    align-items: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 8px;
    color: var(--text-secondary);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    line-height: 1.45;
    margin-top: 10px;
    padding: 12px 14px;
}

.reserved-playground-org-callout strong {
    color: var(--text-primary);
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.reserved-playground-org-callout p {
    font-size: 14px;
    margin: 0;
}

.reserved-playground-org-callout .btn-sm {
    flex: 0 0 auto;
}

/* Step indicator */
/* Create / Import entry buttons in the Projects header */
.projects-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.projects-header-actions .project-create-action {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    min-width: 146px;
    height: 44px;
    padding: 6px 14px;
    line-height: 1.15;
    text-align: center;
}

.projects-header-actions .project-create-action.single {
    flex-direction: row;
    min-width: 132px;
}

.projects-header-actions .project-create-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
}

.projects-header-actions .project-create-mode {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    opacity: 0.78;
}

.projects-header-actions .project-import-action {
    height: 44px;
}

.projects-modal-host {
    position: relative;
    min-height: calc(100vh - var(--navbar-height) - 48px);
}

.projects-modal-background {
    pointer-events: none;
    user-select: none;
}

.new-project-mode-page {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 36px;
    overflow-y: auto;
}

.new-project-mode-scrim {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--bg-primary) 72%, transparent);
    backdrop-filter: blur(5px);
}

.modal-card.new-project-mode-modal {
    position: relative;
    width: min(760px, calc(100dvw - 72px));
    max-width: none;
    max-height: calc(100dvh - 72px);
    overflow: hidden;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.28);
}

.new-project-mode-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 14px;
    align-items: start;
    padding: 24px 32px 18px;
    border-bottom: 1px solid var(--border);
}

.new-project-mode-header .modal-title {
    display: block;
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0;
}

.new-project-mode-header .modal-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 28px;
    line-height: 1;
}

.new-project-mode-body {
    gap: 0;
    padding: 28px 32px 32px;
}

.new-project-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.new-project-mode-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    min-height: 128px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    overflow: hidden;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.new-project-mode-card:hover {
    border-color: color-mix(in srgb, var(--text-muted) 52%, transparent);
    background: var(--bg-hover);
}

.new-project-mode-card.selected {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.new-project-mode-top {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.new-project-mode-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: var(--bg-primary);
    color: color-mix(in srgb, var(--accent) 62%, white);
}

.new-project-mode-card-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
}

.new-project-mode-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.new-project-mode-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

@media (max-width: 720px) {
    .new-project-mode-grid {
        grid-template-columns: 1fr;
    }

    .new-project-mode-page {
        align-items: start;
        padding: 20px 14px calc(102px + env(safe-area-inset-bottom));
    }

    .modal-card.new-project-mode-modal {
        width: 100%;
        max-height: calc(100dvh - 122px - env(safe-area-inset-bottom));
        overflow-y: auto;
    }

    .new-project-mode-header,
    .new-project-mode-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .new-project-mode-actions {
        flex-direction: column-reverse;
    }

    .new-project-mode-actions .btn-primary,
    .new-project-mode-actions .btn-secondary {
        width: 100%;
    }
}

.mode-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.mode-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background var(--transition-speed),
        color var(--transition-speed),
        box-shadow var(--transition-speed);
}

.mode-segment.active {
    background: var(--bg-primary);
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.mode-segment:not(.active):not(:disabled):hover {
    background: var(--surface);
    color: var(--text-primary);
}

.mode-segment:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.mode-segment.active:disabled {
    opacity: 1;
}

.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wizard-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 2px solid var(--border);
    transition: all var(--transition-speed);
}

.wizard-step.active .wizard-step-number {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.wizard-step.completed .wizard-step-number {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.wizard-step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
    color: var(--text-primary);
}

.wizard-step.completed .wizard-step-label {
    color: var(--text-secondary);
}

.wizard-step-line {
    flex: 1;
    height: 2px;
    margin: 0 12px;
    background: var(--border);
    min-width: 20px;
}

/* Step content */
.wizard-step-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
}

.wizard-step-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin-bottom: 4px;
}

.wizard-step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Template search (Describe step) */
.template-results {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.template-empty {
    margin-top: 14px;
    margin-bottom: 0;
}

.template-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    cursor: pointer;
}

.template-card:hover {
    border-color: var(--accent);
}

.template-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.template-card-radio {
    width: auto;
    margin: 2px 0 0;
    flex: none;
    cursor: pointer;
}

.template-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-card-name {
    font-weight: 700;
    color: var(--text-primary);
}

.template-card-cat {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.template-card-links {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.template-card-link {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.template-card-link:hover {
    text-decoration: underline;
}

.template-scratch {
    align-items: center;
}

/* Form elements */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-speed);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    border-color: var(--accent);
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color var(--transition-speed);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea:focus {
    border-color: var(--accent);
}

.form-textarea.large {
    min-height: 140px;
}

/* Radio card group */
.form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.form-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color var(--transition-speed), background var(--transition-speed);
}

.form-radio-card:hover {
    border-color: var(--text-muted);
}

.form-radio-card.selected {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.form-radio-input {
    margin-top: 2px;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.form-radio-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-radio-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-radio-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.connect-github-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.connect-github-link:hover {
    text-decoration: underline;
}

.connect-gh-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.connect-gh-banner-icon {
    flex-shrink: 0;
    color: var(--accent);
}

.connect-gh-banner-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.user-menu-item.connect-gh {
    color: var(--accent);
}

/* Toggle switch */
.form-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
}

.form-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.form-toggle-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-toggle-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.toggle-switch.on {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--transition-speed);
}

.toggle-switch.on .toggle-knob {
    transform: translateX(20px);
}

/* OSS details */
.oss-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.oss-info-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 8px;
}

.oss-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.oss-info-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.oss-info-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.oss-info-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* Wizard summary */
.wizard-summary {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.wizard-summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
}

.wizard-summary-row + .wizard-summary-row {
    border-top: 1px solid var(--border);
}

.wizard-summary-label {
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.wizard-summary-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

/* Wizard footer */
.wizard-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-footer-spacer {
    flex: 1;
}
.wizard-error {
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger, #ef4444);
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
}

.wizard-error.actionable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wizard-error-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wizard-error-action,
.wizard-inline-link {
    flex-shrink: 0;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.wizard-error-action {
    color: var(--text-primary);
    background: var(--danger, #ef4444);
}

.wizard-inline-guidance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 11px 14px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.42);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.wizard-inline-guidance strong {
    color: var(--text-primary);
}

.wizard-inline-link {
    background: #f59e0b;
    color: #111827;
}
.form-help-text {
    color: var(--text-tertiary);
    font-size: 14px;
    margin-top: 6px;
}


/* --- Connection Status (New Project Step 1) --- */
.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn .form-input {
    flex: 1;
}

.input-with-btn .btn-primary {
    white-space: nowrap;
    flex-shrink: 0;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary, #2a2a3e);
    border: 1px solid var(--border-primary, #3a3a4e);
    border-radius: 8px;
    overflow: hidden;
}

.input-with-prefix .input-prefix {
    padding: 0 0 0 12px;
    color: var(--text-secondary, #8b8ba7);
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

.input-with-prefix .form-input {
    border: none;
    background: transparent;
    padding-left: 4px;
}

.input-with-prefix .form-input:focus {
    box-shadow: none;
}

.input-with-prefix:focus-within {
    border-color: var(--accent, #6366f1);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.conn-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.conn-status.idle {
    border-color: var(--border);
}

.conn-status.checking {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.04);
}

.conn-status.connected {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.04);
}

.conn-status.not-connected {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.04);
}

.conn-status.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.04);
}

.conn-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conn-status-icon.idle {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.conn-status-icon.checking {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
}

.conn-status-icon.connected {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.conn-status-icon.not-connected {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.conn-status-icon.error {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.conn-status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.conn-status-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.conn-status-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scopes */
.conn-scopes {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.04);
    border: 1px solid rgba(34, 197, 94, 0.12);
    border-radius: 8px;
}

.conn-scopes-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.conn-scopes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.conn-scope-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
}

/* Sync info */
.conn-sync-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.conn-sync-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.conn-sync-icon {
    font-size: 14px;
    color: var(--success);
    flex-shrink: 0;
}

/* Manage installation link (Connected state) */
.conn-manage-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-tertiary, #2a2a3e);
    border: 1px solid var(--border-primary, #3a3a4e);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.conn-manage-link:hover {
    color: var(--text-primary);
    border-color: var(--accent, #6366f1);
    background: rgba(99, 102, 241, 0.08);
}

.repo-manage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* Install actions (Not Connected state) */
.conn-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.conn-install-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.conn-help-text {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}


/* --- Agent Status Bar --- */

.agent-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary, #1e293b);
    border-radius: 6px;
    margin: 0 0 8px 0;
    font-size: 14px;
}

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

.agent-status-dot.idle {
    background: var(--text-muted, #64748b);
}

.agent-status-dot.working {
    background: #3b82f6;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.agent-status-dot.blocked {
    background: #ef4444;
}

.agent-status-text {
    color: var(--text-secondary, #94a3b8);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Disabled radio card + Coming soon badge --- */

.form-radio-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.form-link {
    color: var(--accent, #3b82f6);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    cursor: pointer;
}

.form-link:hover {
    color: var(--accent-hover, #60a5fa);
}

.form-action {
    color: var(--accent, #3b82f6);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
}

.form-action:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-hover, #60a5fa);
}

.coming-soon-badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--text-muted, #64748b);
    color: var(--bg-primary, #0f172a);
    vertical-align: middle;
    margin-left: 4px;
}

/* --- Playground callout (Step 1 of New Project) --- */

.playground-callout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.08),
        rgba(59, 130, 246, 0.03));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0 24px;
}

.playground-callout-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.playground-callout-body {
    flex: 1;
    min-width: 0;
}

.playground-callout-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.playground-callout-text {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.playground-callout-text code {
    background: var(--bg-tertiary);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.playground-callout-cta {
    flex-shrink: 0;
    align-self: center;
}

/* --- Playground mode badge in wizard header --- */

.wizard-mode-badge {
    display: inline-block;
    margin-left: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    vertical-align: middle;
}

/* --- Playground repo preview (Step 2) --- */

.playground-preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.playground-preview-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.playground-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.playground-preview-name {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
}

.playground-preview-pill {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.playground-preview-pill.private {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-secondary);
}

.playground-preview-pill.public {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.playground-preview-note {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.playground-preview-note code {
    background: var(--bg-tertiary);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 14px;
}

.playground-org-link {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 14px;
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 1px 6px;
    border-radius: 4px;
    text-decoration: none;
    border-bottom: 1px dotted transparent;
}

.playground-org-link:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-hover);
}

/* --- Cancelled task row (REMOVE_TASK delta) --- */

.task-row.cancelled {
    opacity: 0.55;
}

.task-row.cancelled .td-name {
    text-decoration: line-through;
    text-decoration-color: var(--text-muted);
    color: var(--text-secondary);
}

.task-row.cancelled .td-progress-placeholder,
.task-row.cancelled .td-issues {
    color: var(--text-muted);
    font-feature-settings: "tnum";
}

.issue-status.cancelled {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    text-decoration: none;
}


