/* Ã¢â€â‚¬Ã¢â€â‚?Reset & Base Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #161922;
    --bg-tertiary: #1e2130;
    --bg-hover: #252836;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #2a2d37;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-on-accent: #ffffff;
    --navbar-height: 48px;
    --navbar-control-height: 36px;
    --navbar-control-radius: 8px;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    /* Shared frame for the New Chat composer and its upgrade notice. */
    --design-home-content-width: min(760px, 100%);
    --design-home-content-gutter: 24px;
    --transition-speed: 200ms;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;
    --bg-hover: #d4d4d8;
    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --border: #d4d4d8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --text-on-accent: #ffffff;
}

[data-theme="light"] .navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar {
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .project-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .channel-card,
[data-theme="light"] .wizard-step-content,
[data-theme="light"] .deliverable-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .dropup-menu {
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .chat-bubble.ai {
    background: var(--bg-secondary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--border);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Light-mode chip/badge/tag/state contrast.
   The status colours throughout the app are bright pastels tuned for a dark
   translucent chip; on the near-white light card the same text on a faint tint
   falls below WCAG. Override every tinted-background label to a deeper 700-level
   shade of the same hue (grouped by colour). Plain links / menu items / borders
   are intentionally excluded Ã¢â‚¬â€ those are a separate concern, not tinted chips. */
[data-theme="light"] .status-dev,
[data-theme="light"] .status-released,
[data-theme="light"] .issue-status.done,
[data-theme="light"] .role-badge-tag.owner,
[data-theme="light"] .plan-badge.growth,
[data-theme="light"] .docs-cat-tag.getting-started,
[data-theme="light"] .chat-badge.active,
[data-theme="light"] .btn-deploy.ready,
[data-theme="light"] .usage-range-chip.active,
[data-theme="light"] .plan-card-status.current {
    color: #1d4ed8; /* blue-700 */
}

[data-theme="light"] .issue-status.open,
[data-theme="light"] .role-badge-tag.member,
[data-theme="light"] .docs-cat-tag.team,
[data-theme="light"] .chat-badge.success,
[data-theme="light"] .project-status-bar.completed,
[data-theme="light"] .domain-state.ready,
[data-theme="light"] .invite-feedback.success,
[data-theme="light"] .credit-status.ok,
[data-theme="light"] .upgrade-plan-badge.active,
[data-theme="light"] .invoice-status.paid,
[data-theme="light"] .doc-stage.done,
[data-theme="light"] .settings-sec-status.enabled,
[data-theme="light"] .settings-gh-status.connected,
[data-theme="light"] .playground-preview-pill.public {
    color: #15803d; /* green-700 */
}

[data-theme="light"] .status-analyzing,
[data-theme="light"] .docs-cat-tag.billing,
[data-theme="light"] .credit-status.low,
[data-theme="light"] .invoice-status.due,
[data-theme="light"] .spend-alert,
[data-theme="light"] .new-repo-banner,
[data-theme="light"] .new-repo-banner-link {
    color: #b45309; /* amber-700 */
}

/* Every non-terminal issue stage uses the same calm green treatment. */
[data-theme="light"] .issue-status.working,
[data-theme="light"] .issue-status.open,
[data-theme="light"] .issue-status.todo,
[data-theme="light"] .status-dev,
[data-theme="light"] .status-todo {
    color: #15803d; /* green-700 */
}

[data-theme="light"] .issue-status.queued {
    color: #475569; /* slate-700 */
}

[data-theme="light"] .new-repo-banner-link:hover {
    color: #92400e; /* amber-800 */
}

[data-theme="light"] .role-badge-tag.admin,
[data-theme="light"] .plan-badge.enterprise,
[data-theme="light"] .docs-cat-tag.projects {
    color: #7e22ce; /* purple-700 */
}

[data-theme="light"] .credit-status.critical {
    color: #c2410c; /* orange-700 */
}

[data-theme="light"] .domain-state.failed,
[data-theme="light"] .invite-feedback.error,
[data-theme="light"] .credit-status.empty,
[data-theme="light"] .issue-status.failed {
    color: #b91c1c; /* red-700 */
}

[data-theme="light"] .domain-state.pending {
    color: #854d0e; /* yellow-800 Ã¢â‚¬â€ yellow-700 #a16207 was only 4.48:1, just under 4.5 */
}

[data-theme="light"] .docs-cat-tag.api {
    color: #be185d; /* pink-700 */
}

[data-theme="light"] .docs-cat-tag.integrations {
    color: #0e7490; /* cyan-700 */
}

[data-theme="light"] .status-todo {
    color: #52525b; /* zinc-600 */
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 14px;
}

button {
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
}

small {
    font-size: 14px;
}

.pwa-install-banner {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(78px, calc(70px + env(safe-area-inset-bottom)));
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.pwa-install-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-install-copy strong {
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.2;
}

.pwa-install-copy span {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.35;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-primary {
    min-height: 34px;
    padding: 0 12px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.pwa-install-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--text-muted);
}

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

@media (max-width: 768px) {
    .pwa-install-banner {
        display: flex;
    }
}

@media (display-mode: standalone) {
    .pwa-install-banner {
        display: none;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?App Shell Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Navbar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.navbar {
    display: flex;
    align-items: center;
    font-size: 14px;
    height: var(--navbar-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-shrink: 0;
    gap: 12px;
}

.navbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--navbar-control-height);
    height: var(--navbar-control-height);
    border-radius: var(--navbar-control-radius);
    color: var(--text-secondary);
    transition: background var(--transition-speed), color var(--transition-speed);
}

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

.sidebar-pin-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 48px;
    padding: 12px 12px 0;
    overflow: visible;
    transition: min-height var(--transition-speed) ease,
                padding var(--transition-speed) ease,
                opacity var(--transition-speed) ease;
}

.sidebar-pin-row > .ws-switcher {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
}

.sidebar-pin-row > .ws-switcher .ws-dropdown {
    right: 0;
    left: 0;
}

.sidebar-pin {
    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);
}

.sidebar-pin-image {
    display: block;
    flex: 0 0 auto;
}

.sidebar-pin:hover:not(:disabled),
.sidebar-pin:focus-visible {
    outline: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-pin.active {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
}

.sidebar-pin.inactive {
    cursor: not-allowed;
    opacity: 0.35;
}

.navbar-logo {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    white-space: nowrap;
    line-height: 0;
}

.navbar-logo .ideavibes-brand {
    display: block;
    width: 112px;
    height: 26px;
    aspect-ratio: 460 / 112;
    flex: 0 0 auto;
    overflow: visible;
}

.ideavibes-wordmark {
    display: inline-block;
    width: auto;
    height: 1em;
    aspect-ratio: 350 / 112;
    overflow: hidden;
    color: var(--text-primary);
    vertical-align: middle;
}

.navbar-mode-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 32px;
    padding: 2px;
    margin-left: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-sm);
}

.navbar-mode-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    height: 26px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    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);
}

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

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

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

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

.navbar-mode-compact {
    display: none;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--accent);
    font-size: 14px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.navbar-mode-compact:disabled {
    opacity: 0.65;
}

.navbar-spacer {
    flex: 1;
}

.navbar-cmd {
    display: flex;
    align-items: center;
    gap: 8px;
    height: var(--navbar-control-height);
    padding: 0 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--navbar-control-radius);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--transition-speed);
    white-space: nowrap;
}

.navbar-cmd:hover {
    border-color: var(--text-muted);
}

.navbar-cmd kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-muted);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.credit-navbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--navbar-control-height);
    padding: 0 10px;
    border-radius: var(--navbar-control-radius);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    transition: color 0.15s, background 0.15s;
}

.credit-navbar-badge:hover {
    background: var(--bg-tertiary);
}

.credit-navbar-badge strong {
    color: currentColor;
    font-size: 14px;
}

.credit-navbar-badge span {
    font-size: 14px;
}

.credit-navbar-icon {
    width: 15px;
    height: 15px;
    color: currentColor;
    fill: currentColor;
    flex-shrink: 0;
}

.credit-navbar-badge.low {
    background: color-mix(in srgb, var(--warning) 14%, transparent);
    color: var(--warning);
}

.credit-navbar-badge.critical,
.credit-navbar-badge.empty {
    background: color-mix(in srgb, var(--danger) 14%, transparent);
    color: var(--danger);
}

.credit-navbar-action {
    font-weight: 600;
    opacity: 0.9;
}

.credit-navbar-container {
    position: relative;
}

.credit-popover-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

.credit-summary-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 100;
    width: 300px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.credit-summary-total,
.credit-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
}

