/* Sales Call Analyzer - Styles */

:root {
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #111317;
    --text-muted: #667085;
    --border: #e9eaeb;
    --primary: #0f62fe;
    --primary-hover: #0353e9;
    --success: #24a148;
    --error: #da1e28;
    --warning: #f1c21b;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.08);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

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

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

/* App Layout */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--bg);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 1000;
    margin-top: 4px;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

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

.dropdown-item:first-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* API Key Flash */
.flash-api_key {
    background: #e8f5e9;
    color: #1b5e20;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 13px;
    word-break: break-all;
}

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

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

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

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.15s;
}

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

/* Flash Messages */
.flash-messages {
    margin-bottom: 24px;
}

.flash {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.flash-success {
    background: #defbe6;
    color: #0e6027;
}

.flash-error {
    background: #fff1f1;
    color: #a2191f;
}

.flash-warning {
    background: #fff8e1;
    color: #8d6e00;
}

.flash-info {
    background: #edf5ff;
    color: #0043ce;
}

.flash-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
}

.flash-close:hover {
    opacity: 1;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 420px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

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

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

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.success-state {
    text-align: center;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-state h2 {
    margin-bottom: 8px;
}

.success-state .hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 16px 0;
}

/* Upload Container */
.upload-container {
    display: flex;
    justify-content: center;
}

.upload-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 640px;
    width: 100%;
}

.upload-header {
    text-align: center;
    margin-bottom: 32px;
}

.upload-header h1 {
    font-size: 26px;
    margin-bottom: 8px;
}

.upload-header .pii-link {
    margin-top: 12px;
    font-size: 14px;
}

.upload-header .link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.upload-header .link-primary:hover {
    text-decoration: underline;
    color: #0d47a1;
}

/* Call Type Tabs */
.call-type-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: var(--bg);
    padding: 8px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    border-color: var(--border);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tab-btn.tab-real.active {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #1976d2;
    color: #1976d2;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.tab-btn.tab-ai.active {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-color: #7b1fa2;
    color: #7b1fa2;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.2);
}

.tab-icon {
    font-size: 24px;
}

.tab-label {
    font-weight: 700;
    font-size: 15px;
}

.tab-desc {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn.active .tab-desc {
    opacity: 1;
}

/* Call Type Info Box */
.call-type-info {
    margin-bottom: 24px;
    padding: 20px;
    border-radius: var(--radius);
    border: 2px solid;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    animation: slideIn 0.3s ease;
}

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

.call-type-info.info-real {
    background: linear-gradient(135deg, #e3f2fd, #ffffff);
    border-color: #1976d2;
}

.call-type-info.info-ai {
    background: linear-gradient(135deg, #f3e5f5, #ffffff);
    border-color: #7b1fa2;
}

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.info-content {
    flex: 1;
}

.info-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
}

.info-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

.info-real .info-content h4 {
    color: #1976d2;
}

.info-ai .info-content h4 {
    color: #7b1fa2;
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg);
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary);
    background: #f0f6ff;
}

.dropzone-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.dropzone-text {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.dropzone-hint {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.dropzone-formats {
    color: var(--text-muted);
    font-size: 12px;
}

/* File Preview */
.file-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    font-size: 24px;
}

.file-name {
    font-weight: 600;
}

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

/* Upload Info */
.upload-info {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.upload-info h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.upload-info ol {
    margin-left: 20px;
}

.upload-info li {
    margin-bottom: 12px;
    font-size: 14px;
}

.privacy-note {
    margin-top: 20px;
    padding: 16px;
    background: #edf5ff;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

/* Processing Container */
.processing-container {
    display: flex;
    justify-content: center;
}

.processing-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px;
    max-width: 560px;
    width: 100%;
    text-align: center;
}

.processing-header {
    margin-bottom: 40px;
}

.processing-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
}

.step.complete {
    opacity: 1;
}

.step.complete .step-icon {
    filter: grayscale(0);
}

.step-icon {
    font-size: 28px;
    filter: grayscale(100%);
}

.step.active .step-icon {
    filter: grayscale(0);
    animation: pulse 1.5s infinite;
}

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

.step-label {
    font-size: 12px;
    font-weight: 600;
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

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

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

/* Complete/Error States */
.complete-state,
.error-state {
    padding: 20px 0;
}

.complete-state .success-icon,
.error-state .error-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

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

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px;
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.error-card .error-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.error-card h1 {
    margin-bottom: 12px;
}

.error-card .error-message {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Report Container */
.report-container {
    max-width: 960px;
    margin: 0 auto;
}

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

.report-header h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

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

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.report-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.report-section.full-width {
    grid-column: 1 / -1;
}

.report-section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.report-section ul,
.report-section ol {
    margin-left: 20px;
}

.report-section li {
    margin-bottom: 8px;
}

.report-section table {
    width: 100%;
    border-collapse: collapse;
}

.report-section td {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.report-section tr:last-child td {
    border-bottom: none;
}

.report-section td:first-child {
    color: var(--text-muted);
    width: 40%;
}

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

.coaching-grid h4 {
    font-size: 14px;
    margin-bottom: 12px;
}

.focus-chip {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 16px;
    background: #edf5ff;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.report-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .report-grid {
        grid-template-columns: 1fr;
    }
    
    .coaching-grid {
        grid-template-columns: 1fr;
    }
    
    .report-header {
        flex-direction: column;
    }
    
    .report-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 16px;
    }
}

