@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --tdc-text-main: #18181b;
    --tdc-text-muted: #4b5563;
    --tdc-text-light: #9ca3af;
    --tdc-border: #e5e7eb;
    --tdc-bg: #ffffff;
    --tdc-bg-alt: #f9fafb;
    
    /* Semantic subtle tones */
    --tdc-color-strength: #10b981;
    --tdc-color-friction: #f59e0b;
    --tdc-color-concern: #f97316;
    --tdc-color-risk: #ef4444;
    
    /* Tier Colors - Muted & Elegant */
    --tdc-tier-exc: #047857;
    --tdc-tier-str: #1d4ed8;
    --tdc-tier-good: #0f766e;
    --tdc-tier-mod: #b45309;
    --tdc-tier-challenging: #a16207;
    --tdc-tier-high: #be123c;
}

.tdc-dashboard {
    max-width: 1040px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--tdc-text-main);
    background: var(--tdc-bg);
    padding: 0 20px;
    line-height: 1.6;
}

/* Typography Hierarchy */
.tdc-h1 { font-size: 32px; font-weight: 300; letter-spacing: -0.02em; margin: 0 0 10px 0; color: var(--tdc-text-main); }
.tdc-h2 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 20px 0; padding-bottom: 12px; border-bottom: 1px solid var(--tdc-border); color: var(--tdc-text-main); }
.tdc-h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; margin: 0 0 15px 0; color: var(--tdc-text-main); }

/* Header Info */
.tdc-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tdc-border);
    margin-bottom: 32px;
    font-size: 14px;
    color: var(--tdc-text-muted);
}
.tdc-meta-code strong, .tdc-meta-drivers strong {
    color: var(--tdc-text-main);
}
@media (max-width: 640px) {
    .tdc-meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Summary Section Redesign */
.tdc-summary-section {
    background: var(--tdc-bg);
    border: 1px solid var(--tdc-border);
    border-radius: 12px;
    padding: 36px;
    margin-bottom: 40px;
}
.tdc-summary-main {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .tdc-summary-main {
        flex-direction: column;
        gap: 24px;
    }
}
.tdc-summary-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tdc-bg-alt);
    border: 1px solid var(--tdc-border);
    border-radius: 10px;
    padding: 24px;
    width: 140px;
    text-align: center;
    flex-shrink: 0;
}
.tdc-overall-score {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--tdc-text-main);
}
.tdc-overall-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--tdc-text-muted);
    margin-top: 8px;
}

/* Tier Specific Branding */
.tdc-tier-exceptional .tdc-summary-score-block {
    border-color: rgba(4, 120, 87, 0.2);
    background: rgba(4, 120, 87, 0.03);
}
.tdc-tier-exceptional .tdc-overall-score {
    color: var(--tdc-tier-exc);
}
.tdc-tier-strong .tdc-summary-score-block {
    border-color: rgba(29, 78, 216, 0.2);
    background: rgba(29, 78, 216, 0.03);
}
.tdc-tier-strong .tdc-overall-score {
    color: var(--tdc-tier-str);
}
.tdc-tier-good .tdc-summary-score-block {
    border-color: rgba(15, 118, 110, 0.2);
    background: rgba(15, 118, 110, 0.03);
}
.tdc-tier-good .tdc-overall-score {
    color: var(--tdc-tier-good);
}
.tdc-tier-moderate .tdc-summary-score-block {
    border-color: rgba(180, 83, 9, 0.2);
    background: rgba(180, 83, 9, 0.03);
}
.tdc-tier-moderate .tdc-overall-score {
    color: var(--tdc-tier-mod);
}
.tdc-tier-challenging .tdc-summary-score-block {
    border-color: rgba(161, 98, 7, 0.2);
    background: rgba(161, 98, 7, 0.03);
}
.tdc-tier-challenging .tdc-overall-score {
    color: var(--tdc-tier-challenging);
}
.tdc-tier-high-risk .tdc-summary-score-block {
    border-color: rgba(190, 18, 60, 0.2);
    background: rgba(190, 18, 60, 0.03);
}
.tdc-tier-high-risk .tdc-overall-score {
    color: var(--tdc-tier-high);
}

.tdc-summary-text-block {
    flex-grow: 1;
}
.tdc-summary-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 10px 0;
    color: var(--tdc-text-main);
}
.tdc-summary-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--tdc-text-muted);
    margin: 0;
}

/* Highlights Grid */
.tdc-highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    border-top: 1px solid var(--tdc-border);
    padding-top: 24px;
}
@media (max-width: 768px) {
    .tdc-highlights-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 480px) {
    .tdc-highlights-grid {
        grid-template-columns: 1fr;
    }
}
.tdc-highlight-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tdc-highlight-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--tdc-text-light);
}
.tdc-highlight-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--tdc-text-main);
}