.credit-summary-total {
    align-items: baseline;
    padding: 2px 2px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.credit-summary-total strong {
    font-size: 20px;
    color: var(--text-primary);
}

.credit-summary-rows {
    padding: 6px 2px 2px;
}

.credit-summary-row {
    padding: 6px 0;
    font-size: 14px;
}

.credit-summary-row > span {
    color: var(--text-secondary);
}

.credit-summary-row > strong {
    color: var(--text-primary);
}

.credit-summary-row > small {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 14px;
}

.credit-summary-breakdown-toggle {
    display: block;
    margin: 2px 0 4px;
    padding: 2px 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.credit-summary-breakdown-toggle:hover,
.credit-summary-breakdown-toggle:focus-visible {
    color: var(--accent-hover);
    text-decoration: underline;
}

.credit-summary-detail {
    padding-left: 10px;
    border-left: 2px solid var(--border);
}

.credit-summary-loading,
.credit-summary-member-note {
    margin: 6px 2px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.credit-summary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.credit-summary-actions .credit-summary-member-note {
    margin: 0;
}

.credit-summary-link {
    margin-left: auto;
    padding: 4px;
    border-radius: 4px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.credit-summary-link:hover,
.credit-summary-link:focus-visible {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent-hover);
}

.navbar-action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--navbar-control-height);
    height: var(--navbar-control-height);
    border-radius: var(--navbar-control-radius);
    color: var(--text-secondary);
    transition: background var(--transition-speed), color var(--transition-speed);
}

.navbar-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-action-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.navbar-action-btn .notif-badge {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 18px;
    min-width: 20px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    color: #fff;
    background: var(--danger);
    border-radius: 8px;
    border: 2px solid var(--bg-secondary);
    top: -6px;
    right: -7px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Notification Dropdown Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.notif-container {
    position: relative;
}

.notif-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.notif-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.notif-header-title span {
    color: var(--text-muted);
    font-weight: 500;
}

.notif-mark-read {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.notif-mark-read:hover {
    background: rgba(59,130,246,0.1);
}

.notif-list {
    flex: 1;
    overflow-y: auto;
}

.notif-group {
    margin: 0;
    padding: 12px 18px 6px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-bottom: 1px solid var(--border);
    width: 100%;
    color: inherit;
    text-align: left;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item.read {
    opacity: 0.6;
}

.notif-item.read:hover {
    opacity: 1;
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notif-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notif-time {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.notif-detail {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-footer {
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.notif-footer-link {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.notif-footer-link:hover {
    background: rgba(59,130,246,0.1);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Search Modal (Ã¢Å’ËœK) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.navbar-cmd-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    z-index: 1100;
    backdrop-filter: blur(4px);
}

.search-modal {
    width: 560px;
    max-width: 92vw;
    max-height: 480px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.search-input-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
}

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

.search-esc {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 14px;
    color: var(--text-muted);
    font-family: inherit;
}

.search-results {
    flex: 1;
    overflow-y: auto;
}

.search-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.search-groups {
    padding: 6px 0;
}

.search-group {
    padding-bottom: 4px;
}

.search-group-label {
    padding: 8px 18px 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-item:hover,
.search-item.selected {
    background: var(--bg-hover);
}

.search-item.selected {
    background: var(--bg-tertiary);
}

.search-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.search-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-enter {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-family: inherit;
    flex-shrink: 0;
}

.search-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
}

.search-hint {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-hint kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 14px;
    font-family: inherit;
}

.navbar-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.navbar-avatar:hover {
    background: var(--bg-tertiary);
}

.navbar-avatar .avatar-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

/* Avatar component: the <img> shares the circle class with the initials
   fallback, so make the image crop-to-fill the circle (size + radius come
   from each call site's circle class). */
img.avatar-circle,
img.user-menu-avatar,
img.team-avatar,
img.settings-avatar-circle {
    object-fit: cover;
    border-radius: 50%;
    background: none;
    padding: 0;
}

.navbar-avatar .role-badge {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Ã¢â€â‚¬Ã¢â€â‚?User Menu Dropdown Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.user-menu-container {
    position: relative;
}

.user-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    z-index: 100;
    padding: 6px;
    display: flex;
    flex-direction: column;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
}

.user-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-menu-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-email {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 6px;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border-radius: 8px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: left;
}

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

.user-menu-item.logout {
    color: #f87171;
}

.user-menu-item.logout:hover {
    background: rgba(239,68,68,0.08);
    color: #f87171;
}

.user-menu-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.user-menu-item:hover .user-menu-item-icon {
    opacity: 1;
}

.user-menu-item-value {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Sidebar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.sidebar {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    transition: width var(--transition-speed) ease,
                min-width var(--transition-speed) ease;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 50;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-pin-row {
    height: auto;
    padding: 8px 0 0;
    opacity: 1;
    visibility: visible;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sidebar.collapsed .sidebar-pin-row > .sidebar-pin {
    display: none;
}

.sidebar.collapsed .sidebar-pin-row > .ws-switcher {
    flex: 0 0 auto;
    width: 40px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Workspace Switcher Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.ws-switcher {
    position: relative;
    padding: 12px 12px 0;
}
.ws-switcher-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.ws-switcher-btn:hover { background: var(--bg-hover); }
.sidebar.collapsed .ws-switcher-btn { justify-content: center; padding: 8px; }
.ws-switcher-chevron { color: var(--text-muted); display: flex; }

.ws-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}
.ws-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 12px;
    right: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 200;
    overflow: hidden;
    min-width: 220px;
}
.sidebar.collapsed .ws-dropdown { left: 100%; top: 0; right: auto; width: 240px; }

.ws-dropdown-label {
    padding: 8px 12px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ws-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.ws-dropdown-item:hover { background: var(--bg-hover); }
.ws-dropdown-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ws-dropdown-item:disabled:hover { background: none; }
.ws-dropdown-item.active { color: var(--text-primary); }
.ws-dropdown-item.create { color: var(--accent); font-weight: 500; padding: 8px 12px; }
.ws-dropdown-avatar {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ws-dropdown-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ws-dropdown-name { font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-dropdown-meta { font-size: 14px; color: var(--text-muted); }
.ws-dropdown-check { color: var(--accent); display: flex; flex-shrink: 0; }
.ws-dropdown-divider { height: 1px; background: var(--border); margin: 2px 0; }
.ws-create-plus {
    width: 28px; height: 28px;
    border-radius: 6px;
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
}
.ws-create-form {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
}
.ws-create-form .form-input { flex: 1; font-size: 14px; padding: 6px 8px; }
.ws-dropdown-error {
    margin: 0;
    padding: 0 12px 10px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 2px;
}

.sidebar-section-label {
    padding: 16px 12px 6px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    height: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 15px;
    transition: background var(--transition-speed), color var(--transition-speed);
    white-space: nowrap;
    overflow: hidden;
}

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

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

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    width: 3px;
    height: 20px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item .nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-item .nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 8px;
}

.design-nav-row {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    border-radius: 6px;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.design-nav-row:hover,
.design-nav-row.active {
    background: var(--bg-tertiary);
}

.design-nav-row.active::before,
.design-nav-new-chat.active::before,
.design-nav-session-row.active::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
    content: "";
    transform: translateY(-50%);
}

.design-nav-row.active .nav-item {
    color: var(--text-primary);
}

.design-nav-row .nav-item {
    width: auto;
    min-width: 0;
    padding-right: 2px;
    flex: 0 1 auto;
    background: transparent;
}

.design-nav-row .nav-item:hover,
.design-nav-row .nav-item.active {
    background: transparent;
}

.design-nav-row .design-nav-group-toggle {
    width: 100%;
    min-width: 0;
    padding-right: 10px;
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.design-nav-group-toggle .nav-label {
    flex: 0 1 auto;
}

.design-nav-group-toggle > .design-nav-history-chevron {
    margin-left: 1px;
    opacity: 0;
    pointer-events: none;
    transition: color var(--transition-speed), opacity var(--transition-speed);
}

.design-nav-row:hover .design-nav-group-toggle > .design-nav-history-chevron,
.design-nav-group-toggle:focus-visible > .design-nav-history-chevron {
    opacity: 1;
}

.design-nav-group-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.sidebar.collapsed .design-nav-row .nav-item {
    padding: 8px;
}

.sidebar.collapsed .design-nav-group-toggle > .design-nav-history-chevron {
    display: none;
}

.design-nav-submenu {
    display: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.design-nav-submenu.expanded {
    /* Expansion is intentionally immediate. This avoids exposing overflowing
       content halfway through a height animation; the sidebar itself owns the
       single scroll surface for the full, unbounded navigation snapshot. */
    display: block;
    margin: 1px 0 5px;
    padding: 2px 0;
    overflow: visible;
}

.sidebar.collapsed .design-nav-submenu {
    display: none;
}

.design-nav-new-chat {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 30px;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 650;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.design-nav-new-chat:hover,
.design-nav-new-chat:focus-visible {
    outline: none;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-nav-import-repo.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.design-nav-new-chat-icon {
    display: grid;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid color-mix(in srgb, #8b5cf6 38%, var(--border));
    border-radius: 5px;
    color: #a78bfa;
    font-size: 14px;
    line-height: 1;
    place-items: center;
}

.import-repo-more-toggle {
    display: flex;
    width: calc(100% - 8px);
    min-height: 30px;
    align-items: center;
    gap: 7px;
    margin: 2px 4px 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.import-repo-more-toggle:hover,
.import-repo-more-toggle:focus-visible {
    outline: none;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.import-repo-more-toggle:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.import-repo-more-dots {
    min-width: 16px;
    color: var(--text-muted);
    font-weight: 750;
    letter-spacing: 0.5px;
}

.design-nav-more-toggle {
    display: flex;
    width: calc(100% - 8px);
    min-height: 30px;
    align-items: center;
    gap: 7px;
    margin: 2px 4px 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.design-nav-more-toggle:hover,
.design-nav-more-toggle:focus-visible {
    outline: none;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-nav-more-toggle:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.design-nav-more-dots {
    min-width: 16px;
    color: var(--text-muted);
    font-weight: 750;
    letter-spacing: 0.5px;
}

.design-nav-history-toggle {
    display: flex;
    width: 100%;
    min-height: 28px;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 10px 7px 4px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.65px;
    text-transform: uppercase;
    transition: color var(--transition-speed);
}

.design-nav-history-toggle:hover,
.design-nav-history-toggle:focus-visible {
    color: var(--text-primary);
    outline: none;
}

.design-nav-history-chevron {
    display: inline-grid;
    width: 10px;
    height: 10px;
    align-self: center;
    font-size: 0;
    line-height: 0;
    opacity: 0;
    place-items: center;
    transition: opacity var(--transition-speed);
}

.design-nav-history-chevron::before {
    width: 4px;
    height: 4px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    content: "";
    transform: translateY(1px) rotate(-45deg);
    transform-origin: center;
}

.design-nav-history-chevron.expanded::before,
.design-nav-history-toggle[aria-expanded="true"] .design-nav-history-chevron::before {
    transform: translateY(1px) rotate(45deg);
}

.design-nav-history-toggle:hover .design-nav-history-chevron,
.design-nav-history-toggle:focus-visible .design-nav-history-chevron {
    opacity: 1;
}

.design-nav-history-items {
    display: contents;
}

/* Nest session rows under their Pinned/Recents heading without shifting the
   parent navigation or the New chat action. */
.design-nav-history-items .design-nav-session-link {
    padding-left: 28px;
}

.design-nav-history-items .design-nav-more-toggle,
.design-nav-history-items .import-repo-more-toggle {
    padding-left: 24px;
}

.design-nav-session-list {
    display: flex;
    max-height: none;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    overflow: visible;
    overscroll-behavior: contain;
}

.design-nav-session-row {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 30px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.3;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.design-nav-session-row:hover,
.design-nav-session-row:focus-within {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-nav-session-row.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.design-nav-session-link {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 30px;
    flex: 1;
    padding: 5px 50px 5px 12px;
    border-radius: inherit;
    color: inherit;
}

.design-nav-legacy-project-link {
    padding-right: 8px;
}

.design-nav-session-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.design-nav-session-title {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-nav-session-actions {
    position: absolute;
    right: 3px;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    transform: translateY(-50%);
}

.design-nav-session-pin,
.design-nav-session-more {
    display: grid;
    width: 23px;
    height: 23px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    place-items: center;
    transition: background var(--transition-speed), color var(--transition-speed), opacity var(--transition-speed);
}

.design-nav-session-row:hover .design-nav-session-pin,
.design-nav-session-row:hover .design-nav-session-more,
.design-nav-session-row:focus-within .design-nav-session-pin,
.design-nav-session-row:focus-within .design-nav-session-more {
    opacity: 1;
}

.design-nav-session-pin:hover,
.design-nav-session-more:hover,
.design-nav-session-pin:focus-visible,
.design-nav-session-more:focus-visible {
    outline: none;
    background: color-mix(in srgb, var(--bg-tertiary) 78%, transparent);
    color: var(--text-primary);
}

.design-nav-session-pin:focus-visible,
.design-nav-session-more:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.design-nav-session-pin span,
.design-nav-session-more span,
.design-nav-session-menu button > span:first-child {
    display: flex;
    width: 15px;
    height: 15px;
}

.design-nav-session-pin svg,
.design-nav-session-more svg,
.design-nav-session-menu svg {
    width: 100%;
    height: 100%;
}

.design-nav-session-rename {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 24px 24px;
    gap: 2px;
    padding: 3px;
}

.design-nav-session-rename input {
    min-width: 0;
    height: 26px;
    padding: 4px 6px;
    border: 1px solid var(--accent);
    border-radius: 5px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.design-nav-session-rename button {
    border-radius: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}

.design-nav-session-rename button:hover,
.design-nav-session-rename button:focus-visible {
    outline: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.design-nav-session-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 209;
    width: 100vw;
    height: 100vh;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

.design-nav-session-menu {
    position: absolute;
    top: calc(100% - 2px);
    right: 2px;
    z-index: 210;
    display: flex;
    width: 158px;
    padding: 5px;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-tertiary);
    box-shadow: 0 12px 32px rgb(0 0 0 / 24%);
}

.design-nav-session-menu.above {
    top: auto;
    bottom: calc(100% - 2px);
}

.design-nav-session-menu button {
    display: flex;
    width: 100%;
    min-height: 31px;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.design-nav-session-menu button:hover,
.design-nav-session-menu button:focus-visible {
    outline: none;
    background: var(--bg-hover);
}

.design-nav-session-menu button.danger {
    color: var(--danger);
}

.design-nav-session-menu-divider {
    height: 1px;
    margin: 4px 3px;
    background: var(--border);
}

.design-nav-session-notice {
    margin: 5px 3px 1px;
    padding: 6px 7px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--success) 10%, transparent);
    color: var(--success);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.design-nav-session-notice.error {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
}

.design-nav-state,
.design-nav-refresh-error {
    display: flex;
    align-items: center;
    min-height: 28px;
    gap: 6px;
    padding: 4px 7px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.35;
}

.design-nav-state.error,
.design-nav-refresh-error {
    color: var(--danger);
}

.design-nav-state button,
.design-nav-refresh-error button {
    margin-left: auto;
    color: var(--accent);
    font-size: 14px;
    font-weight: 650;
}

.design-nav-state button:hover,
.design-nav-refresh-error button:hover {
    text-decoration: underline;
}

.design-nav-spinner {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 1.5px solid color-mix(in srgb, var(--text-muted) 35%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: design-nav-spin 0.75s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition: none;
    }

    .design-nav-submenu {
        transition: none;
    }

    .design-nav-spinner {
        animation-duration: 1.8s;
    }
}

/* Sidebar footer */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-cost {
    display: flex;
    flex-direction: column;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-cost .cost-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-cost .cost-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-footer {
    display: none;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Main Content Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.main-content {
    position: relative;
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    background: var(--bg-primary);
}

.mobile-bottom-nav {
    display: none;
}

.mobile-nav-item {
    display: flex;
    flex: 1;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.mobile-nav-item.active {
    color: var(--text-primary);
}

.mobile-nav-current.active {
    color: var(--accent);
}

.mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.mobile-nav-icon svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    html,
    body,
    .app {
        min-height: 100dvh;
    }

    .app {
        height: 100dvh;
    }

    .navbar {
        padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
        gap: 8px;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-logo {
        font-size: 0;
        gap: 0;
    }

    .navbar-mode-switcher {
        display: none;
    }

    .navbar-mode-compact {
        display: inline-flex;
    }

    .navbar-cmd {
        width: var(--navbar-control-height);
        height: var(--navbar-control-height);
        padding: 0;
        justify-content: center;
    }

    .navbar-cmd-label,
    .navbar-cmd .navbar-cmd-kbd {
        display: none;
    }

    .credit-navbar-badge span {
        display: none;
    }

    .credit-summary-popover {
        position: fixed;
        top: auto;
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(74px + env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        width: auto;
        max-height: min(72dvh, 560px);
        overflow-y: auto;
        border-radius: 14px;
        z-index: 190;
    }

    .credit-popover-backdrop {
        z-index: 180;
        background: rgba(0, 0, 0, 0.42);
    }

    .navbar-avatar .role-badge {
        display: none;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: 16px max(14px, env(safe-area-inset-right)) calc(82px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 120;
        display: flex;
        min-height: calc(64px + env(safe-area-inset-bottom));
        padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        background: var(--bg-secondary);
        border-top: 1px solid var(--border);
    }

    /* mobile notification sheet */
    .notif-backdrop {
        z-index: 180;
        background: rgba(0, 0, 0, 0.42);
    }

    .notif-dropdown {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(74px + env(safe-area-inset-bottom));
        top: auto;
        width: auto;
        max-height: min(72dvh, 560px);
        border-radius: 14px;
        z-index: 190;
    }

    .notif-header {
        padding: 13px 14px;
    }

    .notif-item {
        padding: 13px 14px;
    }

    .mobile-project-detail {
        height: calc(100dvh - var(--navbar-height) - 82px);
        min-height: 0;
        padding-bottom: 0;
    }

    .mobile-project-header {
        margin-bottom: 10px;
        padding-bottom: 12px;
    }

    .mobile-project-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 3px;
        margin-bottom: 10px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 10px;
        flex-shrink: 0;
    }

    .mobile-project-tab {
        min-height: 36px;
        border-radius: 8px;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 700;
    }

    .mobile-project-tab.active {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .mobile-project-body {
        display: flex;
        flex: 1;
        min-height: 0;
        flex-direction: column;
    }

    .mobile-project-body .right-panel {
        flex: 1;
        min-height: 0;
    }

    .mobile-project-panel {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .mobile-work-panel,
    .mobile-lite-work-panel,
    .mobile-info-panel {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-lite-work-panel {
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .mobile-work-card {
        display: flex;
        flex-shrink: 0;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 10px;
    }

    .mobile-deployment-action {
        width: 100%;
        justify-content: center;
    }

    .mobile-work-label {
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0;
    }

    .mobile-work-value {
        color: var(--text-primary);
        font-size: 14px;
        font-weight: 700;
        text-transform: capitalize;
    }

    .mobile-work-list {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-work-list.long {
        max-height: min(42dvh, 360px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 2px;
    }

    .mobile-work-load-more {
        justify-content: center;
        width: 100%;
    }

    .mobile-work-row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        color: var(--text-secondary);
        font-size: 14px;
        min-width: 0;
    }

    .mobile-work-row span:first-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-work-muted {
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .mobile-danger-zone {
        margin-top: 8px;
        border-color: rgba(239, 68, 68, 0.35);
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Page Stubs Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.page-header p {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.page-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Dashboard Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
/* Ã¢â€â‚¬Ã¢â€â‚?Welcome / Landing Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.welcome-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: calc(100vh - 48px - 48px);
}

.welcome-card {
    text-align: center;
    max-width: 420px;
    padding: 48px 32px;
}

.welcome-icon {
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.welcome-cta {
    display: inline-block;
    padding: 10px 28px;
    font-size: 14px;
}

.welcome-hint {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.welcome-link {
    color: var(--accent);
    text-decoration: none;
}

.welcome-link:hover {
    text-decoration: underline;
}

.dashboard {
    max-width: 1280px;
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

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

.dashboard-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-subtitle {
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 14px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: background var(--transition-speed);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Stats Grid Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.dashboard-credits-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.welcome-page .dashboard-credits-strip {
    width: min(620px, 100%);
    margin-bottom: 0;
}

.dashboard-credits-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dashboard-credits-kicker {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.dashboard-credits-main strong {
    color: var(--text-primary);
    font-size: 22px;
    line-height: 1.2;
}

.dashboard-credits-main span:last-child,
.dashboard-credits-actions span {
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-credits-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

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

    .dashboard-credits-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-credits-actions {
        justify-content: flex-start;
    }
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color var(--transition-speed);
}

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

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.sparkline {
    flex-shrink: 0;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-card-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Current Work Banner Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.current-work {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    margin-bottom: 28px;
}

.current-work-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.current-work-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.current-work-project {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-work-detail {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-work-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.current-work-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.current-work-eta {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Dashboard Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.dashboard-page {
    max-width: 1280px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Recent Activity Section Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.dashboard-activity-section {
    margin-top: 32px;
}

.dashboard-activity-section .section-title {
    display: block;
    margin-bottom: 14px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    transition: background var(--transition-speed);
}

.activity-row:hover {
    background: var(--bg-secondary);
}

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

.activity-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.activity-project {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.activity-action {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Projects Placeholder Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.projects-placeholder {
    text-align: center;
    grid-column: 1 / -1;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Projects Section Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.projects-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Filter Bar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.filter-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
}

.filter-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 6px;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.filter-btn:hover {
    color: var(--text-secondary);
}

.filter-btn.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Projects Grid Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.project-groups {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.project-group-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.project-group-count {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 650;
}

.projects-placeholder.compact {
    min-height: 92px;
    display: flex;
    align-items: center;
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

@media (max-width: 1100px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Project Card Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.project-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: transform var(--transition-speed),
                border-color var(--transition-speed),
                box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.project-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.project-card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.project-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-repo {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.project-card-pct {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.project-card-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.task-badge {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.status-pill {
    font-size: 14px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-overview-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.project-overview-summary {
    padding: 2px 2px 20px;
}

.project-overview-summary h2 {
    margin: 6px 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

.project-overview-summary > p {
    margin: 0;
    max-width: 68ch;
    color: var(--text-secondary);
    line-height: 1.5;
}

.project-overview-details {
    border-top: 1px solid var(--border);
}

.overview-detail-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 2px;
    border-bottom: 1px solid var(--border);
}

.overview-detail-row:last-child {
    border-bottom: 0;
}

.overview-detail-icon,
.overview-stage-indicator {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.overview-stage-indicator {
    gap: 3px;
}

.overview-stage-indicator span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.overview-stage-indicator.active span {
    background: var(--accent);
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.overview-stage-indicator.active span:nth-child(2) { animation-delay: 0.2s; }
.overview-stage-indicator.active span:nth-child(3) { animation-delay: 0.4s; }

.overview-detail-content {
    min-width: 0;
}

.overview-detail-value {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin-top: 5px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

a.overview-detail-value:hover {
    color: var(--accent);
}

.overview-detail-help {
    display: block;
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.overview-edit-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.overview-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.overview-edit-row .btn-sm {
    min-height: 40px;
}

.overview-kicker {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.repo-destination-options {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.repo-destination-option {
    width: 100%;
    min-height: 62px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    background: transparent;
    text-align: left;
}

button.repo-destination-option:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--text-muted) 62%, transparent);
    background: var(--bg-hover);
}

.repo-destination-option.selected {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.repo-destination-option.unavailable {
    color: var(--text-secondary);
}

.repo-destination-option:disabled {
    cursor: wait;
    opacity: 0.72;
}

.repo-destination-option strong,
.repo-destination-option small {
    display: block;
}

.repo-destination-option strong {
    font-size: 14px;
}

.repo-destination-option small {
    margin-top: 2px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.repo-destination-radio {
    width: 14px;
    height: 14px;
    border: 1px solid var(--text-muted);
    border-radius: 50%;
}

.repo-destination-option.selected .repo-destination-radio {
    border: 4px solid var(--accent);
}

.repo-visibility-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    padding: 2px 0 0;
}

.repo-visibility-copy strong,
.repo-visibility-copy small {
    display: block;
}

.repo-visibility-copy strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.repo-visibility-copy small {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.repo-visibility-switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    padding: 2px;
    border: 0;
    border-radius: 999px;
    background: var(--bg-hover);
    transition: background-color 160ms ease;
}

.repo-visibility-switch > span {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 160ms ease;
}

.repo-visibility-switch.on {
    background: var(--accent);
}

.repo-visibility-switch.on > span {
    transform: translateX(20px);
}

.repo-visibility-switch:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
    outline-offset: 2px;
}

.repo-visibility-switch:disabled {
    cursor: wait;
    opacity: 0.7;
}

.repo-check-connection {
    margin-top: 24px;
}

.repo-destination-preview {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.repo-destination-preview code {
    min-width: 0;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .repo-destination-option {
        grid-template-columns: 18px minmax(0, 1fr);
    }

    .repo-destination-option .btn-sm {
        grid-column: 2;
        width: fit-content;
    }
}

.status-dev {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-released {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.btn-ghost.btn-sm {
    height: 26px;
    padding: 0 10px;
    font-size: 14px;
}

.project-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.project-card-avatars {
    display: flex;
    align-items: center;
}

.mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-left: -6px;
}

.mini-avatar:first-child {
    margin-left: 0;
}

.mini-avatar.extra {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 14px;
}

.delivery-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--success);
    padding: 2px 8px;
    border-radius: 4px;
    transition: background var(--transition-speed);
}

.delivery-link:hover {
    background: rgba(34, 197, 94, 0.1);
}

.delivery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
}

.project-card-activity {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Card wrapper hosts the full-card link plus a sibling "open in new tab"
   affordance. The button is a sibling (not nested in the card anchor) to keep
   the markup valid Ã¢â‚¬â€ anchors can't nest. */
.project-card-wrap {
    position: relative;
}

.project-card-open {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    opacity: 0.55;
    transition: opacity var(--transition-speed),
                color var(--transition-speed),
                background var(--transition-speed),
                border-color var(--transition-speed);
}

.project-card-wrap:hover .project-card-open {
    opacity: 1;
}

.project-card-open:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--border);
}

.project-card-open:focus-visible {
    opacity: 1;
    outline: none;
    border-color: var(--text-muted);
}

/* Project list status pills */
.status-live {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-done {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-working {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.status-stalled {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.status-planning {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.status-idle {
    background: rgba(113, 113, 122, 0.15);
    color: var(--text-muted);
}

/* Light mode: the pill text colours above are tuned for a dark translucent
   chip. On the near-white light card the same pastels fail contrast, so swap to
   deeper 700-level shades (faint tint + dark text = standard readable badge). */
[data-theme="light"] .status-live {
    color: #15803d;
}

[data-theme="light"] .status-done {
    color: #047857;
}

[data-theme="light"] .status-working {
    color: #1d4ed8;
}

[data-theme="light"] .status-stalled {
    color: #b45309;
}

[data-theme="light"] .status-planning {
    color: #7e22ce;
}

[data-theme="light"] .status-idle {
    color: #52525b;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Buttons (shared) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-primary.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 14px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

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

.btn-success {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Shared deployment action button. */
.btn-deploy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(113, 113, 122, 0.15);
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.btn-deploy:hover {
    background: rgba(113, 113, 122, 0.25);
}

.btn-deploy:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.btn-deploy.ready {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.btn-deploy.ready:hover {
    background: rgba(59, 130, 246, 0.25);
}

.btn-deploy.released {
    cursor: default;
    opacity: 1;
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.deploy-pending-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--warning, #f59e0b);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
}

.deploy-action-error {
    max-width: 260px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Progress Bar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Projects Listing Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
/* Projects list page fills the available width: drop the fixed 1280px cap and
   let cards reflow by min-width so the column count grows on wide screens and
   collapses on zoom-in. Scoped to the list page; dashboard grids keep
   their fixed 3-column layout. */
.projects-listing .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}

.projects-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Project Detail Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.project-detail {
    display: flex;
    flex-direction: column;
    /* Definite height so the side-by-side chat panel (.chat-messages is
       flex:1 + overflow-y:auto) is height-bounded and scrolls internally,
       landing on the latest message. When the split stacks (<=1024px) this
       switches to auto so the page grows instead Ã¢â‚¬â€ see the media query. */
    height: calc(100vh - var(--navbar-height) - 48px);
}

.project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.project-detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.project-detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.project-detail-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.project-detail-repo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
    transition: color var(--transition-speed);
}

.project-detail-repo:hover {
    color: var(--text-secondary);
}

.no-repo {
    font-style: italic;
    opacity: 0.5;
}

.project-detail-repo svg {
    flex-shrink: 0;
}

.project-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Active Work Banner Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.active-work-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.active-work-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?New Repo Banner Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.new-repo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    margin-bottom: 12px;
    color: #f59e0b;
    flex-shrink: 0;
}

.new-repo-banner-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.new-repo-banner-link {
    color: #f59e0b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.new-repo-banner-link:hover {
    color: #fbbf24;
}

.new-repo-banner-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.new-repo-banner-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Deploy-context credit warning, above the Deploy button. Amber when the
   balance is approaching the threshold, red once deploys are paused. */
.deploy-credit-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    border: 1px solid transparent;
}

/* The banner sets its own accent color; the icon (fill: currentColor) and CTA
   (color: inherit) pick it up, so the tier only needs to vary one property. */
.deploy-credit-banner.approaching {
    background: color-mix(in srgb, var(--warning) 10%, transparent);
    border-color: color-mix(in srgb, var(--warning) 30%, transparent);
    color: var(--warning);
}

.deploy-credit-banner.blocked {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
    color: var(--danger);
}

.deploy-credit-icon {
    flex-shrink: 0;
}

.deploy-credit-text {
    /* No flex-grow: the text keeps its natural width so the "Add credits" CTA
       sits right after it instead of being pushed to the far edge on wide
       banners, where it's easy to miss. */
    color: var(--text-secondary);
}

.deploy-credit-cta {
    flex-shrink: 0;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Split Layout Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.split-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}

.left-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.split-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
    cursor: col-resize;
    position: relative;
}

.split-divider::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -3px;
    right: -3px;
}

/* Standalone legacy/imported Project workspaces use the same roomy 50/50
   conversation surface as Idea Design. The visible divider remains a single
   hairline while the full 32px gutter is available as a drag target. */
.project-workspace-splitter {
    position: relative;
    z-index: 4;
    width: 32px;
    flex: 0 0 32px;
    cursor: col-resize;
    touch-action: none;
    background: transparent;
}

.project-workspace-splitter::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 1px;
    background: var(--border);
    transition: width 120ms ease, left 120ms ease, background 120ms ease;
}

.project-workspace-splitter:hover::before,
.project-workspace-splitter:focus-visible::before,
.project-workspace-splitter.dragging::before {
    left: 14px;
    width: 3px;
    background: var(--accent);
}

.project-workspace-splitter:focus-visible {
    outline: none;
}

.resizable-project-chat-panel {
    transition: none;
    background: var(--bg-primary);
}

/* Legacy and imported repositories use the same framed workspace as Idea
   Design. Embedded Build continuations already live inside that frame. */
.project-detail:not(.embedded-project-workspace) > .project-workspace-split {
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-primary);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.right-panel {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: flex var(--transition-speed), min-width var(--transition-speed);
}

.right-panel.folded {
    flex: 0;
    min-width: 44px;
    max-width: 44px;
}

.right-panel.folded .chat-header {
    flex-direction: column;
    padding: 10px 6px;
    gap: 10px;
}

.right-panel.folded .chat-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 14px;
    white-space: nowrap;
}

.right-panel.folded .chat-participants {
    flex-direction: column;
    gap: 4px;
}

/* Below 1024px (incl. zoomed-in desktop) the split gets too cramped, so
   stack the panels into one column and let the page scroll instead of clipping.
   The mobile DOM swap only happens at <=768px and isn't re-evaluated on zoom,
   so this CSS is what keeps the mounted desktop layout usable as it narrows. */
@media (max-width: 1024px) {
    /* Stacked: let the page grow and scroll instead of clipping to viewport
       height. (Side-by-side keeps its definite height so chat scrolls inside.) */
    .project-detail {
        height: auto;
        min-height: calc(100vh - var(--navbar-height) - 48px);
    }

    .split-layout {
        flex-direction: column;
    }

    .split-divider {
        display: none;
    }

    .project-workspace-splitter {
        display: none;
    }

    .left-panel,
    .right-panel,
    .right-panel.folded {
        flex: none;
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    /* Left panel flows into the page scroll; the chat panel keeps a usable
       height and scrolls internally as on desktop. */
    .left-panel {
        overflow: visible;
    }

    .right-panel,
    .right-panel.folded {
        min-height: 70vh;
    }

    .right-panel.resizable-project-chat-panel {
        flex: none !important;
    }
}

.chat-fold-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.chat-fold-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Panel Tabs Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.panel-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    padding: 0 16px;
    height: 42px;
}

.panel-tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color var(--transition-speed), border-color var(--transition-speed);
    white-space: nowrap;
}

.panel-tab:hover {
    color: var(--text-secondary);
}

.panel-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}


.overview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.overview-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.overview-stat-value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.overview-stat-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.overview-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.overview-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overview-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.overview-task-name {
    font-size: 14px;
    font-weight: 500;
    width: 160px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-task-bar {
    flex: 1;
    min-width: 60px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Tasks Tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.tasks-table {
    display: flex;
    flex-direction: column;
}

.tasks-table-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border);
}

.th-name { flex: 2; }
.th-progress { flex: 2.5; }
.th-status { flex: 0.8; }
.th-issues { width: 60px; text-align: center; flex-shrink: 0; }
.th-time { width: 70px; text-align: right; flex-shrink: 0; }
.th-estimate { width: 70px; text-align: right; flex-shrink: 0; }

.task-row-group {
    border-bottom: 1px solid var(--border);
}

.task-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.task-row:hover {
    background: var(--bg-secondary);
}

.task-row.expanded {
    background: var(--bg-secondary);
}

.td-name {
    flex: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.td-status {
    flex: 0.8;
    display: flex;
    align-items: center;
}

.expand-arrow {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform var(--transition-speed);
    display: inline-block;
}

.expand-arrow.expanded {
    transform: rotate(90deg);
}

.td-progress {
    flex: 2.5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-progress-pct {
    font-size: 14px;
    color: var(--text-muted);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.td-issues {
    width: 60px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?4-column task table Ã¢â€ â€?CSS Grid Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?
   The header and every row share ONE column definition, so column edges
   can't drift the way they did with per-row flex (the header had no gap;
   rows had gap:8px, nudging each data column right of its label). Scoped
   to `.tasks-table-grid` so the 6-column mock table keeps its flex layout. */
.tasks-table-grid .tasks-table-header,
.tasks-table-grid .task-row {
    display: grid;
    /* Progress floor stays small so the name column (the primary identifier)
       keeps priority when the panel is narrow Ã¢â‚¬â€ e.g. the 50/50 split just above
       the 1024px stack breakpoint. A ~40px bar still reads; a clipped name doesn't. */
    grid-template-columns: minmax(0, 3fr) minmax(80px, 2fr) 104px 44px;
    align-items: center;
    gap: 14px;
}

/* Status badge stays left-aligned (conventional Ã¢â‚¬â€ badge left edges line up) but
   gets a left inset so it sits a touch further from the progress %, and the Issues
   count is left-aligned (below) so the two right columns read as one tight cluster
   instead of a wide STATUSÃ¢â€ â€ISSUES void. The 104px track leaves room for the inset
   while still fitting the widest label ("In Progress"). */
.tasks-table-grid .td-status,
.tasks-table-grid .th-status {
    padding-left: 18px;
}

/* Name gets the most room (3fr) instead of losing it to a 6px bar; block-level
   so `text-overflow: ellipsis` renders the Ã¢â‚¬Â?on overflow (a flex container
   hard-clips with no ellipsis). Full name stays recoverable via the `title`
   tooltip on hover. */
.tasks-table-grid .td-name {
    display: block;
}

/* Issues count: left-aligned so it sits close to the Status column (tightens the
   right side instead of pinning the number to the far edge); tabular figures keep
   digit widths even. The progress % below stays right-aligned against its bar. */
.tasks-table-grid .th-issues,
.tasks-table-grid .td-issues {
    width: auto;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.tasks-table-grid .td-progress-pct {
    font-variant-numeric: tabular-nums;
}

.td-time, .td-estimate {
    width: 70px;
    text-align: right;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-muted);
}

.status-analyzing {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.status-todo {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

/* Task expanded content */
.task-expanded-content {
    padding: 8px 12px 12px 32px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-expanded-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.task-expanded-issue {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 14px;
}

.issue-id-badge {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.issue-title-inline {
    flex: 1;
    color: var(--text-primary);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.issue-status {
    font-size: 14px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.issue-status.done {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.issue-status.working {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.issue-status.open {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.issue-status.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.issue-status.todo {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.issue-status.queued {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.issue-status.paused {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.issue-pr-link {
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Issues Tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.issues-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.issues-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dropup menu */
.dropup-container {
    position: relative;
}

.dropup-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropup-arrow {
    font-size: 14px;
    transition: transform var(--transition-speed);
}

.dropup-arrow.open {
    transform: rotate(180deg);
}

.dropup-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.dropup-item {
    display: block;
    width: 100%;
    padding: 7px 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    transition: background var(--transition-speed), color var(--transition-speed);
}

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

.dropup-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

.issues-sync-note {
    font-size: 14px;
    color: var(--text-muted);
}

.issues-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.issues-table-header {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 1px solid var(--border);
}

.ith-id { width: 55px; flex-shrink: 0; }
.ith-title { flex: 2; min-width: 0; }
.ith-task { flex: 1; min-width: 0; }
.ith-status { width: 90px; flex-shrink: 0; }
.ith-pr { width: 65px; flex-shrink: 0; }
.ith-updated { width: 80px; flex-shrink: 0; }

.issue-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition-speed);
}

.issue-row:last-child {
    border-bottom: none;
}

.issue-row:hover {
    background: var(--bg-secondary);
}

.issue-row.done {
    opacity: 0.7;
}

.itd-id { width: 55px; flex-shrink: 0; }
.itd-title { flex: 2; min-width: 0; color: var(--text-primary); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itd-task { flex: 1; min-width: 0; color: var(--text-muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itd-status { width: 90px; flex-shrink: 0; display: flex; align-items: center; }
.itd-pr { width: 65px; flex-shrink: 0; font-size: 14px; color: var(--text-muted); }
.itd-updated { width: 80px; flex-shrink: 0; font-size: 14px; color: var(--text-muted); }

/* Ã¢â€â‚¬Ã¢â€â‚?Deployment Tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.deployment-tab {
    padding: 12px;
    display: grid;
    gap: 12px;
}

.deployment-tab-empty {
    padding: 0;
}

.deployment-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.deployment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.deployment-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.deployment-url {
    display: inline-block;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}

.deployment-url:hover {
    text-decoration: underline;
}

.deployment-address-list {
    display: grid;
    gap: 8px;
}

.deployment-address-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.deployment-address-label {
    flex: 0 0 106px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.deployment-address-row .deployment-url {
    min-width: 0;
}

@media (max-width: 520px) {
    .deployment-address-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}
.deployment-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.deployment-progress .progress-bar {
    flex: 1;
}
.deployment-progress-pct {
    font-size: 14px;
    color: var(--text-muted);
    min-width: 32px;
    text-align: right;
}

.deployment-env-list {
    display: grid;
    gap: 10px;
}

.deployment-env-row {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.deployment-env-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.deployment-env-key {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.deployment-env-value {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Project Status Bar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.project-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}
.project-status-bar.working { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.project-status-bar.completed { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.project-status-bar.pending { background: rgba(148, 163, 184, 0.15); color: var(--text-muted); }
.project-workspace-toolbar {
    flex: 0 0 auto;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}
.project-workspace-toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.project-workspace-status-slot {
    min-width: 0;
    flex: 1 1 auto;
}
.project-workspace-status-slot .project-status-bar {
    width: 100%;
    margin-bottom: 0;
}
.project-status-bar-spacer {
    min-height: 36px;
}
.project-workspace-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}
.build-control-menu {
    position: relative;
    /* The popover sits below the trigger. Keep its 6px visual separation inside
       this hover target so crossing from Build to a menu item never fires the
       container's mouseleave. The negative margin keeps the toolbar height. */
    padding-bottom: 6px;
    margin-bottom: -6px;
}
.build-control-trigger {
    min-width: 36px;
    padding-inline: 10px;
    font-size: 20px;
    line-height: 1;
}
.build-control-popover {
    position: absolute;
    z-index: 40;
    top: 100%;
    right: 0;
    display: flex;
    min-width: 156px;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
.build-control-item {
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}
.build-control-item:hover:not(:disabled) { background: var(--bg-hover); }
.build-control-item:disabled { opacity: .45; cursor: default; }
.build-control-item.danger { color: #ef4444; }
.build-control-item.danger:disabled { color: var(--text-muted); }
.build-control-error { padding: 5px 7px; color: #ef4444; font-size: 12px; }
.project-workspace-toolbar > .deploy-action-error {
    display: block;
    margin: 6px 0 0 auto;
    text-align: right;
}
.project-workspace-toolbar > .deploy-credit-banner {
    margin: 8px 0 0;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.working { background: #22c55e; animation: pulse 2s infinite; }
.status-dot.completed { background: #22c55e; }
.status-dot.pending { background: var(--text-muted); }
.status-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-progress { margin-left: auto; font-size: inherit; color: inherit; white-space: nowrap; flex-shrink: 0; }
.issue-link { color: var(--accent); text-decoration: none; }
.issue-link:hover { text-decoration: underline; }

/* Ã¢â€â‚¬Ã¢â€â‚?Project Log tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.log-tab { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.log-filters { display: flex; gap: 6px; padding: 4px 0 10px; flex-wrap: wrap; }
.log-chip {
    font-size: 14px; padding: 3px 10px; border-radius: 999px;
    background: var(--bg-tertiary); color: var(--text-secondary);
    border: 1px solid var(--border); cursor: pointer;
}
.log-chip:hover { background: var(--bg-hover); color: var(--text-primary); }
.log-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.log-stream {
    flex: 1; min-height: 0; overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 14px; line-height: 1.5;
    background: var(--bg-primary); border: 1px solid var(--border); border-radius: 8px;
    padding: 6px 0;
}
.log-empty {
    margin: 0; padding: 8px 12px;
    color: var(--text-tertiary); font-size: 14px;
}
.log-older, .chat-load-older {
    display: block; margin: 2px auto 8px; padding: 3px 12px;
    font-size: 14px; color: var(--text-secondary);
    background: var(--bg-tertiary); border: 1px solid var(--border);
    border-radius: 999px; cursor: pointer;
}
.log-older:hover:not(:disabled), .chat-load-older:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.log-older:disabled, .chat-load-older:disabled { opacity: 0.6; cursor: default; }
/* "Jump to latest" re-arms chat auto-tail. Inline (not absolute) so it never
   overlaps the composer; shown only while scrolled up. */
.chat-jump {
    display: block; flex-shrink: 0; margin: 0 auto 4px; padding: 6px 14px;
    background: var(--accent); color: #fff; border: none; border-radius: 999px;
    font-size: 14px; cursor: pointer;
}
.chat-jump:hover { background: var(--accent-hover); }
.log-row {
    display: flex; align-items: baseline; gap: 8px;
    padding: 2px 12px; white-space: nowrap;
}
.log-row:hover { background: var(--bg-hover); }
.log-time { color: var(--text-muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.log-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.log-dot-info { background: var(--text-muted); }
.log-dot-success { background: var(--success); }
.log-dot-warn { background: var(--warning); }
.log-dot-error { background: var(--danger); }
.log-badge {
    flex: 0 0 auto; font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em;
    color: var(--text-secondary); background: var(--bg-tertiary);
    border-radius: 4px; padding: 0 5px;
}
.log-msg {
    flex: 1 1 auto; min-width: 0; color: var(--text-primary);
    overflow: hidden; text-overflow: ellipsis;
}
.log-level-warn .log-msg { color: var(--warning); }
.log-level-error .log-msg { color: var(--danger); }
.log-issue {
    flex: 0 0 auto; color: var(--accent); background: none; border: none;
    cursor: pointer; font-family: inherit; font-size: inherit; padding: 0;
}
.log-issue:hover { text-decoration: underline; }
.log-jump {
    position: absolute; right: 14px; bottom: 14px;
    background: var(--accent); color: #fff; border: none; border-radius: 999px;
    padding: 6px 14px; font-size: 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.log-jump:hover { background: var(--accent-hover); }

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

/* Ã¢â€â‚¬Ã¢â€â‚?Deliverables Tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.deliverables-tab {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deliverable-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-wrap: wrap;
}

.deliverable-card.latest {
    border-color: var(--accent);
}

.deliverable-card.release {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.04);
}

.deliverables-section {
    margin-bottom: 16px;
}

.deliverables-section:last-child {
    margin-bottom: 0;
}

.deliverables-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deliverables-count {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.deliverable-release-badge {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.deliverable-url.release {
    color: var(--success);
    font-weight: 600;
}

.delivery-dot.release {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.deliverable-empty {
    font-size: 14px;
    color: var(--text-muted);
    padding: 16px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.deliverable-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deliverable-version {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.deliverable-latest-badge {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

.deliverable-label {
    font-size: 14px;
    color: var(--text-muted);
}

.deliverable-url {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--success);
    flex: 1;
    transition: opacity var(--transition-speed);
}

.deliverable-url:hover {
    opacity: 0.8;
}

.deliverable-updated {
    font-size: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚?History Tab Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.history-tab {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

.history-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    position: relative;
}

.history-time {
    width: 80px;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--text-muted);
    text-align: right;
}

.history-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 4px;
    flex-shrink: 0;
    position: relative;
}

.history-dot::before {
    content: "";
    position: absolute;
    left: -21px;
    top: 1px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
}

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

.history-action {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.history-detail {
    font-size: 14px;
    color: var(--text-muted);
}

/* ── Ideavibes AI chat ───────────────────────────────────────── */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    height: 42px;
}

.chat-title {
    font-size: 14px;
    font-weight: 600;
}

.chat-participants {
    display: flex;
    align-items: center;
    gap: 0;
}

.chat-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-left: -4px;
    border: 2px solid var(--bg-primary);
}

.chat-avatar:first-child { margin-left: 0; }
.chat-avatar.ai { background: var(--accent); }
.chat-avatar.user { background: linear-gradient(135deg, var(--accent), #8b5cf6); }

.chat-messages {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    margin-bottom: 10px;
}

.chat-bubble:last-child {
    margin-bottom: 0;
}

.chat-bubble.ai {
    border-left: 3px solid var(--accent);
}

.chat-bubble.user {
    background: var(--bg-tertiary);
    border-color: transparent;
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-avatar-sm {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.chat-avatar-sm.ai { background: var(--accent); }
.chat-avatar-sm.user { background: linear-gradient(135deg, var(--accent), #8b5cf6); }

.chat-sender {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-time {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: auto;
}

.chat-bubble-content {
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble-content > div {
    min-width: 0;
    max-width: 100%;
}

/* Markdown rendering inside chat bubbles */
.chat-bubble-content ol,
.chat-bubble-content ul {
    margin: 8px 0;
    padding-left: 24px;
}

.chat-bubble-content ol {
    list-style-type: decimal;
}

.chat-bubble-content ul {
    list-style-type: disc;
}

.chat-bubble-content li {
    margin-bottom: 4px;
    padding-left: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble-content p {
    margin: 6px 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble-content p:first-child {
    margin-top: 0;
}

.chat-bubble-content p:last-child {
    margin-bottom: 0;
}

.chat-bubble-content code {
    background: var(--bg-tertiary);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble-content pre {
    background: var(--bg-tertiary);
    max-width: 100%;
    max-height: 180px;
    padding: 10px 12px;
    border-radius: 6px;
    overflow: auto;
    margin: 8px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-bubble-content pre code {
    background: none;
    padding: 0;
}

.chat-bubble-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--text-muted);
}

.chat-bubble-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Links sit on muted body text, so give them a resting affordance
   (accent + underline) instead of relying on hover to reveal them. */
.chat-bubble-content a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.chat-bubble-content a:hover {
    color: var(--accent-hover);
}

.chat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.chat-badge {
    font-size: 14px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(113, 113, 122, 0.15);
    color: var(--text-muted);
}

.chat-badge.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.chat-badge.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* Chat input */
.chat-input-area {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-file-input {
    display: none;
}

.chat-attach-btn,
.goal-attach-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: border-color var(--transition-speed), color var(--transition-speed);
}

.chat-attach-btn {
    width: 36px;
    padding: 0;
}

.chat-attach-btn:hover,
.goal-attach-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.chat-image-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
    border-top: 1px solid transparent;
}

.wizard-image-preview-row {
    padding: 8px 0 0;
}

.chat-image-preview {
    position: relative;
    width: 72px;
    height: 72px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.chat-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-image-preview button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 16px;
    line-height: 1;
}

.chat-image-error {
    padding: 0 16px 10px;
    color: #ef4444;
    font-size: 14px;
}

.wizard-image-error {
    padding: 8px 0 0;
}

.goal-image-actions {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.chat-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Document attachments (.txt/.md) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.chat-doc-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
}


.wizard-doc-preview-row {
    padding: 8px 0 0;
}

.chat-doc-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 240px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    font-size: 14px;
}

.chat-doc-preview .chat-doc-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-doc-preview .chat-doc-size {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.chat-doc-preview button {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.chat-doc-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.chat-doc-attachment {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.chat-doc-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}

.chat-doc-chip .chat-doc-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-doc-chip .chat-doc-size {
    margin-left: auto;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.chat-doc-body {
    margin: 0;
    max-height: 320px;
    overflow: auto;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-doc-loading,
.chat-doc-load-error {
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.chat-doc-load-error {
    color: #ef4444;
}

.chat-image-link {
    display: block;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.chat-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-image-loading,
.chat-image-load-error {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 14px;
}

.chat-image-load-error {
    color: #ef4444;
}

.chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.45;
    outline: none;
    resize: none;
    overflow-y: auto;
    field-sizing: content;
    transition: border-color var(--transition-speed);
}

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

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

.chat-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background var(--transition-speed);
}

.chat-send-btn:hover {
    background: var(--accent-hover);
}

/* Plan list in chat */
.chat-plan-list {
    margin: 8px 0 6px 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none;
    counter-reset: plan-step;
}

.chat-plan-item {
    counter-increment: plan-step;
    font-size: 14px;
    line-height: 1.5;
    padding: 5px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
    padding-left: 30px;
}

.chat-plan-item::before {
    content: counter(plan-step);
    position: absolute;
    left: 8px;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-plan-title {
    font-weight: 600;
    color: var(--text-primary);
}

.chat-plan-detail {
    color: var(--text-muted);
}

.chat-plan-summary {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Build credit ceiling on pending confirm / resume cards (warn-only). */
.chat-credit-estimate {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    line-height: 1.4;
}

.chat-credit-estimate.warn {
    color: var(--text-primary);
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

/* Confirm plan bubble */
.chat-bubble.confirm-plan {
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.06);
}

.chat-bubble.interim {
    border-color: rgba(59, 130, 246, 0.28);
    border-left: 3px solid var(--accent);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.04));
}

.chat-confirm-action {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.btn-confirm-plan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    background: var(--success);
    color: #fff;
}

.btn-confirm-plan:disabled {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    cursor: default;
}

/* Confirmed user bubble */
.chat-bubble.confirmed {
    border: 1px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.06);
}

/* Project / Build conversation Ã¢â‚¬â€ ChatGPT-style reading surface.  Keep the
   actionable confirmation controls, but remove decorative avatars and large
   assistant cards so the design-to-build handoff reads as one conversation. */
.project-chat-panel .chat-messages {
    gap: 0;
    padding: 26px 18px 12px;
}

.project-chat-panel .chat-thread {
    display: flex;
    width: min(780px, 100%);
    margin: 0 auto;
    flex-direction: column;
    gap: 20px;
}

.project-chat-panel .chat-bubble {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.project-chat-panel .chat-bubble.ai,
.project-chat-panel .chat-bubble.ai.confirm-plan,
.project-chat-panel .chat-bubble.ai.interim {
    border: 0;
    background: transparent;
}

.project-chat-panel .chat-bubble.user {
    width: fit-content;
    max-width: min(78%, 620px);
    align-self: flex-end;
    justify-content: center;
    padding: 11px 15px;
    border: 0;
    border-radius: 20px;
    background: var(--bg-tertiary);
}

.project-chat-panel .chat-bubble.user.confirmed {
    border: 1px solid rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.06);
}

.project-chat-panel .chat-bubble-header {
    margin-bottom: 2px;
}

.project-chat-panel .chat-avatar,
.project-chat-panel .chat-avatar-sm,
.project-chat-panel .chat-participants {
    display: none;
}

.project-chat-panel .chat-sender {
    font-size: 14px;
}

.project-chat-panel .chat-bubble-content {
    font-size: 15px;
    line-height: 1.7;
}

.project-chat-panel .chat-typing {
    width: min(780px, calc(100% - 36px));
    margin: 0 auto;
    padding: 8px 0;
}

.project-chat-panel .chat-typing-label {
    font-size: 14px;
}

.project-chat-panel .chat-input-area {
    width: min(780px, calc(100% - 36px));
    margin: 8px auto 20px;
    padding: 6px 8px;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-secondary);
}

.project-chat-panel .chat-attach-btn {
    border: 0;
    border-radius: 50%;
    background: transparent;
}

.project-chat-panel .chat-input {
    min-height: 40px;
    padding: 10px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    line-height: 20px;
}

.project-chat-panel .chat-input:focus {
    border-color: transparent;
}

.project-chat-panel .chat-send-btn {
    border-radius: 50%;
}

/* Ã¢â€â‚¬Ã¢â€â‚?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;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Channels & Integrations Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.channels-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 8px;
}

.channels-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.channels-header-text {
    flex: 1;
}

.channels-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.channels-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 520px;
}

.channels-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.channels-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 80px;
}

.channels-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.channels-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Channel cards grid */
.channels-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.channel-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

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

.channel-card.connected {
    border-color: rgba(34, 197, 94, 0.3);
}

.channel-card.connected:hover {
    border-color: rgba(34, 197, 94, 0.5);
}

.channel-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.channel-card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.channel-card-icon svg {
    width: 22px;
    height: 22px;
}

.channel-card-info {
    flex: 1;
    min-width: 0;
}

.channel-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.channel-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Connect / Disconnect button */
.btn-channel-toggle {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition-speed);
}

.btn-channel-toggle:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-channel-toggle.connected {
    background: transparent;
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.btn-channel-toggle.connected:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* Feature tags */
.channel-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.channel-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 10px;
    border: 1px solid;
}

/* Connected details panel */
.channel-card-details {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.channel-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--font-mono, monospace);
}

.channel-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-mono, monospace);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 4px;
}

.channel-detail-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--success);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Footer note */
.channels-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.channels-footer-note svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?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;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Scrollbar Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Team Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.team-page {
    padding: 32px;
    max-width: 1280px;
}

.team-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.team-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.team-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

.team-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.team-stat strong {
    color: var(--text-primary);
}

.team-stat.online {
    display: flex;
    align-items: center;
    gap: 5px;
}

.team-stat-sep {
    color: var(--text-muted);
    font-size: 14px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Team Table Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.team-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.team-table-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.team-th {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.team-th.member { width: 260px; flex-shrink: 0; }
.team-th.role   { width: 100px; flex-shrink: 0; }
.team-th.status { width: 110px; flex-shrink: 0; }
.team-th.projects { width: 80px; flex-shrink: 0; }
.team-th.active { flex: 1; }

.team-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.team-row:last-child {
    border-bottom: none;
}

.team-row:hover {
    background: var(--bg-hover);
}

.team-td.member { width: 260px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; }
.team-td.role   { width: 100px; flex-shrink: 0; }
.team-td.status { width: 110px; flex-shrink: 0; }
.team-td.projects { width: 80px; flex-shrink: 0; color: var(--text-secondary); font-size: 14px; }
.team-td.active { flex: 1; color: var(--text-muted); font-size: 14px; }

.team-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.team-member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.team-member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-member-email {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Role Badges Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.role-badge-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.role-badge-tag.owner  { background: rgba(59,130,246,0.15); color: #60a5fa; }
.role-badge-tag.admin  { background: rgba(139,92,246,0.15); color: #a78bfa; }
.role-badge-tag.member { background: rgba(34,197,94,0.12);  color: #4ade80; }
.role-badge-tag.viewer { background: rgba(161,161,170,0.12); color: var(--text-secondary); }

/* Ã¢â€â‚¬Ã¢â€â‚?Team Status Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.team-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.team-status.online  { color: var(--success); }
.team-status.away    { color: var(--warning); }
.team-status.pending { color: var(--text-muted); font-style: italic; }

/* Ã¢â€â‚¬Ã¢â€â‚?Invite Modal Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 440px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.invite-modal-card {
    width: 560px;
    min-height: 338px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

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

.modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.invite-modal-body {
    flex: 1;
    min-height: 208px;
    padding: 24px 28px 28px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.subscription-upgrade-notice {
    position: absolute;
    top: 24px;
    left: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: calc(var(--design-home-content-width) - var(--design-home-content-gutter) - var(--design-home-content-gutter));
    margin: 0;
    padding: 12px 14px;
    transform: translateX(-50%);
    background: color-mix(in srgb, var(--warning) 10%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
    border-radius: 10px;
}

.subscription-upgrade-notice-copy,
.subscription-upgrade-notice-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subscription-upgrade-notice-copy > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subscription-upgrade-notice-copy strong {
    color: var(--text-primary);
    font-size: 14px;
}

.subscription-upgrade-notice-copy span:not(.subscription-upgrade-notice-icon) {
    color: var(--text-muted);
    font-size: 14px;
}

.subscription-upgrade-notice .btn-sm,
.subscription-upgrade-notice-close {
    font-size: 14px;
}

.subscription-upgrade-notice-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 14%, transparent);
    border-radius: 8px;
    font-weight: 800;
}

.subscription-upgrade-notice-close {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.subscription-upgrade-notice-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.credited-free-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 12px 14px;
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    border-radius: 10px;
}

.credited-free-notice > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.credited-free-notice strong {
    color: var(--text-primary);
    font-size: 14px;
}

.credited-free-notice span {
    color: var(--text-muted);
    font-size: 14px;
}

.design-workspace > .credited-free-notice {
    margin: 12px 16px 0;
}

@media (max-width: 700px) {
    .subscription-upgrade-notice {
        top: 12px;
        align-items: flex-start;
    }

    .subscription-upgrade-notice-copy span:not(.subscription-upgrade-notice-icon) {
        display: none;
    }

    .credited-free-notice {
        align-items: flex-start;
        flex-direction: column;
    }
    .credited-free-notice .btn-sm {
        align-self: flex-end;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Config Drawer Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.modal-overlay.drawer {
    justify-content: flex-end;
    align-items: stretch;
    backdrop-filter: blur(3px);
}

.config-drawer {
    width: 560px;
    max-width: 92vw;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    animation: drawer-slide-in 0.22s ease-out;
}

@keyframes drawer-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.config-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.config-drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.config-drawer-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
    font-family: var(--font-mono, ui-monospace, monospace);
}

.config-drawer-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.config-drawer-nav {
    width: 160px;
    padding: 16px 10px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
}

.config-drawer-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.config-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.config-row label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.config-value {
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-mono, ui-monospace, monospace);
}

.config-repository-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.config-repository-error {
    margin: 4px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.config-placeholder {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Toggle Switch Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.toggle-switch:hover {
    border-color: var(--text-muted);
}
.toggle-switch.on {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
}
.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.toggle-switch.on .toggle-thumb {
    transform: translateX(20px);
    background: #60a5fa;
}
.toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.mode-choice-row {
    display: inline-flex;
    width: fit-content;
    padding: 3px;
    gap: 3px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.mode-choice {
    min-width: 104px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.mode-choice:hover:not(:disabled) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.mode-choice.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.18);
}

.mode-choice:disabled {
    cursor: not-allowed;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Environment Variables Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.env-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 12px 0 10px;
    font-size: 14px;
    color: var(--text-muted);
}
.env-meta-dirty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}
.env-meta-pending {
    color: var(--warning, #f59e0b);
}
.env-meta-reset {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}
.env-meta-reset:hover { color: var(--text-primary); }

.env-empty {
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.env-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.env-grid-row {
    display: grid;
    grid-template-columns: minmax(120px, 30%) 1fr auto auto;
    gap: 8px;
    align-items: center;
}
.env-input {
    padding: 7px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-mono, ui-monospace, monospace);
    min-width: 0;
}
.env-input:focus {
    outline: none;
    border-color: var(--accent);
}
.env-input[readonly] {
    color: var(--text-secondary);
    cursor: default;
}
.env-row-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
}
.env-row-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.env-row-icon:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}
.env-row-icon:disabled:hover {
    background: none;
    color: var(--text-muted);
}
.env-row-icon.env-row-remove:hover { color: var(--danger, #ef4444); }

.env-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.env-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.env-toast {
    margin-top: 10px;
    margin-left: auto;
    width: max-content;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.22);
    font-size: 14px;
    color: var(--success, #22c55e);
    animation: env-fade 2s ease-out forwards;
}
@keyframes env-fade {
    0%, 40% { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Bring-your-own Google OAuth ─────────────────────────────────────────── */
.oauth-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    color: var(--text-muted);
    font-size: 14px;
}
.oauth-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.oauth-status.ready {
    color: var(--success, #22c55e);
}
.oauth-status.ready .oauth-status-dot {
    background: var(--success, #22c55e);
}
.oauth-setup-note {
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}
.oauth-setup-note ol {
    margin: 8px 0 0 20px;
    padding: 0;
}
.oauth-setup-note li + li {
    margin-top: 6px;
}
.oauth-setup-note code {
    display: inline;
    overflow-wrap: anywhere;
    color: var(--text-primary);
}
.oauth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}
.oauth-field small {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}
.oauth-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.oauth-remove {
    margin-right: auto;
    color: var(--danger, #ef4444);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Custom Domains Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.domain-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.domain-section-head .form-help-text {
    margin-bottom: 0;
}
.domain-automation-note {
    max-width: 440px;
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}
.domain-connect-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.domain-cf-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.domain-cf-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.domain-cf-status.connected {
    color: #22c55e;
}
.domain-cf-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}
.domain-add-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}
.domain-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.domain-add-input {
    flex: 1;
    min-width: 220px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-mono, ui-monospace, monospace);
}
.domain-add-input:focus {
    outline: none;
    border-color: var(--accent);
}
.domain-email-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}
.domain-email-option input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent);
}
.domain-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.domain-row {
    padding: 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.domain-row-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.chat-command-suggestions {
    position: absolute;
    z-index: 4;
    left: 52px;
    bottom: calc(100% - 6px);
    min-width: 272px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-secondary);
    box-shadow: 0 10px 24px rgb(0 0 0 / 18%);
}

.chat-command-suggestion {
    display: flex;
    width: 100%;
    align-items: baseline;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.chat-command-suggestion:hover,
.chat-command-suggestion:focus-visible {
    background: var(--bg-hover);
}

.chat-command-suggestion code {
    color: var(--accent);
    font-weight: 650;
}

.chat-command-suggestion span {
    color: var(--text-secondary);
    font-size: 12px;
}
.domain-host {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 14px;
    color: var(--text-primary);
}
.domain-row-head .domain-state,
.domain-row-head .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}
.domain-state {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.domain-state.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}
.domain-state.ready {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.domain-state.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.domain-email-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
}
.domain-email-status code {
    padding: 3px 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono, ui-monospace, monospace);
    color: var(--text-primary);
}
.domain-hint {
    font-size: 14px;
    color: var(--text-muted);
}
.domain-hint-label {
    font-weight: 500;
    margin-bottom: 2px;
}
.domain-hint code {
    display: block;
    padding: 6px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 14px;
    color: var(--text-primary);
    word-break: break-all;
}
.domain-link {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    word-break: break-all;
}
.domain-link:hover { text-decoration: underline; }
.domain-error {
    font-size: 14px;
    color: #ef4444;
}
.form-error {
    margin-top: 4px;
    font-size: 14px;
    color: #ef4444;
}
.form-success {
    margin-top: 4px;
    font-size: 14px;
    color: var(--success, #22c55e);
}

.admin-referral-updated {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-muted);
}


/* Ã¢â€â‚¬Ã¢â€â‚?Invite Tabs Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.invite-tabs {
    display: flex;
    padding: 0 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
}
.invite-tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.invite-tab:hover { color: var(--text-primary); }
.invite-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.invite-description {
    max-width: 470px;
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.55;
}

.invite-section {
    display: grid;
    gap: 10px;
}

.invite-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.invite-input {
    height: 44px;
    min-width: 0;
}

.invite-button {
    height: 44px;
    min-width: 96px;
    justify-content: center;
    padding: 0 18px;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.invite-empty {
    display: grid;
    justify-items: start;
}

.invite-danger-quiet:hover:not(:disabled) {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.06);
    color: var(--danger);
}

.invite-loading {
    color: var(--text-secondary);
    font-size: 14px;
}

.invite-message {
    min-height: 20px;
    margin-top: 9px;
    font-size: 14px;
    font-weight: 600;
}

.invite-message.success {
    color: var(--success);
}

.invite-message.error {
    color: var(--danger);
}

@media (max-width: 520px) {
    .invite-modal-card {
        min-height: 378px;
    }

    .invite-control-row {
        grid-template-columns: 1fr;
    }

    .invite-button {
        width: fit-content;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Form Controls Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.form-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

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

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

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Invite Role Select Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.invite-role-select {
    position: relative;
}

.invite-role-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 12px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
}

.invite-role-trigger:hover {
    border-color: var(--text-muted);
}

.dropup-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

.invite-role-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Invite Feedback Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.invite-feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.invite-feedback.success {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
}

.invite-feedback.error {
    background: rgba(239,68,68,0.1);
    color: #f87171;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Secondary Button Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

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

/* Ã¢â€â‚¬Ã¢â€â‚?Billing & Usage Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.billing-page {
    padding: 32px;
    max-width: 1100px;
}

.usage-page,
.upgrade-page {
    padding: 32px;
    max-width: 1120px;
}

.billing-header {
    margin-bottom: 28px;
}

.billing-header-row {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.billing-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.billing-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

.billing-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Plans selection Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

[data-theme="light"] .main-content:has(.plans-page) {
    background: #f7f7f8;
}

.plans-page {
    margin: 0 auto;
    max-width: 1280px;
    padding: 32px;
    width: 100%;
}

.plans-page .subscription-plan-grid {
    gap: 20px;
    margin-bottom: 0;
}

.plans-page .subscription-plan-card {
    background: var(--bg-secondary);
    border-color: var(--border);
    border-radius: 20px;
    min-height: 0;
    padding: 28px 24px 32px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

[data-theme="light"] .plans-page .subscription-plan-card {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.plans-page .subscription-plan-card:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: 0 18px 34px color-mix(in srgb, var(--text-primary) 10%, transparent);
    transform: translateY(-2px);
}

.plans-page .subscription-plan-card.included {
    background: var(--bg-secondary);
}

[data-theme="light"] .plans-page .subscription-plan-card.included {
    background: #ffffff;
}

.plans-page .subscription-plan-card.popular {
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 1px var(--accent-hover), 0 12px 28px color-mix(in srgb, var(--accent) 14%, transparent);
}

.plans-page .subscription-plan-badge {
    background: var(--accent-hover);
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    letter-spacing: 0.08em;
    padding: 8px 16px;
    right: 20px;
    top: 0;
    transform: translateY(-50%);
}

.plans-page .subscription-plan-name {
    font-size: 1.72rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 24px;
}

.plans-page .subscription-plan-price {
    gap: 6px;
    margin-bottom: 18px;
}

.plans-page .subscription-plan-price strong {
    font-size: 3.43rem;
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.9;
}

.plans-page .subscription-plan-price .subscription-plan-currency {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 600;
}

.plans-page .subscription-plan-price > span:last-child {
    color: var(--text-secondary);
    font-size: 1.14rem;
    font-weight: 600;
}

.plans-page .subscription-plan-copy {
    line-height: 1.5;
    margin: 0;
    min-height: 3rem;
}

.plans-page .subscription-plan-action {
    background: var(--bg-primary);
    border-color: var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    margin-top: 24px;
    min-height: 40px;
}

[data-theme="light"] .plans-page .subscription-plan-action {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #1f2937;
}

.plans-page .subscription-plan-action:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.plans-page .subscription-plan-action.included {
    background: var(--bg-primary);
    border-color: var(--border);
    color: var(--text-secondary);
}

[data-theme="light"] .plans-page .subscription-plan-action.included {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #4b5563;
}

.plans-page .subscription-plan-action.primary {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-on-accent);
}

.plans-page .subscription-plan-action.primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.plans-page .subscription-plan-includes {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 0.12em;
    margin-top: 28px;
}

.plans-page .subscription-plan-features {
    gap: 14px;
    margin-top: 20px;
}

.plans-page .subscription-plan-features li {
    gap: 12px;
    line-height: 1.45;
}

.plans-page .subscription-plan-features li > span:first-child {
    margin-top: 1px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Subscription billing Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.subscription-current-plan,
.subscription-topup-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.subscription-current-plan {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 28px;
    padding: 24px;
}

.subscription-current-plan.low {
    border-color: var(--warning);
}

.subscription-current-plan.critical,
.subscription-current-plan.empty {
    border-color: var(--danger);
}

.billing-flow-notice {
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.billing-flow-notice.processing {
    background: color-mix(in srgb, var(--warning) 10%, var(--bg-secondary));
    border-color: color-mix(in srgb, var(--warning) 48%, var(--border));
}

.billing-flow-notice.success {
    background: color-mix(in srgb, var(--success) 10%, var(--bg-secondary));
    border-color: color-mix(in srgb, var(--success) 48%, var(--border));
}

.billing-flow-notice.error {
    background: color-mix(in srgb, var(--danger) 10%, var(--bg-secondary));
    border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
}

.subscription-current-copy {
    min-width: 0;
}

.subscription-current-copy h2 {
    color: var(--text-primary);
    font-size: 1.4rem;
    line-height: 1;
    margin: 0 0 8px;
}

.subscription-current-copy p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 620px;
}

.subscription-current-stats {
    display: grid;
    flex-shrink: 0;
    gap: 22px;
    grid-template-columns: repeat(3, max-content);
}

.subscription-current-stats div {
    text-align: right;
}

.subscription-current-stats strong {
    color: var(--text-primary);
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
}

.subscription-current-stats span {
    color: var(--text-muted);
    display: block;
    font-size: 14px;
    margin-top: 4px;
}

.subscription-plan-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 32px;
}

.subscription-plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 430px;
    padding: 20px;
    position: relative;
    transition: border-color 0.15s, transform 0.15s;
}

.subscription-plan-card:hover {
    border-color: var(--text-muted);
}

.subscription-plan-card.included {
    background: var(--bg-tertiary);
}

.subscription-plan-card.popular {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 18px 34px color-mix(in srgb, var(--accent) 14%, transparent);
}

.subscription-plan-badge {
    background: var(--accent);
    border-radius: 0 0 6px 6px;
    color: var(--text-on-accent);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    position: absolute;
    right: 16px;
    text-transform: uppercase;
    top: -1px;
}

.subscription-plan-name {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.subscription-plan-price {
    align-items: baseline;
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.subscription-plan-price strong {
    color: var(--text-primary);
    font-size: 2.25rem;
    line-height: 1;
}

.subscription-plan-price span,
.subscription-plan-credits,
.subscription-plan-chat {
    color: var(--text-muted);
    font-size: 1rem;
}

.subscription-plan-copy {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 6px 0 10px;
}

.subscription-plan-includes {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 18px 0 0;
    text-transform: uppercase;
}

.subscription-plan-credits,
.subscription-plan-chat {
    margin: 0;
}

.subscription-plan-chat {
    color: var(--text-secondary);
    margin-top: 4px;
}

.subscription-plan-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.subscription-plan-features li {
    align-items: flex-start;
    color: var(--text-secondary);
    display: flex;
    font-size: 1rem;
    gap: 9px;
    line-height: 1.35;
}

.subscription-plan-features li > span:first-child {
    color: var(--accent);
    flex: 0 0 auto;
    font-weight: 800;
}

.subscription-plan-action {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    min-height: 38px;
    margin-top: 16px;
    padding: 9px 12px;
    width: 100%;
}

.subscription-plan-action:disabled {
    cursor: default;
    opacity: 0.62;
}

.subscription-plan-action.included {
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent) 32%, transparent);
    color: var(--accent);
}

.subscription-plan-action.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-on-accent);
}

.subscription-plan-action.primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.subscription-comparison-section {
    margin-bottom: 32px;
}

.subscription-comparison-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.subscription-comparison-row {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(170px, 1.3fr) repeat(4, minmax(88px, 1fr));
    min-width: 720px;
    padding: 13px 18px;
}

.subscription-comparison-row:last-child {
    border-bottom: none;
}

.subscription-comparison-row.header {
    background: var(--bg-tertiary);
}

.subscription-comparison-row span {
    color: var(--text-secondary);
    font-size: 14px;
    min-width: 0;
}

.subscription-comparison-row span:first-child,
.subscription-comparison-row.header span {
    color: var(--text-primary);
    font-weight: 700;
}

.subscription-comparison-row span:not(:first-child) {
    text-align: center;
}

.subscription-bottom-grid {
    margin-bottom: 32px;
}

.subscription-topup-panel {
    padding: 24px;
}

.subscription-topup-panel .credit-pack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Ã¢â€â‚¬Ã¢â€â‚?Credits overview Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.credit-summary-card,
.credit-rate-panel,
.cost-model-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.credit-summary-card {
    margin-bottom: 32px;
    padding: 24px;
}

.credit-summary-card.low {
    border-color: rgba(245, 158, 11, 0.5);
}

.credit-summary-card.empty {
    border-color: rgba(239, 68, 68, 0.55);
}

.credit-summary-top {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.credit-summary-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.credit-summary-runway {
    border-left: 1px solid var(--border);
    padding-left: 32px;
}

.credit-rate-panel {
    padding: 20px;
}

.credit-kicker {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.credit-summary-top .credit-kicker {
    margin-bottom: 0;
}

.credit-status {
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 9px;
}

.credit-status.ok {
    background: rgba(22, 163, 74, 0.14);
    color: #4ade80;
}

.credit-status.low {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.credit-status.critical {
    background: rgba(249, 115, 22, 0.14);
    color: #fb923c;
}

.credit-status.empty {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
}

.credit-balance-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.credit-balance {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 800;
    line-height: 0.95;
}

.credit-note {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 14px;
    max-width: 620px;
}

.credit-benefits-link {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 10px;
}

.credit-benefits-link a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.credit-benefits-link a:hover {
    text-decoration: underline;
}

.credit-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.credit-rate-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 18px;
}

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

.credit-rate-eq {
    color: #16a34a;
    font-size: 1rem;
    font-weight: 700;
}

.credit-rate-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credit-rate-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.credit-rate-list span {
    color: var(--text-secondary);
    font-size: 14px;
}

.credit-rate-list strong {
    color: var(--text-primary);
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

.runway-days-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.runway-days-row strong {
    color: var(--text-primary);
    font-size: 2rem;
    line-height: 1;
}

.runway-days-row span {
    color: var(--text-secondary);
    font-size: 14px;
}

.runway-copy {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.credit-usage-link-row {
    align-items: center;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    font-size: 14px;
    gap: 8px;
    margin-top: 12px;
}

.credit-usage-link-row a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.credit-usage-link-row a:hover {
    text-decoration: underline;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Paid benefits page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.upgrade-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.upgrade-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upgrade-plan-grid,
.upgrade-benefit-grid {
    display: grid;
    gap: 16px;
}

.upgrade-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 28px;
}

.upgrade-plan-card,
.upgrade-rule-card,
.upgrade-benefit-card,
.upgrade-contact-band {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.upgrade-plan-card {
    padding: 22px;
}

.upgrade-plan-card.free {
    border-color: rgba(59, 130, 246, 0.28);
}

.upgrade-plan-card.paid {
    border-color: rgba(34, 197, 94, 0.32);
}

.upgrade-plan-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.upgrade-plan-badge {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    padding: 4px 8px;
}

.upgrade-plan-badge.active {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.22);
    color: #16a34a;
}

.upgrade-plan-card h2 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin: 0 0 16px;
}

.upgrade-plan-card p,
.upgrade-section-heading p,
.upgrade-benefit-card p,
.upgrade-contact-band p,
.upgrade-rule-list p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.upgrade-metric-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.upgrade-metric-list div {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.upgrade-metric-list strong {
    color: var(--text-primary);
    display: block;
    font-size: 1.55rem;
    line-height: 1;
    margin-bottom: 6px;
}

.upgrade-metric-list span {
    color: var(--text-secondary);
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.upgrade-section {
    margin-top: 28px;
}

.upgrade-section-heading {
    align-items: baseline;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.upgrade-rule-card {
    padding: 20px;
}

.upgrade-rule-list span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.upgrade-rule-list {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upgrade-rule-list > div {
    border-left: 2px solid var(--border);
    padding-left: 14px;
}

.upgrade-rule-list strong {
    color: var(--text-primary);
    display: block;
    font-size: 1rem;
    margin: 4px 0 6px;
}

.upgrade-benefit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.upgrade-benefit-card {
    padding: 18px;
}

.upgrade-benefit-card h3 {
    color: var(--text-primary);
    font-size: 14px;
    margin: 0 0 8px;
}

.upgrade-contact-band {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 28px;
    padding: 22px;
}

.upgrade-contact-band h2 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0 0 6px;
}

@media (max-width: 900px) {
    .upgrade-header,
    .upgrade-section-heading,
    .upgrade-contact-band {
        align-items: stretch;
        flex-direction: column;
    }

    .upgrade-plan-grid,
    .upgrade-benefit-grid,
    .upgrade-rule-list {
        grid-template-columns: 1fr;
    }

}

/* Ã¢â€â‚¬Ã¢â€â‚?Top cards row Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.billing-top-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.billing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.billing-card-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* Plan badges */
.plan-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.plan-badge.starter    { background: rgba(161,161,170,0.12); color: var(--text-secondary); }
.plan-badge.growth     { background: rgba(59,130,246,0.15); color: #60a5fa; }
.plan-badge.enterprise { background: rgba(139,92,246,0.15); color: #a78bfa; }

.plan-price-row {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.plan-period {
    font-size: 14px;
    color: var(--text-muted);
}

.plan-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Spend card */
.spend-amount-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.spend-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.spend-budget {
    font-size: 14px;
    color: var(--text-muted);
}

.billing-period-label {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 6px;
}

.spend-bar-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spend-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.spend-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.spend-bar-fill.warning {
    background: var(--warning);
}

.spend-bar-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.spend-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(245,158,11,0.1);
    color: #fbbf24;
    font-size: 14px;
    font-weight: 500;
}

/* Payment card */
.payment-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.payment-card-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.payment-details {
    display: flex;
    flex-direction: column;
}

.payment-type {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-expiry {
    font-size: 14px;
    color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Billing sections Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.billing-section {
    margin-bottom: 32px;
}

.billing-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Admin credits Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.admin-page {
    max-width: 1120px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 16px;
    margin-bottom: 32px;
}

.admin-grid.admin-paired-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.admin-paired-grid .admin-search-panel {
    margin-bottom: 0;
}

.admin-panel,
.admin-balance-card,
.admin-empty-state,
.admin-adjustment-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-panel {
    padding: 16px;
}

.admin-search-panel {
    margin-bottom: 16px;
}

.admin-inline-row,
.admin-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-inline-row .form-input {
    flex: 1;
}

.admin-balance-card {
    margin-top: 14px;
    padding: 14px;
    display: grid;
    gap: 5px;
}

.admin-balance-card strong {
    font-size: 1.6rem;
    color: var(--text-primary);
}

.admin-balance-card .admin-current-plan {
    color: var(--accent);
    font-size: 1.25rem;
    text-transform: capitalize;
}

.admin-balance-card span:not(.credit-kicker),
.admin-balance-card code,
.admin-hint,
.admin-note-cell {
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-balance-card code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-form-grid {
    display: grid;
    gap: 12px;
}

.admin-search-results {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.admin-search-result {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 90px;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.admin-search-result:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.admin-search-workspace {
    color: var(--text-primary);
    font-weight: 700;
}

.admin-search-workspace,
.admin-search-user,
.admin-search-role {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-search-role {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: capitalize;
}

.admin-search-truncated {
    color: var(--text-muted);
    font-size: 14px;
    padding: 2px 4px;
}

.admin-note-field {
    display: block;
}

.admin-action-row {
    margin-top: 14px;
}

.admin-adjustments-section {
    margin-bottom: 0;
}

.admin-empty-state {
    padding: 18px;
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-adjustment-table {
    overflow: hidden;
}

.admin-adjustment-header,
.admin-adjustment-row,
.admin-plan-grant-header,
.admin-plan-grant-row {
    display: grid;
    gap: 14px;
    align-items: center;
    padding: 12px 16px;
}

.admin-adjustment-header,
.admin-adjustment-row {
    grid-template-columns: 160px 120px 160px 150px minmax(0, 1fr);
}

.admin-plan-grant-header,
.admin-plan-grant-row {
    grid-template-columns: 160px 100px minmax(0, 1fr) 150px;
}

.admin-adjustment-header,
.admin-plan-grant-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-adjustment-row,
.admin-plan-grant-row {
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-adjustment-row:last-child,
.admin-plan-grant-row:last-child {
    border-bottom: none;
}

.admin-credit-positive {
    color: #22c55e;
    font-weight: 700;
}

.admin-note-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .admin-grid.admin-paired-grid {
        grid-template-columns: 1fr;
    }

    .admin-adjustment-table {
        overflow-x: auto;
    }
}

/* Curated apps admin table Ã¢â‚¬â€ narrower than the credit-adjustment grid. */
.admin-adjustment-header.curated-row,
.admin-adjustment-row.curated-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 160px 90px 150px;
}

/* Referral reward settings audit: 6 columns (must beat .admin-adjustment-row 5-col rule). */
.admin-adjustment-header.admin-referral-audit-row,
.admin-adjustment-row.admin-referral-audit-row {
    grid-template-columns:
        minmax(130px, 0.9fr)
        minmax(160px, 1.2fr)
        minmax(90px, 0.7fr)
        minmax(90px, 0.7fr)
        minmax(70px, 0.5fr)
        minmax(120px, 1.2fr);
}

.admin-referral-audit-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-adjustment-table.admin-referral-audit-table {
    overflow-x: auto;
}

.curated-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.curated-repo-link {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.admin-checkbox-field input {
    width: auto;
    margin: 0;
}

.admin-analytics-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.admin-analytics-card,
.admin-analytics-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-analytics-card {
    padding: 16px;
}

.admin-analytics-card span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-analytics-card strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.55rem;
    margin-top: 8px;
}

.admin-analytics-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

.admin-analytics-panel {
    margin-bottom: 0;
}

.admin-analytics-table {
    overflow-x: auto;
}

.admin-analytics-header,
.admin-analytics-row {
    display: grid;
    grid-template-columns: 120px repeat(7, minmax(110px, 1fr));
    gap: 12px;
    align-items: center;
    min-width: 970px;
    padding: 12px 16px;
}

.admin-analytics-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-analytics-row {
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
}

.admin-analytics-row:last-child {
    border-bottom: none;
}

.admin-analytics-date {
    color: var(--text-primary);
    font-weight: 700;
}

.admin-analytics-metric {
    position: relative;
    min-height: 28px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--bg-tertiary);
}

.admin-analytics-metric strong {
    position: relative;
    color: var(--text-primary);
    font-size: 14px;
    z-index: 1;
}

.admin-analytics-bar {
    position: absolute;
    inset: 0 auto 0 0;
    opacity: 0.28;
}

.admin-analytics-bar.users,
.usage-dot.users {
    background: var(--accent);
}

.admin-analytics-bar.projects,
.usage-dot.projects {
    background: var(--success);
}

.admin-analytics-bar.paid,
.usage-dot.paid {
    background: var(--warning);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Token Quota (Codex) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.token-quota-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.token-quota-note {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 12px;
}

.token-quota-reconnect-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.token-quota-reconnect-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.token-quota-reconnect-head h2 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0 0 4px;
}

.token-quota-reconnect-head p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.token-quota-device-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.token-quota-device-link {
    color: var(--accent);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.token-quota-device-code {
    align-self: flex-start;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0;
}

.token-quota-reconnect-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.token-quota-code-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.token-quota-code-input {
    min-width: 260px;
    flex: 1 1 320px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 12px;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 14px;
}

.token-quota-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.token-quota-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 18px;
}

.token-quota-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.token-quota-card-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.token-quota-source {
    color: var(--text-muted);
    font-size: 14px;
}

.token-quota-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.token-quota-trigger {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.token-quota-trigger.trigger-refresh {
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent);
}

.token-quota-trigger.trigger-standby {
    background: color-mix(in srgb, var(--warning) 16%, transparent);
    color: var(--warning);
}

.token-quota-trigger.trigger-degraded,
.token-quota-trigger.trigger-unknown {
    background: color-mix(in srgb, var(--warning) 16%, transparent);
    color: var(--warning);
}

.token-quota-trigger.trigger-unavailable,
.token-quota-trigger.trigger-failed {
    background: color-mix(in srgb, var(--danger) 16%, transparent);
    color: var(--danger);
}

.token-quota-trigger.trigger-active {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}

.token-quota-updated {
    color: var(--text-muted);
    font-size: 14px;
}

.token-quota-accounts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.token-quota-account {
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.token-quota-account:first-child {
    border-top: none;
    padding-top: 0;
}

.token-quota-account-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.token-quota-account-title,
.token-quota-account-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.token-quota-account-actions .btn-ghost:disabled,
.token-quota-account-actions .btn-ghost:disabled:hover {
    cursor: not-allowed;
    opacity: 0.5;
    background: transparent;
    color: var(--text-muted);
}

.token-quota-account-head strong {
    color: var(--text-primary);
    font-size: 1.05rem;
}

.token-quota-status {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 700;
}

.token-quota-status.ok {
    background: color-mix(in srgb, var(--success) 18%, transparent);
    color: var(--success);
}

.token-quota-status.warn,
.token-quota-status.unknown,
.token-quota-status.readonly {
    background: color-mix(in srgb, var(--warning) 18%, transparent);
    color: var(--warning);
}

.token-quota-status.dead {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    color: var(--danger);
}

.token-quota-status-detail {
    color: var(--text-muted);
    font-size: 14px;
    margin: -4px 0 10px;
}

.token-quota-plan {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.token-quota-windows {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.token-quota-window-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.token-quota-window-name {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.token-quota-window-pct {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.token-quota-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.token-quota-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--success);
    transition: width 0.3s ease;
}

.token-quota-bar-fill.warn {
    background: var(--warning);
}

.token-quota-bar-fill.critical {
    background: var(--danger);
}

.token-quota-window-reset {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 14px;
}

.token-quota-empty {
    color: var(--text-muted);
    font-size: 14px;
}

.token-quota-fallback {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 16px;
}

.token-quota-fallback-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.token-quota-fallback-header h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}


@media (max-width: 1100px) {
    .admin-analytics-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .admin-analytics-summary {
        grid-template-columns: 1fr;
    }
}

.usage-range-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.usage-range-chip {
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    padding: 0 12px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.usage-range-chip:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.usage-range-chip:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.usage-range-chip:disabled:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.usage-range-chip.active {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.42);
    color: #93c5fd;
}

.usage-chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
}

.usage-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.usage-chart-caption {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: -6px;
}

.usage-chart-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
}

.usage-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.usage-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    display: inline-block;
}

.usage-dot.build {
    background: #2563eb;
}

.usage-dot.operation {
    background: #f97316;
}

.usage-chart-wrap {
    overflow-x: auto;
}

.usage-chart-svg {
    display: block;
    min-width: 760px;
    width: 100%;
    height: auto;
}

.usage-axis {
    stroke: var(--border);
    stroke-width: 1;
}

.usage-grid-line {
    stroke: var(--border);
    stroke-width: 1;
    opacity: 0.55;
}

.usage-y-label,
.usage-x-label {
    fill: var(--text-muted);
    font-size: 14px;
}

.usage-y-label {
    text-anchor: end;
}

.usage-x-label {
    text-anchor: middle;
}

.usage-bar-build {
    fill: #2563eb;
}

.usage-bar-operation {
    fill: #f97316;
}

.usage-bar-group:hover .usage-bar-build,
.usage-bar-group:hover .usage-bar-operation {
    filter: brightness(1.18);
}

.usage-card-detail {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
    margin-top: 10px;
}

.usage-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.usage-summary-grid.usage-page-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.usage-ledger-section {
    margin-top: 24px;
}

.usage-summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.usage-summary-card strong {
    color: var(--text-primary);
    display: block;
    font-size: 1.8rem;
    line-height: 1.05;
    margin-top: 10px;
}

.usage-comparison {
    color: var(--text-secondary);
    display: block;
    font-size: 14px;
    margin-top: 8px;
}

.spend-breakdown-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.spend-breakdown-bar {
    display: flex;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--bg-tertiary);
}

.spend-breakdown-segment {
    min-width: 3px;
}

.spend-breakdown-segment.build,
.spend-breakdown-dot.build {
    background: #2563eb;
}

.spend-breakdown-segment.operation,
.spend-breakdown-dot.operation {
    background: #f97316;
}

.spend-breakdown-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.spend-breakdown-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.spend-breakdown-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.spend-breakdown-item strong {
    color: var(--text-primary);
    font-size: 14px;
}

.spend-breakdown-item em {
    color: var(--text-muted);
    font-size: 14px;
    font-style: normal;
}

.cost-model-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cost-model-card {
    padding: 18px;
}

.cost-model-title {
    color: var(--text-muted);
    display: block;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cost-model-price {
    color: var(--text-primary);
    display: block;
    font-size: 1.35rem;
    margin-top: 10px;
}

.cost-model-detail {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
}

.billing-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.ledger-table,
.buy-credits-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.ledger-table-header,
.ledger-row {
    display: grid;
    grid-template-columns: 78px minmax(190px, 1fr) 110px 78px 96px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.ledger-table-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.ledger-th {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ledger-row {
    border-bottom: 1px solid var(--border);
}

.ledger-row:last-child {
    border-bottom: none;
}

.ledger-td {
    color: var(--text-secondary);
    font-size: 14px;
}

.ledger-td.activity {
    color: var(--text-primary);
    font-weight: 600;
}

.ledger-td.credits {
    font-weight: 700;
    text-align: right;
}

.ledger-td.credits.debit {
    color: #f87171;
}

.ledger-td.credits.credit {
    color: #22c55e;
}

.buy-credits-card {
    padding: 16px;
}

.buy-credits-card.wide {
    overflow: visible;
}

.buy-credits-card.wide .credit-pack-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.buy-credits-form-row {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    align-items: end;
    gap: 12px;
    margin-top: 14px;
}

.buy-credits-form-row .custom-credit-field,
.buy-credits-form-row .buy-credit-submit {
    margin-top: 0;
}

.credit-pack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.credit-pack-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.credit-pack-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(37, 99, 235, 0.5);
}

.credit-pack-btn.selected {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.72);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
}

.credit-pack-btn strong {
    font-size: 14px;
}

.credit-pack-btn span {
    color: var(--text-secondary);
    font-size: 14px;
}

.custom-credit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

.custom-credit-field span,
.auto-topup-row,
.credit-rate-note,
.credit-sales-note {
    color: var(--text-secondary);
    font-size: 14px;
}

.custom-credit-field input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font: inherit;
    min-height: 38px;
    padding: 8px 10px;
}

.buy-credit-submit {
    width: auto;
    min-width: 112px;
    justify-self: start;
    margin-top: 12px;
}

.credit-rate-note,
.credit-sales-note {
    margin-top: 10px;
}

.credit-sales-note {
    color: var(--text-muted);
}

.auto-topup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    margin-top: 12px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Usage grid Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.usage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.usage-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-card-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.usage-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.usage-values {
    font-size: 14px;
    color: var(--text-secondary);
}

.usage-bar-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.usage-bar-fill.warning {
    background: var(--warning) !important;
}

.usage-pct {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Cost table Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.cost-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.cost-table-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.cost-th {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    width: 110px;
    flex-shrink: 0;
    text-align: right;
}

.cost-th.project {
    flex: 1;
    text-align: left;
}

.cost-th.total {
    width: 100px;
}

.cost-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.cost-row:last-child {
    border-bottom: none;
}

.cost-row:hover {
    background: var(--bg-hover);
}

.cost-td {
    width: 110px;
    flex-shrink: 0;
    text-align: right;
    font-size: 14px;
    color: var(--text-secondary);
}

.cost-td.project {
    flex: 1;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 500;
}

.cost-td.total {
    width: 100px;
    color: var(--text-primary);
    font-weight: 600;
}

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

.cost-total-row {
    background: var(--bg-tertiary);
    border-top: 2px solid var(--border);
}

.cost-total-row:hover {
    background: var(--bg-tertiary);
}

.cost-total-row .cost-td {
    color: var(--text-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Invoice table Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.invoice-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.invoice-table-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.invoice-th {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    min-width: 0;
}

.invoice-th.id     { width: 160px; flex-shrink: 0; }
.invoice-th.date   { width: 140px; flex-shrink: 0; }
.invoice-th.amount { flex: 1; }
.invoice-th.status { width: 80px; flex-shrink: 0; }
.invoice-th.action { width: 100px; flex-shrink: 0; text-align: right; }

.invoice-row {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.invoice-row:last-child {
    border-bottom: none;
}

.invoice-row:hover {
    background: var(--bg-hover);
}

.invoice-td {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 0;
}

.invoice-td.id     { width: 160px; flex-shrink: 0; font-weight: 500; color: var(--text-primary); }
.invoice-td.date   { width: 140px; flex-shrink: 0; }
.invoice-td.amount { flex: 1; }
.invoice-td.action { width: 100px; flex-shrink: 0; text-align: right; }

.invoice-td.id,
.invoice-td.date,
.invoice-td.amount {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.invoice-status {
    font-size: 14px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
}

.invoice-status.paid {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
}

.invoice-status.due {
    background: rgba(245,158,11,0.12);
    color: #fbbf24;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Plan cards v2 (3-tier comparison) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.plan-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.plan-card-v2 {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}

.plan-card-v2:hover {
    border-color: var(--text-muted);
}

.plan-card-v2.popular {
    border-color: #f97316;
    border-width: 2px;
}

.plan-card-v2.current {
    background: var(--bg-tertiary);
}

.plan-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.plan-popular-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #fff;
}

.plan-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

.plan-card-price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.plan-card-price {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.plan-card-period {
    font-size: 1rem;
    color: var(--text-muted);
}

.plan-card-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.plan-feature svg {
    flex-shrink: 0;
}

.plan-card-btn {
    width: 100%;
    margin-top: auto;
}

.plan-card-status {
    width: 100%;
    margin-top: auto;
    min-height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
}

.plan-card-status.current {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.24);
    color: #93c5fd;
}

.plan-card-status.muted {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Usage grid v2 (3 columns) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.usage-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Small / Ghost button variants Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.btn-sm {
    padding: 6px 14px;
    font-size: 14px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 14px;
}

.btn-ghost {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Responsive billing Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

@media (max-width: 900px) {
    .billing-header-row {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-header-actions {
        justify-content: flex-start;
    }

    .subscription-current-plan {
        align-items: stretch;
        flex-direction: column;
    }

    .subscription-current-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .subscription-current-stats div {
        text-align: left;
    }

    .subscription-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subscription-topup-panel .credit-pack-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .credit-summary-grid,
    .cost-model-grid,
    .usage-summary-grid,
    .billing-two-column,
    .subscription-bottom-grid,
    .spend-breakdown-list {
        grid-template-columns: 1fr;
    }
    .credit-summary-runway {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 24px;
    }
    .ledger-table {
        overflow-x: auto;
    }
    .ledger-table-header,
    .ledger-row {
        min-width: 640px;
    }
    .buy-credits-form-row {
        grid-template-columns: 1fr;
    }
    .billing-top-cards {
        grid-template-columns: 1fr;
    }
    .usage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .billing-page {
        padding: 20px;
    }

    .subscription-topup-panel .credit-pack-grid {
        grid-template-columns: 1fr;
    }

    .subscription-current-stats,
    .subscription-plan-grid {
        grid-template-columns: 1fr;
    }

    .subscription-comparison-table {
        overflow-x: auto;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Docs Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.docs-page {
    padding: 32px;
    max-width: 1000px;
}

.docs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.docs-howto-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.docs-howto-icon {
    display: inline-flex;
}

.docs-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.docs-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

/* Search bar */
.docs-search-bar {
    position: relative;
    margin-bottom: 20px;
}

.docs-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.docs-search-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
}

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

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

/* Category pills */
.docs-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.docs-cat-pill {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.docs-cat-pill:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.docs-cat-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Articles grid */
.docs-articles {
    margin-bottom: 32px;
}

.docs-articles-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
}

.docs-article-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.docs-article-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.docs-discord-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(88,101,242,0.16), rgba(88,101,242,0.06));
    border: 1px solid rgba(88,101,242,0.4);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.15s, transform 0.15s;
}

.docs-discord-card:hover {
    border-color: #5865f2;
    transform: translateY(-2px);
}

.docs-discord-icon {
    display: flex;
    color: #5865f2;
    flex-shrink: 0;
}

.docs-discord-text {
    flex: 1;
    min-width: 0;
}

.docs-discord-title {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 600;
}

.docs-discord-summary {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.docs-discord-arrow {
    color: #5865f2;
    flex-shrink: 0;
}

.docs-article-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-cat-tag {
    font-size: 14px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.docs-cat-tag.getting-started { background: rgba(59,130,246,0.15); color: #60a5fa; }
.docs-cat-tag.projects        { background: rgba(139,92,246,0.15); color: #a78bfa; }
.docs-cat-tag.team            { background: rgba(34,197,94,0.12);  color: #4ade80; }
.docs-cat-tag.billing         { background: rgba(245,158,11,0.12); color: #fbbf24; }
.docs-cat-tag.api             { background: rgba(236,72,153,0.12); color: #f472b6; }
.docs-cat-tag.integrations    { background: rgba(6,182,212,0.12);  color: #22d3ee; }

.docs-video-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
}

.docs-article-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.docs-article-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.docs-article-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.docs-meta-sep {
    font-size: 14px;
}

/* Empty state */
.docs-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px 0;
    color: var(--text-muted);
    text-align: center;
}

.docs-empty p {
    font-size: 14px;
}

/* Footer note (reuse channels pattern) */
.docs-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.docs-footer-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚?Doc detail view Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.doc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: opacity 0.15s;
}

.doc-back-btn:hover { opacity: 0.8; }

.doc-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.doc-detail-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 8px;
}

.doc-detail-summary {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.doc-detail-body {
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 14px;
}

.doc-detail-body h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 12px 0;
}

.doc-detail-body h2:first-child { margin-top: 0; }

.doc-detail-body p {
    margin: 0 0 14px 0;
    color: var(--text-secondary);
}

.doc-detail-body ol,
.doc-detail-body ul {
    margin: 0 0 14px 0;
    padding-left: 22px;
    color: var(--text-secondary);
}

.doc-detail-body li {
    margin-bottom: 6px;
}

.doc-detail-body li ul {
    margin-top: 6px;
    margin-bottom: 6px;
}

.doc-detail-body code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--accent);
}

.doc-detail-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.doc-detail-body em {
    font-style: italic;
}

.doc-detail-body a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.doc-detail-body a:hover {
    color: var(--accent-hover);
}

.doc-section {
    margin-bottom: 24px;
}

.doc-callout {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 14px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.doc-callout-warn {
    background: rgba(245, 158, 11, 0.08);
    border-left-color: #f59e0b;
}

.doc-callout strong {
    color: var(--text-primary);
}

/* Pipeline visualization */
.doc-pipeline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 14px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.doc-stage {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.doc-stage.done {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.doc-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* Table in docs */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}

.doc-table th {
    text-align: left;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
}

.doc-table td {
    padding: 8px 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.doc-table tr:last-child td {
    border-bottom: none;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Settings Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.settings-page {
    padding: 32px;
    max-width: 960px;
}

.settings-header {
    margin-bottom: 28px;
}

.settings-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

/* Layout: sidebar + content */
.settings-layout {
    display: flex;
    gap: 28px;
}

.settings-nav {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-nav-item {
    background: none;
    border: none;
    text-align: left;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

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

.settings-nav-item.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
}

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

/* Sections */
.settings-section {
    margin-bottom: 32px;
}

.settings-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.settings-section-title.danger {
    color: #f87171;
}

.settings-section-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Form fields */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.settings-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s;
    max-width: 400px;
}

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

.settings-input-group {
    display: flex;
    align-items: stretch;
    max-width: 400px;
}

.settings-input-prefix {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.settings-input.slug {
    border-radius: 0 8px 8px 0;
    max-width: none;
    flex: 1;
}

.settings-select-display {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
}

/* Save bar */
.settings-save-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    margin-bottom: 32px;
}

.settings-saved-msg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #4ade80;
}

/* GitHub connection card */
.settings-gh-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-gh-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.settings-gh-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.settings-gh-org {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 8px;
}

.settings-gh-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
}

.settings-gh-status.connected { color: #4ade80; }

.settings-gh-details {
    display: flex;
    gap: 16px;
}

.settings-gh-detail {
    font-size: 14px;
    color: var(--text-muted);
}

/* Profile card */
.settings-profile-card {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.settings-avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.settings-avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
}

.settings-avatar-upload {
    cursor: pointer;
}

.settings-avatar-upload-btn {
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
}

.settings-avatar-upload-btn:hover {
    text-decoration: underline;
}

.settings-avatar-error {
    font-size: 14px;
    color: var(--danger, #ef4444);
    text-align: center;
    max-width: 120px;
}

.settings-profile-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}

.settings-plan-row:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.settings-plan-row > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-plan-link {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.plans-readonly-action:disabled {
    cursor: not-allowed;
}

/* Toggle switches */
.settings-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 8px;
    transition: background 0.15s;
}

.settings-toggle-row:hover {
    background: var(--bg-tertiary);
}

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

.settings-toggle-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.settings-mode-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.settings-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
    flex-shrink: 0;
}

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

.settings-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

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

/* Security cards */
.settings-security-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-sec-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}

.settings-sec-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-sec-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-sec-status {
    font-size: 14px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
}

.settings-sec-status.enabled {
    background: rgba(34,197,94,0.12);
    color: #4ade80;
}

.settings-sec-status.planned {
    background: rgba(148,163,184,0.12);
    color: var(--text-muted);
}

/* Sessions */
.settings-sessions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.settings-session-row.current {
    border-color: var(--accent);
}

.settings-session-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-session-device {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-session-meta {
    font-size: 14px;
    color: var(--text-muted);
}

.settings-session-active {
    font-size: 14px;
    font-weight: 600;
    color: #4ade80;
}

/* Audit log */
.settings-audit-log {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-audit-row {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    gap: 12px;
    transition: background 0.15s;
}

.settings-audit-row:hover {
    background: var(--bg-tertiary);
}

.settings-audit-action {
    width: 180px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-audit-detail {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.settings-audit-time {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Danger zone */
.settings-section.danger {
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: 12px;
    padding: 20px;
    background: rgba(239,68,68,0.03);
}

.settings-danger-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-danger-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    gap: 16px;
}

.settings-danger-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-danger-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-danger-outline {
    background: none;
    border: 1px solid rgba(239,68,68,0.4);
    color: #f87171;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-danger-outline:hover {
    background: rgba(239,68,68,0.1);
}

.btn-danger {
    background: #dc2626;
    border: none;
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Responsive settings */
@media (max-width: 700px) {
    .settings-layout {
        flex-direction: column;
    }
    .settings-nav {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .settings-profile-card {
        flex-direction: column;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Login Page Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(59, 130, 246, 0.08) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 80%,
        rgba(139, 92, 246, 0.06) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.login-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.login-theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 64px;
    height: 64px;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0 auto 20px;
    border-radius: 0;
}

.login-title {
    /* The login brand is an SVG image; size it through its containing title
       so the wordmark remains crisp instead of scaling a raster asset. */
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.login-title .ideavibes-wordmark {
    display: block;
    width: auto;
    height: 1em;
    max-width: 100%;
    margin: 0 auto;
}

.login-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-btn-github {
    background: #24292e;
    color: #fff;
    border-color: #24292e;
}

.login-btn-github:hover:not(:disabled) {
    background: #2f363d;
    box-shadow: 0 4px 16px rgba(36, 41, 46, 0.3);
}

.login-btn-google {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border);
}

.login-btn-google:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.login-btn-icon {
    display: flex;
    align-items: center;
}

.login-btn-email {
    width: 100%;
}

.login-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.login-code-input {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: 0;
}

.login-email-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.login-email-note {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    text-align: center;
}

.login-email-note strong {
    color: var(--text-primary);
}

.login-email-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-link-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.login-link-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.login-email-status {
    min-height: 18px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    text-align: center;
}

.login-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.6s linear infinite;
}

.login-btn-google .login-btn-spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-primary);
}

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

.login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Light theme adjustments */
[data-theme="light"] .login-card {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .login-page::before {
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(59, 130, 246, 0.04) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 80%,
        rgba(139, 92, 246, 0.03) 0%,
        transparent 50%
    );
}

@media (max-width: 480px) {
    .login-card {
        padding: 36px 24px;
    }
    .login-title {
        font-size: 2.625rem;
    }
    .login-footer p {
        white-space: normal;
    }
}

/* Ã¢â€â‚¬Ã¢â€â‚?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; }
}

/* Ã¢â€â‚¬Ã¢â€â‚?Chat typing indicator Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/

.chat-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
}

.chat-typing-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted, #64748b);
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dots .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Ã¢â€â‚¬Ã¢â€â‚?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;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Onboarding Tour Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.tour-pill {
    position: fixed;
    top: calc(var(--navbar-height) + 12px);
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    font-size: 14px;
    color: var(--text-primary);
    z-index: 50;
}
.tour-pill-step {
    font-weight: 600;
    color: var(--accent);
}
.tour-pill-label {
    color: var(--text-secondary);
}

.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9000;
}
.tour-spotlight-ring {
    position: fixed;
    z-index: 9001;
    border-radius: 8px;
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    transition: top 120ms ease, left 120ms ease,
                width 120ms ease, height 120ms ease;
}
.tour-coachmark {
    position: fixed;
    z-index: 9002;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 16px 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
}
.tour-coachmark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.tour-coachmark-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.tour-coachmark-close {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.tour-coachmark-close:hover {
    color: var(--text-primary);
}
.tour-coachmark-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}
.tour-coachmark-skip {
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}
.tour-coachmark-skip:hover {
    color: var(--text-primary);
}

.nav-item-button {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    padding: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Creator Mode Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.creator-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.creator-field span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
}

.creator-field input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 12px;
    font: inherit;
    outline: none;
}

.creator-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.creator-primary {
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: white;
    font-weight: 750;
    cursor: pointer;
}

/* Live stage: Play + one-tap share-link row */
.creator-live-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 380px;
}

.creator-share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated, var(--bg-secondary));
}

.creator-public-urls {
    display: grid;
    gap: 8px;
    width: 100%;
}

.creator-public-url {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated, var(--bg-secondary));
}

.creator-public-url-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.creator-public-url .creator-share-url:hover {
    color: var(--accent, #3b82f6);
    text-decoration: underline;
}

.creator-share-url {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: var(--text-secondary);
}

.creator-share-btn {
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: var(--accent, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.creator-share-btn:hover {
    filter: brightness(1.05);
}

.creator-product-icon,
.creator-creation-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
    font-weight: 850;
}

.creator-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
    font-size: 14px;
    font-weight: 750;
}

.creator-projects-page {
    max-width: 1280px;
}

.creator-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: stretch;
    gap: 22px;
    padding: 22px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.creator-dashboard-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    min-height: 100%;
}

.creator-dashboard-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.creator-dashboard-copy h2 {
    color: var(--text-primary);
    font-size: 26px;
    line-height: 1.12;
}

.creator-dashboard-copy h2 span {
    color: var(--accent);
}

.creator-dashboard-copy h3 {
    max-width: 620px;
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1.2;
}

.creator-dashboard-copy p {
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

.creator-dashboard-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 560px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.creator-dashboard-tip span {
    flex-shrink: 0;
}

.creator-dashboard-tip p {
    margin: 0;
    font-size: inherit;
}

.creator-dashboard-tip strong {
    color: var(--text-primary);
}

.creator-dashboard-ideas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
}

.creator-dashboard-ideas-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 2px;
}

.creator-dashboard-ideas-header strong {
    color: var(--text-primary);
}

.creator-dashboard-ideas-header span {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.creator-credit-strip,
.creator-project-create {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.creator-credit-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.creator-credit-strip > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.creator-credit-strip strong {
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.2;
}

.creator-credit-strip > span {
    color: var(--text-secondary);
    font-size: 14px;
}

.creator-project-create {
    padding: 18px;
    margin-bottom: 22px;
}

.creator-project-create h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.creator-create-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-create-input {
    width: min(420px, 100%);
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 12px;
    font: inherit;
    outline: none;
}

.creator-create-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.creator-onboarding-card,
.creator-start-strip,
.creator-setup-card,
.creator-setup-help {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.creator-onboarding-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 18px;
    padding: 22px;
    margin-bottom: 22px;
}

.creator-onboarding-copy h2 {
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1.15;
    margin: 6px 0 8px;
}

.creator-onboarding-copy p,
.creator-onboarding-helper span,
.creator-setup-help p,
.creator-setup-example span {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.creator-onboarding-actions,
.creator-start-actions,
.creator-setup-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.creator-onboarding-actions {
    margin-top: 16px;
}

.creator-hero-action {
    height: 40px;
}

.creator-onboarding-helper {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.creator-onboarding-helper strong,
.creator-start-strip strong,
.creator-setup-help h2,
.creator-setup-example strong {
    color: var(--text-primary);
}

.creator-chip-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.creator-idea-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
    transition:
        border-color var(--transition-speed),
        background var(--transition-speed);
}

.creator-idea-chip:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
}

.creator-chip-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 8px;
    color: var(--accent);
    background: rgba(59, 130, 246, 0.12);
}

.creator-idea-chip.compact {
    min-height: 34px;
    padding: 0 10px;
}

.creator-start-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    margin-bottom: 22px;
}

.creator-start-strip > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.creator-setup-page {
    max-width: 1180px;
}

.creator-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    gap: 18px;
}

.creator-setup-card,
.creator-setup-help {
    padding: 20px;
}

.creator-setup-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.creator-setup-card .creator-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.creator-setup-card .creator-field span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.creator-idea-textarea {
    min-height: 150px;
    width: 100%;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 12px;
    font: inherit;
    line-height: 1.45;
    outline: none;
}

.creator-idea-textarea:focus,
.creator-create-input.setup:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.creator-create-input.setup {
    width: 100%;
}

.creator-setup-actions {
    justify-content: flex-end;
}

.creator-setup-help {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: start;
}

.creator-setup-example {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.creator-project-setup .creator-product-icon {
    display: grid;
    place-items: center;
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
    font-weight: 850;
}

.creator-setup-panel {
    width: min(640px, 100%);
}

.creator-builder-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    text-align: left;
}

.creator-builder-form .creator-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.creator-builder-form .creator-field span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 750;
}

.creator-project-setup .creator-idea-textarea {
    min-height: 118px;
}

.creator-setup-side .chat-header {
    border-bottom: 1px solid var(--border);
}

.creator-setup-side-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}

.creator-setup-side-body h2 {
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1.2;
}

.creator-setup-side-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.creator-gallery,
.creator-builder {
    min-height: 100vh;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.creator-gallery-header,
.creator-builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.creator-gallery-header span,
.creator-product-title span {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.creator-gallery-header h1 {
    font-size: 30px;
    line-height: 1.1;
}

.creator-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.creator-project-create {
    padding: 18px;
}

.creator-project-create h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

.creator-create-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-create-inline .creator-name-input {
    width: min(420px, 100%);
    margin: 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
}

.creator-creation-card {
    min-height: 158px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}

.creator-creation-card.passive {
    cursor: default;
    justify-content: center;
}

.creator-creation-card.passive.warn {
    border-color: rgba(239, 68, 68, 0.45);
}

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

.creator-creation-card.new {
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: var(--text-secondary);
}

.creator-creation-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    font-size: 22px;
}

.creator-creation-icon.live {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.creator-creation-icon.work {
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.creator-creation-icon.warn {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.creator-plus {
    font-size: 40px;
    line-height: 1;
    color: var(--text-muted);
}

.creator-back {
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 750;
    padding: 0 12px;
    cursor: pointer;
}

.creator-product-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.creator-product-title {
    flex: 1;
    min-width: 0;
}

.creator-product-title strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
}

.creator-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 750;
}

.creator-status.work {
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.creator-status.live {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.creator-status.warn {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.creator-builder-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 372px;
    gap: 16px;
}

.creator-builder-grid.creator-project-grid {
    grid-template-columns: minmax(0, 4fr) minmax(360px, 3fr);
}

.creator-workbench,
.creator-chat {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.creator-chat .right-panel {
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.creator-chat .chat-header {
    min-height: 58px;
}

.creator-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--border);
}

.creator-step {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.creator-step strong {
    min-width: 72px;
    padding: 7px 12px;
    border-radius: 999px;
    text-align: center;
    font-weight: 750;
}

.creator-step.done strong {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

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

.creator-step.active strong {
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.creator-arena {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    text-align: center;
    background: transparent;
}

.creator-project-detail-header {
    margin-bottom: 12px;
}

.creator-detail-icon {
    background: #3b82f6;
}

.creator-detail-kicker {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.creator-workbench-panel {
    background: transparent;
    border: 0;
}

.creator-workbench-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.creator-workbench-content {
    display: flex;
    flex-direction: column;
}

.creator-setup-overview {
    width: min(100%, 620px);
    margin: 24px auto 0;
    padding: 0 28px;
}

.creator-setup-heading h2 {
    margin: 6px 0 18px;
    font-size: 20px;
    line-height: 1.25;
}

.creator-setup-overview + .creator-arena {
    min-height: 260px;
    padding-top: 18px;
}

.repo-destination-action {
    display: inline-flex;
    margin-top: 10px;
}

.creator-workbench-split > .right-panel {
    border: 0;
    background: transparent;
}

.creator-workbench-split .split-divider {
    background: var(--border);
}

.creator-panel {
    max-width: 620px;
}

.creator-panel h2 {
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 10px;
}

.creator-panel p {
    max-width: 530px;
    margin: 0 auto 18px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.creator-stage-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.creator-stage-icon svg {
    width: 42px;
    height: 42px;
}

.creator-stage-icon.live {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.creator-stage-icon.warn {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

.creator-name-input {
    width: min(360px, 100%);
    height: 46px;
    margin: 0 auto 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-align: center;
    font-size: 18px;
    font-weight: 750;
    outline: none;
}

.creator-build-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.creator-build-flow span {
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 750;
}

.creator-build-flow .done {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.creator-build-flow .active {
    background: rgba(59, 130, 246, 0.14);
    color: var(--accent);
}

.creator-build-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.creator-build-animation {
    height: 84px;
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 8px;
}

.creator-build-animation span {
    width: 30px;
    border-radius: 7px;
    background: var(--accent);
    animation: creator-build-bounce 1.45s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.16);
}

.creator-build-animation span:nth-child(1) {
    height: 32px;
    animation-delay: -0.32s;
}

.creator-build-animation span:nth-child(2) {
    height: 54px;
    background: #16a34a;
    animation-delay: -0.16s;
}

.creator-build-animation span:nth-child(3) {
    height: 74px;
    background: #8b5cf6;
    animation-delay: 0s;
}

.creator-build-animation span:nth-child(4) {
    height: 48px;
    background: #f59e0b;
    animation-delay: 0.16s;
}

.creator-build-animation span:nth-child(5) {
    height: 38px;
    background: #06b6d4;
    animation-delay: 0.32s;
}

@keyframes creator-build-bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.72;
    }
    50% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .creator-build-animation span {
        animation: none;
    }
}

.creator-count {
    color: var(--accent);
}

.creator-build-meter,
.creator-eta-card {
    width: min(420px, 100%);
    margin: 0 auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
}

.creator-build-meter-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.creator-build-meter-row strong {
    color: var(--text-primary);
}

.creator-eta-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.creator-eta-card span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.creator-eta-card.warn {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
}

.creator-actions,
.creator-ideas {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.creator-live-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    text-decoration: none;
}

.creator-ideas button {
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 14px;
    font-weight: 750;
    cursor: pointer;
}

.creator-chat h2 {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.creator-messages {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
}

.creator-bubble {
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.creator-bubble.me {
    align-self: flex-end;
    background: var(--accent);
    color: white;
}

.creator-bubble.system {
    align-self: center;
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
    font-weight: 750;
}

.creator-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.creator-chat-input input {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 0 11px;
}

.creator-chat-input button {
    width: 58px;
    border: 0;
    border-radius: 7px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 750;
}

@media (max-width: 980px) {
    .creator-dashboard-hero,
    .creator-onboarding-card,
    .creator-setup-grid,
    .creator-builder-grid,
    .creator-builder-grid.creator-project-grid,
    .creator-gallery-grid {
        grid-template-columns: 1fr;
    }

    .creator-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .creator-dashboard-hero {
        padding: 18px;
    }

    .creator-start-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .creator-start-actions {
        align-items: stretch;
    }

    .creator-start-actions .btn-primary,
    .creator-start-actions .creator-idea-chip {
        justify-content: center;
    }

    .creator-builder-header,
    .creator-gallery-header {
        align-items: stretch;
        flex-direction: column;
    }

}

/* Ã¢â€â‚¬Ã¢â€â‚?UOS v0 Ã¢â‚¬â€ PQL queue (admin) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.pql-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pql-table th,
.pql-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.pql-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.pql-user {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pql-user .muted {
    color: var(--text-muted);
    font-size: 14px;
}

.pql-intent {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.pql-input {
    width: 100%;
    min-width: 90px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.3rem 0.4rem;
}

.pql-save {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.pql-detail-row td {
    background: var(--bg-secondary);
    padding: 0.85rem 1rem;
}

.pql-detail {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.pql-detail-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.pql-profile,
.pql-cost {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pql-cost {
    text-align: right;
    min-width: 180px;
}

.pql-project-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pql-project-detail {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.7rem;
    background: var(--bg-primary);
}

.pql-project-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.pql-project-head > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pql-project-links,
.pql-project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pql-project-links {
    justify-content: flex-end;
}

.pql-project-metrics {
    margin-top: 0.55rem;
    color: var(--text-muted);
}

.pql-message-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.pql-message {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
}

/* Ã¢â€â‚¬Ã¢â€â‚?UOS v0 Ã¢â‚¬â€ NPS survey Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.nps-card {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 50;
    width: 340px;
    max-width: calc(100vw - 2.5rem);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nps-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.nps-q {
    font-weight: 600;
    margin: 0 0 0.6rem;
    padding-right: 1rem;
}

.nps-scale {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
}

.nps-num {
    min-width: 0;
    padding: 0.35rem 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
}

.nps-num:hover {
    background: var(--bg-hover);
}

.nps-ends {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
    font-size: 14px;
    color: var(--text-muted);
}

.nps-comment {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.4rem 0.5rem;
    margin: 0.3rem 0;
}

.nps-share {
    margin: 0.35rem 0 0.45rem;
}

.nps-copy {
    width: 100%;
    justify-content: center;
}

.nps-comment {
    min-height: 56px;
    resize: vertical;
}

.nps-consent {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 14px;
    color: var(--text-muted);
}

.nps-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Ã¢â€â‚¬Ã¢â€â‚?Design studio Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚?*/
.design-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--navbar-height) - 48px);
    min-height: 620px;
    overflow: hidden;
}

.design-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-shrink: 0;
    padding-bottom: 18px;
}

.design-title-row,
.design-workspace-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.design-title-row h1 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.35px;
}

.design-page-header > div > p {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: 14px;
}

.design-spark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    font-size: 15px;
}

.design-beta-badge {
    padding: 2px 7px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.design-mobile-session-picker {
    display: none;
    position: relative;
    z-index: 30;
    flex-shrink: 0;
}

.design-mobile-picker-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 40px;
    gap: 8px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
    text-align: left;
}

.design-mobile-picker-trigger:hover,
.design-mobile-picker-trigger:focus-visible {
    border-color: var(--text-muted);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-mobile-picker-trigger:focus-visible,
.design-mobile-picker-link:focus-visible,
.design-mobile-picker-state button:focus-visible,
.design-mobile-picker-refresh-error button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.design-mobile-picker-label {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0.45px;
    text-transform: uppercase;
}

.design-mobile-picker-current {
    overflow: hidden;
    min-width: 0;
    flex: 1;
    color: var(--text-primary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-mobile-picker-chevron {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform var(--transition-speed);
}

.design-mobile-picker-chevron.open {
    transform: rotate(180deg);
}

.design-mobile-picker-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 31;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-secondary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.design-mobile-picker-links {
    display: flex;
    max-height: min(280px, 42dvh);
    padding: 5px;
    flex-direction: column;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.design-mobile-picker-link {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 38px;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
}

.design-mobile-picker-link:hover,
.design-mobile-picker-link:focus-visible {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-mobile-picker-link.active {
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--text-primary);
}

.design-mobile-picker-link > span:last-child {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-mobile-picker-link.active .design-nav-session-dot {
    background: var(--accent);
    opacity: 1;
}

.design-mobile-picker-state,
.design-mobile-picker-refresh-error {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    padding: 9px 11px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.35;
}

.design-mobile-picker-state.error,
.design-mobile-picker-refresh-error {
    color: var(--danger);
}

.design-mobile-picker-state > span:not(.design-nav-spinner),
.design-mobile-picker-refresh-error > span {
    overflow: hidden;
    min-width: 0;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-mobile-picker-state button,
.design-mobile-picker-refresh-error button {
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.design-mobile-picker-state button:hover,
.design-mobile-picker-refresh-error button:hover {
    text-decoration: underline;
}

.design-mobile-picker-refresh-error {
    min-height: 34px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.design-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.design-workbench-home {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.design-workbench-home .design-main-panel {
    display: flex;
    background: transparent;
}

.design-new-session-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.design-new-session-form label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
}

.design-new-session-form input {
    width: 100%;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    outline: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
}

.design-new-session-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.design-new-session-form input::placeholder,
.design-prompt-box textarea::placeholder {
    color: var(--text-muted);
}

.design-new-session-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 3px;
}

.design-new-session-actions .btn-primary {
    height: 34px;
    padding: 0 14px;
    font-size: 14px;
}

.design-new-session-actions .design-quiet-button {
    min-height: 34px;
}

.design-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(3, 7, 18, 0.68);
    backdrop-filter: blur(4px);
}

.design-new-session-modal {
    width: min(430px, 100%);
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.design-new-session-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 17px;
}

.design-new-session-header h2 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.15px;
}

.design-new-session-header p {
    max-width: 330px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.design-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
}

.design-modal-close:hover:not(:disabled) {
    border-color: var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-modal-close:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.design-quiet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
    transition: border-color 150ms, background 150ms, color 150ms;
}

.design-quiet-button:hover {
    border-color: var(--text-muted);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-main-panel {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--bg-primary);
}

.design-welcome,
.design-center-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 320px;
    flex-direction: column;
    color: var(--text-muted);
    text-align: center;
}

.design-welcome {
    max-width: 510px;
    margin: 0 auto;
    padding: 40px 24px;
}

.design-welcome.design-chat-home {
    width: var(--design-home-content-width);
    max-width: 760px;
    flex: 1;
    padding: 48px var(--design-home-content-gutter);
}

.design-welcome-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    background: radial-gradient(circle at 35% 25%, rgba(96, 165, 250, 0.28), rgba(139, 92, 246, 0.1));
    box-shadow: 0 14px 34px rgba(79, 70, 229, 0.12);
    color: #c4b5fd;
    font-size: 25px;
}

.design-eyebrow {
    margin-bottom: 8px;
    color: #8b5cf6;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.design-welcome h2 {
    color: var(--text-primary);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 750;
    letter-spacing: -0.8px;
}

.design-chat-home h2 {
    margin-bottom: 34px;
    font-weight: 600;
}

.design-welcome > p {
    max-width: 450px;
    margin: 10px 0 22px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.65;
}

.design-chat-home > p {
    max-width: 560px;
    margin-bottom: 16px;
}

.design-capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    margin-top: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.design-capabilities span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 11px 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.design-capabilities span + span {
    border-left: 1px solid var(--border);
}

.design-capabilities b {
    color: var(--text-primary);
    font-size: 14px;
}

.design-center-state {
    gap: 8px;
    padding: 24px;
}

.design-center-state strong {
    color: var(--text-primary);
    font-size: 14px;
}

.design-center-state p {
    max-width: 430px;
    color: var(--text-muted);
    font-size: 14px;
}

.design-center-state.error strong,
.design-center-state.error p {
    color: var(--danger);
}

.design-center-state.compact {
    min-height: 190px;
}

.design-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    font-weight: 800;
}

.design-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: design-spin 0.75s linear infinite;
}

.design-spinner.large {
    width: 22px;
    height: 22px;
}

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

.design-workspace {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.design-workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 10px 15px 10px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.design-workspace-title h2 {
    overflow: hidden;
    max-width: min(38vw, 480px);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-workspace-title > span:last-child {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 650;
    text-transform: capitalize;
}

.design-status-dot {
    width: 6px;
    height: 6px;
    margin-left: 3px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.design-workspace-header > div:first-child > p {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 14px;
}

.design-workspace-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.design-chat-panel,
.design-artifact-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.design-chat-panel {
    /* The splitter occupies 32px, so subtract half at the 50:50 default. */
    flex: 0 0 calc(50% - 16px);
    background: var(--bg-primary);
}

.design-workspace-body.chat-only .design-chat-panel {
    flex: 1 1 100%;
    border: 0;
}

.design-workspace-body.chat-only .design-artifact-panel {
    display: none;
}

.design-splitter {
    --design-splitter-right-bg: #0b0d12;
    position: relative;
    z-index: 6;
    width: 32px;
    flex: 0 0 32px;
    cursor: col-resize;
    touch-action: none;
    background: linear-gradient(
        to right,
        var(--bg-secondary) 0 50%,
        var(--design-splitter-right-bg) 50% 100%
    );
}

.design-workspace-body.has-build .design-splitter {
    --design-splitter-right-bg: var(--bg-primary);
    background: var(--bg-primary);
}

.design-splitter::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 1px;
    background: var(--border);
    transition: width 120ms ease, left 120ms ease, background 120ms ease;
}

.design-splitter:hover::before,
.design-splitter:focus-visible::before,
.design-splitter.dragging::before {
    left: 14px;
    width: 3px;
    background: var(--accent);
}

.design-splitter:focus-visible {
    outline: none;
}

.design-panel-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 39px;
    padding: 0 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.design-panel-label small {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 550;
    letter-spacing: 0;
    text-transform: none;
}

.design-message-list {
    flex: 1;
    min-height: 0;
    padding: 26px 18px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.design-chat-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 28px;
    flex-direction: column;
    color: var(--text-muted);
    text-align: center;
}

.design-chat-empty > span {
    margin-bottom: 10px;
    color: #a78bfa;
    font-size: 19px;
}

.design-chat-empty strong {
    color: var(--text-primary);
    font-size: 14px;
}

.design-chat-empty p {
    max-width: 260px;
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.55;
}

.design-messages {
    display: flex;
    width: min(780px, 100%);
    margin: 0 auto;
    flex-direction: column;
    gap: 20px;
    padding: 0;
}

.design-message {
    --design-message-copy-font-size: 15px;
    display: flex;
    gap: 0;
    padding: 0;
    border-radius: 0;
}

.design-message.assistant {
    background: transparent;
}

.design-message-avatar {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 750;
}

.design-message.assistant .design-message-avatar {
    border-color: rgba(139, 92, 246, 0.28);
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
}

.design-message-body {
    flex: 1;
    min-width: 0;
}

.design-message-meta {
    display: none;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.design-message-meta strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.design-message-meta time {
    overflow: hidden;
    max-width: 120px;
    color: var(--text-muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-message.user {
    justify-content: flex-end;
}

.design-message.user .design-message-body {
    max-width: min(78%, 620px);
    padding: 11px 15px;
    border-radius: 20px;
    background: var(--bg-tertiary);
}

.design-message.assistant .design-message-body {
    max-width: 100%;
}

.design-message.user.pending.failed .design-message-meta {
    display: flex;
    justify-content: flex-end;
}

.design-message.user.pending.failed .design-message-meta strong {
    display: none;
}

.design-welcome.design-chat-home.has-pending {
    justify-content: flex-end;
}

.design-welcome-pending {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 18px 0;
    overflow-y: auto;
    text-align: left;
}

.design-welcome-pending .design-message {
    width: min(78%, 620px);
    padding: 11px 15px;
    border-radius: 20px;
    background: var(--bg-tertiary);
    opacity: 1;
}

.design-welcome-pending .design-message-body p {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
}

.design-pending-messages {
    padding-top: 0;
}

.design-message.pending {
    opacity: 0.82;
}

.design-message.pending.failed {
    opacity: 1;
}

.design-message.assistant.streaming,
.design-message.assistant.partial {
    opacity: 1;
}

.design-message.assistant.streaming .design-streaming-copy::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    vertical-align: -0.12em;
    background: var(--accent);
    animation: design-stream-caret 0.9s steps(1) infinite;
}

@keyframes design-stream-caret {
    50% { opacity: 0; }
}

.design-thinking-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
}

.design-thinking-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: design-thinking-dot 1.1s ease-in-out infinite;
}

.design-thinking-dots i:nth-child(2) { animation-delay: 0.14s; }
.design-thinking-dots i:nth-child(3) { animation-delay: 0.28s; }

@keyframes design-thinking-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-3px); opacity: 1; }
}

.design-pending-state {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.design-pending-state-sr-only {
    /* Keep lifecycle updates available to assistive technology without
       restoring the visual status copy beside each optimistic message. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.design-message.pending.failed .design-pending-state {
    color: var(--danger);
}

.design-message-body p {
    color: var(--text-secondary);
    font-size: var(--design-message-copy-font-size);
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.design-message-markdown {
    color: var(--text-secondary);
    font-size: var(--design-message-copy-font-size);
    line-height: 1.55;
    overflow-x: auto;
    overflow-wrap: anywhere;
}

.design-message-markdown > :first-child {
    margin-top: 0;
}

.design-message-markdown > :last-child {
    margin-bottom: 0;
}

.design-message-markdown p,
.design-message-markdown ul,
.design-message-markdown ol,
.design-message-markdown pre,
.design-message-markdown blockquote {
    margin: 0 0 8px;
    white-space: normal;
}

.design-message-markdown ul,
.design-message-markdown ol {
    padding-left: 20px;
}

.design-message-markdown a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.design-message-markdown code {
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.design-message-markdown pre {
    overflow-x: auto;
    padding: 9px 10px;
    border-radius: 8px;
    background: var(--bg-primary);
}

.design-message-markdown pre code {
    padding: 0;
    background: transparent;
}

.design-message-markdown table {
    width: max-content;
    max-width: 100%;
    border-collapse: collapse;
}

.design-message-markdown th,
.design-message-markdown td {
    padding: 5px 7px;
    border: 1px solid var(--border);
    text-align: left;
}

.design-message-markdown img {
    max-width: 100%;
}

.design-message-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    margin-top: 7px;
}

.design-message-action {
    display: inline-grid;
    width: 28px;
    height: 28px;
    padding: 5px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.design-message-action svg {
    width: 18px;
    height: 18px;
}

.design-message-action:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.design-message-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.design-message-action-notice {
    margin-right: 3px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
}

.design-message-body > p,
.design-message-markdown {
    font-size: var(--design-message-copy-font-size);
    line-height: 1.7;
}

.design-message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.design-message-attachment {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
    padding: 4px 6px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-message-image {
    display: block;
    width: 62px;
    height: 62px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-primary);
}

.design-message-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 140ms ease;
}

.design-message-image:hover img {
    transform: scale(1.04);
}

.design-pending-image {
    cursor: default;
    opacity: 0.92;
}

.design-pending-image:hover img {
    transform: none;
}

.design-composer {
    flex-shrink: 0;
    padding: 9px 10px 10px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.design-workspace-body.chat-only .design-composer {
    width: min(780px, calc(100% - 36px));
    margin: 8px auto 20px;
    padding: 0;
    border-top: 0;
    background: transparent;
}

.design-workspace-body.chat-only .design-prompt-box {
    border-radius: 22px;
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.14);
}

.design-workspace-body.chat-only .design-prompt-box textarea {
    min-height: 52px;
    padding: 14px 50px 12px;
    resize: none;
    font-size: 14px;
}

.design-home-composer {
    width: 100%;
    margin-top: 4px;
    padding: 0;
    border-top: 0;
    background: transparent;
    text-align: left;
}

.design-home-composer .design-prompt-box {
    border-radius: 20px;
    background: var(--bg-secondary);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.design-home-composer .design-prompt-box:focus-within {
    border-color: color-mix(in srgb, var(--accent) 68%, var(--border));
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.09),
                0 20px 56px rgba(0, 0, 0, 0.2);
}

.design-home-composer .design-prompt-box textarea {
    min-height: 54px;
    max-height: 260px;
    padding: 15px 52px 12px;
    resize: none;
    font-size: 15px;
    line-height: 1.55;
}

.design-home-composer .design-upload-preview-row {
    padding-right: 18px;
    padding-left: 18px;
}

.design-home-composer .design-prompt-footer {
    min-height: 46px;
    padding: 0 12px 10px 14px;
}

.design-home-composer .design-prompt-footer > span {
    font-size: 14px;
}

.design-home-composer .design-attach-button {
    width: 34px;
    height: 34px;
}

.design-home-composer .design-send-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
}

.design-home-composer > .design-inline-error,
.design-home-composer > .design-attachment-status {
    padding: 0 5px;
    text-align: left;
}

.design-prompt-box {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-primary);
    transition: border-color 150ms, box-shadow 150ms;
}

.design-prompt-box.drag-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.design-drop-overlay {
    position: absolute;
    inset: 5px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px dashed color-mix(in srgb, var(--accent) 72%, var(--border));
    border-radius: 13px;
    background: color-mix(in srgb, var(--bg-secondary) 92%, var(--accent));
    color: var(--text-primary);
    font-size: 14px;
    pointer-events: none;
}

.design-drop-overlay span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    color: var(--accent);
    font-size: 17px;
}

.design-prompt-box:focus-within {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
}

.design-prompt-box textarea {
    display: block;
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-height: 52px;
    max-height: 150px;
    resize: none;
    padding: 14px 50px 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    field-sizing: content;
}

.design-file-input {
    display: none;
}

.design-upload-preview-row {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 7px;
    padding: 2px 9px 7px;
    overflow-x: auto;
}

.design-upload-preview {
    position: relative;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-tertiary);
}

.design-upload-preview img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.design-upload-preview button {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1;
}

.design-upload-preview button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.design-prompt-footer {
    display: contents;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    padding: 0 6px 5px 10px;
}

.design-prompt-footer > span {
    display: none;
}

.design-attach-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    border-radius: 50%;
    color: var(--text-muted);
}

.design-attach-button:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    z-index: 2;
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
}

.design-send-button:hover:not(:disabled) {
    background: var(--accent-hover);
}

.design-send-button:disabled,
.design-attach-button:disabled,
.design-new-session-form button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.design-inline-error {
    margin-top: 6px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.4;
}

.design-artifact-panel {
    flex: 1 1 0;
    background: #0b0d12;
}

.design-artifact-panel-hidden {
    display: none !important;
}

.design-project-build-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 0;
    overflow: hidden;
    background: var(--bg-primary);
}

.design-project-build-state {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
    gap: 10px;
    padding: 32px;
    flex-direction: column;
    color: var(--text-secondary);
    text-align: center;
}

.design-project-build-state strong {
    color: var(--text-primary);
    font-size: 15px;
}

.design-project-build-state p {
    max-width: 460px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.design-project-build-state.error strong {
    color: var(--danger);
}

.design-project-build-state .btn-primary {
    min-width: 92px;
    margin-top: 5px;
}

.design-embedded-project-workspace {
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

.design-embedded-project-workspace > .embedded-project-workspace {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

/* The Idea Design page already owns the conversation column and surrounding
   shell. Embed only the mode-specific panel from the Project detail view. */
.embedded-project-workspace > .project-detail-header,
.embedded-project-workspace > .new-repo-banner,
.embedded-project-workspace > #tour-pipeline-strip,
.embedded-project-workspace > .deploy-credit-banner {
    display: none !important;
}

.embedded-project-workspace > .split-layout {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: row;
    overflow: hidden;
}

.embedded-project-workspace > .split-layout > .left-panel {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    background: var(--bg-primary);
}

.design-embedded-build-chat {
    display: block;
    min-width: 0;
    min-height: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    overflow: visible;
    background: transparent;
}

.design-embedded-build-chat > .embedded-build-chat-panel {
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    background: transparent;
}

.design-embedded-build-chat .chat-messages {
    min-height: 0;
    padding: 0;
    overflow: visible;
}

[data-theme="light"] .design-artifact-panel {
    background: #eceef2;
}

[data-theme="light"] .design-splitter {
    --design-splitter-right-bg: #eceef2;
}

.design-build-mode-page {
    z-index: 1120;
}

.design-build-mode-modal .new-project-mode-header p {
    max-width: 560px;
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.45;
}

.design-build-mode-card:disabled {
    cursor: wait;
    opacity: 0.64;
}

.design-build-mode-error {
    margin-top: 18px;
}

.design-build-mode-progress {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 34px;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
}

.design-artifact-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 39px;
    padding: 0 11px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.design-artifact-navigation {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 13px;
}

.design-attachment-status {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 14px;
}

.design-artifact-tabs {
    display: flex;
    align-items: stretch;
    gap: 13px;
}

.design-artifact-tabs button {
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.design-artifact-tabs button:hover,
.design-artifact-tabs button.active {
    color: var(--text-primary);
}

.design-artifact-tabs button.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--accent);
}

.design-artifact-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.design-history-control {
    position: relative;
    display: flex;
    align-items: center;
}

.design-history-button {
    position: relative;
    z-index: 159;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 650;
}

.design-history-button:hover,
.design-history-button[aria-expanded="true"] {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-version-history {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 160;
    display: flex;
    width: 150px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
    flex-direction: column;
    gap: 2px;
}

.design-history-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 8px;
    border-radius: 5px;
    color: var(--text-muted);
    font-size: 14px;
}

.design-history-option:hover,
.design-history-option.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-history-option span {
    color: #a78bfa;
    font-size: 14px;
    font-weight: 800;
}

.design-export-control {
    position: relative;
    flex-shrink: 0;
}

.design-export-dismiss {
    position: fixed;
    inset: 0;
    z-index: 158;
    background: transparent;
}

.design-export-button {
    position: relative;
    z-index: 159;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    height: 26px;
    gap: 5px;
    padding: 0 9px;
    border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--border));
    border-radius: 6px;
    background: color-mix(in srgb, var(--accent) 12%, var(--bg-secondary));
    color: #93c5fd;
    font-size: 14px;
    font-weight: 750;
    white-space: nowrap;
    transition: border-color 140ms, background 140ms, color 140ms, opacity 140ms;
}

.design-export-button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent) 75%, var(--border));
    background: color-mix(in srgb, var(--accent) 20%, var(--bg-secondary));
    color: #dbeafe;
}

.design-export-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
    outline-offset: 2px;
}

.design-export-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.design-export-icon {
    font-size: 14px;
    line-height: 1;
}

.design-export-chevron {
    margin-left: 1px;
    color: currentColor;
    font-size: 14px;
    line-height: 1;
    opacity: 0.72;
    transition: transform 140ms ease;
}

.design-export-button[aria-expanded="true"] .design-export-chevron {
    transform: rotate(180deg);
}

.design-export-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 160;
    display: flex;
    width: 190px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-secondary);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
    flex-direction: column;
    gap: 2px;
}

.design-export-option {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 8px 9px;
    border-radius: 6px;
    color: var(--text-secondary);
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.design-export-option:hover:not(:disabled),
.design-export-option:focus-visible {
    outline: none;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-export-option strong {
    color: inherit;
    font-size: 14px;
    font-weight: 750;
}

.design-export-option span {
    color: var(--text-muted);
    font-size: 14px;
}

.design-export-option:disabled {
    cursor: wait;
    opacity: 0.5;
}

.design-export-error {
    margin: 0;
    padding: 6px 11px;
    border-bottom: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border));
    background: color-mix(in srgb, var(--danger) 7%, var(--bg-secondary));
    color: var(--danger);
    font-size: 14px;
    line-height: 1.4;
}

.design-artifact-stage {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 14px;
}

.design-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    flex-direction: column;
    border: 1px dashed color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 9px;
    color: var(--text-muted);
    text-align: center;
}

.design-preview-empty strong {
    color: var(--text-secondary);
    font-size: 14px;
}

.design-preview-empty p {
    max-width: 320px;
    margin-top: 5px;
    padding: 0 18px;
    font-size: 14px;
}

.design-preview-illustration {
    position: relative;
    width: 88px;
    height: 61px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg-secondary);
    box-shadow: 7px 7px 0 rgba(139, 92, 246, 0.06);
}

.design-preview-illustration::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.design-preview-illustration span {
    position: absolute;
    top: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
}

.design-preview-illustration span:nth-child(1) { left: 6px; background: #ef4444; }
.design-preview-illustration span:nth-child(2) { left: 13px; background: #f59e0b; }
.design-preview-illustration span:nth-child(3) { left: 20px; background: #22c55e; }

.design-html-preview,
.design-pdf-preview {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.design-image-preview {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 12px;
}

.design-image-preview img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.26);
    object-fit: contain;
}

.design-code-view {
    width: 100%;
    min-height: 100%;
    margin: 0;
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #080a0f;
    color: #cbd5e1;
    tab-size: 2;
    white-space: pre;
}

.design-code-view code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 14px;
    line-height: 1.6;
}

[data-theme="light"] .design-code-view {
    background: #111827;
    color: #e5e7eb;
}

@media (max-width: 1180px) {
    .design-artifact-toolbar {
        min-height: 44px;
        padding: 4px 8px;
        flex-wrap: wrap;
        row-gap: 3px;
    }

    .design-artifact-navigation {
        min-width: 0;
        flex: 1 1 auto;
    }

    .design-artifact-toolbar > .design-session-header-actions {
        max-width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 980px) {
    .design-page {
        height: auto;
        min-height: calc(100dvh - var(--navbar-height) - 48px);
        overflow: visible;
    }

    .design-workbench {
        display: flex;
        min-height: 720px;
        flex-direction: column;
        overflow: visible;
    }

    .design-main-panel {
        min-height: 660px;
    }
}

@media (max-width: 768px) {
    :root {
        --design-home-content-gutter: 4px;
    }

    .design-page {
        min-height: 0;
    }

    .design-page-header {
        align-items: center;
        padding-bottom: 13px;
    }

    .design-title-row h1 {
        font-size: 19px;
    }

    .design-spark {
        width: 24px;
        height: 24px;
    }

    .design-page-header > div > p {
        display: none;
    }

    .design-mobile-session-picker {
        display: block;
        margin-bottom: 10px;
    }

    .design-workbench {
        min-height: 780px;
        border-radius: 10px;
    }

    .design-workbench-home {
        min-height: calc(100dvh - var(--navbar-height) - 150px);
        border-radius: 0;
    }

    .design-welcome.design-chat-home {
        padding: 36px var(--design-home-content-gutter);
    }

    .design-chat-home h2 {
        font-size: clamp(23px, 7vw, 30px);
    }

    .design-home-composer .design-prompt-box {
        border-radius: 17px;
    }

    .design-home-composer .design-prompt-box textarea {
        min-height: 96px;
        padding: 15px 15px 7px;
        font-size: 14px;
    }

    .design-home-composer .design-prompt-footer > span {
        display: none;
    }

    .design-main-panel {
        min-height: 710px;
    }

    .design-workbench-home .design-main-panel {
        min-height: max(420px, calc(100dvh - var(--navbar-height) - 150px));
    }

    .design-workspace-header {
        align-items: flex-start;
        min-height: auto;
        flex-direction: column;
    }

    .design-workspace-title h2 {
        max-width: 65vw;
    }

    .design-workspace-body {
        display: flex;
        min-height: 600px;
        flex-direction: column;
        overflow: visible;
    }

    .design-chat-panel {
        flex-basis: auto !important;
        min-height: 460px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .design-splitter {
        display: none;
    }

    .design-message-list {
        min-height: 230px;
        max-height: 360px;
    }

    .design-workspace-body.chat-only .design-message-list {
        max-height: none;
    }

    .design-artifact-panel {
        min-height: 520px;
    }

    .design-project-build-panel {
        min-height: 560px;
        overflow: hidden;
    }

    .design-artifact-toolbar {
        min-height: 44px;
        padding: 4px 8px;
        flex-wrap: wrap;
        row-gap: 3px;
    }

    .design-artifact-navigation {
        min-width: 0;
        flex: 1 1 auto;
        gap: 6px;
    }

    .design-artifact-actions {
        margin-left: auto;
        gap: 5px;
    }

    .design-export-button {
        min-width: 76px;
        padding: 0 6px;
    }

    .design-export-menu {
        width: min(190px, calc(100vw - 32px));
    }

    .design-artifact-stage {
        min-height: 470px;
        padding: 9px;
    }

    .design-html-preview,
    .design-pdf-preview {
        min-height: 450px;
    }

    .design-modal-backdrop {
        align-items: flex-start;
        padding: max(16px, env(safe-area-inset-top)) 12px 16px;
        overflow-y: auto;
    }

    .design-new-session-modal {
        margin-top: 8vh;
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .design-spinner {
        animation-duration: 1.8s;
    }
}

/* Idea Design session controls Ã¢â‚¬â€ ChatGPT-style actions live in the session
   header. The previous Artifact-toolbar actions stay hidden during the markup
   migration so Preview/Code/History keep their established layout. */
.design-artifact-toolbar > .design-artifact-actions {
    display: none;
}

.design-artifact-toolbar > .design-session-header-actions {
    margin-left: auto;
}

.design-preview-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
}

.design-preview-close:hover {
    border-color: var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-preview-close:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.design-session-header-actions {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
}

.design-session-action {
    position: relative;
    z-index: 159;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 34px;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 650;
    white-space: nowrap;
    transition: background 140ms, color 140ms, border-color 140ms, opacity 140ms;
}

.design-session-menu-icon,
.design-session-menu-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.design-session-action:hover:not(:disabled),
.design-session-action[aria-expanded="true"] {
    border-color: var(--border);
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-session-action:focus-visible,
.design-session-menu button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.design-session-action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.design-session-share {
    color: var(--text-primary);
}

.design-session-more {
    width: 36px;
    padding: 0;
    font-size: 14px;
    letter-spacing: 1px;
}

.design-session-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 160;
    display: flex;
    width: 190px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--bg-secondary);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
    flex-direction: column;
    gap: 2px;
}

.design-session-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 36px;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
}

.design-session-menu button > span:first-child {
    display: inline-grid;
    width: 18px;
    place-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

.design-session-menu button:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.design-session-menu button.danger,
.design-session-menu button.danger > span:first-child {
    color: var(--danger);
}

.design-session-menu button:disabled {
    cursor: wait;
    opacity: 0.5;
}

.design-session-toast {
    position: fixed;
    top: calc(var(--navbar-height) + 14px);
    left: 50%;
    z-index: 420;
    max-width: min(440px, calc(100vw - 32px));
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-secondary);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 650;
    transform: translateX(-50%);
}

/* Public Idea Design share (outside the authenticated Dashboard shell). */
.shared-design-page {
    min-height: 100dvh;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.shared-design-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 58px;
    padding: 0 clamp(18px, 4vw, 54px);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
    backdrop-filter: blur(14px);
    color: var(--text-muted);
    font-size: 14px;
}

.shared-design-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.shared-design-brand img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.shared-design-main {
    width: min(1500px, 100%);
    min-height: calc(100dvh - 58px);
    margin: 0 auto;
    padding: clamp(18px, 3vw, 38px);
}

.shared-design-workspace {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-secondary);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.shared-design-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 16px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
}

.shared-design-title > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.shared-design-title h1 {
    overflow: hidden;
    font-size: 18px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-design-title p {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 14px;
}

.shared-design-readonly {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.shared-design-content {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(420px, 1fr);
    min-height: min(720px, calc(100dvh - 174px));
}

.shared-design-chat {
    min-width: 0;
    border-right: 1px solid var(--border);
}

.shared-design-chat > h2,
.shared-design-preview-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.35px;
    text-transform: uppercase;
}

.shared-design-messages {
    display: flex;
    max-height: calc(100dvh - 218px);
    padding: 13px;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.shared-design-message {
    padding: 10px 11px;
    border-radius: 9px;
}

.shared-design-message.assistant {
    background: var(--bg-tertiary);
}

.shared-design-message strong {
    font-size: 14px;
}

.shared-design-message p {
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.shared-design-preview {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    background: #0b0d12;
}

[data-theme="light"] .shared-design-preview {
    background: #eceef2;
}

.shared-design-preview-label {
    background: var(--bg-secondary);
}

.shared-design-preview-label span {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.shared-design-preview-stage {
    display: flex;
    min-height: 0;
    flex: 1;
    padding: 14px;
}

.shared-design-preview-frame {
    display: block;
    width: 100%;
    min-height: 580px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
}

.shared-design-preview-image {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
}

.shared-design-preview-image img {
    max-width: 100%;
    max-height: 680px;
    border: 1px solid var(--border);
    border-radius: 9px;
    object-fit: contain;
}

.shared-design-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 55dvh;
    gap: 10px;
    flex-direction: column;
    color: var(--text-muted);
    text-align: center;
}

.shared-design-state.compact {
    width: 100%;
    min-height: 300px;
}

.shared-design-state strong {
    color: var(--text-primary);
    font-size: 14px;
}

.shared-design-state p {
    max-width: 440px;
    font-size: 14px;
    line-height: 1.5;
}

.shared-design-state.error p {
    color: var(--danger);
}

@media (max-width: 880px) {
    .design-workspace-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .design-session-header-actions {
        width: 100%;
        flex-wrap: wrap;
        overflow: visible;
    }

    .shared-design-content {
        display: flex;
        flex-direction: column;
    }

    .shared-design-chat {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .shared-design-messages {
        max-height: 360px;
    }

    .shared-design-preview-frame {
        min-height: 520px;
    }
}
.workspace-pause-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #f59e0b;
  background: #fffbeb;
  color: #78350f;
  font-size: 14px;
}

.workspace-pause-notice time {
  margin-left: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.workspace-pause-notice a {
  color: #92400e;
  font-weight: 600;
}

@media (max-width: 700px) {
  .workspace-pause-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .workspace-pause-notice time {
    margin-left: 0;
  }
}

/* Admin account-pool capacity view */
.account-pool-snapshot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.account-pool-snapshot-meta span,
.account-pool-health {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.account-pool-table-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
}

.account-pool-table-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.account-pool-table-card h2,
.account-pool-table-card header span {
  margin: 0;
  font-size: 17px;
}

.account-pool-table-card header span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.account-pool-table-wrap {
  overflow-x: auto;
}

.account-pool-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 13px;
}

.account-pool-table th,
.account-pool-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.account-pool-table tr:last-child td {
  border-bottom: 0;
}

.account-pool-table th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-pool-provider {
  font-weight: 700;
}

.account-pool-health {
  text-transform: capitalize;
}

.account-pool-health.health-ready {
  color: var(--success);
}

.account-pool-health.health-cooling {
  color: var(--warning);
}

.account-pool-health.health-dead {
  color: var(--danger);
}

.account-pool-detail {
  color: var(--text-secondary);
  font-size: 12px;
}

.account-pool-windows {
  display: grid;
  gap: 5px;
}

.account-pool-windows span:first-child {
  white-space: nowrap;
}

.account-pool-windows .account-pool-detail {
  display: block;
}
/* ── Referral invites (API-keys style) ──────────────────────── */
.referral-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 0 48px;
}

.referral-page-header {
  margin-bottom: 16px;
}

.referral-title {
  font-size: 1.5rem;
  font-weight: 650;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.referral-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: none;
  width: 100%;
}

.referral-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.referral-rules-inline {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--text-muted, var(--text-secondary));
  line-height: 1.4;
}

.referral-toolbar .btn-primary {
  flex: 0 0 auto;
}

.referral-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
}

.referral-table-panel {
  padding: 0;
  overflow: hidden;
}

.referral-privacy,
.referral-muted {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.referral-feedback {
  margin-top: 16px;
  text-align: center;
}

.referral-feedback .referral-status,
.referral-feedback .form-error {
  margin: 0;
  text-align: center;
}

.referral-status {
  color: var(--success);
  font-size: 0.9rem;
}

.referral-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 24px;
  text-align: center;
}

.referral-empty .referral-muted {
  margin: 0;
}

.referral-table-wrap {
  overflow-x: auto;
}

.referral-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.referral-table th,
.referral-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.referral-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  background: color-mix(in srgb, var(--bg-primary) 40%, var(--bg-secondary));
}

.referral-table tbody tr:last-child td {
  border-bottom: none;
}

.referral-row:hover {
  background: color-mix(in srgb, var(--bg-hover, var(--bg-primary)) 55%, transparent);
}

.referral-row.is-disabled .referral-link-name,
.referral-row.is-disabled .referral-url-masked {
  opacity: 0.55;
}

.referral-table .col-name {
  width: 16%;
  min-width: 120px;
}

.referral-table .col-link {
  width: 32%;
  min-width: 180px;
}

.referral-table .col-date {
  width: 12%;
  white-space: nowrap;
}

.referral-table .col-count {
  width: 10%;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.referral-table th.col-count {
  text-align: center;
}

.referral-table .col-status {
  width: 14%;
  white-space: nowrap;
}

.referral-table .col-ops {
  width: 16%;
  white-space: nowrap;
  text-align: right;
}

.referral-row.is-expanded {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.referral-link-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0;
  font: inherit;
  font-weight: 500;
  text-align: left;
}

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

.referral-chevron {
  display: inline-block;
  width: 0.9em;
  color: var(--text-muted, var(--text-secondary));
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
}

.referral-chevron.open {
  transform: rotate(90deg);
  color: var(--accent);
}

.referral-accordion-row > td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-primary) 40%, var(--bg-secondary));
}

.referral-accordion-body {
  padding: 12px 16px 14px 16px;
}

.referral-invitee-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.referral-invitee-scroll {
  /* ~20 body rows (36px) + header (40px) */
  max-height: calc(40px + 20 * 36px);
  overflow-y: auto;
  overflow-x: auto;
}

.referral-invitee-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  table-layout: fixed;
}

.referral-invitee-table th,
.referral-invitee-table td {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  height: 36px;
  box-sizing: border-box;
}

.referral-invitee-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  height: 40px;
  background: color-mix(in srgb, var(--bg-primary) 50%, var(--bg-secondary));
  border-bottom: 1px solid var(--border);
}

.referral-invitee-table tbody tr:hover td {
  background: color-mix(in srgb, var(--bg-hover, var(--bg-primary)) 50%, transparent);
}

.referral-invitee-table tbody tr:last-child td {
  border-bottom: none;
}

.referral-invitee-table .col-invitee-account {
  width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-invitee-table .col-invitee-date {
  width: 38%;
  white-space: nowrap;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.referral-invitee-table th.col-invitee-date {
  color: var(--text-secondary);
}

.referral-invitee-hint {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted, var(--text-secondary));
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-primary) 35%, var(--bg-secondary));
}

.referral-link-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.referral-url-masked {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  padding: 0;
}

.referral-copy-btn {
  flex: 0 0 auto;
}

.referral-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.referral-switch input {
  cursor: pointer;
}

.referral-ops {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.referral-delete-btn {
  color: var(--danger, #e25555);
}

.referral-delete-btn:hover {
  color: var(--danger, #e25555);
  background: color-mix(in srgb, var(--danger, #e25555) 12%, transparent);
}

.referral-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referral-field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .referral-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .referral-toolbar .btn-primary {
    width: 100%;
  }

  .referral-table th,
  .referral-table td {
    padding: 12px 12px;
  }
}
