/* Synergy HOA, the platform behind the community's branding: its mark (SynergyMark.razor and the
   loading screen) keeps the platform colours whatever the community accent. */
:root {
    --synergy-stone: #0e6b73;
    --synergy-key: #a87b25;
}
:root[data-theme="dark"] {
    --synergy-stone: #3ab5ae;
    --synergy-key: #cda861;
}
.synergy-mark { display: inline-block; flex-shrink: 0; }
.synergy-mark-stone { fill: var(--synergy-stone); }
.synergy-mark-key { fill: var(--synergy-key); }

/* Loading Screen */
.loading-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--bg);
    color: var(--ink-2);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.loading-mark {
    animation: hearth-breathe 2.4s ease-in-out infinite;
}

.loading-bar {
    width: 132px;
    height: 3px;
    border-radius: 999px;
    background: var(--chip-muted);
    overflow: hidden;
}

.loading-bar span {
    display: block;
    height: 100%;
    width: var(--blazor-load-percentage, 0%);
    background: var(--synergy-stone);
    border-radius: inherit;
    transition: width .1s ease-out;
}

.loading-text {
    margin: 0;
    font-size: 13.5px;
    color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
    .loading-mark { animation: none; }
    .loading-bar span { transition: none; }
}

/* Sign-in pages: the platform mark when no community is known, and the platform credit. */
.auth-platform-mark {
    display: block;
    margin: 0 auto;
}

.auth-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--ink-3);
}

.auth-powered-by strong {
    font-weight: 600;
    color: var(--ink-2);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--surface);
    color: var(--ink);
    border-top: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    font-size: 13.5px;
    bottom: 0;
    box-shadow: var(--shadow);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#blazor-error-ui .reload {
    color: var(--primary);
    font-weight: 600;
    margin-left: 8px;
}

/* Custom Styles */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* Card Styles */
.stat-card {
    text-align: center;
    padding: 16px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 500;
    color: var(--mud-palette-primary);
}

.stat-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

/* Form Styles */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.required-indicator {
    color: var(--mud-palette-error);
    margin-left: 2px;
}

/* Table Styles */
.table-actions {
    display: flex;
    gap: 4px;
}

/* Status Colors */
.status-active { color: var(--mud-palette-success); }
.status-pending { color: var(--mud-palette-warning); }
.status-inactive { color: var(--mud-palette-text-secondary); }
.status-error { color: var(--mud-palette-error); }

/* Money Display */
.money-positive { color: var(--mud-palette-success); }
.money-negative { color: var(--mud-palette-error); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--mud-palette-text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    opacity: 0.5;
    margin-bottom: 16px;
}

/* Auth Layout */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 32px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title {
    text-align: center;
    margin-bottom: 24px;
}

/* Dashboard Widgets */
.dashboard-widget {
    height: 100%;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Navigation */
.nav-brand {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.nav-brand h6 {
    margin: 0;
    color: var(--mud-palette-primary);
}

/* Responsive */
@media (max-width: 600px) {
    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .page-actions {
        width: 100%;
        justify-content: stretch;
    }

    .page-actions .mud-button {
        flex: 1;
    }
}
