@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* --- Base & Variables --- */
:root {
    /* Core Foundation (Always On) */
    --deep-ink: #0F172A;
    --fog-grey: #E5E7EB;
    --text-primary: #E5E7EB;
    --text-secondary: #9CA3AF;
    
    /* Discovery & Scanning */
    --audit-teal: #2DD4BF;
    --audit-teal-soft: #5EEAD4;
    
    /* System States */
    --signal-blue: #38BDF8;
    
    /* Cost Tracking */
    --muted-indigo: #818CF8;
    --soft-amber: #FBBF24;
    
    /* Usage Tracking */
    --warm-clay: #D6B89C;
    --muted-rose: #FB7185;
    
    /* Insights */
    --insight-indigo: #6366F1;
    --insight-amber: #FBBF24;
    --insight-rose: #FB7185;
    --slate-blue: #64748B;
    
    /* Community */
    --muted-plum: #A78BFA;
    
    /* Legacy mappings for compatibility */
    --primary-color: #2DD4BF;
    --secondary-color: #5EEAD4;
    --background-color: #0F172A;
    --card-background: #1E293B;
    --text-color: #E5E7EB;
    --subtle-text: #9CA3AF;
    --border-color: #334155;
    --success-color: #5EEAD4;
    --warning-color: #FBBF24;
    --danger-color: #FB7185;
    
    --font-family: 'Manrope', sans-serif;
    --heading-font: 'Playfair Display', serif;
    --border-radius: 14px;
    --box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
    --glow: 0 10px 22px rgba(45, 212, 191, 0.2);
}

.household-card { display: flex; flex-direction: column; gap: 1rem; }
.household-header h2 { margin: 0; }
.household-header p { margin: 0; color: var(--muted-text); }
.household-member-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.household-member-item { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1rem; border: 1px solid #e1e5f2; border-radius: 8px; background-color: #f9f9ff; }
.household-member-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.household-role { font-size: 0.85rem; color: var(--muted-text); }
.household-member-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.household-amount { font-weight: 600; }
.household-count { font-size: 0.85rem; color: var(--muted-text); }
.household-unassigned { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: var(--muted-text); }
.household-unassigned-services { font-size: 0.85rem; }
.household-empty { margin: 0; color: var(--muted-text); }
.household-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #f0f0f5; margin: 0.75rem 0 0.5rem 0; }
.household-bar-segment { display: inline-block; background: linear-gradient(90deg, rgba(74,71,163,0.15), rgba(112,111,211,0.45)); color: #2f2f2f; font-size: 0.7rem; text-align: center; line-height: 12px; white-space: nowrap; }
.household-bar-segment.unassigned { background: #ffe8e8; }

body {
    font-family: var(--font-family);
    background: radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.03), transparent 38%),
                radial-gradient(circle at 78% 8%, rgba(129, 140, 248, 0.04), transparent 35%),
                linear-gradient(180deg, var(--deep-ink) 0%, #0a0f1d 52%, #0b101f 100%);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* --- Header --- */
.main-header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.85rem 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}
.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.logo-text {
    color: var(--primary-color);
}
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    transition: color 0.2s ease, background-color 0.2s ease;
}
.nav-link:hover { color: #f8fafc; background-color: rgba(255, 255, 255, 0.06); }
.nav-icon {
    width: 24px;
    height: 24px;
}

/* --- Buttons & Forms --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--deep-ink);
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, var(--audit-teal), var(--audit-teal-soft));
    border: 1px solid rgba(45, 212, 191, 0.3);
    padding: 0.65rem 1.35rem;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-secondary { background: rgba(255, 255, 255, 0.04); color: var(--text-color); border-color: rgba(255, 255, 255, 0.06); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); }
.btn-danger { background: linear-gradient(135deg, var(--muted-rose), #f97171); color: #fff; border-color: rgba(251, 113, 133, 0.3); }
.btn-success { background: linear-gradient(135deg, var(--audit-teal-soft), var(--audit-teal)); color: var(--deep-ink); border-color: rgba(94, 234, 212, 0.3); }
.btn-warning { background: linear-gradient(135deg, var(--soft-amber), #fcd34d); color: var(--deep-ink); border-color: rgba(251, 191, 36, 0.3); }
.btn-small { padding: 0.45rem 0.85rem; font-size: 0.82rem; border-radius: 12px; }
.btn-full { width: 100%; box-sizing: border-box; }
.btn-disabled { cursor: not-allowed; opacity: 0.55; }

.dashboard-header-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.view-mode-toggle { display: inline-flex; gap: 0.25rem; background: rgba(255, 255, 255, 0.04); padding: 0.25rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.05); }
.view-mode-toggle .btn-small { min-width: 86px; }
.renewal-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; background: #101a2d; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--border-radius); padding: 0.85rem 1rem; box-shadow: 0 10px 22px rgba(0,0,0,0.25); margin-bottom: 1rem; }
.renewal-strip-left span { color: var(--subtle-text); font-size: 0.9rem; display: block; }
.renewal-strip-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.renewal-pill { background: rgba(255, 255, 255, 0.05); color: var(--text-color); padding: 0.35rem 0.65rem; border-radius: 999px; font-size: 0.85rem; border: 1px solid rgba(255, 255, 255, 0.06); }
.renewal-pill.trial { background: rgba(251, 191, 36, 0.14); color: var(--soft-amber); border-color: rgba(251, 191, 36, 0.25); }
.renewal-pill.alert { background: rgba(251, 191, 36, 0.14); color: var(--soft-amber); border-color: rgba(251, 191, 36, 0.25); }
.renewal-pill.muted { background: rgba(255, 255, 255, 0.04); color: var(--subtle-text); border-color: rgba(255, 255, 255, 0.05); }
.renewal-strip-actions { display: flex; gap: 0.5rem; }

.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1e293b;
    background: #ffffff;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--audit-teal);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Password Toggle Eye Icon --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--subtle-text);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-color);
}

.password-toggle:focus {
    outline: none;
    color: var(--audit-teal);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Dashboard & General Layout --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.dashboard-shell { display: flex; flex-direction: column; gap: 1.75rem; }
details.dashboard-group { border: 1px solid rgba(255, 255, 255, 0.05); border-radius: var(--border-radius); background: var(--card-background); box-shadow: var(--box-shadow); overflow: hidden; }
.dashboard-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; cursor: pointer; }
.dashboard-group summary::-webkit-details-marker { display: none; }
.group-summary { display: flex; flex-direction: column; gap: 0.25rem; }
.group-summary small { color: var(--subtle-text); font-weight: 500; }
.collapse-indicator { width: 12px; height: 12px; border-right: 2px solid var(--subtle-text); border-bottom: 2px solid var(--subtle-text); transform: rotate(45deg); transition: transform 0.2s ease; }
.dashboard-group[open] .collapse-indicator { transform: rotate(225deg); }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.35rem; padding: 1.25rem; background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.015)); border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 18px; }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid .card { margin-bottom: 0; }
.dashboard-grid .span-2 { grid-column: span 2; }
.show-more-hint { color: var(--primary-color); font-weight: 600; font-size: 0.85rem; }
.alerts-section, .subscriptions-section { margin-bottom: 2.5rem; }
h1, h2 {
    font-family: var(--heading-font);
    color: var(--text-color); 
}
h2 { border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 0.5rem; margin-bottom: 1.35rem; }

/* --- Alert Cards --- */
.alert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--card-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1rem;
    border-left: 5px solid var(--soft-amber);
}
.alert-card.alert-trial { border-left-color: var(--audit-teal-soft); }
.alert-card.alert-downgrade { border-left-color: var(--signal-blue); }
.alert-card.alert-usage { border-left-color: var(--warm-clay); }
.alert-icon { font-size: 1.5rem; }
.alert-content h4 { margin: 0 0 0.25rem 0; }
.alert-content p { margin: 0; color: var(--subtle-text); }

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background-color: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}
.status-chip.status-linked {
    background-color: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}