/* Two-Column Grid */
.tdc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}
@media (min-width: 768px) {
    .tdc-grid {
        grid-template-columns: 3fr 2fr;
    }
}

/* Core Compatibility Cards List */
.tdc-categories-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.tdc-cat-card {
    background: var(--tdc-bg);
    border: 1px solid var(--tdc-border);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tdc-cat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tdc-cat-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--tdc-text-main);
}
.tdc-cat-card-score {
    font-size: 15px;
    font-weight: 600;
    color: var(--tdc-text-main);
}
.tdc-cat-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tdc-cat-card-interpretation {
    font-size: 14px;
    line-height: 1.5;
    color: var(--tdc-text-muted);
    margin: 0;
}
.tdc-cat-card-implication {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tdc-text-muted);
    background: var(--tdc-bg-alt);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--tdc-border);
}
.tdc-cat-card-implication strong {
    color: var(--tdc-text-main);
    font-weight: 500;
}
.tdc-cat-card-discussion {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tdc-text-main);
    background: rgba(245, 158, 11, 0.04);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px dashed rgba(245, 158, 11, 0.25);
}
.tdc-cat-card-discussion strong {
    color: var(--tdc-color-concern);
    font-weight: 600;
}

/* Minimalist Segmented Indicator */
.tdc-cat-card-footer {
    margin-top: 4px;
}
.tdc-indicator-track {
    width: 100%;
    height: 4px;
    background: var(--tdc-bg-alt);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.tdc-indicator-fill {
    height: 100%;
    border-radius: 2px;
}
.tdc-indicator-fill.tdc-indicator-safe { background: var(--tdc-color-strength); }
.tdc-indicator-fill.tdc-indicator-warn { background: var(--tdc-color-friction); }
.tdc-indicator-fill.tdc-indicator-concern { background: var(--tdc-color-concern); }
.tdc-indicator-fill.tdc-indicator-risk { background: var(--tdc-color-risk); }

/* Sidebar Sections */
.tdc-sidebar-section {
    background: var(--tdc-bg-alt);
    padding: 28px;
    border-radius: 10px;
    border: 1px solid var(--tdc-border);
    margin-bottom: 24px;
}

/* Lists styling inside sidebar */
.tdc-strengths-list, .tdc-discussion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tdc-strengths-list li, .tdc-discussion-list li {
    font-size: 13.5px;
    color: var(--tdc-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
    padding-left: 16px;
    position: relative;
}
.tdc-strengths-list li:last-child, .tdc-discussion-list li:last-child {
    margin-bottom: 0;
}
.tdc-strengths-list li::before, .tdc-discussion-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.tdc-strengths-list li::before {
    background: var(--tdc-color-strength);
}
.tdc-discussion-list li::before {
    background: var(--tdc-text-light);
}
.tdc-strengths-list li strong, .tdc-discussion-list li strong {
    color: var(--tdc-text-main);
    font-weight: 500;
}

/* Operational Vitals Stack */
.tdc-vitals-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tdc-vital-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--tdc-border);
    border-radius: 8px;
}
.tdc-vital-label {
    font-size: 13px;
    color: var(--tdc-text-main);
    font-weight: 500;
}
.tdc-vital-status {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}
.tdc-vital-safe {
    background: #ecfdf5;
    color: var(--tdc-color-strength);
}
.tdc-vital-warn {
    background: #fffbeb;
    color: var(--tdc-color-friction);
}
.tdc-vital-concern {
    background: #fff7ed;
    color: var(--tdc-color-concern);
}
.tdc-vital-risk {
    background: #fef2f2;
    color: var(--tdc-color-risk);
}

/* Footer Action */
.tdc-footer-action {
    margin-top: 48px;
    text-align: center;
}
.tdc-footer-btn {
    display: inline-block;
    background: var(--tdc-text-main);
    color: #fff !important;
    text-decoration: none !important;
    border: 1px solid var(--tdc-text-main) !important;
    box-shadow: none !important;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
}
.tdc-footer-btn:hover {
    background: #27272a;
    border-color: #27272a !important;
}

/* Entry Form Screen */
.tdc-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: 40vh;
}
.tdc-auth-card {
    background: #fff;
    border: 1px solid var(--tdc-border);
    border-radius: 12px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
}
.tdc-auth-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--tdc-text-main);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}
.tdc-auth-subtitle {
    font-size: 14.5px;
    color: var(--tdc-text-muted);
    margin: 0 0 24px 0;
    line-height: 1.5;
}
.tdc-auth-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--tdc-border);
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    margin-bottom: 16px;
    background: var(--tdc-bg-alt);
    color: var(--tdc-text-main);
    transition: border-color 0.2s, background-color 0.2s;
}
.tdc-auth-form input::placeholder {
    color: var(--tdc-text-light);
}
.tdc-auth-form input:focus {
    border-color: var(--tdc-text-main);
    background: #fff;
}
.tdc-auth-form button {
    width: 100%;
    background: var(--tdc-text-main);
    color: #fff !important;
    border: 1px solid var(--tdc-text-main) !important;
    text-decoration: none !important;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}
