/* ==================== */
/* Design System Tokens */
/* ==================== */
:root {
    /* Primary Palette */
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-dark: #3730a3;
    --color-primary-light: #6366f1;
    --color-primary-bg: #eef2ff;
    --color-primary-bg-hover: rgba(79, 70, 229, 0.08);
    --color-primary-ring: rgba(79, 70, 229, 0.1);
    --color-primary-border: rgba(79, 70, 229, 0.15);
    --color-primary-shadow: rgba(79, 70, 229, 0.3);

    /* Neutrals */
    --color-text: #1a1a1a;
    --color-text-secondary: #374151;
    --color-text-muted: #6b7280;
    --color-text-faint: #9ca3af;
    --color-bg: #ffffff;
    --color-bg-subtle: #f9fafb;
    --color-bg-muted: #f3f4f6;
    --color-border: rgba(0, 0, 0, 0.06);
    --color-border-medium: rgba(0, 0, 0, 0.1);
    --color-border-strong: #d1d5db;

    /* Status Colors */
    --color-success: #059669;
    --color-success-bg: #ecfdf5;
    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 4px 12px rgba(79, 70, 229, 0.3);

    /* Spacing (reference) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Transitions */
    --ease-default: 0.2s ease;
    --ease-spring: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== */
/* Auth Screen Styles   */
/* ==================== */
.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.auth-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.auth-screen.hidden {
    display: none;
}

.auth-card {
    width: 90%;
    max-width: 420px;
    text-align: center;
    padding: var(--space-10);
}

.auth-logo {
    max-width: 240px;
    width: 55%;
    margin-bottom: var(--space-8);
    opacity: 0;
    transform: scale(0.92);
    animation: splashFadeIn 0.6s ease forwards;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--space-2) 0;
    opacity: 0;
    animation: splashFadeIn 0.6s ease 0.2s forwards;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-8) 0;
    opacity: 0;
    animation: splashFadeIn 0.6s ease 0.3s forwards;
}

#auth-form {
    opacity: 0;
    animation: splashFadeIn 0.6s ease 0.4s forwards;
}

.auth-field {
    margin-bottom: var(--space-4);
    text-align: left;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.auth-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-lg);
    outline: none;
    transition: all var(--ease-spring);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-ring);
    background: var(--color-bg);
}

.auth-input::placeholder {
    color: var(--color-text-faint);
}

.auth-error {
    font-size: 13px;
    color: var(--color-error);
    margin-bottom: var(--space-3);
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.25s ease;
}

.auth-error.visible {
    min-height: 20px;
    max-height: 60px;
    opacity: 1;
    margin-bottom: var(--space-4);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--ease-spring);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.auth-toggle-text {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-top: var(--space-6);
    opacity: 0;
    animation: splashFadeIn 0.6s ease 0.5s forwards;
}

.auth-toggle-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
}

.auth-toggle-text a:hover {
    text-decoration: underline;
}

/* Field hints */
.auth-field-hint {
    display: block;
    font-size: 12px;
    color: var(--color-text-faint);
    margin-top: var(--space-1);
}

/* Invite Screen */
.invite-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    text-align: left;
}

.invite-item {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: border-color var(--ease-default);
}

.invite-item:hover {
    border-color: var(--color-primary);
}

.invite-company {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.invite-role {
    font-size: 13px;
    color: var(--color-text-secondary);
    text-transform: capitalize;
}

.invite-from {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.invite-accept-btn {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--ease-spring);
}

.invite-accept-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
}

.invite-accept-btn:disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
}

.invite-skip-btn {
    background: transparent !important;
    color: var(--color-text-muted) !important;
    border: 2px solid var(--color-border-strong) !important;
    box-shadow: none !important;
    font-size: 14px !important;
}

.invite-skip-btn:hover:not(:disabled) {
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    background: var(--color-primary-bg-hover) !important;
    transform: none !important;
}

/* Logout Button */
.auth-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--ease-default);
    margin-left: auto;
    flex-shrink: 0;
}

.auth-logout-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-bg-hover);
}

.auth-logout-btn svg {
    flex-shrink: 0;
}

.logout-label {
    white-space: nowrap;
}

/* ==================== */
/* Splash Screen Styles */
/* ==================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-screen.hidden {
    display: none;
}

.splash-logo {
    max-width: 320px;
    width: 60%;
    opacity: 0;
    transform: scale(0.92);
    animation: splashFadeIn 0.6s ease forwards;
}

@keyframes splashFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-continue-btn {
    padding: 12px 48px;
    background: transparent;
    border: 1.5px solid #d1d5db;
    border-radius: 28px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: splashFadeIn 0.5s ease 0.8s forwards;
    transition: all 0.2s ease;
}

.splash-continue-btn:hover {
    border-color: var(--color-primary);
    color: #4F46E5;
    background: rgba(99, 102, 241, 0.04);
}

.splash-btn-group {
    display: flex;
    gap: 16px;
    align-items: center;
    opacity: 0;
    animation: splashFadeIn 0.5s ease 0.8s forwards;
}

.splash-btn-group .splash-continue-btn {
    opacity: 1;
    animation: none;
}

.splash-tour-btn:hover {
    border-color: var(--color-primary);
    color: #4F46E5;
    background: rgba(99, 102, 241, 0.04);
}

/* ==================== */
/* Onboarding Overlay Styles */
/* ==================== */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(4px);
}

.onboarding-overlay.hidden {
    display: none;
}

.onboarding-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.onboarding-content {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 24px;
    padding: 48px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.onboarding-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    transition: opacity 0.3s ease;
}

.onboarding-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 32px;
    transition: opacity 0.3s ease;
}

.selection-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 16px;
    text-align: left;
}

.avatar-selection {
    margin-bottom: 32px;
}

/* Old avatar-grid overrides removed — see main .avatar-grid block below */

.avatar-option.selected {
    border-color: var(--color-primary);
    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.2),
        0 4px 16px rgba(79, 70, 229, 0.3);
    transform: scale(1.05);
}

.name-selection {
    margin-bottom: 32px;
}

.assistant-name-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.assistant-name-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--color-bg);
}

.assistant-name-input::placeholder {
    color: #aaa;
}

.onboarding-continue-btn {
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(79, 70, 229, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.onboarding-continue-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(79, 70, 229, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.onboarding-continue-btn:active:not(:disabled) {
    transform: translateY(0);
}

.onboarding-continue-btn:disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* Tone / Personality Selection */
.tone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 32px;
}

.tone-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.tone-option:hover {
    border-color: rgba(79, 70, 229, 0.4);
    background: #f9f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tone-option.selected {
    border-color: var(--color-primary);
    background: #f5f3ff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.tone-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.tone-desc {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ==================== */
/* Avatar Builder Styles */
/* ==================== */
.avatar-builder {
    max-width: 880px;
    max-height: 90vh;
    overflow-y: scroll;
    padding: 36px 40px;
}

.avatar-builder::-webkit-scrollbar {
    width: 8px;
}

.avatar-builder::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0;
}

.avatar-builder::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.avatar-builder::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.builder-progress {
    margin-bottom: 24px;
}

.progress-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 50%;
}

.progress-text {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

.builder-step {
    display: none;
    animation: stepFadeIn 0.3s ease-out;
}

.builder-step.active {
    display: block;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.builder-options {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.builder-options.style-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.builder-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 32px;
    min-width: 140px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.builder-option:hover {
    border-color: rgba(79, 70, 229, 0.3);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.builder-option.selected {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.option-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.option-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.option-desc {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.selection-hint {
    font-size: 13px;
    color: #888;
    margin-top: -8px;
    margin-bottom: 16px;
}

.builder-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    resize: vertical;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.builder-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--color-bg);
}

.builder-textarea::placeholder {
    color: #aaa;
}

/* Avatar Grid */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 780px;
    margin: 0 auto;
    padding: 10px;
    max-height: none;
    overflow-y: visible;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed state — grid becomes single centered column */
.avatar-grid.avatar-chosen {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 160px;
    padding: 0;
}

.avatar-option {
    width: 140px;
    height: 172px;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 1;
    position: relative;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.35);
    border-color: #c7d2fe;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    z-index: 10;
}

.avatar-option.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    transform: scale(1.08);
}

/* When grid has chosen state — hide unselected, grow selected */
.avatar-grid.avatar-chosen .avatar-option:not(.selected) {
    width: 0;
    height: 0;
    opacity: 0;
    border: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
    pointer-events: none;
}

.avatar-grid.avatar-chosen .avatar-option.selected {
    width: 160px;
    height: 196px;
    border-radius: 22px;
    margin: 0 auto;
    border-color: var(--color-primary);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
    transform: scale(1);
    cursor: default;
}

/* Upload Your Own — in-grid avatar slot */
.avatar-upload-option {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #c7c7cc !important;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    box-shadow: none !important;
}

.avatar-upload-option:hover {
    border-color: var(--color-primary) !important;
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.avatar-upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 6px;
}

.avatar-upload-inner .upload-icon {
    font-size: 28px;
    font-weight: 300;
    color: var(--color-text-faint);
    line-height: 1;
}

.avatar-upload-inner .upload-label {
    font-size: 12px;
    color: var(--color-text-faint);
    font-weight: 500;
}

.avatar-upload-option:hover .upload-icon {
    color: #4f46e5;
}

.avatar-upload-option:hover .upload-label {
    color: #4f46e5;
}

/* Drag over state */
.avatar-upload-option.drag-over {
    border-color: var(--color-primary) !important;
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

/* Hide upload inner when grid collapses (not relevant for this slot) */
.avatar-grid.avatar-chosen .avatar-upload-option {
    display: none;
}

/* ==================== */
/* Avatar Crop Modal    */
/* ==================== */
.avatar-crop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.avatar-crop-overlay.hidden {
    display: none;
}

.avatar-crop-modal {
    background: white;
    border-radius: 20px;
    padding: 28px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.avatar-crop-modal h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 4px;
}

.crop-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 20px;
}

.crop-viewport {
    width: 200px;
    height: 245px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: var(--color-bg-muted);
    border: 2px solid #e5e7eb;
    cursor: grab;
}

.crop-viewport:active {
    cursor: grabbing;
}

.crop-viewport img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

/* Drag hint overlay */
.crop-drag-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
    border-radius: 18px;
}

.crop-drag-hint.fade-out {
    opacity: 0;
}

.crop-drag-hint svg {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.crop-drag-hint span {
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Hover hint — subtle move icon in corner */
.crop-viewport::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.85);
    border-radius: 6px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2'%3E%3Cpolyline points='5 9 2 12 5 15'/%3E%3Cpolyline points='9 5 12 2 15 5'/%3E%3Cpolyline points='15 19 12 22 9 19'/%3E%3Cpolyline points='19 9 22 12 19 15'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cline x1='12' y1='2' x2='12' y2='22'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.crop-viewport:hover::after {
    opacity: 1;
}

.crop-viewport:active::after {
    opacity: 0;
}

.crop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 10px;
}

.crop-control-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
    min-width: 72px;
}

