/* ============================================================
   Sales Call Grader — styles for /sales-calls and child routes
   ============================================================ */

/* ---------- Empty state ---------- */
.scg-empty-state {
    padding: 48px 24px;
    text-align: center;
    color: #6b7280;
    background: #fafafa;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    margin: 16px 0;
}

/* ---------- Demo type pill (used in list + result) ---------- */
.scg-type-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.scg-type-pill.solution {
    background: #dbeafe;
    color: #1e40af;
}

.scg-type-pill.first-touch {
    background: #fef3c7;
    color: #92400e;
}

/* ---------- Score / verdict ---------- */
.scg-score-cell {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.scg-verdict-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.scg-verdict-pill.strong {
    background: #dcfce7;
    color: #166534;
}

.scg-verdict-pill.needs-coaching {
    background: #fef3c7;
    color: #92400e;
}

.scg-verdict-pill.stop-rework {
    background: #fee2e2;
    color: #991b1b;
}

.scg-status-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 4px;
}

.scg-status-badge.disputed {
    background: #fee2e2;
    color: #991b1b;
}

.scg-status-badge.reviewed {
    background: #e0e7ff;
    color: #3730a3;
}

/* ---------- Create form ---------- */
.scg-create-form {
    max-width: 900px;
    margin: 16px auto;
    padding: 24px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.scg-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.scg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.scg-field-grow {
    flex: 1 1 240px;
    min-width: 0;
}

.scg-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.scg-req {
    color: #dc2626;
    font-weight: 700;
}

.scg-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
}

.scg-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.scg-textarea {
    min-height: 320px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
}

.scg-textarea-short {
    min-height: 60px;
    resize: vertical;
}

.scg-helper {
    font-size: 0.8rem;
    color: #6b7280;
}

.scg-radio-group {
    display: flex;
    gap: 16px;
    padding-top: 4px;
}

.scg-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.scg-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.scg-transcript-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.scg-char-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.scg-file-input {
    font-size: 0.85rem;
}

.scg-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.scg-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px auto;
    max-width: 900px;
}

.scg-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.15s;
}

.scg-btn:hover:not(:disabled) {
    filter: brightness(0.95);
}

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

.scg-btn-primary {
    background: var(--ebp-btn-primary, #2563eb);
    color: var(--ebp-btn-primary-text, white);
    border-color: transparent;
}

.scg-btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

.scg-btn-text {
    background: transparent;
    color: #2563eb;
    border-color: transparent;
    padding-left: 8px;
    padding-right: 8px;
}

.scg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
}

/* ---------- Grading overlay ---------- */
.scg-grading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
}

.scg-grading-text {
    font-size: 1.05rem;
    font-weight: 600;
}

.scg-grading-subtext {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ---------- Result panel ---------- */
.scg-result {
    max-width: 900px;
    margin: 16px auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.scg-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
    gap: 24px;
    flex-wrap: wrap;
}

.scg-result-title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.scg-result-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
}

.scg-result-sep {
    margin: 0 6px;
    color: #d1d5db;
}

