/**
 * SBC SMSF Center - Dashboard styles
 * Extracted from inline <style> blocks so the browser can cache them.
 */

.sbc-smsf-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 100%;
    color: #1e293b;
    line-height: 1.5;
}

.sbc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.sbc-header h2 { margin: 0; font-size: 24px; font-weight: 700; color: #0f172a; letter-spacing: -0.025em; }
.sbc-header .sbc-subtitle { font-size: 14px; color: #64748b; margin-top: 6px; }

.sbc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Tabs container */
.sbc-tabs-responsive {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
}
.sbc-tabs-responsive .sbc-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.sbc-tabs-responsive .sbc-tab-btn.active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.sbc-tab-btn:hover:not(.active) { color: #334155; }

.sbc-tab-content { display: none; }
.sbc-tab-content.active { display: block; animation: sbc-fadeIn 0.3s ease; }
@keyframes sbc-fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Holdings count badge on tab */
.sbc-tab-count-badge {
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 4px;
    min-width: 22px;
    text-align: center;
    line-height: 1;
}

/* Info card with icon */
.sbc-info-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sbc-info-card-inner { display: flex; align-items: flex-start; gap: 16px; }
.sbc-info-card-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sbc-info-card-icon.dark { background: linear-gradient(135deg, #0f172a, #334155); }
.sbc-info-card-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.sbc-info-card h3 { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: #0f172a; }
.sbc-info-card p { margin: 0; font-size: 14px; color: #64748b; line-height: 1.6; }

/* SDB feature grid */
.sbc-sdb-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}
.sbc-feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sbc-feature-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.sbc-feature-icon.blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.sbc-feature-icon.green  { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.sbc-feature-icon.purple { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.sbc-feature-icon.amber  { background: linear-gradient(135deg, #fefce8, #fef9c3); }
.sbc-feature-title { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }
.sbc-feature-desc { font-size: 13px; color: #64748b; line-height: 1.5; }

/* CTA */
.sbc-cta {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.sbc-cta h4 { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: #0f172a; }
.sbc-cta p  { margin: 0; font-size: 14px; color: #64748b; }

/* Stats grid */
.sbc-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.sbc-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.sbc-stat-card.pl-up   { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #a7f3d0; }
.sbc-stat-card.pl-down { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fecaca; }
.sbc-stat-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sbc-stat-label  { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.sbc-stat-card.pl-up  .sbc-stat-label { color: #047857; }
.sbc-stat-card.pl-down .sbc-stat-label { color: #b91c1c; }
.sbc-stat-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.sbc-stat-icon.blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.sbc-stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.sbc-stat-icon.green  { background: linear-gradient(135deg, #10b981, #059669); }
.sbc-stat-icon.red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.sbc-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.sbc-stat-card.pl-up   .sbc-stat-value { color: #047857; }
.sbc-stat-card.pl-down .sbc-stat-value { color: #b91c1c; }
.sbc-stat-pl-row { display: flex; align-items: baseline; gap: 8px; }
.sbc-stat-pl-pct {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
}
.sbc-stat-card.pl-up   .sbc-stat-pl-pct { color: #059669; }
.sbc-stat-card.pl-down .sbc-stat-pl-pct { color: #dc2626; }

/* Chart pills */
.sbc-pill-container {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    line-height: 0;
}
.sbc-time-pill {
    background: transparent;
    border: none;
    margin: 0 !important;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1 !important;
    display: inline-block;
}
.sbc-time-pill:hover { color: #0f172a; background: rgba(255, 255, 255, 0.6); }
.sbc-time-pill.active { background: #ffffff; color: #0f172a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); font-weight: 700; }

/* Chart header + footnote */
.sbc-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.sbc-chart-head h3 { margin: 0; font-size: 18px; font-weight: 600; color: #0f172a; }
.sbc-chart-wrap { height: 320px; position: relative; }
.sbc-chart-legend-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}
.sbc-chart-disclaimer {
    margin-top: 12px;
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* Holdings table */
.sbc-card.sbc-holdings-card { padding: 0; overflow: hidden; margin-bottom: 32px; }
.sbc-holdings-header {
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sbc-holdings-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #0f172a; line-height: 1; }
.sbc-holdings-count-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
}

.sbc-table-wrap { border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; }
.sbc-card.sbc-holdings-card .sbc-table-wrap { border: none; }
.sbc-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.sbc-table thead th {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 16px 24px;
    text-align: center;
}
.sbc-table thead th:first-child { text-align: left; }
.sbc-table tbody tr { background: #fff; transition: background-color 0.2s; }
.sbc-table tbody td {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
    font-weight: 500;
}

.sbc-order-row { cursor: pointer; }
.sbc-order-row:hover { background-color: #f8fafc; }
.sbc-order-row.active { background-color: #f1f5f9; border-bottom-color: transparent; }
.sbc-order-id { font-weight: 600; color: #0f172a; line-height: 1.2; }
.sbc-order-date { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.sbc-pl-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.sbc-details-row { display: none; }
.sbc-details-row.open { display: table-row; }
.sbc-details-row > td { padding: 0 !important; border-bottom: 1px solid #e2e8f0; }

.sbc-nested-wrapper { padding: 0; width: 100%; background-color: #f1f5f9; }
.sbc-nested-table { width: 100%; font-size: 13px; }
.sbc-nested-table th {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 12px 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f1f5f9;
}
.sbc-nested-table th:first-child { text-align: left; }
.sbc-nested-table td { padding: 16px 24px; color: #475569; border-bottom: 1px solid #e2e8f0; }
.sbc-nested-table tr:last-child td { border-bottom: none; }

/* Badges & utilities */
.sbc-roi-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 64px;
    text-align: center;
    letter-spacing: -0.01em;
}
.sbc-roi-badge.pos { background: #dcfce7; color: #166534; }
.sbc-roi-badge.neg { background: #fee2e2; color: #991b1b; }
.sbc-text-center { text-align: center !important; }
.sbc-text-right  { text-align: right !important; }
.sbc-text-green  { color: #16a34a; font-weight: 600; }
.sbc-text-red    { color: #dc2626; font-weight: 600; }

/* Coming-soon buttons with tooltip */
.sbc-coming-soon-btn { position: relative; display: inline-block; }
.sbc-coming-soon-btn button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
}
.sbc-coming-soon-btn .sbc-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 8px;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}
.sbc-coming-soon-btn .sbc-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
}
.sbc-coming-soon-btn:hover .sbc-tooltip { visibility: visible; opacity: 1; }

/* Empty states */
.sbc-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}
.sbc-empty-state.small { padding: 60px 40px; }
.sbc-empty-icon-circle {
    width: 80px; height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
    color: #94a3b8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.sbc-empty-icon-square {
    width: 64px; height: 64px;
    background: #fff;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.sbc-empty-state h3, .sbc-empty-state h4 { margin: 0 0 8px 0; color: #334155; font-weight: 600; }
.sbc-empty-state h3 { font-size: 18px; }
.sbc-empty-state h4 { font-size: 18px; }
.sbc-empty-state p  { margin: 0; color: #64748b; font-size: 14px; }
.sbc-empty-state.with-cta p { margin-bottom: 24px; }

/* Buttons */
.sbc-btn-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.sbc-btn-dark:hover { background: #1e293b; }
.sbc-btn-dark.sm { padding: 10px 18px; border-radius: 8px; font-size: 13px; gap: 6px; }

/* Statements table */
.sbc-statements-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sbc-fy-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sbc-fy-badge .sbc-fy-icon {
    width: 36px; height: 36px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.sbc-fy-label { font-size: 15px; color: #0f172a; font-weight: 700; }
.sbc-fy-period { color: #64748b; }
.sbc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #ecfdf5;
    color: #059669;
}

/* Responsive */
@media (max-width: 900px) {
    .sbc-stats-grid    { grid-template-columns: 1fr !important; }
    .sbc-sdb-features  { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 700px) {
    .sbc-tabs-responsive { flex-direction: column !important; }
    .sbc-tabs-responsive .sbc-tab-btn { flex: none !important; }
}
@media (max-width: 500px) {
    .sbc-sdb-features { grid-template-columns: 1fr !important; }
}