.crop-zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

.crop-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.crop-zoom-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.crop-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.crop-cancel-btn {
    padding: 10px 24px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: white;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.crop-cancel-btn:hover {
    background: var(--color-bg-muted);
}

.crop-apply-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    background: var(--color-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.crop-apply-btn:hover {
    background: var(--color-primary);
}

/* Name Reveal — animated in after avatar pick */
.name-reveal {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease 0.15s,
                margin-top 0.5s ease;
    margin-top: 0;
}

.name-reveal.visible {
    max-height: 220px;
    opacity: 1;
    margin-top: 24px;
}

.name-reveal-inner {
    text-align: center;
    animation: nameSlideUp 0.4s ease-out 0.15s both;
}

/* nameSlideUp animation for name reveal elements */
@keyframes nameSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name-reveal .assistant-name-input {
    width: auto;
    max-width: none;
    padding: 10px 16px;
    font-size: 15px;
    margin: 0 auto 14px;
    text-align: center;
    display: block;
    box-sizing: border-box;
}

.name-reveal .onboarding-continue-btn {
    display: block;
    margin: 0 auto;
}

/* Match input width to button */
.name-reveal .assistant-name-input,
.name-reveal .onboarding-continue-btn {
    width: 180px;
}

.avatar-back-btn {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.avatar-back-btn:hover {
    color: #5b5fc7;
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
}

.suggestion-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #4f46e5;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.suggestion-chip:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.suggestion-chip:active {
    transform: translateY(0);
}

.suggestion-chip.used {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.3);
}

.step-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.builder-back-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    background: transparent;
    color: #666;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.builder-back-btn:hover {
    border-color: #ccc;
    color: #333;
}

.builder-next-btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.builder-next-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Avatar Preview */
.avatar-preview-container {
    margin: 24px 0;
}

.avatar-preview {
    width: 160px;
    height: 200px;
    margin: 0 auto 12px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid white;
}

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

.avatar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 13px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.refinement-info {
    text-align: center;
}

.refinement-count {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.refinement-section {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.refinement-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.refinement-input-row {
    display: flex;
    gap: 12px;
}

.refinement-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s;
}

.refinement-input:focus {
    border-color: var(--color-primary);
}

.refinement-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s;
}

.refinement-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

.refinement-btn:disabled {
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    cursor: not-allowed;
}

.no-more-refinements {
    text-align: center;
    padding: 16px;
    color: #666;
    font-size: 14px;
}

.no-more-refinements a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, #f7f8fa 0%, #eef0f4 100%);
    min-height: 100vh;
    color: var(--color-text);
    line-height: 1.5;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 12px 40px rgba(0, 0, 0, 0.06);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    visibility: hidden;
}

.app-container.visible {
    visibility: visible;
}

/* Header */
.main-header {
    display: flex;
    align-items: center;
    padding: 8px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

.logo-container {
    flex: 1;
}

.logo {
    height: 32px;
    width: auto;
}

.main-tabs {
    display: flex;
    gap: 4px;
    background: linear-gradient(180deg, #f0f1f3 0%, #e8eaed 100%);
    border-radius: 10px;
    padding: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.main-tabs .tab-btn {
    flex: 1;
    min-width: 0;
}

.tab-btn {
    padding: 8px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    min-width: 80px;
}

.tab-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.tab-btn:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--color-text);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.header-spacer {
    flex: 1;
}

/* ==================== */
/* Persistent Copilot Assistant */
/* ==================== */
.copilot-container {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.copilot-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.copilot-avatar-wrap:hover {
    transform: scale(1.06);
}

.copilot-avatar {
    width: 112px;
    height: 138px;
    border-radius: 18px;
    object-fit: cover;
    background: var(--color-bg);
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.copilot-avatar-wrap:hover .copilot-avatar {
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow:
        0 6px 28px rgba(79, 70, 229, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

.copilot-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    line-height: 1;
    margin-top: 6px;
    transition: color 0.2s ease;
}

.copilot-avatar-wrap:hover .copilot-name {
    color: #4f46e5;
}

/* Subtle "notice me" animation when user discovers something new — pulses twice */
.copilot-avatar-wrap.copilot-notice .copilot-avatar {
    animation: copilotNotice 1.4s ease-in-out;
}

@keyframes copilotNotice {
    0% { transform: scale(1); }
    12% { transform: scale(1.1); box-shadow: 0 6px 24px rgba(79, 70, 229, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08); }
    28% { transform: scale(0.98); }
    42% { transform: scale(1); }
    55% { transform: scale(1.08); box-shadow: 0 5px 20px rgba(79, 70, 229, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06); }
    72% { transform: scale(0.99); }
    100% { transform: scale(1); box-shadow: none; }
}

/* Expanded chat panel on hover */
.copilot-expanded {
    width: 340px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: var(--color-bg);
    border-radius: 14px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
    pointer-events: none;
}

.copilot-container.expanded .copilot-expanded {
    max-height: 380px;
    opacity: 1;
    pointer-events: auto;
}

.copilot-chat-messages {
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
}

.copilot-chat-messages:not(:empty) {
    flex: 1;
    padding: 14px 16px;
}

.copilot-msg {
    font-size: 13px;
    line-height: 1.5;
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 14px;
}

.copilot-msg p {
    margin-bottom: 6px;
}

.copilot-msg p:last-child {
    margin-bottom: 0;
}

.copilot-msg-assistant {
    background: var(--color-bg-muted);
    color: var(--color-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.copilot-msg-user {
    background: var(--color-primary);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Copilot Tooltip (contextual discovery bubble) */
.copilot-tooltip {
    position: fixed;
    background: var(--color-bg);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    padding-right: 28px;
    box-shadow: var(--shadow-lg);
    max-width: 280px;
    z-index: 10001;
    pointer-events: auto;
    font-size: 13px;
    line-height: 1.5;
    animation: tooltipFadeIn 0.25s ease-out;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.copilot-tooltip-message {
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.copilot-tooltip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.copilot-tooltip-followup {
    background: var(--color-primary-bg);
    border: 1px solid var(--color-primary-border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-primary);
    cursor: pointer;
    transition: all var(--ease-default);
    font-family: inherit;
}

.copilot-tooltip-followup:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.copilot-tooltip-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--color-text-faint);
    cursor: pointer;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: color var(--ease-default);
}

.copilot-tooltip-dismiss:hover {
    color: var(--color-text);
}

/* Copilot Typing Indicator */
.copilot-typing {
    padding: 8px 14px !important;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 0;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--color-text-faint);
    border-radius: var(--radius-full);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Chat Message Fade-In (universal) */
.copilot-msg,
.claude-message,
.or-chat-msg,
.cg-chat-msg,
.ad-writer-msg,
.sandbox-chat-msg {
    animation: msgFadeIn 0.3s ease-out;
}

@keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.copilot-input-area {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 10px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
    border-radius: 0 0 14px 14px;
}

.copilot-input {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.2s ease;
    max-height: 80px;
}

.copilot-input:focus {
    border-color: rgba(79, 70, 229, 0.4);
}

.copilot-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copilot-send:not(:disabled) {
    background: var(--color-primary);
}

.copilot-send:not(:disabled):hover {
    background: var(--color-primary-hover);
}

/* Tab Content */
.tab-content {
    flex: 1;
    overflow: hidden;
}

.tab-panel {
    display: none;
    height: 100%;
}

.tab-panel.active {
    display: block;
}

/* ==================== */
/* ChatGPT Tab Styles */
/* ==================== */
.chatgpt-layout {
    display: flex;
    height: 100%;
}

.chatgpt-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f3f4f6 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    transform: translateX(2px);
}

.sidebar-heading {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding: 0 12px;
}

.conversation-item {
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 4px;
    border-left: 3px solid transparent;
}

.conversation-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-left-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateX(2px);
}

.conv-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 4px;
}

.conv-preview {
    display: block;
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatgpt-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: #666;
    padding: 60px 40px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(79, 70, 229, 0.02) 100%);
    border-radius: 24px;
    border: 1px dashed rgba(79, 70, 229, 0.2);
    max-width: 500px;
}

.empty-state::before {
    content: '💬';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.empty-state h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 16px;
    color: #888;
    line-height: 1.6;
}

.active-tab-label {
    font-size: 12px;
    color: #4f46e5;
}

.chat-input-container {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.chat-input-wrapper,
.agent-input-wrapper,
.notification-input {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    border-radius: 24px;
    padding: 14px 18px 12px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-input-wrapper:focus-within,
.agent-input-wrapper:focus-within,
.notification-input:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(79, 70, 229, 0.1);
}

.chat-input,
.agent-input,
.reply-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 0 10px 0;
    font-size: 16px;
    outline: none;
    color: var(--color-text);
}

.chat-input::placeholder,
.agent-input::placeholder,
.reply-input::placeholder {
    color: #6b6b6b;
}

.toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

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

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #6b6b6b;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toolbar-btn:hover {
    color: #333;
}

.toolbar-label {
    font-size: 15px;
    color: #6b6b6b;
    font-weight: 400;
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 8px rgba(79, 70, 229, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.send-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: scale(1.08);
    box-shadow:
        0 4px 12px rgba(79, 70, 229, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.send-btn:active {
    transform: scale(0.95);
}

/* ==================== */
/* Agents Tab Styles */
/* ==================== */
.agents-layout {
    display: flex;
    height: 100%;
}

.agents-sidebar {
    width: 180px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f3f4f6 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    padding: 14px 10px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.agent-item-ava {
    margin-top: auto;
}

/* Scroll indicator for agents sidebar */
.scroll-indicator {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to top, #fafafa 0%, #fafafa 50%, transparent 100%);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 12px;
}

.scroll-indicator span {
    background: var(--color-primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
    animation: pulse 1.5s ease-in-out infinite;
}

.scroll-indicator span::before {
    content: '↓';
    font-size: 16px;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(79, 70, 229, 0.6);
    }
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

.scroll-indicator.hidden {
    display: none;
}

.agent-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    position: relative;
    border: 1px solid transparent;
}

.agent-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateX(3px);
}

.agent-item.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
    border-color: rgba(79, 70, 229, 0.15);
    box-shadow: 0 2px 12px rgba(79, 70, 229, 0.1);
}

.agent-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 36px;
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 0 8px rgba(79, 70, 229, 0.3);
}

/* Placeholder sidebar items */
.agent-item.placeholder-item {
    height: 20px;
    background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 50%, #e5e7eb 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    cursor: default;
    pointer-events: none;
    opacity: 0.5;
    padding: 0;
    margin-bottom: 6px;
}

/* Sidebar separator */
.sidebar-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 10px 8px 14px;
}

/* Business Tools locked panel */
.business-tools-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 48px 40px;
}

.locked-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.locked-ava {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.locked-ava-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.locked-ava-avatar {
    width: 140px;
    height: 172px;
    border-radius: 20px;
    object-fit: cover;
    background: var(--color-bg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 3px solid white;
}

.locked-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.locked-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 28px;
}

.locked-mailing {
    display: flex;
    gap: 10px;
    max-width: 400px;
    width: 100%;
}

.locked-email-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--color-bg);
}

.locked-email-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.locked-email-input::placeholder {
    color: var(--color-text-faint);
}

.locked-join-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    white-space: nowrap;
}

