:root {
    /* Greener Brand Colors - Premium Palette */
    --greener-primary: #10B981;
    /* Vibrant Emerald */
    --greener-primary-dark: #047857;
    --greener-primary-light: #34D399;
    --greener-accent: #6EE7B7;

    /* Gradients */
    --greener-gradient-primary: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --greener-gradient-dark: linear-gradient(135deg, #064E3B 0%, #065F46 100%);
    --greener-gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);

    /* Neutral Colors */
    --greener-bg: #F3F4F6;
    /* Cool Gray 100 */
    --greener-surface: #FFFFFF;
    --greener-text: #111827;
    /* Gray 900 */
    --greener-text-muted: #6B7280;
    /* Gray 500 */
    --greener-border: #E5E7EB;
    /* Gray 200 */

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Shadows - Soft & Layered */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-colored: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -2px rgba(16, 185, 129, 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

html,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--greener-bg);
    color: var(--greener-text);
    margin: 0;
    padding: 0;
    height: 100%;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--greener-text);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.025em;
}

a {
    color: var(--greener-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--greener-primary-dark);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--greener-gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-colored);
}

.btn-outline-secondary {
    background: white;
    border-color: var(--greener-border);
    color: var(--greener-text);
}

.btn-outline-secondary:hover {
    background: var(--greener-bg);
    border-color: var(--greener-text-muted);
}

/* Card Utilities */
.card-premium {
    background: var(--greener-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #FFF3CD;
    color: #856404;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--greener-primary);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: relative;
    text-align: center;
    font-weight: bold;
    top: -9rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Global Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-xl);
}

.header-text h1 {
    margin-bottom: 0.25rem;
}

.header-text p {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
}

/* Internal modal host replacement for legacy Blazored.Modal */
.ga-modal-shell {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ga-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(2px);
}

.ga-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 640px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--greener-border);
    background: var(--greener-surface);
    box-shadow: var(--shadow-lg);
}

.ga-modal-dialog.ga-modal-dialog-wide {
    width: min(100%, 860px);
}

.ga-modal-dialog .modal-body {
    margin: 0;
}