.scg-result-score {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.scg-score-badge {
    background: #1f2937;
    color: white;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 1.05rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.scg-criteria {
    padding: 4px 0;
}

.scg-criterion {
    display: flex;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid #f3f4f6;
}

.scg-criterion:last-child {
    border-bottom: none;
}

.scg-criterion-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.scg-criterion.pass .scg-criterion-icon {
    background: #16a34a;
}

.scg-criterion.fail .scg-criterion-icon {
    background: #dc2626;
}

.scg-criterion-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.scg-criterion-feedback {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

.scg-stakeholders {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.scg-stakeholders-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.scg-chip {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ---------- Detail page layout ---------- */
.scg-detail-header {
    max-width: 1300px;
    margin: 8px auto 0;
    padding: 0 16px;
}

.scg-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 16px 32px;
}

@media (max-width: 1024px) {
    .scg-detail-layout {
        grid-template-columns: 1fr;
    }
}

.scg-detail-main {
    min-width: 0;
}

.scg-detail-sidebar {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    height: fit-content;
    position: sticky;
    top: 16px;
}

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

.scg-sidebar-header .scg-sidebar-title {
    margin: 0;
}

.scg-sidebar-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.scg-transcript-view {
    background: #1e1e1e;
    color: #e5e5e5;
    padding: 12px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    max-height: 70vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Notes card ---------- */
.scg-notes-card {
    max-width: 900px;
    margin: 20px auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
}

.scg-notes-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
}

/* ---------- Result-card tabs ---------- */
.scg-result-tabs {
    border-top: 1px solid #e5e7eb;
}

.scg-result-tabs .mud-tabs-toolbar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 4px 12px;
}

.scg-result-tabs .mud-tab {
    text-transform: none;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 0;
    padding: 6px 14px;
}

/* ---------- Objection handling ---------- */
.scg-objections {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.scg-objection {
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.scg-objection-text {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.scg-objection-excerpt {
    font-style: italic;
    color: #4b5563;
    background: white;
    border-left: 3px solid #d1d5db;
    padding: 6px 10px;
    margin: 6px 0 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    border-radius: 0 6px 6px 0;
}

.scg-laer-strip {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.scg-laer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 4px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.scg-laer-pill .scg-laer-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: white;
    font-weight: 700;
    font-size: 0.72rem;
}

.scg-laer-pill.pass {
    background: #dcfce7;
    color: #166534;
}

.scg-laer-pill.pass .scg-laer-letter {
    color: #166534;
}

.scg-laer-pill.fail {
    background: #fee2e2;
    color: #991b1b;
}

.scg-laer-pill.fail .scg-laer-letter {
    color: #991b1b;
}

.scg-objection-coaching {
    margin-top: 8px;
    font-size: 0.88rem;
    color: #4b5563;
    line-height: 1.5;
}

.scg-objections-empty {
    padding: 32px 24px;
    text-align: center;
    color: #6b7280;
}

.scg-objections-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.scg-objections-empty-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.scg-objections-empty-sub {
    font-size: 0.88rem;
    color: #6b7280;
}

/* ---------- Criteria trend chart ---------- */
.scg-trend-card {
    max-width: 1300px;
    margin: 16px auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px 12px;
}

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

.scg-trend-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.scg-trend-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 9999px;
}

.scg-trend-body {
    padding-top: 4px;
}

.scg-trend-empty {
    padding: 28px 16px;
    text-align: center;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.scg-trend-empty p {
    margin: 0;
    font-weight: 600;
    color: #1f2937;
}

.scg-trend-empty span {
    font-size: 0.85rem;
}

/* ---------- Heatmap ---------- */
.scg-heatmap {
    display: grid;
    gap: 4px;
    align-items: stretch;
    margin: 8px 0 4px;
}

.scg-heatmap-corner {
    background: transparent;
}

.scg-heatmap-month {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    padding: 4px 0 6px;
    border-bottom: 1px solid #e5e7eb;
}

.scg-heatmap-criterion {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    padding-right: 12px;
}

.scg-heatmap-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: default;
    transition: transform 80ms ease;
}

.scg-heatmap-cell:hover {
    transform: scale(1.05);
}

.scg-heatmap-cell.high {
    background: #dcfce7;
    color: #166534;
}

.scg-heatmap-cell.mid {
    background: #fef3c7;
    color: #92400e;
}

.scg-heatmap-cell.low {
    background: #fee2e2;
    color: #991b1b;
}

.scg-heatmap-cell.empty {
    background: #f3f4f6;
    color: #9ca3af;
}

.scg-heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.78rem;
    color: #6b7280;
}

.scg-heatmap-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.scg-heatmap-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.scg-heatmap-swatch.high {
    background: #dcfce7;
}

.scg-heatmap-swatch.mid {
    background: #fef3c7;
}

.scg-heatmap-swatch.low {
    background: #fee2e2;
}

.scg-heatmap-swatch.empty {
    background: #f3f4f6;
}