.locked-join-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.locked-join-btn.joined {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    pointer-events: none;
}

.agent-avatar {
    width: 56px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 12px;
}

/* Agent icon (for non-personalized agents like Legal, Leasing, etc.) */
.agent-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    margin-right: 12px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.agent-initial {
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

/* Ava avatar - cropped from bottom for portrait image, shifted right to center face */
.agent-avatar.ava-avatar {
    object-position: 55% top;
}

/* Agent sidebar separator */
.agent-separator {
    display: none;
}

.agent-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
}

.agent-arrow {
    color: #999;
    font-size: 18px;
}

.agents-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.agent-chat {
    flex: 1;
    padding: 24px 40px;
    overflow-y: auto;
}

.agent-conversation {
    display: none;
}

.agent-conversation.active {
    display: block;
}

.message {
    display: flex;
    margin-bottom: 24px;
    max-width: 800px;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.8) 0%, rgba(199, 210, 254, 0.6) 100%);
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.agent-message {
    align-items: flex-start;
}

.message-avatar {
    width: 56px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 16px;
    flex-shrink: 0;
    display: none; /* Hide avatars in chat messages */
}

/* Message icon (for non-personalized agents in chat) */
.message-icon {
    width: 48px;
    height: 48px;
    display: none; /* Hide icons in chat messages */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--color-bg-muted);
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
}

.agent-message .message-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 16px 20px;
    border-radius: 4px 18px 18px 18px;
    font-size: 14px;
    flex: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.agent-message .message-content p {
    margin-bottom: 12px;
}

.agent-message .message-content p:last-child {
    margin-bottom: 0;
}

.agent-message .message-content ul {
    margin: 8px 0 12px 20px;
}

.agent-message .message-content li {
    margin-bottom: 6px;
}

.agent-message .message-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--color-text);
}

.document-link {
    display: inline-block;
    background: #f0f0f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    margin: 8px 0;
}

