/* CloserCoach - Live Coaching Styles with Roleplay Support */

:root {
    --primary: #0f766e;
    --primary-light: #14b8a6;
    --primary-dark: #115e59;
    --accent: #0ea5e9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --navy: #0f172a;
    --navy-light: #1e293b;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--slate-100);
    color: var(--navy);
    min-height: 100vh;
}

.app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* ============================
   SIDEBAR (dark theme — kept)
   ============================ */
.sidebar {
    background: var(--navy-light);
    border-right: 1px solid var(--slate-700);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--slate-700);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.sidebar-logo .icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.sidebar-logo h1 {
    font-size: 1.15rem;
    font-weight: 700;
}

.nav-menu {
    flex: 1;
    padding: 20px 16px;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--slate-500);
    padding: 0 12px;
    margin-bottom: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--slate-400);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.nav-item:hover { background: var(--slate-800); color: var(--white); }
.nav-item.active { background: var(--primary); color: var(--white); }

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--slate-700);
}

.user-card { display: flex; align-items: center; gap: 12px; }

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--slate-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--slate-300);
}

.user-name { font-weight: 600; font-size: 0.85rem; color: var(--white); }
.user-role { color: var(--slate-500); font-size: 0.75rem; }

/* ============================
   MAIN CONTENT (light theme)
   ============================ */
.main {
    background: var(--slate-50);
    overflow-y: auto;
    max-height: 100vh;
    color: var(--navy);
}

/* Setup Panel */
.setup-panel {
    background: var(--slate-50);
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.setup-header { margin-bottom: 32px; }
.setup-title h1 { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.setup-title p { color: var(--slate-500); font-size: 1rem; }

.setup-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.setup-form-container {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Mode Selector */
.mode-selector {
    margin-bottom: 28px;
}

.mode-selector h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--navy);
}

.mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mode-option { cursor: pointer; }
.mode-option input { display: none; }

.mode-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 12px;
    transition: all 0.2s;
    text-align: center;
}

.mode-option input:checked + .mode-card {
    border-color: var(--primary);
    background: rgba(15, 118, 110, 0.05);
}

.mode-card:hover {
    border-color: var(--slate-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mode-icon { font-size: 2rem; margin-bottom: 10px; }
.mode-title { font-weight: 600; font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.mode-desc { font-size: 0.8rem; color: var(--slate-500); }

/* Call Type Options (Web vs Phone) */
.call-type-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.call-type-option { cursor: default; }
.call-type-option input { display: none; }

.call-type-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 10px;
    text-align: left;
}

.call-type-card.active {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.05);
}

.call-type-option input:checked + .call-type-card {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.05);
}

.call-type-icon { font-size: 1.5rem; }
.call-type-title { font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-bottom: 4px; }
.call-type-desc { font-size: 0.7rem; color: var(--slate-500); line-height: 1.3; }

/* Persona Grid */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

.persona-grid::-webkit-scrollbar { width: 6px; }
.persona-grid::-webkit-scrollbar-track { background: var(--slate-100); border-radius: 3px; }
.persona-grid::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }

.persona-card { cursor: pointer; }
.persona-card input { display: none; }

.persona-content {
    padding: 14px;
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 10px;
    transition: all 0.2s;
}

.persona-card input:checked + .persona-content {
    border-color: var(--purple);
    background: rgba(139, 92, 246, 0.05);
}

