/* =============================================================================
   Sector Rotation Tab (#614)
   ============================================================================= */

.rotation-loading,
.rotation-empty,
.rotation-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted, #64748b);
}

.rotation-stale-banner {
    background: var(--warning-bg, #fef3c7);
    color: var(--warning-text, #92400e);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.rotation-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 1rem;
}

.rotation-table {
    width: 100%;
    margin-bottom: 2rem;
}

.regime-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.regime-badge.regime-green {
    background: #dcfce7;
    color: #166534;
}

.regime-badge.regime-yellow {
    background: #fef3c7;
    color: #92400e;
}

.regime-badge.regime-red {
    background: #fee2e2;
    color: #991b1b;
}

.regime-badge.regime-none {
    background: #f1f5f9;
    color: #64748b;
}

.transition-topping {
    color: #dc2626;
    font-weight: 700;
}

.transition-breaking {
    color: #16a34a;
    font-weight: 700;
}

.stale-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #ffedd5;
    color: #9a3412;
}

.rotation-paused {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px dashed var(--border-color, #e2e8f0);
    border-radius: 8px;
    background: var(--bg-secondary, #0f172a);
}

.rotation-paused-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary, #94a3b8);
}

.rotation-paused-row + .rotation-paused-row {
    margin-top: 0.5rem;
}

/* Leader cards */

.rotation-leaders-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rotation-leaders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.leader-no-setup {
    color: var(--text-muted);
    font-style: italic;
}

.leader-card {
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 8px;
    padding: 1rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.leader-header {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leader-body {
    font-size: 0.9rem;
}

.leader-stock {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.leader-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.leader-no-data {
    color: var(--text-muted, #94a3b8);
    font-style: italic;
    font-size: 0.875rem;
}

.leader-chart {
    display: block;
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    margin-top: 0.5rem;
    border-radius: 4px;
    background: var(--bg-secondary, #0f172a);
}

.leader-chart-group {
    max-height: 168px;
    margin-top: 0.35rem;
    margin-bottom: 0.35rem;
}

.leader-plan {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    margin-top: 0.35rem;
}

.leader-card .leader-body + .leader-body {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.rotation-no-data {
    color: var(--text-muted, #94a3b8);
    font-style: italic;
    padding: 1rem 0;
}

/* Footer legal links — ≥44px touch targets (#793) */
.global-footer .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0.35rem;
}

/* ── Billing (#976) ──────────────────────────────────────────────────────── */
.billing-cta-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.billing-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: var(--accent-warning-bg-strong);
    border: 1px solid var(--accent-warning-border-strong);
    color: var(--text-primary);
    font-size: var(--text-body, 0.95rem);
}

.billing-page {
    max-width: 36rem;
    margin: 2.5rem auto 4rem;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-align: center;
}

.billing-page h2 {
    margin: 0 0 0.75rem;
    font-size: var(--text-title, 1.4rem);
}

.billing-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.billing-page-note {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-height: 1.25em;
}

.billing-btn {
    min-height: 44px;
    padding: 0.55rem 1.15rem;
    border: 0;
    border-radius: 10px;
    background: var(--accent-blue);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.billing-btn:hover {
    filter: brightness(1.08);
}

.billing-btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
}

.billing-header-manage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
}

.billing-header-manage:hover {
    background: var(--border-color);
}

.billing-header-manage.hidden {
    display: none;
}

#referral-header-btn.hidden {
    display: none;
}

.community-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.45rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

.community-header-link:hover {
    background: var(--border-color);
}

.community-header-link.hidden {
    display: none;
}

.dashboard.billing-locked .tabs,
.dashboard.billing-locked .tab-content {
    display: none;
}

@media (max-width: 480px) {
    .billing-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Live book review paste panel (#1144) */
.book-review-panel {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color, #334155);
    border-radius: 8px;
    background: var(--bg-card, rgba(15, 23, 42, 0.4));
}

.book-review-panel h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.book-review-panel .helper-text {
    margin: 0 0 0.45rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.45;
}

.book-review-label {
    display: block;
    margin: 0.65rem 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
}

.book-review-input {
    width: 100%;
    margin: 0 0 0.6rem;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 0.85rem;
    background: var(--bg-input, #0f172a);
    color: var(--text-primary, #e2e8f0);
    border: 1px solid var(--border-color, #334155);
    border-radius: 6px;
    resize: vertical;
}

.book-review-input:focus {
    outline: none;
    border-color: var(--accent-blue, #3b82f6);
}

.book-review-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.book-review-table-wrap {
    overflow-x: auto;
}

.book-review-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.book-review-holes {
    margin-top: 0.75rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