.listing-preview {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.listing-preview h4 {
    margin-top: 0 !important;
}

.listing-preview p {
    font-size: 13px;
    color: #555;
}

.agent-input-container {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.agent-claude-input {
    padding: 16px 40px 24px;
    border-top: 1px solid #e5e5e5;
}

.agent-claude-input .claude-input-wrapper {
    max-width: none;
}

/* ==================== */
/* Control Center Tab Styles */
/* ==================== */
.control-center-layout {
    height: 100%;
    overflow-y: auto;
    padding: 24px 40px;
    background: #fafafa;
}

.notifications-feed {
    max-width: 800px;
    margin: 0 auto;
}

.notification-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.notification-card[data-status="acknowledged"] {
    opacity: 0.45;
    background: #f8f8f8;
}

.notification-card[data-status="approved"] {
    border-left: 4px solid #22c55e;
}

.notification-card[data-status="snoozed"] {
    opacity: 0.5;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.notification-agent {
    display: flex;
    align-items: center;
}

.notification-avatar {
    width: 52px;
    height: 65px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 16px;
}

.notification-meta {
    display: flex;
    flex-direction: column;
}

.notification-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.notification-time {
    font-size: 12px;
    color: #888;
}

.acknowledge-btn {
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.acknowledge-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.acknowledge-btn.acknowledged {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.notification-body {
    margin-bottom: 16px;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.notification-body p {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.notification-video {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: inline-block;
}

.notification-video video {
    display: block;
    width: auto;
    height: 250px;
    border-radius: 8px;
}

.notification-list {
    margin: 12px 0 12px 20px;
    font-size: 14px;
    color: #555;
}

.notification-list li {
    margin-bottom: 6px;
}

.suggested-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.steps-label {
    font-size: 13px;
    font-weight: 500;
    color: #4f46e5;
    font-style: italic;
}

.see-more-btn {
    border: none;
    background: transparent;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.see-more-btn:hover {
    color: #555;
}

.steps-content {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8f8f8;
    border-radius: 8px;
}

.steps-content.hidden {
    display: none;
}

.steps-content ul {
    margin: 0 0 0 16px;
    font-size: 13px;
    color: #555;
}

.steps-content li {
    margin-bottom: 6px;
}

.notification-input {
    margin-bottom: 12px;
}

.notification-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-action {
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.notification-action:hover {
    background: #f0f0f0;
}

.notification-action.clicked {
    background: var(--color-primary);
    color: white;
}

.notification-action[data-action="approve"].clicked {
    background: #22c55e;
}

.notification-action[data-action="snooze"].clicked {
    background: #f59e0b;
}

.notification-action[data-action="escalate"].clicked {
    background: #ef4444;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.25),
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .chatgpt-sidebar {
        width: 200px;
    }
    .agents-sidebar {
        width: 160px;
    }

    .agent-name {
        font-size: 12px;
    }

    .agent-avatar {
        width: 40px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

    .logo-container,
    .header-spacer {
        display: none;
    }

    .chatgpt-sidebar,
    .agents-sidebar {
        display: none;
    }

    .chat-messages,
    .agent-chat {
        padding: 16px;
    }

    .control-center-layout {
        padding: 16px;
    }

    .notification-actions {
        flex-direction: column;
    }

    .notification-action {
        width: 100%;
        text-align: center;
    }
}

/* ==================== */
/* Summary Tab Styles */
/* ==================== */
.summary-layout {
    height: 100%;
    overflow-y: auto;
    padding: 24px 40px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f0f2f5 100%);
}

.summary-feed {
    max-width: 800px;
    margin: 0 auto;
}

.summary-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.summary-card:hover {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.summary-agent {
    display: flex;
    align-items: center;
}

.summary-agent-inline {
    gap: 10px;
}

.summary-agent-inline .summary-count {
    margin-top: 0;
}

.summary-avatar {
    width: 45px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 14px;
}

/* Summary icon (for non-personalized agents in Control Center) */
.summary-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    margin-right: 14px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.summary-meta {
    display: flex;
    flex-direction: column;
}

.summary-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.summary-count {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.discuss-btn {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(79, 70, 229, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.discuss-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 12px rgba(79, 70, 229, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.discuss-btn:active {
    transform: translateY(0);
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-item {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 14px 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.summary-item:hover {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.summary-item[data-status="acknowledged"] {
    opacity: 0.5;
    background: #f0f0f0;
}

.summary-item[data-status="acknowledged"] .item-acknowledge {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.urgent-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: urgentPulse 2s ease-in-out infinite;
}

@keyframes urgentPulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
    }
}

.item-summary {
    flex: 1;
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
}

.item-expand {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.item-expand.expanded {
    transform: rotate(180deg);
    color: #4f46e5;
}

.item-expand:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
}

.item-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-details.hidden {
    display: none;
}

.item-details p {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Acknowledge button in header */
.item-acknowledge-btn {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #777;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
    font-weight: 400;
}

.item-acknowledge-btn:hover {
    color: #666;
}

.item-acknowledge-btn.clicked {
    color: #22c55e;
}

/* Action icons in expanded area */
.item-actions {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

.item-action {
    padding: 6px 12px;
    border: none;
    background: transparent !important;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 6px;
}

.item-action:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08) !important;
}

.item-action.clicked {
    color: #4f46e5;
}

.item-action[data-action="approve"]:hover {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.08) !important;
}

.item-action[data-action="approve"].clicked {
    color: #22c55e;
}

.item-action[data-action="todo"]:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.08) !important;
}

.item-action[data-action="todo"].clicked {
    color: #f59e0b;
}

.item-action[data-action="escalate"]:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08) !important;
}

.item-action[data-action="escalate"].clicked {
    color: #ef4444;
}

/* Responsive for Summary */
@media (max-width: 768px) {
    .summary-layout {
        padding: 16px;
    }

    .summary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .discuss-btn {
        width: 100%;
    }
}

/* ==================== */
/* Discuss Conversation Styles */
/* ==================== */
.discuss-section {
    margin-top: 24px;
    padding-top: 16px;
}

.discuss-separator {
    text-align: center;
    margin-bottom: 20px;
    color: #888;
    font-size: 13px;
    position: relative;
}

.discuss-separator span {
    background: #f9f9f9;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.discuss-separator::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd 20%, #ddd 80%, transparent);
}

.discuss-item-block {
    margin-bottom: 16px;
}

.discuss-item-block.hidden {
    display: none;
}

.discuss-item-block .item-detail-text {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    padding: 10px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 3px solid #ddd;
}

.discuss-ack-container {
    display: flex;
    justify-content: flex-start;
    padding-left: 92px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.discuss-ack-btn {
    padding: 10px 20px;
    border: 2px solid #22c55e;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #22c55e;
    cursor: pointer;
    transition: all 0.2s ease;
}

.discuss-ack-btn:hover:not(:disabled) {
    background: #22c55e;
    color: white;
}

.discuss-ack-btn.acknowledged {
    background: #22c55e;
    color: white;
    cursor: default;
}

.discuss-ack-btn:disabled {
    opacity: 0.7;
}

.discuss-completion {
    margin-top: 16px;
}

.discuss-completion.hidden {
    display: none;
}

.discuss-completion .message-content {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

/* ==================== */
/* All Caught Up Message */
/* ==================== */
.all-caught-up {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.caught-up-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.all-caught-up h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.all-caught-up p {
    font-size: 15px;
    color: #666;
}

/* ==================== */
/* Summary Item Time Labels */
/* ==================== */
.item-time {
    font-size: 12px;
    color: #888;
    font-weight: 500;
    margin-right: 6px;
}

.discuss-time {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

/* ==================== */
/* Summary Item Steps */
/* ==================== */
.item-steps {
    margin-top: 12px;
    padding-left: 18px;
    list-style-type: none;
}

.item-steps li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

.item-steps li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #888;
}

/* ==================== */
/* Discuss Steps in Agent Chat */
/* ==================== */
.discuss-steps {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6366f1;
}

.discuss-steps .steps-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.discuss-steps ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: none;
}

.discuss-steps li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

.discuss-steps li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: 600;
}

/* ==================== */
/* Summary Separator for Ava */
/* ==================== */
.summary-separator {
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db 10%, #d1d5db 90%, transparent);
    margin: 24px 0;
}

/* ==================== */
/* Agent Video in Conversation */
/* ==================== */
.agent-video {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    display: inline-block;
}

.agent-video video {
    display: block;
    width: auto;
    height: 250px;
    border-radius: 8px;
}

/* ==================== */
/* Ava Avatar Styles (all locations) */
/* ==================== */
.notification-avatar.ava-avatar,
.summary-avatar.ava-avatar,
.message-avatar.ava-avatar {
    object-position: 55% top;
}

/* ==================== */
/* Premium Polish & Micro-interactions */
/* ==================== */

/* ---- Avatar Depth System ----
   All assistant avatars get consistent depth treatment.
   RULE: Every avatar image in the app should have:
   - A subtle multi-layer box-shadow for lift
   - A thin semi-transparent white border for definition
   - border-radius appropriate to its size
   Apply .avatar-polished class or use these selectors directly.
   When adding new chat tools or avatars, include them here.
   ---------------------------------------- */

/* Large avatars (80px+): welcome screens, splash, upsell */
.empty-state-avatar,
.sandbox-idea-avatar,
.export-upsell-avatar {
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.10),
        0 1px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Medium avatars (36–56px): inline chat messages, review panels */
.chat-assistant-avatar,
.review-assistant-avatar,
.sandbox-msg-avatar {
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.09),
        0 0.5px 2px rgba(0, 0, 0, 0.05);
}

/* Compliance guide inline avatar (slightly smaller) */
.cg-chat-msg-assistant .chat-assistant-avatar {
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.09),
        0 0.5px 2px rgba(0, 0, 0, 0.05);
}

/* Smooth page load animation */
.app-container {
    animation: containerFadeIn 0.5s ease-out;
}

@keyframes containerFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar ring glow on hover */
.agent-avatar,
.message-avatar,
.summary-avatar {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agent-item:hover .agent-avatar {
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2);
}

/* Status indicator badges */
.summary-count {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(79, 70, 229, 0.05) 100%);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    color: #4f46e5;
    font-size: 12px;
}

/* Active conversation indicator */
.agent-item.active .agent-name {
    color: #4338ca;
    font-weight: 600;
}

/* Toolbar button hover effects */
.toolbar-btn {
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.toolbar-btn:hover {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    transform: scale(1.1);
}

/* Message entrance animation */
.message {
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar section dividers with gradient */
.sidebar-section {
    position: relative;
}

.sidebar-section::after {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.06) 20%, rgba(0, 0, 0, 0.06) 80%, transparent);
    margin: 16px 0 8px;
}

.sidebar-section:last-child::after {
    display: none;
}

/* Card stacking effect on Control Center */
.summary-card:nth-child(1) { animation-delay: 0s; }
.summary-card:nth-child(2) { animation-delay: 0.05s; }
.summary-card:nth-child(3) { animation-delay: 0.1s; }
.summary-card:nth-child(4) { animation-delay: 0.15s; }
.summary-card:nth-child(5) { animation-delay: 0.2s; }
.summary-card:nth-child(6) { animation-delay: 0.25s; }

.summary-card {
    animation: cardSlide 0.4s ease-out backwards;
}

@keyframes cardSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Time labels with subtle styling */
.item-time {
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Logo subtle hover */
.logo {
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Hide all scrollbars while keeping scroll functionality */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Selection highlight color */
::selection {
    background: rgba(79, 70, 229, 0.2);
    color: inherit;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid rgba(79, 70, 229, 0.5);
    outline-offset: 2px;
}

/* Subtle text shadow for headers */
.summary-name,
.agent-name,
.onboarding-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Document/listing preview polish */
.listing-preview {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.document-link {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.document-link:hover {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    transform: translateX(3px);
}

/* Video container polish */
.agent-video,
.notification-video {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.agent-video video,
.notification-video video {
    border-radius: 12px;
}

/* ==================== */
/* Claude.ai-Style Chat UI */
/* ==================== */
.claude-ui {
    display: flex;
    height: calc(100vh - 80px);
    background: #f4f5f7;
}

/* Sidebar */
.claude-sidebar {
    width: 260px;
    background: #f4f5f7;
    display: flex;
    flex-direction: column;
    padding: 14px 12px 6px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.claude-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 24px;
}

.claude-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text);
    font-family: inherit;
    transition: background 0.15s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}

.claude-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.claude-sidebar-item svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.claude-sidebar-recents {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 12px;
}

.claude-recents-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-faint);
    padding: 8px 12px 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.claude-recent-item {
    padding: 8px 12px;
    font-size: 14px;
    color: var(--color-text);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claude-recent-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.claude-recent-item.active {
    background: rgba(0, 0, 0, 0.08);
    font-weight: 500;
}

.claude-recent-item .recent-delete-btn {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
}

.claude-recent-item:hover .recent-delete-btn {
    display: flex;
}

.claude-recent-item .recent-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.claude-recent-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.claude-recent-item .recent-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Agent Pin Buttons use .agent-pin-btn styles below */

/* Agent Pin Buttons */
.agent-pin-btn {
    margin-left: auto;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--color-text-faint);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.agent-item:hover .agent-pin-btn {
    opacity: 0.5;
}

.agent-item:hover .agent-pin-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-secondary);
}

.agent-pin-btn.pinned {
    opacity: 1;
    color: var(--color-primary);
}

.agent-pin-btn.pinned:hover {
    background: rgba(99, 102, 241, 0.08);
}

.pinned-separator {
    height: 1px;
    background: rgba(99, 102, 241, 0.15);
    margin: 6px 8px 10px;
}

/* Sidebar User Menu (bottom) */
.claude-sidebar-user {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 8px;
    margin-top: 4px;
}

.sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: background 0.15s;
}

.sidebar-user-trigger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-text-muted, #6b7280);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.sidebar-user-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text, #1a1a2e);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-chevron {
    flex-shrink: 0;
    color: var(--color-text-faint, #9ca3af);
    transition: transform 0.2s ease;
}

.sidebar-user-trigger[aria-expanded="true"] .sidebar-user-chevron {
    transform: rotate(180deg);
}

/* User Menu Popover */
.user-menu-popover {
    position: absolute;
    bottom: 70px;
    left: 12px;
    right: 12px;
    background: var(--color-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 6px;
    z-index: 200;
    animation: userMenuSlideUp 0.15s ease;
}

.user-menu-popover.hidden {
    display: none;
}

@keyframes userMenuSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-menu-email {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-divider {
    height: 1px;
    background: var(--color-border, #e5e7eb);
    margin: 4px 0;
}

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

.user-menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.user-menu-item svg {
    flex-shrink: 0;
    opacity: 0.55;
}

.user-menu-item:hover svg {
    opacity: 0.85;
}

.user-menu-item--danger {
    color: var(--color-error, #dc2626);
}

.user-menu-item--danger:hover {
    background: rgba(220, 38, 38, 0.06);
}

/* Settings Overlay Panels */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: settingsFadeIn 0.2s ease;
}

.settings-overlay.hidden {
    display: none;
}

@keyframes settingsFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.settings-panel {
    background: var(--color-bg, #ffffff);
    border-radius: 16px;
    width: 440px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.settings-panel--wide {
    width: 540px;
}

.settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.settings-panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    margin: 0;
}

.settings-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    font-size: 20px;
    color: var(--color-text-muted, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.settings-panel-close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.settings-panel-body {
    padding: 20px 24px 24px;
}

.settings-section {
    margin-bottom: 20px;
}

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

.settings-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text, #1a1a2e);
    margin-bottom: 6px;
}

.settings-value {
    font-size: 14px;
    color: var(--color-text-secondary, #374151);
}

.settings-hint {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 8px;
}

.settings-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--color-border-strong, #d1d5db);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text, #1a1a2e);
    background: var(--color-bg, #ffffff);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.settings-input:focus {
    outline: none;
    border-color: var(--color-primary, #4f46e5);
}

.settings-select {
    padding: 8px 12px;
    border: 1.5px solid var(--color-border-strong, #d1d5db);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text, #1a1a2e);
    background: var(--color-bg, #ffffff);
}

.settings-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    white-space: nowrap;
}

.settings-btn--primary {
    background: var(--color-primary, #4f46e5);
    color: white;
}

.settings-btn--primary:hover {
    background: var(--color-primary-hover, #4338ca);
}

.settings-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-btn--secondary {
    background: transparent;
    border: 1.5px solid var(--color-border-strong, #d1d5db);
    color: var(--color-text-secondary, #374151);
}

.settings-btn--secondary:hover {
    border-color: var(--color-primary, #4f46e5);
    color: var(--color-primary, #4f46e5);
}

.settings-feedback {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.settings-feedback.hidden {
    display: none;
}

.settings-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.settings-feedback.error {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
}

/* Tone selector buttons */
.settings-tone-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-tone-btn {
    padding: 6px 14px;
    border: 1.5px solid var(--color-border-strong, #d1d5db);
    border-radius: 20px;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    color: var(--color-text-secondary, #374151);
    cursor: pointer;
    transition: all 0.15s;
}

.settings-tone-btn:hover {
    border-color: var(--color-primary, #4f46e5);
    color: var(--color-primary, #4f46e5);
}

.settings-tone-btn.active {
    background: var(--color-primary, #4f46e5);
    border-color: var(--color-primary, #4f46e5);
    color: white;
}

/* Avatar preview + grid in My Settings */
/* Account profile row */
.account-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.account-avatar-wrap {
    flex-shrink: 0;
}

.account-profile-info {
    flex: 1;
    min-width: 0;
}

.account-profile-info .settings-value {
    font-weight: 500;
    font-size: 15px;
}

.settings-avatar-preview {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.settings-avatar-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.settings-avatar-grid.hidden {
    display: none;
}

.settings-avatar-grid .avatar-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.settings-avatar-grid .avatar-option:hover,
.settings-avatar-grid .avatar-option.selected {
    border-color: var(--color-primary, #4f46e5);
}

.settings-avatar-grid .avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Invite form */
.invite-form-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.invite-name-row {
    display: flex;
    gap: 8px;
}

.invite-name-row .settings-input {
    flex: 1;
}

.invite-action-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.invite-action-row .settings-select {
    flex: 1;
}

.invite-link-display {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.invite-link-display.hidden {
    display: none;
}

.invite-link-display .settings-input {
    flex: 1;
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
}

/* Members list */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-bg-muted, #e5e7eb);
}

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

.member-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text, #1a1a2e);
}

.member-email {
    font-size: 12px;
    color: var(--color-text-muted, #6b7280);
}

.member-role-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-muted, #6b7280);
    text-transform: capitalize;
}

/* Pending invite row */
.pending-invite-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.08);
    font-size: 13px;
}

/* ==================== */
/* View System          */
/* ==================== */
.claude-view {
    display: none;
    height: 100%;
}

.claude-view.active {
    display: flex;
    flex-direction: column;
}

/* Chat List & Projects List */
/* Chats View Header */
.chats-view-header {
    padding: 28px 40px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chats-view-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 16px;
}

.chats-search-wrapper {
    position: relative;
    margin-bottom: 14px;
}

.chats-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-faint);
    pointer-events: none;
}

.chats-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text);
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.chats-search-input:focus {
    border-color: #c4a47c;
}

.chats-search-input::placeholder {
    color: #b4b4b4;
}

.chats-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
}

.chats-toolbar.hidden {
    display: none;
}

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

.chats-select-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #c4a47c;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    padding: 0;
}

.chats-select-btn:hover {
    color: #a8875c;
}

.chats-select-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
}

.chats-select-toolbar.hidden {
    display: none;
}

.chats-select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.chats-select-all-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #c4a47c;
}

.chats-select-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chats-delete-selected-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #ef4444;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
}

.chats-delete-selected-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.08);
}

.chats-delete-selected-btn:disabled {
    color: #d1d5db;
    cursor: default;
}

.chats-cancel-select-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
}

.chats-cancel-select-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Select mode checkboxes on chat items */
.chat-item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #c4a47c;
    flex-shrink: 0;
}

.claude-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 40px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.claude-list-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.claude-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

/* Empty state for lists */
.claude-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    gap: 8px;
}

.claude-list-empty p {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}

.claude-list-empty span {
    font-size: 14px;
    color: var(--color-text-faint);
}

/* Chat list items */
.claude-chat-list-item {
    display: flex;
    align-items: center;
    padding: 18px 16px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.claude-chat-list-item:last-child {
    border-bottom: none;
}

.claude-chat-list-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.claude-chat-list-item .chat-item-content {
    flex: 1;
    min-width: 0;
}

.claude-chat-list-item .chat-item-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claude-chat-list-item .chat-item-meta {
    font-size: 13px;
    color: var(--color-text-faint);
    margin-top: 4px;
}

/* Project list items */
.claude-project-list-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

.claude-project-list-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.14);
}

.claude-project-list-item .project-item-icon {
    flex-shrink: 0;
    color: #7c3aed;
    margin-top: 2px;
}

.claude-project-list-item .project-item-content {
    flex: 1;
    min-width: 0;
}

.claude-project-list-item .project-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.claude-project-list-item .project-item-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.claude-project-list-item .project-item-meta {
    font-size: 12px;
    color: var(--color-text-faint);
    margin-top: 6px;
    display: flex;
    gap: 10px;
}

.claude-project-list-item .project-item-delete {
    display: none;
    background: none;
    border: none;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1;
}

.claude-project-list-item:hover .project-item-delete {
    display: flex;
}

.claude-project-list-item .project-item-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* New Project Button */
.claude-new-project-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #7c3aed;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.claude-new-project-btn:hover {
    background: #6d28d9;
}

/* ==================== */
/* Project Modal        */
/* ==================== */
.project-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    backdrop-filter: blur(2px);
}

.project-modal.hidden {
    display: none;
}

.project-modal-content {
    background: white;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.project-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 6px;
}

.project-modal-desc {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 20px;
}

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

.project-modal-label .optional-label {
    font-weight: 400;
    color: var(--color-text-faint);
}

.project-modal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.project-modal-input:focus {
    border-color: #7c3aed;
}

.project-modal-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 20px;
    outline: none;
    resize: vertical;
    min-height: 70px;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.project-modal-textarea:focus {
    border-color: #7c3aed;
}

.project-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.project-modal-cancel {
    padding: 9px 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: white;
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.project-modal-cancel:hover {
    background: var(--color-bg-muted);
}

.project-modal-create {
    padding: 9px 18px;
    border: none;
    border-radius: 10px;
    background: #7c3aed;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, opacity 0.15s;
}

.project-modal-create:hover {
    background: #6d28d9;
}

.project-modal-create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Project Banner in Chat */
.chat-project-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    align-self: flex-start;
}

/* Main Chat Area */
.claude-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fafbfc;
    border-radius: 16px 0 0 0;
    position: relative;
    overflow: hidden;
}

.claude-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 40px 40px 20px;
    display: flex;
    flex-direction: column;
}

.claude-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 40px;
}

.claude-logo-mark {
    display: none;
}

.empty-state-avatar {
    width: 144px;
    height: 176px;
    border-radius: 22px;
    object-fit: cover;
    margin-bottom: 10px;
    /* Shadow & border applied via Avatar Depth System */
}

.empty-state-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.claude-empty-state h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.claude-quick-actions {
    display: flex;
    gap: 12px;
}

.claude-quick-action {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.claude-quick-action:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Messages */
.claude-message {
    max-width: 900px;
    width: 100%;
    margin: 0 auto 20px;
    display: flex;
    animation: messageSlide 0.3s ease-out;
}

.claude-message.user {
    justify-content: flex-end;
}

.claude-message.user .claude-message-content {
    background: #e3e5e8;
    padding: 12px 18px;
    border-radius: 20px 20px 4px 20px;
    font-size: 15px;
    color: var(--color-text);
    max-width: 75%;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.claude-message.assistant {
    align-items: flex-start;
    gap: 12px;
}

.chat-assistant-avatar {
    width: 36px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.claude-message.assistant .claude-message-content {
    background: transparent;
    padding: 4px 0;
    font-size: 15px;
    flex: 1;
    line-height: 1.65;
    color: var(--color-text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.claude-message.assistant .claude-message-content p {
    margin-bottom: 14px;
}

.claude-message.assistant .claude-message-content p:last-child {
    margin-bottom: 0;
}

.claude-message.assistant .claude-message-content code {
    background: rgba(0, 0, 0, 0.07);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
}

.claude-message.assistant .claude-message-content pre {
    background: #2b2b2b;
    color: #e0ddd5;
    padding: 16px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
    white-space: pre;
}

.claude-message.assistant .claude-message-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    white-space: pre;
}

.claude-message.assistant .claude-message-content ul,
.claude-message.assistant .claude-message-content ol {
    margin: 8px 0 14px 20px;
}

.claude-message.assistant .claude-message-content li {
    margin-bottom: 6px;
}

.claude-message.assistant .claude-message-content strong {
    font-weight: 600;
    color: #111827;
}

/* Message Action Icons — always visible, under assistant response */
.claude-message-actions {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    opacity: 1;
}

.msg-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: var(--color-text-faint);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.msg-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

/* Follow-up Suggestion Chips */
.followup-suggestions {
    max-width: 900px;
    width: 100%;
    margin: -8px auto 20px;
    padding-left: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    animation: messageSlide 0.3s ease-out;
}

.followup-chip {
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.followup-chip:hover {
    background: var(--color-bg-muted);
    border-color: rgba(79, 70, 229, 0.3);
    color: #4f46e5;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.1);
}

.followup-chip:active {
    transform: scale(0.97);
}

/* Typing Indicator */
.claude-typing-indicator {
    display: flex;
    gap: 5px;
    padding: 8px 0;
    align-items: center;
}

.claude-typing-indicator span {
    width: 7px;
    height: 7px;
    background: #9ca3af;
    border-radius: 50%;
    opacity: 0.5;
    animation: typingDot 1.4s ease-in-out infinite;
}

.claude-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.claude-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
    30% { opacity: 1; transform: scale(1.15); }
}

/* Input Area */
.claude-input-container {
    padding: 0 40px 28px;
    background: transparent;
}

.claude-input-wrapper {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    border-radius: 24px;
    padding: 14px 18px 10px 18px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.claude-input-wrapper:focus-within {
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(79, 70, 229, 0.1);
}

.claude-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0 0 8px 0;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    color: var(--color-text);
    resize: none;
    max-height: 200px;
    line-height: 1.5;
}

.claude-input::placeholder {
    color: #6b6b6b;
}

.claude-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.claude-attach-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b6b6b;
    transition: all 0.15s ease;
}

.claude-attach-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.claude-model-label {
    font-size: 13px;
    color: #6b6b6b;
    font-weight: 500;
    margin-right: 10px;
}

.claude-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #1a1a1a;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.claude-send-btn:hover:not(:disabled) {
    background: #333333;
    transform: scale(1.05);
}

.claude-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.claude-send-btn:disabled {
    background: #c5c8cc;
    cursor: not-allowed;
    color: #ffffff;
}

/* Error */
.claude-error {
    color: #b44;
    font-size: 13px;
    padding: 8px 14px;
    background: rgba(180, 68, 68, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(180, 68, 68, 0.12);
    margin-top: 8px;
    text-align: center;
    max-width: 720px;
    width: 100%;
    align-self: center;
}

/* ==================== */
/* Tools Grid & Tool Panels */
/* ==================== */
.tools-grid-view {
    padding: 8px 0;
}

.tools-grid-view.hidden {
    display: none;
}

.tools-grid-header {
    margin-bottom: 24px;
}

.tools-grid-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.tools-grid-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 20px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.tool-card-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.tool-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.tool-card:active {
    transform: translateY(0);
}

.tool-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #4f46e5;
}

.tool-card-content {
    flex: 1;
    min-width: 0;
}

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

.tool-card-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    align-self: center;
}

.tool-card-badge[data-status="live"] {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tool-card-badge[data-status="coming-soon"] {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.tool-card-badge[data-status="in-development"] {
    background: var(--color-primary-bg);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.tool-card-badge[data-status="exploring"] {
    background: #f0f9ff;
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.2);
}

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

.tool-card-arrow {
    font-size: 22px;
    color: var(--color-text-faint);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.tool-card:hover .tool-card-arrow {
    transform: translateX(3px);
    color: #4f46e5;
}

/* Placeholder Tool Cards */
.tool-card-placeholder {
    min-height: 92px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e9ecf0 40%, #f3f4f6 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.tool-card-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: placeholderShimmer 2.5s ease-in-out infinite;
}

@keyframes placeholderShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Tool Panel */
.tool-panel {
    animation: stepFadeIn 0.3s ease-out;
}

.tool-panel.hidden {
    display: none;
}

.tool-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    padding-right: 150px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 101;
}

.tool-back-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.tool-panel-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    flex: 1;
}

.tool-panel-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
}

/* Tool Status Badges */
.tool-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    z-index: 5;
    transition: opacity 0.15s ease;
}

.tool-status-badge:hover {
    opacity: 0.8;
}

.tool-status-badge[data-status="live"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.tool-status-badge[data-status="coming-soon"] {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.tool-status-badge[data-status="in-development"] {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: #4f46e5;
}

.tool-status-badge[data-status="exploring"] {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #0284c7;
}

/* Status Dropdown */
.status-dropdown {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 6px;
    z-index: 9999;
    min-width: 160px;
    animation: dropdownFade 0.12s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s ease;
}

.status-dropdown-item:hover {
    background: #F3F4F6;
}

.status-dropdown-item.active {
    background: #EEF2FF;
    color: #4F46E5;
}

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

.status-dropdown-dot[data-status="live"] {
    background: #10B981;
}

.status-dropdown-dot[data-status="coming-soon"] {
    background: #F59E0B;
}

.status-dropdown-dot[data-status="in-development"] {
    background: var(--color-primary);
}

.status-dropdown-dot[data-status="exploring"] {
    background: #0EA5E9;
}

/* Tool Panel Overview */
.tool-panel-overview {
    margin-bottom: 20px;
    transition: opacity 0.25s ease, max-height 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

.tool-panel-overview.tool-active-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    pointer-events: none;
}

.tool-overview-section {
    padding: 20px 24px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    text-align: center;
}

.tool-overview-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-faint);
    margin: 0 0 8px;
}

.tool-overview-section p {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* ================================================ */
/* Unified Prompt Bar — matches copilot input style */
/* ================================================ */
.tool-prompt-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
}

.tool-prompt-bar textarea,
.tool-prompt-bar input[type="text"] {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13.5px;
    font-family: inherit;
    resize: none;
    background: var(--color-bg);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    max-height: 100px;
    color: var(--color-text);
}

.tool-prompt-bar textarea::placeholder,
.tool-prompt-bar input[type="text"]::placeholder {
    color: var(--color-text-faint);
}

.tool-prompt-bar textarea:focus,
.tool-prompt-bar input[type="text"]:focus {
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.tool-prompt-bar .prompt-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tool-prompt-bar .prompt-send-btn:not(:disabled) {
    background: var(--color-primary);
}

.tool-prompt-bar .prompt-send-btn:not(:disabled):hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

.tool-prompt-bar .prompt-send-btn:disabled {
    cursor: not-allowed;
}

/* Coming Soon Tool Body */
.tool-coming-soon-body {
    text-align: center;
    padding: 48px 24px 40px;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    border: 2px dashed #e5e7eb;
    border-radius: 16px;
}

.tool-coming-soon-avatar {
    width: 72px;
    height: 88px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.tool-coming-soon-body p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 20px;
    line-height: 1.6;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.tool-coming-soon-body .build-in-sandbox-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #4f46e5;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.tool-coming-soon-body .build-in-sandbox-cta:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

/* ==================== */
/* Owner Reports Tool   */
/* ==================== */

.or-state { width: 100%; }
.or-state.hidden { display: none; }

/* Upload State */
.or-upload-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 340px;
}

.or-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 40px;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    background: rgba(249, 250, 251, 0.6);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
    max-width: 500px;
}

.or-dropzone:hover, .or-dropzone.dragover {
    border-color: var(--color-primary);
    background: rgba(238, 242, 255, 0.5);
}

.or-dropzone h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1F2937;
    margin: 4px 0 0 0;
}

.or-dropzone p {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
    max-width: 360px;
    margin: 0;
}

.or-browse-btn {
    margin-top: 8px;
    padding: 8px 20px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.or-browse-btn:hover {
    background: #4F46E5;
}

/* Processing State */
.or-processing-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 340px;
}

.or-processing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.or-processing-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.or-processing-content p {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
}

.or-spin {
    animation: or-spin 1.5s linear infinite;
}

@keyframes or-spin {
    100% { transform: rotate(360deg); }
}

.or-progress-bar {
    width: 280px;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
}

.or-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4f46e5, #818CF8);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.or-progress-label {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 500;
}

/* Owner Report QA — Action buttons in main Chat */
.or-chat-action-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.or-chat-action-btn {
    padding: 6px 14px;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
    color: #4F46E5;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.or-chat-action-btn:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
}

.or-chat-action-btn.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #fff;
    border-color: transparent;
}

.or-chat-action-btn.primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

/* Owner Report Error State */
.or-error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    gap: 12px;
}

.or-error-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.or-error-content p {
    font-size: 13px;
    color: var(--color-text-secondary);
    max-width: 400px;
    line-height: 1.5;
    margin: 0;
}

/* ==================== */
/* Compliance Guide     */
/* ==================== */

.cg-state { width: 100%; }
.cg-state.hidden { display: none; }

/* Library State */
.cg-overview { margin-bottom: 20px; }

.cg-doc-library {
    background: #FAFBFC;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

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

.cg-doc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.cg-doc-count {
    font-size: 12px;
    color: #6B7280;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 10px;
    border-radius: 10px;
}

.cg-doc-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.cg-doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 13px;
}

.cg-doc-icon {
    color: #4f46e5;
    flex-shrink: 0;
}

.cg-doc-name {
    flex: 1;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.cg-doc-meta {
    font-size: 11px;
    color: #9CA3AF;
    white-space: nowrap;
}

.cg-doc-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    flex-shrink: 0;
}

.cg-doc-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.cg-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.cg-upload-btn:hover {
    background: #F9FAFB;
    border-color: rgba(0, 0, 0, 0.2);
}

.cg-doc-source {
    font-size: 11px;
    color: #9CA3AF;
    font-style: italic;
}

/* Sessions */
/* Start Session */
.cg-start-area {
    display: flex;
    justify-content: center;
}

.cg-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.cg-start-btn:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Chat State (split pane) */
.cg-chat-state {
    display: flex;
    gap: 0;
    height: calc(100vh - 200px);
    min-height: 480px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.cg-chat-state.hidden { display: none; }

/* Chat Panel (left) */
.cg-chat-panel {
    width: 65%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    background: #FAFBFC;
}

.cg-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    gap: 10px;
}

.cg-end-session-btn {
    font-size: 12px;
    color: #6B7280;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cg-end-session-btn:hover {
    background: #F9FAFB;
    color: var(--color-text-secondary);
}

.cg-chat-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    flex: 1;
    text-align: center;
}

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

.cg-chat-msg {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #1F2937;
}

.cg-chat-msg-assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 4px 12px 12px 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cg-chat-msg-assistant .chat-assistant-avatar {
    width: 32px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.cg-chat-msg-content {
    flex: 1;
    min-width: 0;
}

.cg-disclaimer {
    text-align: center;
    padding: 20px 28px;
    margin: 8px auto 12px;
    max-width: 520px;
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
    background: #F9FAFB;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
}

.cg-disclaimer strong {
    color: var(--color-text-secondary);
}

.cg-chat-msg-user {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
    border-radius: 12px 4px 12px 12px;
}

.cg-chat-msg .cg-citation {
    display: inline-block;
    background: rgba(99, 102, 241, 0.08);
    color: #4F46E5;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 2px;
}

.cg-chat-msg .cg-citation:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* CG chat input — now inherits from .tool-prompt-bar */
.cg-chat-input-area { /* layout overridden by .tool-prompt-bar */ }
.cg-chat-input { /* styling inherited from .tool-prompt-bar textarea */ }
.cg-chat-send { /* styling inherited from .tool-prompt-bar .prompt-send-btn */ }

/* Reference Panel (right) */
.cg-ref-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.cg-ref-header {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cg-ref-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.cg-ref-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cg-ref-empty {
    font-size: 13px;
    color: #9CA3AF;
    font-style: italic;
    text-align: center;
    margin-top: 60px;
}

.cg-ref-card {
    background: #FAFBFC;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 3px solid #4f46e5;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.cg-ref-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.cg-ref-card-meta {
    font-size: 11px;
    color: #9CA3AF;
    margin-bottom: 6px;
}

.cg-ref-card-excerpt {
    font-size: 11px;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.06);
    padding: 5px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    line-height: 1.45;
    font-weight: 500;
    word-break: break-word;
}

.cg-ref-card-link {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
    cursor: pointer;
}

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

.cg-ref-card-link-disabled {
    color: #9CA3AF;
    cursor: default;
    font-weight: 500;
}

.cg-ref-card-link-disabled:hover {
    text-decoration: none;
}

/* Typing indicator */
.cg-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 4px 12px 12px 12px;
}

.cg-typing span {
    width: 6px;
    height: 6px;
    background: #9CA3AF;
    border-radius: 50%;
    animation: cg-bounce 1.4s infinite ease-in-out;
}

.cg-typing span:nth-child(2) { animation-delay: 0.2s; }
.cg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes cg-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

/* ==================== */
/* Tool Spec Sheet      */
/* ==================== */

/* Button on tool panel to open spec */
.view-spec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.view-spec-btn:hover {
    background: var(--color-bg-subtle);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Spec sheet full-page view */
.tool-spec-sheet {
    display: none;
    flex-direction: column;
    gap: 0;
    animation: stepFadeIn 0.3s ease-out;
}

.tool-spec-sheet.active {
    display: flex;
}

.spec-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 101;
}

.spec-back-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

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

.spec-header h2 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.spec-header-actions {
    display: flex;
    gap: 8px;
}

.spec-save-btn,
.spec-submit-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.2s ease;
}

.spec-save-btn {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--color-text-secondary);
}

.spec-save-btn:hover {
    background: var(--color-bg-muted);
}

.spec-submit-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.spec-submit-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
}

