:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --text: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --primary: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: #ede9fe;
    --primary-subtle: #f5f3ff;
    --success: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --warning-dark: #92400e;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --danger-dark: #991b1b;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --info-dark: #1e40af;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.04);
    --transition: 0.15s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.header-brand svg {
    width: 28px;
    height: 28px;
}

.header-brand span {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    font-size: 13px;
    color: var(--text-secondary);
}

.header-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.header-link:hover {
    color: var(--primary);
}

.header-logout {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.header-logout:hover {
    color: var(--text);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

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

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border-color: var(--border);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--bg);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: var(--radius);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

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

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group {
    margin-bottom: 16px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 20px 24px;
}

/* ============================================
   BADGES & PILLS
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.badge-info {
    background: var(--info-light);
    color: var(--info-dark);
}

.badge-neutral {
    background: var(--border-light);
    color: var(--text-secondary);
}

/* ============================================
   SCORE BADGE
   ============================================ */

.score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.score-lg {
    width: 64px;
    height: 64px;
    font-size: 22px;
}

.score-high { background: var(--success-light); color: var(--success-dark); }
.score-mid { background: var(--warning-light); color: var(--warning-dark); }
.score-low { background: var(--danger-light); color: var(--danger-dark); }

/* ============================================
   STATUS BADGES
   ============================================ */

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-uploading, .status-processing, .status-transcribing,
.status-detecting_type, .status-analyzing, .status-transcribed,
.status-fetching_fathom, .status-downloading_zoom,
.status-analyzing_prior_calls {
    background: var(--info-light);
    color: var(--info-dark);
}
.status-uploading::before, .status-processing::before,
.status-transcribing::before, .status-detecting_type::before,
.status-analyzing::before, .status-transcribed::before,
.status-fetching_fathom::before, .status-downloading_zoom::before,
.status-analyzing_prior_calls::before {
    background: var(--info);
}

.status-completed {
    background: var(--success-light);
    color: var(--success-dark);
}
.status-completed::before { background: var(--success); }

.status-error {
    background: var(--danger-light);
    color: var(--danger-dark);
}
.status-error::before { background: var(--danger); }

/* ============================================
   PRIORITY BADGES
   ============================================ */

.priority {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.priority-high { background: var(--danger-light); color: var(--danger-dark); }
.priority-medium { background: var(--warning-light); color: var(--warning-dark); }
.priority-low { background: var(--border-light); color: var(--text-muted); }

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
}

.login-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

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

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    font-family: inherit;
}

.google-btn:hover {
    background: var(--bg);
    box-shadow: var(--shadow);
}

.google-btn svg {
    width: 18px;
    height: 18px;
}

.login-footer {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   UPLOAD WIZARD
   ============================================ */

.wizard {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.wizard-header {
    text-align: center;
    margin-bottom: 28px;
}

.wizard-header h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.wizard-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.wizard-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: var(--border-light);
    color: var(--text-muted);
    transition: all var(--transition);
}

.wizard-step.active .wizard-step-num {
    background: var(--primary);
    color: white;
}

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

.wizard-step.completed .wizard-step-num {
    background: var(--success-light);
    color: var(--success-dark);
}

.wizard-step-divider {
    width: 32px;
    height: 1px;
    background: var(--border);
}

.wizard-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

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

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

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

/* Step 1: File/URL input */
.upload-zone {
    max-width: 520px;
    margin: 0 auto;
}

.upload-zone .form-input {
    text-align: center;
    font-size: 14px;
}

.upload-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px auto;
    max-width: 300px;
    color: var(--text-muted);
    font-size: 13px;
}

.upload-divider::before,
.upload-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.drop-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.drop-area:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.drop-area.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.drop-area-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.drop-area-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.drop-area-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.file-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--primary-subtle);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    margin-top: 12px;
}

.file-selected-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-selected-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    line-height: 1;
}

.file-selected-remove:hover {
    color: var(--danger);
}

/* Step 2: Call details */
.details-grid {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Mode toggle */
.mode-toggle {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.mode-toggle-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-family: inherit;
}

.mode-toggle-btn.active {
    background: var(--primary);
    color: white;
}

/* Advanced context */
.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
}

.advanced-toggle:hover {
    color: var(--text-secondary);
}

.advanced-toggle-arrow {
    transition: transform var(--transition);
    font-size: 10px;
}

.advanced-toggle-arrow.open {
    transform: rotate(90deg);
}

