/*
 * GrowthScout — Flourish-tier command center
 *
 * Shell + tabs + stat cards + upgrade banner.
 * Pulls from --primary-purple / --primary-green / --gradient (main.css).
 */

.growthscout-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
    padding: 24px 32px;
    box-sizing: border-box;
}

.gs-loading {
    padding: 48px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* ---------- Header ---------- */

.gs-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(139, 126, 200, 0.15);
    margin-bottom: 20px;
}

.gs-header-icon {
    font-size: 36px;
    line-height: 1;
}

.gs-header-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary, #2d2d2d);
}

.gs-subtitle {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: #777;
}

/* ---------- Tabs ---------- */

.gs-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(139, 126, 200, 0.15);
}

.gs-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.gs-tab:hover {
    color: var(--primary-purple, #8B7EC8);
}

.gs-tab.active {
    color: var(--primary-purple, #8B7EC8);
    border-bottom-color: var(--primary-purple, #8B7EC8);
}

/* ---------- Overview tab ---------- */

.gs-overview {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 16px;
}

.gs-stat-card {
    background: #fff;
    border: 1px solid rgba(139, 126, 200, 0.15);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.gs-stat-card.gs-stat-narrow {
    /* Capabilities card uses the wider grid cell */
}

.gs-stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 8px;
}

.gs-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-purple, #8B7EC8);
    line-height: 1.1;
}

.gs-cap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gs-cap-list li {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gs-cap-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gs-cap-list li.on {
    color: var(--text-primary, #2d2d2d);
}

.gs-cap-list li.on::before {
    background: var(--primary-green, #7FB069);
}

.gs-cap-list li.off {
    color: #aaa;
}

.gs-cap-list li.off::before {
    background: #ddd;
}

/* ---------- Segments tab ---------- */

.gs-segments-toolbar {
    margin-bottom: 16px;
}

.gs-segments-toolbar h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: var(--text-primary, #2d2d2d);
}

.gs-help {
    margin: 0;
    color: #777;
    font-size: 13px;
    max-width: 720px;
}

.gs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid rgba(139, 126, 200, 0.15);
    border-radius: 12px;
    overflow: hidden;
}

.gs-table thead {
    background: rgba(139, 126, 200, 0.06);
}

.gs-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #777;
}

.gs-table td {
    padding: 12px 16px;
    font-size: 14px;
    border-top: 1px solid rgba(139, 126, 200, 0.08);
    color: var(--text-primary, #2d2d2d);
}

.gs-muted {
    color: #888;
}

.gs-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.gs-chip-shared {
    background: rgba(127, 176, 105, 0.12);
    color: #5a8049;
}

.gs-row-actions {
    text-align: right;
    white-space: nowrap;
}

.gs-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
}

.gs-btn-link {
    color: var(--primary-purple, #8B7EC8);
    text-decoration: none;
}

.gs-btn-link:hover {
    text-decoration: underline;
}

.gs-btn-danger {
    color: #c44;
}

.gs-error {
    padding: 16px;
    border: 1px solid #f0c2c2;
    background: #fdf3f3;
    color: #a02a2a;
    border-radius: 8px;
}

/* ---------- Placeholder (Phase 3+ tab stubs) ---------- */

.gs-placeholder {
    padding: 32px;
    background: #fafafa;
    border: 1px dashed rgba(139, 126, 200, 0.3);
    border-radius: 12px;
    text-align: center;
}

.gs-placeholder h3 {
    margin: 0 0 12px 0;
    color: var(--primary-purple, #8B7EC8);
    font-size: 18px;
}

.gs-placeholder p {
    margin: 0;
    color: #777;
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto;
}

/* ---------- Upgrade banner (non-Flourish users) ---------- */

.gs-upgrade {
    max-width: 560px;
    margin: 48px auto;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.06), rgba(127, 176, 105, 0.06));
    border: 1px solid rgba(139, 126, 200, 0.2);
    border-radius: 16px;
    text-align: center;
}

.gs-upgrade-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.gs-upgrade h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
    color: var(--text-primary, #2d2d2d);
}

.gs-upgrade p {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.gs-upgrade-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.gs-upgrade-features li {
    padding: 8px 0 8px 28px;
    position: relative;
    font-size: 14px;
    color: #444;
}

.gs-upgrade-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green, #7FB069);
    font-weight: 700;
}

.gs-upgrade-cta {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient, linear-gradient(135deg, #8B7EC8, #7FB069));
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gs-upgrade-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.3);
}

/* ---------- Score band badges (rendered inside leads-component) ---------- */

.gs-score-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 6px;
    vertical-align: middle;
}

.gs-score-hot {
    background: #fee;
    color: #c44;
}

.gs-score-warm {
    background: #fef3e0;
    color: #b87b22;
}

.gs-score-cool {
    background: #e8f0fe;
    color: #2b66bf;
}

.gs-score-cold {
    background: #f1f1f1;
    color: #777;
}

/* ---------- Enrichment dashboard ---------- */

.gs-enrichment-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gs-stat-pct {
    font-size: 14px;
    color: #888;
    font-weight: 400;
    margin-left: 6px;
}

.gs-enrichment-actions {
    display: flex;
    gap: 12px;
    margin: 16px 0 28px;
}

.gs-band-chart {
    background: #fff;
    border: 1px solid rgba(139, 126, 200, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.gs-band-row {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.gs-band-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.gs-band-bar {
    background: #f1f1f1;
    border-radius: 4px;
    height: 12px;
    overflow: hidden;
}

.gs-band-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.gs-band-row.gs-band-hot .gs-band-fill { background: #c44; }
.gs-band-row.gs-band-warm .gs-band-fill { background: #b87b22; }
.gs-band-row.gs-band-cool .gs-band-fill { background: #2b66bf; }
.gs-band-row.gs-band-cold .gs-band-fill { background: #aaa; }

.gs-band-row.gs-band-hot .gs-band-label { color: #c44; }
.gs-band-row.gs-band-warm .gs-band-label { color: #b87b22; }
.gs-band-row.gs-band-cool .gs-band-label { color: #2b66bf; }
.gs-band-row.gs-band-cold .gs-band-label { color: #777; }

.gs-band-count {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary, #2d2d2d);
}

/* ---------- Bulk toolbar (rendered inside leads-component) ---------- */

.gs-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(139, 126, 200, 0.06);
    border: 1px solid rgba(139, 126, 200, 0.18);
    border-radius: 8px;
    margin-bottom: 12px;
}

.gs-bulk-count {
    font-weight: 600;
    color: var(--primary-purple, #8B7EC8);
    margin-right: 8px;
}

.gs-select-col {
    width: 36px;
    text-align: center;
}

.lead-row.gs-selected {
    background: rgba(139, 126, 200, 0.04);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .growthscout-shell {
        padding: 16px;
    }
    .gs-overview {
        grid-template-columns: 1fr;
    }
    .gs-upgrade {
        padding: 28px 20px;
    }
}