/* Spec sections */
.spec-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-right: 8px;
}

.spec-section {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    transition: border-color 0.2s ease;
}

.spec-section:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

.spec-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.spec-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-faint);
    margin: 0;
}

.spec-edit-btn {
    background: none;
    border: none;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-family: inherit;
}

.spec-edit-btn:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.06);
}

.spec-section-content {
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.spec-section-content p {
    margin: 0;
}

.spec-section-content.empty {
    color: #c4c4c4;
    font-style: italic;
}

/* Editing state */
.spec-section.editing {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.spec-section.editing .spec-edit-btn {
    display: none;
}

.spec-edit-area {
    display: none;
}

.spec-section.editing .spec-section-content {
    display: none;
}

.spec-section.editing .spec-edit-area {
    display: block;
}

.spec-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text);
    line-height: 1.6;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.spec-edit-textarea:focus {
    border-color: var(--color-primary);
}

.spec-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    justify-content: flex-end;
}

.spec-edit-save,
.spec-edit-cancel {
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.15s ease;
}

.spec-edit-save {
    background: var(--color-primary);
    color: #fff;
}

.spec-edit-save:hover {
    background: var(--color-primary-hover);
}

.spec-edit-cancel {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
}

.spec-edit-cancel:hover {
    background: #e5e7eb;
}