.persona-content:hover {
    border-color: var(--slate-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.persona-type-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.persona-type-badge.skeptical { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.persona-type-badge.rushed { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.persona-type-badge.price_focused { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.persona-type-badge.technical { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.persona-type-badge.reserved { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.persona-type-badge.hidden_decision_maker { background: rgba(236, 72, 153, 0.1); color: #db2777; }
.persona-type-badge.friendly { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.persona-type-badge.aggressive { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.persona-difficulty {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.persona-difficulty.beginner { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.persona-difficulty.intermediate { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.persona-difficulty.advanced { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

.persona-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.persona-desc {
    font-size: 0.75rem;
    color: var(--slate-500);
    line-height: 1.4;
}

/* Form Elements */
.form-section { margin-bottom: 28px; }
.form-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; color: var(--navy); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--slate-600); font-size: 0.85rem; }

.form-group input,
.form-group textarea,
.form-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--navy);
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--slate-400); }
.form-group textarea { resize: vertical; min-height: 70px; }

.form-select option {
    background: var(--white);
    color: var(--navy);
}

/* Whisper Option */
.whisper-option {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.toggle-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle-switch input { display: none; }

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--slate-300);
    border-radius: 12px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::after { left: 23px; }
.toggle-label { font-weight: 500; color: var(--navy); }
.whisper-note { margin-top: 10px; font-size: 0.8rem; color: var(--slate-500); }

/* Launch Button */
.btn-launch {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
}

.btn-launch:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.3);
}

.btn-launch.roleplay-mode {
    background: linear-gradient(135deg, var(--purple) 0%, #6d28d9 100%);
}

.btn-launch.roleplay-mode:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.btn-launch .btn-icon { font-size: 1.3rem; }
.launch-note { text-align: center; margin-top: 12px; font-size: 0.85rem; color: var(--slate-500); }

/* History Panel */
.history-panel {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.history-panel h3 { font-size: 1rem; font-weight: 600; margin-bottom: 16px; color: var(--navy); }
.no-history { color: var(--slate-500); font-size: 0.9rem; text-align: center; padding: 20px; }
.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--slate-50);
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    transition: all 0.2s;
}

.history-item:hover {
    background: var(--slate-100);
}

.history-name { font-weight: 500; font-size: 0.9rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.history-meta { font-size: 0.75rem; color: var(--slate-500); margin-top: 2px; }
.history-cost { color: var(--primary); margin-left: 8px; font-weight: 600; }

.history-mode-badge { font-size: 0.8rem; }
.history-mode-badge.roleplay { opacity: 0.8; }

/* ============================
   CONNECTING PANEL (light)
   ============================ */
.connecting-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    background: var(--slate-50);
}

.connecting-content { text-align: center; }

.connecting-animation {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    position: relative;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 3px solid var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s ease-out infinite;
}

.pulse-ring:nth-child(2) { animation-delay: 0.5s; }
.pulse-ring:nth-child(3) { animation-delay: 1s; }

.connecting-panel.roleplay-mode .pulse-ring {
    border-color: var(--purple);
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.phone-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(-10deg); }
    50% { transform: translate(-50%, -50%) rotate(10deg); }
}

.connecting-panel h2 { font-size: 1.5rem; margin-bottom: 24px; color: var(--navy); }

.connecting-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 250px;
    margin: 0 auto 32px;
}

.connect-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--slate-200);
    color: var(--navy);
}

.step-indicator { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }

.step-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--slate-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.roleplay-mode .step-spinner {
    border-top-color: var(--purple);
}

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

.step-indicator.pending .step-dot { width: 10px; height: 10px; background: var(--slate-300); border-radius: 50%; }
.step-indicator.done { color: var(--success); font-weight: bold; }
.step-indicator.done::after { content: '✓'; }

.btn-cancel {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--slate-300);
    border-radius: 8px;
    color: var(--slate-500);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover { border-color: var(--danger); color: var(--danger); }

/* ============================
   COACHING PANEL (light)
   ============================ */
.coaching-panel {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--slate-50);
}

/* Call Header */
.call-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.call-info { display: flex; align-items: center; gap: 20px; }
.call-status { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 500; color: var(--navy); }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--slate-400);
}

