/* Preview / sales-call demo page — synthetic data only.
   Imports base.css for variable parity with the live app, then defines the
   minimal visual shell (banner + scrollable sections). */

@import url('./base.css');

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
    color: var(--text-primary, #1a1a1a);
    background: var(--bg-app, #f6f7f9);
    line-height: 1.5;
}

/* ─── Banner ─────────────────────────────────────────────────────── */
.preview-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #ffb300 0%, #ff7a00 100%);
    color: #1a1a1a;
    padding: 12px 20px;
    border-bottom: 2px solid #1a1a1a;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.preview-banner-text { font-weight: 600; max-width: 720px; }
.preview-banner-text strong { display: inline-block; margin-right: 6px; }
.preview-banner-cta {
    display: inline-flex;
    gap: 8px;
}
.preview-banner-cta a {
    background: #1a1a1a;
    color: #ffb300;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.preview-banner-cta a.secondary {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
}

/* ─── Page chrome ────────────────────────────────────────────────── */
.preview-header {
    background: #fff;
    border-bottom: 1px solid #e2e4e8;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.preview-brand {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}
.preview-brand-icon { margin-right: 6px; }
.preview-tenant-meta {
    font-size: 13px;
    color: #6b7280;
}
.preview-tenant-meta strong { color: #1a1a1a; }

.preview-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e2e4e8;
    padding: 0 24px;
    overflow-x: auto;
}
.preview-tab {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.preview-tab.active {
    color: #1a1a1a;
    border-bottom-color: #ff7a00;
}

/* ─── Sections ───────────────────────────────────────────────────── */
.preview-section {
    padding: 32px 24px;
    max-width: 1280px;
    margin: 0 auto;
}
.preview-section h2 {
    font-size: 20px;
    margin: 0 0 16px;
    color: #1a1a1a;
}
.preview-section .section-sub {
    color: #6b7280;
    margin: 0 0 24px;
    font-size: 14px;
}

/* KPI grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.kpi-card {
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 8px;
    padding: 20px;
}
.kpi-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 8px;
}
.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}
.kpi-delta {
    font-size: 13px;
    margin-top: 6px;
}
.kpi-delta.up { color: #16a34a; }
.kpi-delta.down { color: #dc2626; }

/* Chart container */
.chart-card {
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 32px;
}
.chart-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    color: #1a1a1a;
}
.chart-canvas-wrap { position: relative; height: 280px; }

/* Tables */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 8px;
    overflow: hidden;
}
.preview-table th, .preview-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #f1f3f5;
}
.preview-table th {
    background: #f9fafb;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}
.preview-table tr:last-child td { border-bottom: none; }
.preview-table tr.is-self {
    background: #fff8e6;
    font-weight: 600;
}
.delta-up { color: #16a34a; }
.delta-down { color: #dc2626; }

/* Deals pipeline */
.deals-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.deal-card {
    background: #fff;
    border: 1px solid #e2e4e8;
    border-radius: 8px;
    padding: 16px;
}
.deal-stage {
    display: inline-block;
    background: #1a1a1a;
    color: #ffb300;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.deal-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a1a1a;
}
.deal-owner {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px;
}
.deal-meta {
    font-size: 13px;
    color: #1a1a1a;
    margin: 6px 0;
}
.deal-meta-label { color: #6b7280; margin-right: 6px; }
.deal-scorecard {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e4e8;
    font-size: 13px;
    color: #1a1a1a;
    font-style: italic;
}

/* Footer */
.preview-foot {
    text-align: center;
    padding: 40px 24px;
    color: #6b7280;
    font-size: 13px;
    border-top: 1px solid #e2e4e8;
    background: #fff;
}
.preview-foot a { color: #ff7a00; font-weight: 600; }

/* ─── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .preview-banner { padding: 10px 14px; gap: 10px; }
    .preview-banner-text { font-size: 13px; }
    .preview-banner-cta a { padding: 6px 10px; font-size: 12px; }

    .preview-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 6px 14px;
    }
    .preview-tenant-meta { width: 100%; font-size: 12px; }

    .preview-tabs { padding: 0 14px; }
    .preview-tab { padding: 12px 14px; font-size: 13px; }

    .preview-section { padding: 24px 16px; }
    .preview-section h2 { font-size: 18px; }
    .kpi-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; }
    .chart-card { padding: 14px; }
    .chart-canvas-wrap { height: 220px; }
    .preview-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .preview-table th, .preview-table td { padding: 8px 10px; font-size: 12px; }
    .deals-board { grid-template-columns: 1fr; }
}