/* Spec metadata footer */
.spec-meta {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 12px;
    color: var(--color-text-faint);
    flex-wrap: wrap;
}

.spec-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Change log */
.spec-changelog-btn {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    padding: 0;
}

.spec-changelog-btn:hover {
    text-decoration: underline;
}

.spec-changelog {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--color-bg-subtle);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.spec-changelog.open {
    display: block;
}

.spec-changelog-entry {
    font-size: 12px;
    color: var(--color-text-muted);
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.spec-changelog-entry:last-child {
    border-bottom: none;
}

/* Submit review modal */
.spec-submit-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 300;
    align-items: center;
    justify-content: center;
}

.spec-submit-overlay.active {
    display: flex;
}

.spec-submit-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.spec-submit-modal h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 8px;
}

.spec-submit-modal .spec-submit-intro {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 20px;
}

.spec-submit-changes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.spec-submit-change {
    padding: 10px 14px;
    background: var(--color-bg-subtle);
    border-radius: 8px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.spec-submit-change strong {
    color: var(--color-text);
}

.spec-submit-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.spec-submit-confirm,
.spec-submit-cancel {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.2s ease;
}

.spec-submit-confirm {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: #fff;
}

.spec-submit-cancel {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
}

.open-in-sandbox-btn {
    padding: 7px 16px;
    border: 1px solid rgba(79, 70, 229, 0.25);
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 8px;
}

.open-in-sandbox-btn:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.tool-panel-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.tool-instructions h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.tool-instructions ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

.tool-instructions ol li {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.tool-instructions p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.tool-tips {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 16px 20px;
}

.tool-tips h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.tool-tips ul {
    padding-left: 18px;
    margin: 0;
}

.tool-tips li {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Upload Dropzone */
.tool-upload-area {
    margin-top: 4px;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: var(--color-text-faint);
}

.upload-dropzone:hover {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, #f5f3ff 0%, #eef2ff 100%);
    color: #4f46e5;
}

.upload-dropzone.drag-over {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    transform: scale(1.01);
}

.dropzone-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 14px;
    margin-bottom: 4px;
}

.dropzone-subtext {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.dropzone-formats {
    font-size: 12px;
    color: var(--color-text-faint);
}

/* Photo Editor States */
/* ==================== */
.photo-state {
    display: none;
    animation: stepFadeIn 0.3s ease-out;
}

.photo-state.active {
    display: block;
}

/* Upload State */

/* Photo Disclaimer */
.photo-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 16px;
}

.photo-disclaimer svg {
    flex-shrink: 0;
    color: #d97706;
    margin-top: 1px;
}

.photo-disclaimer p {
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
    margin: 0;
}

/* Editor State */
.editor-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.editor-back-btn {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.editor-back-btn:hover:not(:disabled) {
    background: var(--color-bg-muted);
    border-color: var(--color-text-faint);
}

.editor-back-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.editor-header-info {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.editor-header-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

/* Exit Button — subtle, next to Delete */
.editor-exit-btn {
    background: white;
    color: var(--color-text-muted);
    border-color: #d1d5db;
}

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

.editor-filename {
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editor-photo-display {
    position: relative;
    background: var(--color-bg-subtle);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    margin-bottom: 16px;
}

.editor-photo-display canvas {
    max-width: 100%;
    max-height: 450px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.editor-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    z-index: 10;
    overflow: hidden;
    pointer-events: none;
}

.editor-loading-overlay.hidden {
    display: none;
}

/* Subtle rotating edge glow */
.editor-edge-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 2;
    overflow: hidden;
}

.editor-edge-glow::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        transparent 60%,
        rgba(99, 102, 241, 0.12) 75%,
        rgba(99, 102, 241, 0.2) 80%,
        rgba(99, 102, 241, 0.12) 85%,
        transparent 100%
    );
    animation: editorEdgeSpin 3s linear infinite;
}

/* Mask out the interior so only the edge shows */
.editor-edge-glow::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: transparent;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0);
}