.advanced-content {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.advanced-content.open {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   UPLOAD PROGRESS
   ============================================ */

.upload-progress {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.upload-progress.visible {
    display: flex;
}

/* ============================================
   REVIEWS LIST
   ============================================ */

.reviews-section {
    margin: 24px 0 48px;
}

.reviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.reviews-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.tab-group {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.tab-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.review-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.review-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.review-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.review-card-info {
    min-width: 0;
}

.review-card-info h3 {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 450px;
    margin-bottom: 2px;
}

.review-card-info .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.review-card-info .meta span:not(:last-child)::after {
    content: "\00b7";
    margin-left: 4px;
}

.review-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-delete-card {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
}

.review-card:hover .btn-delete-card {
    opacity: 1;
}

.btn-delete-card:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ============================================
   REVIEW DETAIL — HERO
   ============================================ */

.review-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin: 24px 0 16px;
    box-shadow: var(--shadow-sm);
}

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

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

.review-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.3;
    cursor: text;
    padding: 2px 0;
    border-bottom: 1px dashed transparent;
    transition: border-color var(--transition);
}

.review-title:hover {
    border-bottom-color: var(--border);
}

.review-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
}

.review-hero-score {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

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

.review-summary {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
}

.review-context {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 13px;
    margin-top: 12px;
}

.review-context-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
}

/* ============================================
   REVIEW DETAIL — SECTIONS & TABS
   ============================================ */

.section-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}

.section-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

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

.section-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

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

/* ============================================
   REVIEW DETAIL — SECTION CARDS
   ============================================ */

.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.section h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

/* Strengths & Weaknesses */
.sw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.strength-item, .weakness-item, .action-item {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    gap: 10px;
    line-height: 1.5;
}