.status-chip.status-unlinked {
    background-color: rgba(251, 113, 133, 0.15);
    color: var(--muted-rose);
}
.status-chip.status-provider {
    background-color: rgba(56, 189, 248, 0.15);
    color: var(--signal-blue);
    text-transform: capitalize;
}
.status-chip.status-relay {
    background-color: rgba(167, 139, 250, 0.18);
    color: var(--muted-plum);
}

.linked-account-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.linked-account-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.link-new-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.linked-account-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.linked-account-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.linked-account-actions form {
    margin: 0;
    display: inline;
}

.linked-email-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.linked-account-preferences {
    margin-top: 1rem;
}

.linked-account-preferences .form-row {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.linked-account-hint {
    font-size: 0.85rem;
    color: var(--subtle-text);
    margin: 0.5rem 0 0.75rem 0;
}

.linked-account-schedule {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Email Accordion (Profile Page) --- */
.linked-account-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.email-accordion-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-background);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.email-accordion-item[open] {
    border-color: var(--audit-teal);
}

.email-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: background-color 0.2s ease;
    list-style: none;
}

.email-accordion-header::-webkit-details-marker {
    display: none;
}

.email-accordion-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.email-accordion-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-address {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.email-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.accordion-chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--subtle-text);
    border-bottom: 2px solid var(--subtle-text);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.email-accordion-item[open] .accordion-chevron {
    transform: rotate(225deg);
}

.email-accordion-content {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-accordion-content .linked-account-actions {
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.email-accordion-content .linked-account-preferences {
    margin-top: 0;
}

.email-accordion-content .linked-account-schedule {
    margin-top: 0.5rem;
}

.audit-snapshot {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.audit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.audit-item {
    background: #f9f9ff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.audit-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.audit-insights,
.insight-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.audit-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.15);
    color: var(--audit-teal);
}

.audit-chip.positive {
    background: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}

.audit-chip.negative {
    background: rgba(251, 113, 133, 0.15);
    color: var(--muted-rose);
}

.audit-chip.warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--soft-amber);
}

.audit-chip.critical {
    background: rgba(251, 113, 133, 0.15);
    color: var(--muted-rose);
}

.audit-chip.fee-chip {
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.audit-chip.subtle {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-secondary);
}

.audit-chip.stale {
    opacity: 0.6;
}