@keyframes editorEdgeSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Centered logo during photo editing */
.editor-loading-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0.55;
    z-index: 3;
    animation: editorLogoPulse 2s ease-in-out infinite;
}

@keyframes editorLogoPulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.65; transform: translate(-50%, -50%) scale(1.05); }
}

/* Typewriter suggestion cursor effect */
#edit-prompt-input.typewriter-active::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

#edit-prompt-input.typewriter-active {
    caret-color: #4f46e5;
}

/* Editor Action Buttons */
/* Edit Panel */
.edit-panel {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.edit-panel.hidden {
    display: none;
}

/* Edit Chat History */
.edit-chat-history {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.edit-chat-history:empty {
    display: none;
}

.edit-chat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.edit-chat-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.edit-chat-prompt {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.4;
}

.edit-chat-prompt strong {
    color: #4f46e5;
    font-weight: 600;
}

/* Edit Input Row — now inherits from .tool-prompt-bar */
.edit-input-row {
    margin-bottom: 12px;
    border-top: none;
    padding: 0;
    background: transparent;
}

.edit-input-row input { /* styling inherited from .tool-prompt-bar input */ }

/* Edit Bottom Actions — Apply | Next | Undo | Delete | (auto-spacer) | Exit */
.edit-bottom-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-action-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* Apply Button — primary CTA */
.edit-apply-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
}

.edit-apply-btn:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.edit-apply-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Next Button — secondary indigo outline */
.edit-next-btn {
    background: white;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.edit-next-btn:hover {
    background: var(--color-primary-bg);
    border-color: #a5b4fc;
}

/* Undo Button — subtle secondary */
.edit-undo-btn {
    background: white;
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}

.edit-undo-btn:hover:not(:disabled) {
    border-color: var(--color-text-faint);
    background: var(--color-bg-subtle);
}

.edit-undo-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Delete Button — red, pushed to the right */
.edit-delete-btn {
    background: white;
    color: #dc2626;
    border-color: #fecaca;
}

.edit-delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* Complete State */
.complete-header {
    margin-bottom: 20px;
}

.complete-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.complete-summary {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 500;
    background: var(--color-bg-muted);
    padding: 10px 14px;
    border-radius: 8px;
    margin-top: 8px;
}

.complete-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.complete-grid:empty {
    display: none;
}

.complete-thumb-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.complete-thumb-card canvas {
    width: 100%;
    display: block;
}

.complete-thumb-label {
    padding: 6px 10px;
    font-size: 11px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.complete-thumb-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.complete-thumb-badge.edited {
    background: #ede9fe;
    color: #4f46e5;
}

.complete-thumb-badge.skipped {
    background: var(--color-bg-muted);
    color: var(--color-text-muted);
}

/* Complete Action Buttons */
.complete-actions {
    display: flex;
    gap: 10px;
}

.complete-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    font-family: inherit;
}

.complete-download-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.complete-download-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.complete-download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.complete-startover-btn {
    background: white;
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}

.complete-startover-btn:hover {
    border-color: var(--color-text-faint);
    background: var(--color-bg-subtle);
}

/* Re-edit button on thumbnails */
.complete-thumb-reedit {
    display: block;
    width: 100%;
    padding: 6px 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.complete-thumb-reedit:hover {
    background: var(--color-primary-bg);
}

/* Complete Upsell Overlay */
.complete-upsell-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: upsellFadeIn 0.25s ease-out;
}

.complete-upsell-overlay.hidden {
    display: none;
}

@keyframes upsellFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.complete-upsell-modal {
    background: white;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: upsellSlideUp 0.3s ease-out;
}

@keyframes upsellSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.complete-upsell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 14px;
    color: #4f46e5;
    margin-bottom: 16px;
}

.complete-upsell-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.complete-upsell-text {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 24px 0;
}

.complete-upsell-text strong {
    color: #4f46e5;
    font-weight: 600;
}

.complete-upsell-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.complete-upsell-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: none;
    width: 100%;
}

.complete-upsell-yes {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.complete-upsell-yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.complete-upsell-no {
    background: transparent;
    color: var(--color-text-faint);
    font-weight: 500;
}

.complete-upsell-no:hover {
    color: var(--color-text-muted);
}

/* Ad Description Writer States */
.ad-writer-state {
    display: none;
}

.ad-writer-state.active {
    display: block;
}

.ad-writer-placeholder {
    font-size: 14px;
    color: var(--color-text-faint);
    text-align: center;
    padding: 40px 20px;
}

/* Start State — existing listing prompt */
.ad-writer-start-card {
    text-align: center;
    padding: 40px 20px;
}

.ad-writer-start-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 14px;
    color: #4f46e5;
    margin-bottom: 16px;
}