.strength-item::before {
    content: "+";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

.weakness-item::before {
    content: "\2013";
    color: var(--danger);
    font-weight: 700;
    flex-shrink: 0;
}

/* Category scores */
.category-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-card {
    padding: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: border-color var(--transition);
}

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

.category-card h4 {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.category-card h4 span:last-child {
    font-weight: 600;
    color: var(--text-secondary);
}

.score-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.category-card ul {
    list-style: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.category-card li {
    padding: 2px 0;
    line-height: 1.5;
}

/* Timestamped notes */
.note {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.note:last-child { border-bottom: none; }

.note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
}

.note-timestamp {
    color: var(--primary);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 12px;
}

.note-sentiment {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.note-sentiment.positive { background: var(--success); }
.note-sentiment.negative { background: var(--danger); }
.note-sentiment.neutral { background: var(--text-muted); }

.note-quote {
    font-style: italic;
    color: var(--text-muted);
    font-size: 13px;
    margin: 4px 0;
    padding-left: 14px;
    border-left: 2px solid var(--border);
    line-height: 1.5;
}

.note-feedback {
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.5;
}

/* Action items */
.action-item {
    align-items: flex-start;
}

.action-item .priority {
    margin-top: 2px;
}

/* Watch moments */
.watch-moments {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.watch-moments h3 {
    border-bottom-color: rgba(252, 211, 77, 0.4);
}

.watch-moment {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.watch-moment:last-child {
    margin-bottom: 0;
}

.watch-moment-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.watch-moment-time {
    font-weight: 700;
    color: #b45309;
    font-size: 14px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.watch-moment-reason {
    font-weight: 500;
    font-size: 14px;
}

.watch-moment-detail {
    font-size: 13px;
    color: #78716c;
    line-height: 1.5;
}

/* ============================================
   OBJECTION HANDLING (AIDE)
   ============================================ */

.aide-scores {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.aide-score-card {
    flex: 1;
    min-width: 140px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    text-align: center;
}

.aide-score-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.aide-score-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.objection-card {
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.objection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.aide-circles {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.aide-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.aide-circle-pass {
    background: var(--success-light);
    color: var(--success-dark);
}

.aide-circle-fail {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.objection-quote {
    font-style: italic;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.objection-feedback {
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================
   SENTIMENT ANALYSIS
   ============================================ */

.sentiment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sentiment-card {
    flex: 1;
    min-width: 220px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.sentiment-provider {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sentiment-speaker {
    margin-bottom: 10px;
    font-size: 13px;
}

.sentiment-speaker-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.sentiment-bar {
    display: flex;
    gap: 1px;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}

.sentiment-bar-pos { background: var(--success); }
.sentiment-bar-neu { background: #d1d5db; }
.sentiment-bar-neg { background: var(--danger); }

.sentiment-labels {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.sentiment-emotions {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   CALL DYNAMICS
   ============================================ */

.dynamics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dynamics-card {
    flex: 1;
    min-width: 180px;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius);
}

.dynamics-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.dynamics-pct {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.dynamics-detail {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
}

/* ============================================
   AI CHAT
   ============================================ */

.chat-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 12px;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.chat-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.chat-bubble-user {
    background: var(--primary);
    color: white;
    margin-left: auto;
}

.chat-bubble-assistant {
    background: var(--bg);
    border: 1px solid var(--border-light);
}

/* Chat markdown rendering */
.chat-bubble-assistant h1, .chat-bubble-assistant h2, .chat-bubble-assistant h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 4px;
    line-height: 1.4;
}

.chat-bubble-assistant h1:first-child,
.chat-bubble-assistant h2:first-child,
.chat-bubble-assistant h3:first-child {
    margin-top: 0;
}

.chat-bubble-assistant p {
    margin: 6px 0;
}

.chat-bubble-assistant p:first-child { margin-top: 0; }
.chat-bubble-assistant p:last-child { margin-bottom: 0; }

.chat-bubble-assistant ul, .chat-bubble-assistant ol {
    margin: 4px 0;
    padding-left: 20px;
}

.chat-bubble-assistant li {
    margin: 2px 0;
}

.chat-bubble-assistant code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 13px;
}

.chat-bubble-assistant blockquote {
    border-left: 3px solid var(--border);
    margin: 6px 0;
    padding: 2px 10px;
    color: var(--text-secondary);
    font-style: italic;
}

.chat-bubble-assistant strong {
    font-weight: 600;
}

/* Typing indicator */
.chat-typing {
    padding: 12px 18px;
    width: fit-content;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.2s ease-in-out infinite;
}

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

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

@keyframes typingBounce {
    0%, 100% { opacity: 0.3; transform: translateY(0) scale(0.85); }
    50% { opacity: 1; transform: translateY(-6px) scale(1.1); }
}

.chat-input-row {
    display: flex;
    gap: 8px;
}

.chat-input-row .form-input {
    flex: 1;
}

/* ============================================
   BACK LINK
   ============================================ */

.back-link {
    margin: 16px 0 0;
}

.back-link a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition);
}

.back-link a:hover {
    color: var(--primary);
}

/* ============================================
   PROCESSING BANNER
   ============================================ */

.processing-banner {
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin: 12px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.processing-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.progress-label {
    font-size: 12px;
    color: var(--info-dark);
    text-align: right;
}

.banner-info {
    background: var(--info-light);
    border: 1px solid #93c5fd;
}

.banner-warning {
    background: var(--warning-light);
    border: 1px solid #fcd34d;
}

.banner-error {
    background: var(--danger-light);
    border: 1px solid #fca5a5;
}

.banner-prior {
    background: var(--info-light);
    border: 1px solid #93c5fd;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* ============================================
   PRIOR REVIEWS
   ============================================ */

.prior-review {
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.prior-review:last-child {
    margin-bottom: 0;
}

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

.prior-review-link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.prior-review-link:hover {
    text-decoration: underline;
}

/* ============================================
   COLLAPSIBLE (replaces raw <details>)
   ============================================ */

.collapsible {
    margin-top: 10px;
}

.collapsible summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.collapsible summary::-webkit-details-marker {
    display: none;
}

.collapsible summary::before {
    content: "\25B8";
    font-size: 11px;
    transition: transform var(--transition);
}

.collapsible[open] summary::before {
    transform: rotate(90deg);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

/* ============================================
   PROFILES
   ============================================ */

.profiles-header {
    margin: 24px 0 20px;
}

.profiles-header h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.profiles-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 48px;
}

a.profile-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

a.profile-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d1d5db;
}

.profile-card-avatar, .profile-avatar-lg {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    flex-shrink: 0;
}

.profile-card-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.profile-avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 22px;
}

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

.profile-card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-card-info .meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.profile-card-info .meta span:not(:last-child)::after {
    content: "\00b7";
    margin-left: 4px;
}

.profile-card .score {
    margin-left: auto;
    flex-shrink: 0;
}

/* Profile Detail Page */
.profile-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin: 12px 0 16px;
    box-shadow: var(--shadow-sm);
}

.profile-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.profile-hero-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.profile-name {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.profile-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.profile-hero-score {
    flex-shrink: 0;
}

.profile-chart-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.profile-chart-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.score-chart {
    width: 100%;
}

.score-chart canvas {
    width: 100%;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Stage breakdown bars */
.stage-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stage-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stage-bar-label {
    font-size: 13px;
    font-weight: 500;
    width: 140px;
    flex-shrink: 0;
}

.stage-bar-track {
    flex: 1;
    height: 8px;
    background: var(--border-light);
    border-radius: 4px;
    overflow: hidden;
}

.stage-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.6s ease;
    min-width: 8px;
}

.stage-bar-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 28px;
    text-align: right;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container { padding: 0 16px; }

    .category-grid, .sw-grid { grid-template-columns: 1fr; }

    .review-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .review-card-right { width: 100%; justify-content: flex-end; }
    .review-card-info h3 { max-width: 100%; }

    .review-hero-top { flex-direction: column; }
    .review-hero-score { width: 100%; justify-content: space-between; }

    .wizard { padding: 20px; }
    .details-row { grid-template-columns: 1fr; }

    .dynamics-grid { flex-direction: column; }
    .sentiment-grid { flex-direction: column; }

    .aide-scores { flex-direction: column; }

    .profile-stats-grid { grid-template-columns: 1fr; }
    .profile-hero-top { flex-direction: column; align-items: flex-start; }
    .profile-hero-info { flex-direction: column; text-align: center; width: 100%; }
    .profile-hero-score { width: 100%; display: flex; flex-direction: column; align-items: center; }
    .stage-bar-label { width: 100px; }
}