.audit-fee-breakdown {
    margin: 0.4rem 0 0 0.75rem;
    padding: 0;
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.confidence-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: rgba(45, 212, 191, 0.15); color: var(--audit-teal); }
.confidence-badge.confidence-high { background: rgba(94, 234, 212, 0.15); color: var(--audit-teal-soft); }
.confidence-badge.confidence-medium { background: rgba(251, 191, 36, 0.15); color: var(--soft-amber); }
.confidence-badge.confidence-low { background: rgba(251, 113, 133, 0.15); color: var(--muted-rose); }
.confidence-notes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0 0.2rem 0; }
.confidence-chip { background: rgba(0,0,0,0.05); color: var(--subtle-text); padding: 0.25rem 0.55rem; border-radius: 8px; font-size: 0.8rem; }
.sub-title { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.sub-correction { border: 1px solid var(--border-color); background: #f9f9ff; padding: 0.75rem; border-radius: 10px; margin: 0.5rem 0 0.25rem 0; }
.sub-correction .form-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sub-correction-actions { display: flex; gap: 0.5rem; align-items: center; }
.duplicate-warning { color: var(--danger-color); font-weight: 600; font-size: 0.9rem; }

.floating-actions { position: fixed; right: 1.15rem; bottom: 4.8rem; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 0.55rem; z-index: 1300; }
.floating-action-bar { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-end; transition: opacity 0.18s ease, transform 0.18s ease; }
.floating-action-bar.collapsed { opacity: 0; pointer-events: none; transform: translateY(10px); }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(45, 212, 191, 0.3); background: linear-gradient(145deg, var(--audit-teal), var(--audit-teal-soft)); color: var(--deep-ink); font-size: 1.1rem; cursor: pointer; box-shadow: 0 10px 24px rgba(0,0,0,0.25); display: inline-flex; align-items: center; justify-content: center; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.fab:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.fab:active { transform: translateY(0); }
.fab-form { margin: 0; }
.fab-toggle { border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.05); color: #eef1f7; border-radius: 18px; padding: 0.35rem 0.75rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.2); transition: background-color 0.12s ease, transform 0.12s ease; }
.fab-toggle:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.fab-toggle:active { transform: translateY(0); }

.onboarding-modal { max-width: 520px; }
.onboarding-progress { width: 100%; height: 8px; background: #f0f0f5; border-radius: 10px; overflow: hidden; margin-bottom: 1rem; }
.onboarding-progress-bar { height: 100%; width: 45%; background: linear-gradient(90deg, var(--audit-teal-soft), var(--audit-teal)); transition: width 0.3s ease; }
.onboarding-steps { margin-bottom: 0.5rem; }
.onboarding-preview { background: #f7f7ff; border: 1px solid var(--border-color); padding: 0.75rem; border-radius: 10px; margin: 0.75rem 0; }
.onboarding-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.suggestion-list { background: #fff; border: 1px solid var(--border-color); border-radius: 10px; padding: 0.5rem 0.75rem; margin-top: 0.35rem; display: grid; gap: 0.35rem; }
.suggestion-pill { display: inline-flex; padding: 0.35rem 0.65rem; border-radius: 14px; background: #eef0ff; color: var(--text-color); cursor: pointer; font-size: 0.85rem; }
.duplicate-warning-inline { color: var(--danger-color); font-size: 0.85rem; margin-top: 0.35rem; }

.benchmark-spotlight { border: 1px solid var(--border-color); background: #f9f9ff; padding: 0.85rem 1rem; border-radius: var(--border-radius); display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.benchmark-spotlight-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

body.compact-dashboard .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
body.compact-dashboard .card { padding: 1rem; }
body.compact-dashboard details.dashboard-group summary { padding: 0.75rem 1rem; }
body.compact-dashboard .group-summary small { font-size: 0.85rem; display: none; }
body.compact-dashboard .card h2 + p { display: none; }

@media (max-width: 900px) {
    .renewal-strip { grid-template-columns: 1fr; }
    .dashboard-header-actions { flex-direction: column; align-items: flex-start; }
    .floating-actions { right: 0.75rem; bottom: 4.2rem; }
    .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .renewal-strip-items { gap: 0.35rem; }
    .renewal-strip { padding: 0.75rem; }
}

.insight-note {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.insight-note.stale {
    color: #999;
}

.sub-automation {
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.automation-flag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(45, 212, 191, 0.06);
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.automation-flag-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 240px;
}

.automation-flag-text span {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.automation-flag-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.automation-flag-note {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.automation-card {
    margin-bottom: 1.5rem;
}

.automation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.trial-guardian-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trial-guardian-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.trial-guardian-subhead {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.trial-watchlist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.trial-watch-item {
    border: 1px solid var(--border-color);
    border-left: 6px solid rgba(45, 212, 191, 0.4);
    border-radius: var(--border-radius);
    background: var(--fog-grey);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--box-shadow);
}

.trial-rights-link {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
}

.insight-rights-link {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
}

.rights-cta-link {
    color: var(--audit-teal);
    font-weight: 600;
    text-decoration: none;
}

.rights-cta-link:hover {
    text-decoration: underline;
}

.trial-watch-item.status-urgent {
    border-left-color: var(--soft-amber);
}

.trial-watch-item.status-expired {
    border-left-color: var(--muted-rose);
}

.trial-watch-item.status-warning {
    border-left-color: var(--soft-amber);
    background: rgba(251, 191, 36, 0.08);
}

.trial-watch-item.status-ok {
    border-left-color: var(--audit-teal-soft);
}

.trial-watch-item.status-unknown {
    border-left-color: var(--slate-blue);
}

.trial-watch-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.trial-service {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
}

.trial-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(45, 212, 191, 0.15);
    color: var(--audit-teal);
    font-size: 0.75rem;
    font-weight: 600;
}

.trial-watch-item.status-urgent .trial-badge {
    background: rgba(251, 191, 36, 0.15);
    color: var(--soft-amber);
}

.trial-watch-item.status-expired .trial-badge {
    background: rgba(251, 113, 133, 0.15);
    color: var(--muted-rose);
}

.trial-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.trial-countdown {
    font-weight: 600;
}

.trial-compliance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0;
}

.compliance-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.compliance-chip.variant-warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--soft-amber);
}

.compliance-chip.variant-info {
    background: rgba(45, 212, 191, 0.15);
    color: var(--audit-teal);
}

.compliance-chip.variant-ok {
    background: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}

.compliance-chip.variant-neutral {
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.trial-compliance-list {
    margin: 0.4rem 0 0 1rem;
    padding: 0;
    color: #5d6470;
    font-size: 0.82rem;
}

.trial-compliance-list li {
    margin-bottom: 0.3rem;
}

.trial-actions {
    display: flex;
    gap: 0.5rem;
}

.usage-status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}

.usage-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.usage-pill.status-stale {
    background: rgba(214, 184, 156, 0.25);
    color: var(--warm-clay);
}

.usage-pill.status-at_risk {
    background: rgba(214, 184, 156, 0.25);
    color: var(--warm-clay);
}

.usage-pill.status-healthy {
    background: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}

.usage-pill.status-neutral {
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.usage-frequency {
    font-size: 0.82rem;
    color: var(--subtle-text);
}

.trial-reminder-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trial-reminder {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

.trial-reminder.status-scheduled {
    background: rgba(45, 212, 191, 0.15);
    color: var(--audit-teal);
}

.trial-reminder.status-overdue {
    background: rgba(251, 113, 133, 0.15);
    color: var(--muted-rose);
}

.trial-reminder.status-processing {
    background: rgba(251, 191, 36, 0.15);
    color: var(--soft-amber);
}

.trial-reminder.status-completed {
    background: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}

.trial-reminder.status-failed {
    background: rgba(251, 113, 133, 0.18);
    color: var(--muted-rose);
}

.trial-reminder.status-missing {
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-blue);
}

/* Chat concierge */
.chat-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1500;
    background: linear-gradient(145deg, var(--audit-teal), var(--audit-teal-soft));
    color: var(--deep-ink);
    border: 1px solid rgba(45, 212, 191, 0.3);
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 12px 26px rgba(0,0,0,0.22);
    cursor: pointer;
    font-weight: 700;
}
.chat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 4.2rem;
    width: 360px;
    max-height: 78vh;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1500;
}
.chat-panel.drawer { right: 0; bottom: 0; width: 420px; max-height: 100vh; border-radius: 0; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color); background: #f7f7ff; }
.chat-title { font-weight: 700; margin: 0; }
.chat-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; overflow-y: auto; }
.chat-message { background: #f9f9ff; border: 1px solid var(--border-color); padding: 0.75rem 0.9rem; border-radius: 12px; font-size: 0.95rem; }
.chat-message.assistant { background: #eef0ff; }
.chat-message.user { background: #f4f4f4; align-self: flex-end; }
.chat-quick-row { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1rem 0.75rem; border-bottom: 1px solid var(--border-color); }
.chat-chip { background: #eef0ff; color: var(--text-color); border: 1px solid var(--border-color); border-radius: 999px; padding: 0.4rem 0.75rem; font-size: 0.85rem; cursor: pointer; }
.chat-actions-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.chat-footer { padding: 0.75rem 1rem 1rem; border-top: 1px solid var(--border-color); display: flex; gap: 0.5rem; }
.chat-input { flex: 1; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid var(--border-color); font-size: 0.95rem; }
.chat-send { padding: 0.65rem 1rem; border-radius: 10px; border: none; background: var(--audit-teal); color: var(--deep-ink); font-weight: 700; cursor: pointer; }
.chat-empty { font-size: 0.9rem; color: var(--subtle-text); }

@media (max-width: 720px) {
    .chat-panel { right: 0.5rem; left: 0.5rem; width: auto; }
    .chat-launcher { right: 0.75rem; bottom: 0.75rem; }
}

.trial-reminder.status-unsupported {
    background: rgba(149, 165, 166, 0.2);
    color: #536871;
}

.trial-reminder.status-unknown {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.trial-compliance {
    margin: 0;
    font-size: 0.82rem;
    color: #5d6470;
}

.trial-empty {
    margin: 0;
    color: var(--subtle-text);
}

.inventory-guard-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inventory-guard-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inventory-guard-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.duplicate-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.duplicate-item {
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--border-radius);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.duplicate-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.duplicate-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--insight-indigo);
}

.duplicate-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.duplicate-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inventory-guard-empty {
    margin: 0;
    color: var(--subtle-text);
    font-style: italic;
}

.insight-feed-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.insight-feed-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.insight-feed-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.insight-feed-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.insight-feed-item {
    display: flex;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.02);
}

.feed-chip {
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(167, 139, 250, 0.18);
    color: var(--muted-plum);
}

.feed-chip.feed-churn_reason {
    background: rgba(251, 191, 36, 0.18);
    color: var(--soft-amber);
}

.feed-chip.feed-trending_cancellation {
    background: rgba(251, 113, 133, 0.18);
    color: var(--muted-rose);
}

.feed-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.feed-title {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.feed-detail {
    margin: 0;
    font-size: 0.88rem;
    color: var(--subtle-text);
}

.feed-timestamp {
    font-size: 0.78rem;
    color: var(--subtle-text);
}

.insight-feed-empty {
    margin: 0;
    color: var(--subtle-text);
}

.budget-guard-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.budget-guard-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.budget-guard-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.budget-guard-summary {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.budget-total {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.budget-summary-caption {
    font-size: 0.9rem;
    color: var(--subtle-text);
}

.budget-guard-limit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.02);
}

.budget-limit-chip {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.18);
    color: var(--muted-indigo);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.budget-limit-chip.state-over {
    background: rgba(251, 113, 133, 0.18);
    color: var(--muted-rose);
}

.budget-limit-chip.state-urgent {
    background: rgba(251, 191, 36, 0.2);
    color: var(--soft-amber);
}

.budget-limit-chip.state-watch {
    background: rgba(129, 140, 248, 0.18);
    color: var(--muted-indigo);
}

.budget-limit-chip.state-ok {
    background: rgba(94, 234, 212, 0.18);
    color: var(--audit-teal-soft);
}

.budget-limit-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--subtle-text);
}

.budget-guard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.budget-guard-column h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.budget-renewal-list,
.budget-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.budget-renewal-list li {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.budget-renewal-date {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.budget-renewal-price {
    font-size: 0.85rem;
    color: var(--text-color);
}

.budget-alert {
    border-radius: var(--border-radius);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.budget-alert-critical {
    border-color: rgba(251, 113, 133, 0.3);
    background: rgba(251, 113, 133, 0.12);
}

.budget-alert-warning {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.12);
}

.budget-alert-info {
    border-color: rgba(45, 212, 191, 0.3);
    background: rgba(45, 212, 191, 0.08);
}

.budget-alert-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.budget-alert-impact,
.budget-alert-headline,
.budget-alert-timestamp {
    font-size: 0.82rem;
    color: var(--subtle-text);
}

.budget-fee-breakdown {
    list-style: none;
    margin: 0;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--subtle-text);
}

.budget-lock-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.budget-lock-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.budget-lock-item.type-duplicate {
    border-color: rgba(99, 102, 241, 0.25);
    background: rgba(99, 102, 241, 0.08);
}

.budget-lock-item.type-bundle {
    border-color: rgba(94, 234, 212, 0.25);
    background: rgba(94, 234, 212, 0.08);
}

.budget-lock-item.type-tip {
    border-color: rgba(56, 189, 248, 0.25);
    background: rgba(56, 189, 248, 0.08);
}

.budget-lock-message {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-color);
}

.budget-lock-savings {
    font-size: 0.82rem;
    color: var(--subtle-text);
}

.community-benchmarks-card,
.bundle-optimizer-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benchmarks-header p,
.bundle-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.benchmark-list,
.bundle-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.benchmark-item,
.bundle-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.9rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.benchmark-item.status-over {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
}

.benchmark-item.status-watch {
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
}

.benchmark-item.status-advantage,
.benchmark-item.status-deal {
    border-color: rgba(94, 234, 212, 0.25);
    background: rgba(94, 234, 212, 0.08);
}

.benchmark-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.benchmark-delta {
    font-weight: 600;
    font-size: 0.95rem;
}

.benchmark-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: var(--subtle-text);
}

.benchmark-advice {
    margin: 0;
    font-size: 0.88rem;
}

.benchmarks-empty,
.bundle-empty {
    margin: 0;
    color: var(--subtle-text);
}

.bundle-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bundle-total {
    font-size: 0.95rem;
    font-weight: 600;
}

.bundle-services,
.bundle-focus {
    font-size: 0.86rem;
    color: var(--subtle-text);
}

.bundle-suggestion {
    margin: 0;
    font-size: 0.9rem;
}

.bundle-savings {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e8449;
}

.page-intro {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.page-intro h1 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-intro h1 .page-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.page-intro p {
    margin: 0;
    color: var(--subtle-text);
}

.community-stats-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.community-stats-card .text-muted {
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    opacity: 0.75;
    font-weight: 500;
}

.community-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.community-stat {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.9rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.community-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.community-stat-label {
    font-size: 0.85rem;
    color: #64748b;
}

.community-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.community-savers-card,
.community-reasons-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saver-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.saver-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.saver-item strong {
    color: #1e293b;
}

.saver-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.saver-savings {
    font-weight: 600;
    color: #1e8449;
}

.saver-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

.reason-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.reason-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.reason-list li strong {
    color: #1e293b;
}

.reason-list li span {
    color: #64748b;
}

.community-tips-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.tip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tip-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tip-body {
    margin: 0;
    font-size: 0.92rem;
    color: #1e293b;
}

.tip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}

.tip-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.community-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.community-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.community-card-header h2 {
    margin: 0;
}

.community-card-subtitle {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.tip-spotlight {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: #fdf7e3;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-spotlight-body {
    margin: 0;
    font-size: 0.95rem;
    color: #1e293b;
}

.tip-spotlight-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

.tip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.85rem;
    color: #64748b;
}

.tip-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-author {
    font-weight: 500;
}

.tip-timestamp {
    color: #64748b;
}

.tip-upvotes {
    font-weight: 600;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.community-polls-card,
.community-offers-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.community-stats-card .empty-state,
.community-savers-card .empty-state,
.community-reasons-card .empty-state,
.community-tips-card .empty-state,
.community-polls-card .empty-state,
.community-offers-card .empty-state {
    color: #64748b;
}

.community-poll {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.community-poll h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #1e293b;
}

.poll-description {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.poll-status {
    font-size: 0.85rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.poll-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    background: #ffffff;
    cursor: pointer;
}

.poll-choice input {
    margin-top: 0.35rem;
}

.poll-choice-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.poll-option-label {
    font-weight: 600;
    color: #1e293b;
}

.poll-option-detail {
    font-size: 0.85rem;
    color: #64748b;
}

.poll-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-result {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poll-result.is-selected {
    border-color: var(--secondary-color);
    background: rgba(112, 111, 211, 0.08);
}

.poll-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.poll-result-label {
    color: #1e293b;
}

.poll-result-share {
    color: #1e293b;
}

.poll-result-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.poll-result-fill {
    display: block;
    height: 100%;
    width: calc(var(--poll-share, 0) * 1%);
    background: var(--secondary-color);
}

.poll-result-detail {
    font-size: 0.85rem;
    color: #64748b;
}

.poll-response-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

.offer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.offer-item {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.offer-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.offer-partner {
    font-weight: 600;
    color: #1e293b;
}

.offer-savings {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.offer-headline {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.offer-description {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.offer-expiry {
    color: #64748b;
}

.offer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.offer-expiry {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

@media (max-width: 720px) {
    .community-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.tip-form input {
    flex: 1 1 320px;
    padding: 0.65rem 0.85rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.empty-state {
    margin: 0;
    color: var(--subtle-text);
}

.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;
}

.budget-empty {
    margin: 0;
    color: var(--subtle-text);
    font-style: italic;
}

@media (max-width: 700px) {
    .trial-watch-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .trial-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .trial-actions .btn {
        flex: 1 1 160px;
    }

    .trial-reminder-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .duplicate-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .duplicate-meta {
        flex-direction: column;
        gap: 0.4rem;
    }

    .budget-guard-summary {
        flex-direction: column;
        align-items: flex-start;
    }
}

.usage-pulse-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-pulse-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.usage-pulse-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.usage-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.usage-summary-item {
    background: rgba(45, 212, 191, 0.08);
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.usage-summary-item.stale {
    background: rgba(214, 184, 156, 0.18);
    border-color: rgba(214, 184, 156, 0.3);
}

.usage-summary-item.at-risk {
    background: rgba(214, 184, 156, 0.18);
    border-color: rgba(214, 184, 156, 0.3);
}

.usage-summary-item.healthy {
    background: rgba(94, 234, 212, 0.12);
    border-color: rgba(94, 234, 212, 0.2);
}

.usage-summary-item.value-strong {
    background: rgba(94, 234, 212, 0.15);
    border-color: rgba(94, 234, 212, 0.25);
}

.usage-summary-item.value-risk {
    background: rgba(214, 184, 156, 0.18);
    border-color: rgba(214, 184, 156, 0.3);
}

.usage-summary-count {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
}

.usage-summary-label {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.usage-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.usage-column h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
}

.usage-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.usage-column li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fdfdff;
}

.usage-column li strong {
    font-size: 0.95rem;
}

.usage-column li span {
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.usage-column .empty-state {
    font-size: 0.85rem;
    color: var(--subtle-text);

    .trial-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .trial-actions .btn {
        flex: 1 1 160px;
    }

    .trial-reminder-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.usage-guidance {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.usage-guidance-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.usage-guidance-column {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: #fbfbfe;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.usage-guidance-column h4 {
    margin: 0;
    font-size: 0.95rem;
}

.usage-guidance-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.usage-guidance-column li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem;
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--border-radius);
    background: var(--fog-grey);
}

.usage-guidance-reason {
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.usage-guidance-cost {
    font-size: 0.75rem;
    color: var(--muted-text);
}

.discovery-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.discovery-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.discovery-header p {
    margin: 0;
    color: var(--subtle-text);
    font-size: 0.9rem;
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.discovery-column {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.where-to-watch-list,
.content-tracking-list,
.move-notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.where-to-watch-list li,
.content-tracking-list li,
.move-notification-list li {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fcfcff;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.where-to-watch-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.4rem;
}

.where-to-watch-label,
.content-tracking-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--subtle-text);
}

.where-to-watch-values,
.content-tracking-values,
.content-tracking-hint {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.where-to-watch-note {
    font-size: 0.8rem;
    color: var(--muted-text);
}

.content-tracking-metric {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--audit-teal);
}

.move-countdown {
    font-size: 0.8rem;
    color: var(--soft-amber);
}

.move-target {
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.bundle-builder {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    background: #f8f9ff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bundle-builder-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.bundle-builder-summary {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.bundle-builder-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .bundle-builder-body {
        flex-direction: row;
    }
}

.bundle-options {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bundle-option {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem;
    border: 1px solid rgba(45, 212, 191, 0.15);
    border-radius: var(--border-radius);
    background: var(--fog-grey);
}

.bundle-option input[type="checkbox"] {
    margin-top: 0.2rem;
}

.bundle-option-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.bundle-summary {
    flex: 1 1 40%;
    border: 1px dashed rgba(45, 212, 191, 0.3);
    border-radius: var(--border-radius);
    padding: 0.85rem;
    background: var(--fog-grey);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.bundle-summary p {
    margin: 0;
}

.bundle-summary-caption {
    font-size: 0.8rem;
    color: var(--subtle-text);
}

.bundle-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.8rem;
}

.bundle-presets span {
    color: var(--subtle-text);
}

.compliance-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.compliance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.compliance-actions {
    display: flex;
    gap: 0.5rem;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.compliance-column {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fbfbfe;
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.compliance-badge-list,
.rights-overview-list,
.regulation-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.badge-item {
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: var(--border-radius);
    background: var(--fog-grey);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.badge-item.variant-warning {
    border-color: rgba(251, 191, 36, 0.3);
}

.badge-item.variant-info {
    border-color: rgba(45, 212, 191, 0.3);
}

.badge-item.variant-neutral {
    border-color: rgba(100, 116, 139, 0.3);
}

.badge-heading {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
}

.badge-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-statute {
    font-size: 0.75rem;
    color: var(--subtle-text);
}

.badge-actions {
    list-style: disc;
    margin: 0.2rem 0 0 1rem;
    padding: 0;
    color: var(--subtle-text);
    font-size: 0.8rem;
}

.rights-overview-list li,
.regulation-feed li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.rights-overview-list a,
.regulation-feed a {
    font-size: 0.8rem;
    color: var(--audit-teal);
}

.regulation-meta {
    font-size: 0.75rem;
    color: var(--muted-text);
}

.automation-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.automation-task {
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: #fbfdff;
}

.automation-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.automation-task-meta strong {
    font-size: 1rem;
}

.automation-task-type {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
}

.automation-task-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    font-size: 0.9rem;
    color: #444;
}

.automation-task-note {
    color: #2c5777;
}

.automation-task-status {
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eef2ff;
    color: #2d3a6f;
}

.automation-task-status.processing {
    background: #fff8e5;
    color: #9a6b00;
}

.automation-empty {
    margin: 0;
    color: var(--subtle-text);
}

.audit-status {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
}

.audit-status.success { color: var(--audit-teal-soft); background: rgba(94, 234, 212, 0.15); }
.audit-status.warning { color: var(--soft-amber); background: rgba(251, 191, 36, 0.15); }
.audit-status.error { color: var(--muted-rose); background: rgba(251, 113, 133, 0.15); }
.audit-status.skipped { color: var(--slate-blue); background: rgba(100, 116, 139, 0.15); }
.audit-status.pending { color: var(--text-secondary); background: rgba(156, 163, 175, 0.15); }

.audit-reason {
    margin: 0;
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.audit-empty {
    margin: 0;
    color: var(--subtle-text);
}

.schedule-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.schedule-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-summary {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--subtle-text);
}

.schedule-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: grid;
    gap: 0.5rem;
    background: #fdfdff;
}

.schedule-item-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.schedule-meta strong {
    color: #1e293b;
}

.schedule-frequency {
    font-size: 0.85rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedule-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #1e293b;
}

.schedule-label {
    font-weight: 600;
    color: #475569;
}

.schedule-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.schedule-status.scheduled { background: rgba(45, 212, 191, 0.15); color: var(--audit-teal); }
.schedule-status.overdue { background: rgba(251, 191, 36, 0.15); color: var(--soft-amber); }
.schedule-status.paused { background: rgba(100, 116, 139, 0.15); color: var(--slate-blue); }

.schedule-last-run,
.schedule-reminder {
    font-size: 0.85rem;
    color: var(--subtle-text);
}

.schedule-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.schedule-status-chip.status-scheduled {
    background-color: rgba(94, 234, 212, 0.15);
    color: var(--audit-teal-soft);
}

.schedule-status-chip.status-overdue {
    background-color: rgba(251, 191, 36, 0.18);
    color: var(--soft-amber);
}

.schedule-status-chip.status-paused {
    background-color: rgba(100, 116, 139, 0.2);
    color: var(--slate-blue);
}

.auto-scan-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.auto-scan-summary li {
    background: #f8f9ff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auto-scan-summary li .summary-label {
    color: #475569;
}

.auto-scan-summary li .summary-value {
    color: #1e293b;
}

.schedule-reminder.muted {
    color: #9aa0b3;
}

.schedule-alert {
    font-size: 0.85rem;
    color: var(--danger-color);
    font-weight: 600;
}

.summary-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

.summary-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
}

.auto-scan-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.auto-scan-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
}

.auto-scan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.auto-scan-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auto-scan-grid small {
    color: var(--subtle-text);
    font-size: 0.85rem;
    line-height: 1.4;
}

[data-auto-scan-form].auto-scan-disabled .auto-scan-grid {
    opacity: 0.6;
}

.linked-account-empty {
    text-align: center;
    padding: 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    color: var(--subtle-text);
}

/* --- Subscription Cards --- */
.subscription-list { display: grid; gap: 1.5rem; }
.subscription-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.subscription-card.unused {
    border-left: 5px solid var(--warm-clay);
    background-color: rgba(214, 184, 156, 0.08);
}
.sub-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.sub-header h3 { margin: 0; }
.sub-price { font-weight: 600; font-size: 1.1rem; color: var(--muted-indigo); }
.sub-meta { font-size: 0.85rem; color: var(--subtle-text); display: flex; flex-wrap: wrap; gap: 0.75rem; margin: -0.5rem 0 1rem 0; }
.sub-meta span { display: flex; align-items: center; gap: 0.35rem; }
.sub-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sub-insights {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr 1fr;
}
.insight-group { display: flex; flex-direction: column; gap: 0.75rem; }
.insight-group h4 { margin: 0 0 0.5rem 0; font-size: 1rem; color: var(--audit-teal); }
.insight-item { display: flex; justify-content: space-between; align-items: center; }
.insight-label { font-weight: 500; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.insight-value { font-weight: 600; font-size: 0.9rem; }
.insight-value.positive { color: var(--audit-teal-soft); }
.insight-value.negative { color: var(--warm-clay); }
.insight-item-col { display: flex; flex-direction: column; align-items: flex-start; }
.insight-item-col ul { margin: 0.5rem 0 0 0; padding-left: 1.2rem; font-size: 0.9rem; }
.spinner { border: 3px solid rgba(100, 116, 139, 0.2); border-top: 3px solid var(--audit-teal); border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 1rem auto; grid-column: 1 / -1; }
.spinner-small { border: 2px solid rgba(100, 116, 139, 0.2); border-top: 2px solid var(--audit-teal); border-radius: 50%; width: 16px; height: 16px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.scan-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.45); z-index: 2500; padding: 1.5rem; box-sizing: border-box; }
.scan-overlay.visible { display: flex; }
.scan-panel { background: var(--card-background); padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--box-shadow); text-align: center; max-width: 320px; width: 100%; }
.scan-panel .scan-message { margin: 1rem 0 0.5rem 0; font-weight: 600; }
.scan-panel .scan-subtext { margin: 0; font-size: 0.9rem; color: var(--subtle-text); }

/* --- Modals --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.modal-content { background-color: var(--card-background); padding: 1.5rem; border-radius: var(--border-radius); width: min(540px, 94vw); max-width: 94vw; position: relative; max-height: 90vh; overflow-y: auto; box-sizing: border-box; }
.modal-content.add-subscription { width: min(560px, 96vw); }
.close-button { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; font-weight: bold; cursor: pointer; color: var(--subtle-text); }
.modal-message { padding: 0.875rem 1rem; margin-bottom: 1.25rem; background-color: rgba(74, 71, 163, 0.08); border-left: 3px solid var(--primary-color); border-radius: var(--border-radius); font-size: 0.9rem; color: var(--text-color); line-height: 1.5; }
.cancel-assist-modal { max-width: 540px; }
.cancel-assist-summary { margin-bottom: 1rem; font-weight: 500; color: var(--text-color); }
.cancel-assist-timing { margin: 0 0 0.75rem 0; font-size: 0.9rem; font-weight: 600; color: var(--primary-color); }
.cancel-assist-steps { margin: 0 0 1rem 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.cancel-assist-reminder { font-size: 0.9rem; font-weight: 600; color: var(--primary-color); margin-bottom: 1rem; }
.cancel-assist-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cancel-assist-notice { margin: 0; font-size: 0.85rem; color: var(--subtle-text); }
.cancel-assist-compliance { margin-top: 1rem; }
.cancel-assist-compliance h3 { margin: 0 0 0.5rem 0; font-size: 0.95rem; color: var(--text-color); }
.cancel-assist-compliance .cancel-assist-hint { margin: 0 0 0.6rem 0; font-size: 0.85rem; color: var(--text-color); }
.cancel-assist-compliance ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--subtle-text); }
.cancel-assist-advocacy { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.cancel-assist-advocacy h3 { margin: 0; font-size: 0.95rem; color: var(--text-color); }
.script-header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.script-label { font-weight: 600; font-size: 0.85rem; color: var(--text-color); }
.script-value { font-size: 0.85rem; color: var(--subtle-text); max-width: 100%; overflow-wrap: anywhere; }
.btn-tiny { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.script-text { width: 100%; min-height: 110px; border-radius: var(--border-radius); border: 1px solid rgba(0,0,0,0.12); padding: 0.6rem; font-size: 0.85rem; color: var(--text-color); background: rgba(0,0,0,0.03); }
.script-text:focus { outline: none; border-color: var(--audit-teal); }
.violation-log { margin: 0; font-size: 0.82rem; color: var(--subtle-text); background: rgba(251, 113, 133, 0.08); border-left: 3px solid var(--muted-rose); padding: 0.6rem; border-radius: var(--border-radius); }
.cancel-assist-rights { margin-top: 1.5rem; }
.cancel-assist-rights h3 { margin: 0 0 0.5rem 0; font-size: 0.95rem; color: var(--text-color); }
.cancel-assist-rights ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }

.cancel-assist-rights-cta {
    margin-top: 1rem;
}
.rights-item { background-color: rgba(45, 212, 191, 0.08); border-radius: var(--border-radius); padding: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.rights-item-title { font-weight: 600; color: var(--audit-teal); font-size: 0.9rem; }
.rights-item-summary { margin: 0; font-size: 0.82rem; color: var(--text-color); }
.rights-item-actions { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; color: var(--subtle-text); }
.rights-item-link { font-size: 0.78rem; color: var(--audit-teal); text-decoration: none; font-weight: 600; }
.rights-item-link:hover { text-decoration: underline; }
.cancel-assist-refund { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.refund-eligibility { font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; align-self: flex-start; background-color: rgba(45, 212, 191, 0.15); color: var(--audit-teal); }
.refund-eligibility.variant-warning { background-color: rgba(251, 191, 36, 0.15); color: var(--soft-amber); }
.refund-eligibility.variant-info { background-color: rgba(56, 189, 248, 0.15); color: var(--signal-blue); }
.refund-step-list { margin: 0 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; color: var(--text-color); }
.manual-add-message { margin: 0 0 1rem 0; padding: 0.85rem 1rem; border-radius: var(--border-radius); background: rgba(0, 110, 255, 0.08); color: var(--text-color); font-weight: 600; }
.refund-citations { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.75rem; color: var(--subtle-text); }
.citation-chip { background-color: rgba(0, 0, 0, 0.07); border-radius: 999px; padding: 0.2rem 0.6rem; font-weight: 600; }
.refund-escalation { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.refund-escalation-link { font-size: 0.8rem; color: var(--audit-teal); text-decoration: none; font-weight: 600; }
.refund-escalation-link:hover { text-decoration: underline; }
.cancel-assist-knowledge { margin-top: 1.5rem; }
.cancel-assist-knowledge h3 { margin: 0 0 0.5rem 0; font-size: 0.95rem; color: var(--text-color); }
.knowledge-card-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.knowledge-card { border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 0.75rem; text-decoration: none; color: inherit; transition: border-color 0.2s ease, transform 0.2s ease; background-color: var(--fog-grey); }
.knowledge-card:hover { border-color: var(--audit-teal); transform: translateY(-1px); }
.knowledge-card-title { font-weight: 600; font-size: 0.88rem; color: var(--audit-teal); margin-bottom: 0.25rem; }
.knowledge-card-summary { margin: 0; font-size: 0.8rem; color: var(--subtle-text); }
.community-wisdom { background-color: #f8f9fa; border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 1rem; margin-bottom: 1.5rem; }
.community-wisdom h4 { margin-top: 0; }
.community-wisdom ul { padding-left: 1.2rem; margin-bottom: 0; }

/* --- Subscription Review Page --- */
.subscription-review-list { display: flex; flex-direction: column; gap: 0.5rem; }
.subscription-review-item { display: flex; align-items: center; background-color: #f8f9fa; padding: 1rem; border-radius: var(--border-radius); cursor: pointer; border: 1px solid var(--border-color); transition: background-color 0.2s; }
.subscription-review-item:hover { background-color: #e9ecef; }
.subscription-review-item input[type="checkbox"] { width: 1.2rem; height: 1.2rem; margin-right: 1rem; }
.subscription-review-item .sub-info { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.subscription-review-item .service-name { font-weight: 600; }
.subscription-review-item .service-price { font-weight: 500; color: var(--primary-color); }

.selection-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.selection-summary { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; }
.selection-count { font-weight: 600; }
.selection-limit { color: var(--subtle-text); }
.selection-actions { display: flex; gap: 0.5rem; }

/* --- Auth & Other Pages --- */
.auth-container { max-width: 450px; margin: 3rem auto; }
.card { background: #111a25; padding: 1.8rem; border-radius: var(--border-radius); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24); margin-bottom: 2rem; border: 1px solid rgba(255, 255, 255, 0.05); }
.auth-switch { text-align: center; margin-top: 1.5rem; }
.flash-messages { margin-bottom: 1.5rem; }
.alert { padding: 1rem; border-radius: var(--border-radius); }
.alert-success { background-color: #d4edda; color: #155724; }
.alert-error { background-color: #f8d7da; color: #721c24; }
.alert-info { background-color: #d1ecf1; color: #0c5460; }
.alert-warning { background-color: #fff3cd; color: #856404; }
.auth-divider { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; margin: 1.5rem 0; color: var(--subtle-text); font-weight: 500; font-size: 1rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-color); margin: 0 1rem; }

.styled-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.styled-table thead tr { background-color: var(--audit-teal); color: var(--deep-ink); text-align: left; }
.styled-table th, .styled-table td { padding: 12px 15px; }
.styled-table tbody tr { border-bottom: 1px solid var(--border-color); }
.styled-table tbody tr:last-of-type { border-bottom: 2px solid var(--audit-teal); }
.status-linked { color: var(--audit-teal-soft); font-weight: 600; }
.status-unlinked { color: var(--soft-amber); font-weight: 600; }
.audit-controls { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.audit-filter-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.audit-filter-link { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid var(--border-color); color: var(--text-color); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: all 0.2s ease; }
.audit-filter-link:hover { border-color: var(--audit-teal); color: var(--audit-teal); }
.audit-filter-link.active { background: var(--audit-teal); color: var(--deep-ink); border-color: var(--audit-teal); }
.audit-table-wrapper { max-height: 520px; overflow-y: auto; border-radius: var(--border-radius); }
.audit-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.audit-table thead th { position: sticky; top: 0; background: var(--audit-teal); color: var(--deep-ink); z-index: 1; }
.audit-table tbody tr:nth-child(odd) { background: rgba(45, 212, 191, 0.03); }
.audit-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.audit-timestamp { font-weight: 600; font-size: 0.9rem; }
.audit-email { font-size: 0.9rem; word-break: break-word; }
.audit-service { font-weight: 600; }
.audit-reason { font-size: 0.85rem; color: var(--subtle-text); }
.audit-muted { color: var(--subtle-text); }
.status-chip.status-suppressed_duplicate { background-color: rgba(251, 191, 36, 0.15); color: var(--soft-amber); }
.status-chip.status-detected { background-color: rgba(94, 234, 212, 0.18); color: var(--audit-teal-soft); }
.status-chip.status-skipped { background-color: rgba(100, 116, 139, 0.2); color: var(--slate-blue); }
.status-chip.status-error { background-color: rgba(251, 113, 133, 0.18); color: var(--muted-rose); }
.price-chip { display: inline-flex; align-items: center; padding: 0.25rem 0.55rem; border-radius: 999px; font-weight: 600; background: rgba(129, 140, 248, 0.15); color: var(--muted-indigo); }
.empty-state { text-align: center; font-size: 0.9rem; color: var(--subtle-text); margin: 0.75rem auto 0; max-width: 420px; }

/* --- Consumer Rights Hub --- */
.rights-section { margin-bottom: 2.5rem; }
.rights-hero {
    background: linear-gradient(140deg, rgba(45, 212, 191, 0.12), rgba(94, 234, 212, 0.08));
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.rights-hero p { margin: 0; color: var(--subtle-text); }
.rights-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}
.rights-hint { margin: 0; color: var(--subtle-text); font-size: 0.9rem; }
.meta-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--subtle-text);
}
.meta-value { font-weight: 600; }
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.right-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.right-card.compact {
    box-shadow: none;
    border-style: dashed;
    border-color: rgba(74, 71, 163, 0.2);
}
.right-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}
.right-card p { margin: 0; color: var(--text-color); }
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(45, 212, 191, 0.15);
    color: var(--audit-teal);
}
.action-list {
    margin: 0;
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.resource-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.resource-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--audit-teal);
    text-decoration: none;
}
.resource-link:hover { text-decoration: underline; }
.dispute-template {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.dispute-template pre {
    background: #f7f7fb;
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #1e293b;
}
.step-list {
    margin: 0;
    padding-left: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.knowledge-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.knowledge-list a {
    font-weight: 600;
    color: var(--audit-teal);
    text-decoration: none;
}
.knowledge-list a:hover { text-decoration: underline; }
.knowledge-summary {
    margin: 0.25rem 0 0 0;
    color: var(--subtle-text);
    font-size: 0.85rem;
}
.rights-catalog {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}
.catalog-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}
.catalog-section h3 {
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.catalog-section.is-active {
    border-color: var(--audit-teal);
    box-shadow: 0 10px 28px rgba(45, 212, 191, 0.18);
}

/* --- Footer Styles --- */
.site-footer {
    padding: 2rem 0 1rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--audit-teal);
}

.footer-meta {
    text-align: center;
    color: var(--subtle-text);
    font-size: 0.85rem;
}

/* --- Monetization & Upgrade Styles --- */
.ad-footer { padding-bottom: 1rem; }
.ad-slot { text-align: center; padding: 1rem; background: #e2e2e8; border-radius: var(--border-radius); margin: 2rem 0; }
.premium-features ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.premium-features li { padding: 0.5rem 0; font-weight: 500; }
.price-display { text-align: center; margin: 2rem 0; padding: 1rem; background: #f8f9fa; border-radius: var(--border-radius); }
.price-display p { margin: 0; color: var(--subtle-text); font-weight: 500; }
.price-display h3 { margin: 0; font-size: 2.5rem; color: var(--primary-color); font-family: var(--heading-font); }

/* --- NEW: Insights Page Enhancements --- */
.progress-bar { background-color: var(--border-color); border-radius: var(--border-radius); overflow: hidden; height: 24px; }
.progress-bar-fill { height: 100%; display: flex; align-items: center; justify-content: center; color: white; font-weight: 600; font-size: 0.8rem; transition: width 0.5s ease; }
.what-if-container { display: flex; flex-direction: column; gap: 0.75rem; max-height: 300px; overflow-y: auto; padding-right: 0.5rem; }
.what-if-item { display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; padding: 0.75rem; border-radius: 8px; }
.what-if-item label { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; cursor: pointer; }
.what-if-item input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
.what-if-summary { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 0.5rem; text-align: right; }
.what-if-summary strong { font-size: 1.2rem; }
.what-if-summary .savings strong { color: var(--success-color); }

/* --- NEW: Onboarding & Account Page Enhancements --- */
.progress-bar-container { margin-bottom: 2rem; }
.progress-bar-container span { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--subtle-text); }
.privacy-mode-banner { background: #f0f8ff; border: 1px solid #cce5ff; padding: 1rem; border-radius: var(--border-radius); margin-bottom: 1.5rem; }
.privacy-mode-banner label { display: flex; align-items: center; gap: 0.75rem; font-weight: bold; cursor: pointer; }
.privacy-mode-banner input[type="checkbox"] { width: 1.1rem; height: 1.1rem; }
.privacy-mode-banner p { font-size: 0.9em; margin: 0.5rem 0 0 0; color: var(--subtle-text); }
.danger-zone { border: 1px solid rgba(220, 53, 69, 0.4); background: rgba(220, 53, 69, 0.08); }
.danger-zone h3 { color: var(--danger-color); }
.danger-zone p { color: #7c1f2a; margin-bottom: 1.25rem; }
.danger-zone .btn-danger { background-color: var(--danger-color); border-color: var(--danger-color); }
.danger-zone .btn-danger:hover { background-color: #b02a37; border-color: #b02a37; }

/* --- Password Strength Indicator --- */
.password-strength { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.8rem; font-weight: 500; height: 20px; }
.strength-bar { flex-grow: 1; height: 8px; background-color: var(--border-color); border-radius: var(--border-radius); overflow: hidden; }
.strength-level { height: 100%; width: 0; border-radius: var(--border-radius); transition: width 0.3s ease, background-color 0.3s ease; }
.strength-text { white-space: nowrap; }
.strength-less-strong .strength-level { width: 25%; background-color: var(--danger-color); }
.strength-strong .strength-level { width: 50%; background-color: var(--warning-color); }
.strength-recommended .strength-level { width: 75%; background-color: #3498db; }
.strength-very-strong .strength-level { width: 100%; background-color: var(--success-color); }

/* --- Button Loader --- */
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading .btn-text { visibility: hidden; }
.btn.loading::after { content: ''; position: absolute; left: 50%; top: 50%; margin-left: -10px; margin-top: -10px; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, 0.5); border-top-color: #ffffff; border-radius: 50%; animation: spin 0.6s linear infinite; }
.btn-secondary.loading::after { border: 3px solid rgba(0, 0, 0, 0.2); border-top-color: var(--audit-teal); }

/* --- Responsive Adjustments --- */
@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
    .nav-text { display: none; }
    .main-nav { gap: 1rem; }
    .logo { width: 40px; overflow: hidden; }
    .logo svg text { display: none; }
    .sub-insights { grid-template-columns: 1fr; }
    .rights-meta { flex-direction: column; gap: 0.75rem; }
    .rights-hero { padding: 1.5rem; }
    .dashboard-group summary { flex-direction: column; align-items: flex-start; }
    
    /* Tablet optimization for linked accounts */
    .linked-account-list {
        grid-template-columns: 1fr;
    }
    
    .linked-account-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .linked-account-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .container { margin: 1rem auto; padding: 0 1rem; }
    .dashboard-header, .card, .subscription-list, .alerts-section { padding: 1rem; margin-bottom: 1rem; }
    .main-header .header-container { flex-direction: column; align-items: flex-start; }
    .subscription-card, .alert-card { flex-direction: column; align-items: stretch; }
    .achievement-badge { position: fixed; bottom: 10px; right: 10px; background: gold; padding: 8px 16px; border-radius: 20px; font-weight: bold; z-index: 1000; }
    .modal-content { width: 96vw; max-width: 96vw; padding: 1.25rem; }
    .rights-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; padding: 1rem; }
    .dashboard-grid .span-2 { grid-column: span 1; }
    
    /* Mobile-optimized button layouts */
    .link-new-account-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .link-new-account-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Ensure linked account cards stack properly on mobile */
    .linked-account-list {
        grid-template-columns: 1fr;
    }
    
    /* Improve button sizing on mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        min-height: 44px; /* Accessibility - minimum touch target */
    }
    
    .btn-small {
        padding: 0.6rem 0.95rem;
        font-size: 0.88rem;
        min-height: 44px;
    }
    
    /* Mobile footer optimization */
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .site-footer {
        margin-top: 2rem;
        padding: 1.5rem 0 1rem;
    }
}