.ad-writer-start-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.ad-writer-start-text {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 auto 20px auto;
    max-width: 380px;
}

.ad-writer-start-input-row {
    display: flex;
    gap: 8px;
    max-width: 420px;
    margin: 0 auto 16px auto;
}

.ad-writer-start-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ad-writer-start-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ad-writer-start-submit {
    padding: 10px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.ad-writer-start-submit:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ad-writer-start-skip {
    background: var(--color-bg);
    border: 1.5px solid #d1d5db;
    color: #4b5563;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    padding: 10px 24px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ad-writer-start-skip:hover {
    color: #1f2937;
    border-color: var(--color-text-faint);
    background: var(--color-bg-subtle);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* Ad Writer Upload State */
.ad-writer-upload-card {
    text-align: center;
    padding: 30px 20px;
}

.ad-writer-upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--color-text-faint);
    max-width: 420px;
    margin: 0 auto 16px auto;
}

.ad-writer-upload-dropzone:hover {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, #f5f3ff 0%, #eef2ff 100%);
    color: #4f46e5;
}

.ad-writer-upload-dropzone.drag-over {
    border-color: var(--color-primary);
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4f46e5;
    transform: scale(1.01);
}

.ad-writer-upload-dropzone .dropzone-text {
    margin-top: 10px;
}

/* File List */
.ad-writer-file-list {
    max-width: 420px;
    margin: 0 auto 16px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.ad-writer-file-list:empty {
    display: none;
}

.ad-writer-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--color-primary-bg);
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    font-size: 12px;
    color: #4338ca;
    font-weight: 500;
}

.ad-writer-file-remove {
    background: none;
    border: none;
    color: #a5b4fc;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-weight: 700;
}

.ad-writer-file-remove:hover {
    color: #4f46e5;
}

/* Upload Actions */
.ad-writer-upload-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ad-writer-upload-continue {
    padding: 10px 28px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.ad-writer-upload-continue:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.ad-writer-upload-continue:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Ad Writer Chat State */
.ad-writer-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

/* Ad Output Area */
.ad-writer-ad-output {
    background: var(--color-bg-subtle);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    animation: stepFadeIn 0.3s ease-out;
}

.ad-writer-ad-output.hidden {
    display: none;
}

.ad-writer-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ad-writer-ad-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.ad-writer-ad-actions {
    display: flex;
    gap: 8px;
}

.ad-writer-ad-copy,
.ad-writer-ad-done {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    border: 1px solid transparent;
}

.ad-writer-ad-copy {
    background: white;
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}

.ad-writer-ad-copy:hover {
    background: var(--color-bg-muted);
    border-color: var(--color-text-faint);
}

.ad-writer-ad-done {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
}

.ad-writer-ad-done:hover {
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.ad-writer-ad-textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    resize: vertical;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.ad-writer-ad-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Chat Messages */
.ad-writer-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 400px;
}

.ad-writer-msg {
    display: flex;
    gap: 10px;
    max-width: 88%;
    animation: stepFadeIn 0.2s ease-out;
}

.ad-writer-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ad-writer-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.ad-writer-msg-content {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.ad-writer-msg.assistant .ad-writer-msg-content {
    background: var(--color-bg-muted);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

.ad-writer-msg.user .ad-writer-msg-content {
    background: var(--color-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ad-writer-msg-content p {
    margin: 0 0 8px 0;
}

.ad-writer-msg-content p:last-child {
    margin-bottom: 0;
}

.ad-writer-msg-content strong {
    font-weight: 600;
}

/* Ad Writer Chat Input — now inherits from .tool-prompt-bar */
.ad-writer-input-area {
    margin-top: auto;
}
.ad-writer-input { /* styling inherited from .tool-prompt-bar textarea */ }
.ad-writer-send-btn { /* styling inherited from .tool-prompt-bar .prompt-send-btn */ }

/* Typing Indicator */
.ad-writer-typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

.ad-writer-typing span {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: adWriterBounce 1.4s infinite both;
}

.ad-writer-typing span:nth-child(2) { animation-delay: 0.2s; }
.ad-writer-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes adWriterBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .claude-sidebar {
        display: none;
    }
    .claude-main {
        border-radius: 0;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== */
/* GB Studio Tab        */
/* ==================== */

.sandbox-layout {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sandbox-view {
    display: none;
    height: 100%;
}

.sandbox-view.active {
    display: flex;
    flex-direction: column;
}

/* Idea Prompt View */
.sandbox-idea-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 80px 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sandbox-idea-avatar {
    width: 80px;
    height: 98px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 16px;
    /* Shadow & border applied via Avatar Depth System */
}

.sandbox-idea-header {
    text-align: center;
    margin-bottom: 32px;
}

.sandbox-idea-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.sandbox-idea-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
}

.sandbox-idea-input-area {
    width: 100%;
}

.sandbox-idea-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    background: linear-gradient(180deg, #f6f7f8 0%, #eff0f2 100%);
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    color: var(--color-text);
    box-sizing: border-box;
}

.sandbox-idea-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sandbox-idea-input::placeholder {
    color: var(--color-text-faint);
}

.sandbox-idea-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.sandbox-start-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.sandbox-start-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

.sandbox-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sandbox-gallery-btn {
    padding: 12px 24px;
    background: white;
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.sandbox-gallery-btn:hover {
    background: #f5f3ff;
    border-color: var(--color-primary);
}

/* Workspace View */
.sandbox-workspace-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    padding-right: 180px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    flex-shrink: 0;
}

.sandbox-back-btn {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.sandbox-workspace-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sandbox-workspace-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.sandbox-save-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.sandbox-save-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
}

.sandbox-save-draft-btn {
    padding: 8px 16px;
    background: white;
    color: var(--color-text-muted);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.sandbox-save-draft-btn:hover {
    background: var(--color-bg-muted);
    color: var(--color-text);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Split Pane */
.sandbox-split-pane {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sandbox-chat-panel {
    width: 32%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.sandbox-resize-handle {
    width: 6px;
    cursor: col-resize;
    background: transparent;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sandbox-resize-handle:hover,
.sandbox-resize-handle.active {
    background: rgba(79, 70, 229, 0.15);
}

.sandbox-preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    background: var(--color-bg);
}

/* Chat Messages */
.sandbox-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Studio chat input — now inherits from .tool-prompt-bar */
.sandbox-chat-input-area { /* layout overridden by .tool-prompt-bar */ }
.sandbox-chat-input { /* styling inherited from .tool-prompt-bar textarea */ }
.sandbox-chat-send-btn { /* styling inherited from .tool-prompt-bar .prompt-send-btn */ }

/* Studio Chat Bubbles */
.sandbox-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: messageSlide 0.3s ease-out;
}

.sandbox-msg-avatar {
    width: 32px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
}

.sandbox-msg {
    max-width: 90%;
    animation: messageSlide 0.3s ease-out;
}

.sandbox-msg-row .sandbox-msg {
    animation: none;
    max-width: calc(100% - 42px);
}

@keyframes messageSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sandbox-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.8) 0%, rgba(199, 210, 254, 0.6) 100%);
    padding: 10px 14px;
    border-radius: 14px 14px 4px 14px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.sandbox-msg-assistant {
    align-self: flex-start;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    padding: 12px 16px;
    border-radius: 4px 14px 14px 14px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    line-height: 1.6;
}

.sandbox-msg-assistant pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 14px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
    margin: 8px 0;
    line-height: 1.5;
}

.sandbox-msg-assistant code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
}

.sandbox-msg-assistant p {
    margin: 6px 0;
}

.sandbox-msg-assistant strong {
    font-weight: 600;
}

/* Preview Panel */
.sandbox-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--color-bg-subtle);
    flex-shrink: 0;
}

.sandbox-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sandbox-refresh-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--color-text-muted);
}

.sandbox-refresh-btn:hover {
    background: var(--color-bg-muted);
    color: #4f46e5;
}

.sandbox-preview-iframe {
    flex: 1;
    border: none;
    width: 100%;
    background: white;
}

/* Gallery View */
.sandbox-gallery-header {
    padding: 24px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.sandbox-gallery-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.sandbox-gallery-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.sandbox-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
}

.sandbox-gallery-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sandbox-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(79, 70, 229, 0.2);
}

.sandbox-gallery-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.sandbox-gallery-card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sandbox-gallery-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-faint);
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.sandbox-gallery-card-author {
    font-weight: 500;
    color: #4f46e5;
}

.sandbox-gallery-empty {
    text-align: center;
    padding: 60px 32px;
    color: var(--color-text-faint);
    font-size: 15px;
}

.sandbox-gallery-empty.hidden {
    display: none;
}

/* Save Modal */
.sandbox-save-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.sandbox-save-modal.hidden {
    display: none;
}

.sandbox-save-modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.sandbox-save-modal-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
}

.sandbox-save-field {
    margin-bottom: 16px;
}

.sandbox-save-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

.sandbox-save-field input,
.sandbox-save-field textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease;
    color: var(--color-text);
    box-sizing: border-box;
}

.sandbox-save-field input:focus,
.sandbox-save-field textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.sandbox-save-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.sandbox-save-confirm-btn {
    flex: 1;
    padding: 11px 20px;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sandbox-save-confirm-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

.sandbox-save-cancel-btn {
    padding: 11px 20px;
    background: white;
    color: var(--color-text-muted);
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sandbox-save-cancel-btn:hover {
    background: var(--color-bg-muted);
}

/* Studio Typing Indicator */
.sandbox-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.sandbox-typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: sandboxTypingBounce 1.4s infinite ease-in-out both;
}

.sandbox-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.sandbox-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.sandbox-typing-indicator span:nth-child(3) { animation-delay: 0s; }

@keyframes sandboxTypingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .sandbox-split-pane {
        flex-direction: column;
    }
    .sandbox-chat-panel {
        width: 100% !important;
        min-width: 0;
        height: 50%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    }
    .sandbox-resize-handle {
        display: none;
    }
    .sandbox-preview-panel {
        min-width: 0;
    }
    .sandbox-gallery-grid {
        grid-template-columns: 1fr;
    }
    .sandbox-idea-container {
        padding: 40px 20px;
    }
}


