h1:focus {
    outline: none;
}

/* ============================================
   THEME VARIABLES - Customizable via Database
   ============================================ */
:root {
    /* Primary colors */
    --theme-primary: #B37A4C;
    --theme-primary-hover: #C28A50;
    --theme-primary-light: rgba(179, 122, 76, 0.1);
    --theme-primary-gradient: linear-gradient(135deg, #B37A4C 0%, #C28A50 100%);

    /* Background colors */
    --theme-bg-dark: #0F0F12;
    --theme-bg-medium: #1B2233;
    --theme-bg-light: #0D0F14;
    --theme-bg-card: rgba(255, 255, 255, 0.03);
    --theme-bg-glass: rgba(255, 255, 255, 0.05);

    /* Text colors */
    --theme-text: #E2E8F0;
    --theme-text-secondary: #94A3B8;
    --theme-text-muted: #64748B;

    /* Border colors */
    --theme-border: rgba(255, 255, 255, 0.12);
    --theme-border-light: rgba(255, 255, 255, 0.08);
    --theme-border-hover: rgba(179, 122, 76, 0.5);

    /* Status colors */
    --theme-success: #10B981;
    --theme-error: #EF4444;
    --theme-warning: #F59E0B;
    --theme-info: #3B82F6;

    /* Shadows */
    --theme-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --theme-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);

    /* Spacing */
    --theme-radius: 16px;
    --theme-radius-sm: 8px;
    --theme-radius-lg: 24px;

    /* Transitions */
    --theme-transition: 0.3s ease;
    --theme-transition-fast: 0.15s ease;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #10B981;
}

.invalid {
    outline: 1px solid #EF4444;
}

.validation-message {
    color: #EF4444;
    font-size: 0.85rem;
    margin-top: 4px;
}

.blazor-error-boundary {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
    padding: 1rem 1.5rem;
    color: white;
    border-radius: 8px;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "Виникла помилка. Будь ласка, оновіть сторінку.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Global Styles - Dark Premium Theme */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--theme-bg-dark);
    color: var(--theme-text);
    font-family: 'Inter', 'Manrope', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: -1;
}

/* Glass Card Style */
.glass-card {
    background: var(--theme-bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--theme-border);
    border-radius: var(--theme-radius);
}

/* Section Title */
.section-title {
    color: var(--theme-text) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 60px !important;
}

/* Links */
a {
    color: var(--theme-primary);
    text-decoration: none;
    transition: color var(--theme-transition-fast);
}

a:hover {
    color: var(--theme-primary-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--theme-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-primary-hover);
}

/* MudBlazor overrides for dark theme */
.mud-typography {
    color: inherit;
}

.mud-input-root {
    color: var(--theme-text) !important;
}

.mud-input-label {
    color: var(--theme-text-secondary) !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--theme-border-hover) !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--theme-primary) !important;
}

.mud-select .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.mud-popover {
    background: var(--theme-bg-medium) !important;
    border: 1px solid var(--theme-border);
}

.mud-list-item:hover {
    background: var(--theme-primary-light) !important;
}

.mud-list-item-text {
    color: var(--theme-text) !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 40px !important;
    }
}

/* Animation classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Utility classes */
.text-gradient {
    background: var(--theme-primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mr-2 {
    margin-right: 8px;
}

.mt-4 {
    margin-top: 16px;
}