.tdc-auth-form button:hover {
    background: #27272a;
    border-color: #27272a !important;
}

/* Debug */
.tdc-debug-box {
    margin-top: 60px;
    padding: 24px;
    background: var(--tdc-text-main);
    color: var(--tdc-bg-alt);
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 11px;
    overflow-x: auto;
    border-radius: 8px;
}
.tdc-debug-header {
    margin-bottom: 16px;
    font-weight: bold;
    color: #9ca3af;
}
.tdc-debug-box table { width: 100%; border-collapse: collapse; text-align: left; }
.tdc-debug-box th, .tdc-debug-box td { padding: 8px; border-bottom: 1px solid #374151; }
.tdc-debug-box th { color: #9ca3af; font-weight: normal; }
.tdc-debug-val-a, .tdc-debug-val-b { color: #34d399; }
.tdc-debug-diff { color: #f87171; }
.tdc-debug-score { color: #60a5fa; }

/* Specific Pairing Insights styling to match Core Compatibility Cards */
.tdc-insights-section {
    margin-bottom: 40px;
}
.tdc-insights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .tdc-insights-grid {
        grid-template-columns: 1fr;
    }
}
.tdc-insight-card {
    background: var(--tdc-bg);
    border: 1px solid var(--tdc-border);
    border-radius: 10px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tdc-insight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.tdc-insight-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--tdc-text-main);
}
.tdc-insight-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.tdc-badge-critical {
    background: rgba(190, 18, 60, 0.06);
    color: #e11d48;
    border-color: rgba(190, 18, 60, 0.15);
}
.tdc-badge-warning {
    background: rgba(217, 119, 6, 0.06);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.15);
}
.tdc-badge-info {
    background: rgba(37, 99, 235, 0.06);
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.15);
}
.tdc-insight-mismatch {
    margin: 0;
    color: var(--tdc-text-main);
    font-size: 14px;
    line-height: 1.55;
}
.tdc-insight-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tdc-insight-implication {
    font-size: 13px;
    line-height: 1.55;
    color: var(--tdc-text-muted);
    background: var(--tdc-bg-alt);
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--tdc-border);
}
.tdc-insight-implication strong {
    color: var(--tdc-text-main);
    font-weight: 500;
}
.tdc-insight-recommendation {
    font-size: 13px;
    line-height: 1.55;
    color: var(--tdc-text-main);
    background: rgba(37, 99, 235, 0.03);
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid rgba(37, 99, 235, 0.12);
}
.tdc-insight-recommendation strong {
    color: #2563eb;
    font-weight: 600;
}
.tdc-insight-success-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(4, 120, 87, 0.02);
    border: 1px solid rgba(4, 120, 87, 0.15);
    padding: 24px;
    border-radius: 10px;
    margin-top: 20px;
}
.tdc-insight-success-icon {
    font-size: 16px;
    font-weight: 700;
    color: var(--tdc-tier-exc);
    width: 28px;
    height: 28px;
    background: rgba(4, 120, 87, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tdc-insight-success-content strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--tdc-tier-exc);
    display: block;
    margin-bottom: 4px;
}
.tdc-insight-success-content p {
    font-size: 14px;
    margin: 0;
    color: var(--tdc-text-muted);
    line-height: 1.5;
}

/* Integrated Operational Forecast Panel */
.tdc-predictive-forecast-panel {
    border-top: 1px solid var(--tdc-border);
    padding-top: 24px;
    margin-top: 24px;
}
.tdc-predictive-forecast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.tdc-predictive-forecast-title-icon {
    font-size: 16px;
    flex-shrink: 0;
}
.tdc-predictive-forecast-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tdc-text-main);
    margin: 0;
}
.tdc-predictive-forecast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .tdc-predictive-forecast-grid {
        grid-template-columns: 1fr;
    }
}
.tdc-predictive-forecast-item {
    background: var(--tdc-bg-alt);
    border: 1px solid var(--tdc-border);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.tdc-predictive-forecast-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}
.tdc-predictive-forecast-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--tdc-text-light);
}
.tdc-predictive-forecast-value {
    font-size: 13px;
    line-height: 1.45;
    color: var(--tdc-text-muted);
}
.tdc-predictive-forecast-item.friction {
    background: rgba(249, 115, 22, 0.03);
    border-color: rgba(249, 115, 22, 0.15);
}
.tdc-predictive-forecast-item.weakpoint {
    background: rgba(239, 68, 68, 0.03);
    border-color: rgba(239, 68, 68, 0.15);
}
.tdc-predictive-forecast-item.environment {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.15);
}