.status-dot.live { background: var(--success); animation: blink 1s infinite; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.mode-indicator {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 8px;
}

.mode-indicator.real { background: rgba(14, 165, 233, 0.1); color: #0284c7; }
.mode-indicator.roleplay { background: rgba(139, 92, 246, 0.1); color: #7c3aed; }

.call-prospect { display: flex; flex-direction: column; }
.prospect-name { font-weight: 600; font-size: 1rem; color: var(--navy); }
.prospect-company { font-size: 0.8rem; color: var(--slate-500); }

.call-timer { display: flex; flex-direction: column; align-items: center; }
.timer-label { font-size: 0.7rem; color: var(--slate-500); text-transform: uppercase; }
.timer-value { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--primary); }

.btn-end-call {
    padding: 12px 20px;
    background: var(--danger);
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-end-call:hover { background: #dc2626; }

/* Alerts Banner */
.alerts-banner {
    background: linear-gradient(90deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom: 1px solid #fecaca;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
    color: #991b1b;
}

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

.alert-icon { font-size: 1.3rem; }
.alert-text { font-weight: 600; font-size: 0.95rem; }

/* Coaching Grid */
.coaching-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

.coaching-left { display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.coaching-right { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }

/* Panels */
.panel {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.panel-header { padding: 14px 18px; border-bottom: 1px solid var(--slate-200); }
.panel-header h3 { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.panel-content { padding: 16px 18px; overflow-y: auto; }
.empty-state { color: var(--slate-400); font-size: 0.85rem; text-align: center; padding: 20px; }

/* Suggestions Panel */
.suggestions-panel { flex: 1; min-height: 200px; }
.suggestions-panel .panel-content { display: flex; flex-direction: column; gap: 10px; }

.suggestion-item {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

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

.suggestion-item.tip { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.2); color: #1d4ed8; }
.suggestion-item.alert { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.2); color: #b45309; }
.suggestion-item.opportunity { background: rgba(34, 197, 94, 0.08); border: 1px solid rgba(34, 197, 94, 0.2); color: #15803d; }
.suggestion-item.warning { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); color: #b91c1c; }

/* Transcript Panel */
.transcript-panel { flex: 1; min-height: 200px; }
.transcript-panel .panel-content { max-height: 300px; }

.transcript-entry {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}

.transcript-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.transcript-speaker { font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; }
.transcript-speaker.user { color: var(--primary); }
.transcript-speaker.prospect, .transcript-speaker.assistant { color: var(--accent); }
.transcript-text { font-size: 0.9rem; color: var(--slate-600); line-height: 1.5; }

/* Checklist Panel */
.checklist { display: flex; flex-direction: column; gap: 8px; }

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--slate-50);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--slate-600);
    cursor: default;
    transition: all 0.2s;
}

.checklist-item input { display: none; }

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--slate-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.checklist-item.checked { background: rgba(34, 197, 94, 0.08); color: var(--navy); }
.checklist-item.checked .checkmark { background: var(--success); border-color: var(--success); }
.checklist-item.checked .checkmark::after { content: '✓'; color: var(--white); font-size: 0.75rem; font-weight: bold; }

/* Metrics Panel */
.metric { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.metric:last-child { margin-bottom: 0; }
.metric-label { flex: 0 0 100px; font-size: 0.8rem; color: var(--slate-500); }

.metric-bar {
    flex: 1;
    height: 8px;
    background: var(--slate-100);
    border-radius: 4px;
    overflow: hidden;
}

.metric-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width 0.5s ease; }
.metric-value { flex: 0 0 50px; text-align: right; font-weight: 600; font-size: 0.9rem; color: var(--navy); }
.metric-value.pace { color: var(--warning); }

/* Context Panel */
.context-panel .panel-content { display: flex; flex-direction: column; gap: 10px; }
.context-item { display: flex; flex-direction: column; gap: 4px; }
.context-label { font-size: 0.7rem; text-transform: uppercase; color: var(--slate-400); letter-spacing: 0.5px; }
.context-value { font-size: 0.85rem; color: var(--navy); }

/* ============================
   ENDED PANEL (light)
   ============================ */
.ended-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px;
    background: var(--slate-50);
}

.ended-content { text-align: center; max-width: 400px; }
.ended-icon { font-size: 4rem; margin-bottom: 24px; }
.ended-content h2 { font-size: 1.8rem; margin-bottom: 32px; color: var(--navy); }
.ended-stats { display: flex; justify-content: center; gap: 48px; margin-bottom: 32px; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--slate-500); }
.ended-actions { display: flex; gap: 16px; justify-content: center; }

.btn {
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--slate-200); color: var(--navy); }
.btn-secondary:hover { background: var(--slate-300); }

/* Cost Container */
.cost-container {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    min-width: 320px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cost-loading { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--slate-500); font-size: 0.95rem; padding: 20px; }

.cost-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--slate-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.cost-error { text-align: center; color: var(--slate-500); font-size: 0.9rem; padding: 20px; }

.cost-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--slate-200);
}

.cost-icon { font-size: 2rem; margin-bottom: 8px; }
.cost-value { font-size: 2.2rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.cost-label { font-size: 0.85rem; color: var(--slate-500); margin-top: 4px; }
.cost-breakdown { display: flex; flex-direction: column; gap: 12px; }

.cost-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--slate-50);
    border-radius: 10px;
    transition: all 0.2s;
}

.cost-item:hover { background: var(--slate-100); }
.cost-item-icon { font-size: 1.2rem; flex-shrink: 0; }
.cost-item-label { flex: 1; font-size: 0.85rem; color: var(--slate-600); }
.cost-item-value { font-weight: 600; font-size: 0.95rem; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ============================
   COACHING OPTIONS (light)
   ============================ */
.coaching-options {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.coaching-options h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--navy);
}

.coaching-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Frequency Slider */
.frequency-control {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.frequency-control label {
    font-weight: 500;
    color: var(--slate-600);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frequency-slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frequency-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--primary) 0%, var(--slate-200) 100%);
    outline: none;
    cursor: pointer;
}

.frequency-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary);
    transition: all 0.2s;
}

.frequency-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
}

.frequency-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border: 3px solid var(--primary);
}

.frequency-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--slate-400);
    margin-top: 4px;
}

.frequency-value {
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
    white-space: nowrap;
}

/* Language Select */
.language-control {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.language-control label {
    font-weight: 500;
    color: var(--slate-600);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-select-wrapper {
    position: relative;
}

.language-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--navy);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s;
}

.language-select:hover {
    border-color: var(--slate-300);
}

.language-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.language-select option {
    background: var(--white);
    color: var(--navy);
    padding: 10px;
}

.language-select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 0.7rem;
    pointer-events: none;
}

/* Coaching indicator in header during call */
.coaching-settings-indicator {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--slate-500);
    margin-top: 8px;
}

.coaching-settings-indicator span {
    background: var(--slate-100);
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1200px) {
    .coaching-grid { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1024px) {
    .setup-content { grid-template-columns: 1fr; }
    .history-panel { order: -1; }
    .coaching-grid { grid-template-columns: 1fr; }
    .coaching-right { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .persona-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .coaching-right { grid-template-columns: 1fr; }
    .mode-options { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .setup-panel { padding: 20px; }
    .call-header { flex-wrap: wrap; gap: 16px; }
    .call-timer { order: -1; width: 100%; }
    .ended-stats { gap: 24px; }
    .ended-actions { flex-direction: column; }
    .cost-container { min-width: auto; padding: 16px; }
    .cost-value { font-size: 1.8rem; }
    .coaching-options-grid { grid-template-columns: 1fr; }
}