html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5I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I2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.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: #1b6ec2;
            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: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

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

code {
    color: #c02d76;
}

.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;
}

/* Dark Theme Form Inputs - Login, Register & Signup */
.login-container .form-control,
.register-container .form-control,
.signup-container .form-control,
.accept-invite-container .form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.75rem !important;
    color: white !important;
    height: 60px !important;
}

.login-container .form-control:focus,
.register-container .form-control:focus,
.signup-container .form-control:focus,
.accept-invite-container .form-control:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25) !important;
    color: white !important;
}

.login-container .form-floating > label,
.register-container .form-floating > label,
.signup-container .form-floating > label,
.accept-invite-container .form-floating > label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
}

.login-container .form-floating > .form-control:focus ~ label,
.login-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.register-container .form-floating > .form-control:focus ~ label,
.register-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.signup-container .form-floating > .form-control:focus ~ label,
.signup-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.accept-invite-container .form-floating > .form-control:focus ~ label,
.accept-invite-container .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #a5b4fc !important;
    background: transparent !important;
    font-weight: 600 !important;
}

/* Dark Theme Tables - Global Override */
.app-container .table,
.app-container .table-responsive {
    --bs-table-bg: transparent !important;
    --bs-table-color: white !important;
    background: transparent !important;
}

.app-container .table thead,
.app-container .table thead tr,
.app-container .table thead th {
    background: rgba(255, 255, 255, 0.03) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.app-container .table tbody tr {
    background: transparent !important;
}

.app-container .table tbody td {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.app-container .table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1) !important;
}

.app-container .table tbody tr:hover td {
    color: white !important;
}

/* ========================================
   DARK THEME - Global Styles for Admin Area
   ======================================== */

/* Cards */
.app-container .card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1rem !important;
    color: white !important;
}

.app-container .card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.app-container .card-body {
    color: white !important;
}

.app-container .card-title {
    color: white !important;
}

/* List Groups */
.app-container .list-group-item {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: white !important;
}

.app-container .list-group-item:last-child {
    border-bottom: none !important;
}

.app-container .list-group-item:hover,
.app-container .list-group-item-action:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.app-container .list-group-item .fw-semibold,
.app-container .list-group-item .fw-bold {
    color: white !important;
}

.app-container .list-group-item small,
.app-container .list-group-item .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Badges */
.app-container .badge.bg-success {
    background: rgba(39, 202, 64, 0.2) !important;
    color: #27ca40 !important;
    border: 1px solid rgba(39, 202, 64, 0.3);
}

.app-container .badge.bg-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-container .badge.bg-primary {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #667eea !important;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.app-container .badge.bg-warning {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107 !important;
}

.app-container .badge.bg-danger {
    background: rgba(255, 107, 107, 0.2) !important;
    color: #ff6b6b !important;
}

.app-container .badge.bg-info {
    background: rgba(13, 202, 240, 0.2) !important;
    color: #0dcaf0 !important;
}

/* Buttons */
.app-container .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.app-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.app-container .btn-outline-primary {
    color: #667eea !important;
    border-color: #667eea !important;
    background: transparent !important;
}

.app-container .btn-outline-primary:hover {
    background: rgba(102, 126, 234, 0.15) !important;
    color: #667eea !important;
    border-color: #667eea !important;
}

.app-container .btn-outline-secondary {
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: transparent !important;
}

.app-container .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: white !important;
}

.app-container .btn-outline-danger {
    color: #ff6b6b !important;
    border-color: rgba(255, 107, 107, 0.5) !important;
    background: transparent !important;
}

.app-container .btn-outline-danger:hover {
    background: rgba(255, 107, 107, 0.15) !important;
    border-color: #ff6b6b !important;
    color: #ff6b6b !important;
}

.app-container .btn-success {
    background: linear-gradient(135deg, #27ca40 0%, #20a837 100%) !important;
    border: none !important;
}

.app-container .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%) !important;
    border: none !important;
    color: #000 !important;
}

.app-container .btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%) !important;
    border: none !important;
}

.app-container .btn-link {
    color: rgba(255, 255, 255, 0.6) !important;
}

.app-container .btn-link:hover {
    color: white !important;
}

/* Text */
.app-container .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.app-container h1, .app-container h2, .app-container h3, 
.app-container h4, .app-container h5, .app-container h6 {
    color: white !important;
}

.app-container p {
    color: rgba(255, 255, 255, 0.85);
}

/* Form Controls */
.app-container .form-control,
.app-container .form-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.app-container .form-control:focus,
.app-container .form-select:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
    color: white !important;
}

.app-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.app-container .form-select option {
    background-color: #1a1a2e;
    color: white;
}

.app-container .form-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

.app-container .form-check-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.app-container .form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.app-container .form-check-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Modals */
.app-container .modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.app-container .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.app-container .modal-header .btn-close {
    filter: invert(1);
}

.app-container .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Alerts */
.app-container .alert-danger {
    background: rgba(255, 100, 100, 0.15) !important;
    border: 1px solid rgba(255, 100, 100, 0.3) !important;
    color: #ff8888 !important;
}

.app-container .alert-success {
    background: rgba(39, 202, 64, 0.15) !important;
    border: 1px solid rgba(39, 202, 64, 0.3) !important;
    color: #27ca40 !important;
}

.app-container .alert-warning {
    background: rgba(255, 193, 7, 0.15) !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
    color: #ffc107 !important;
}

.app-container .alert-info {
    background: rgba(13, 202, 240, 0.15) !important;
    border: 1px solid rgba(13, 202, 240, 0.3) !important;
    color: #0dcaf0 !important;
}

/* Spinners */
.app-container .spinner-border.text-primary {
    color: #667eea !important;
}

/* Empty State Icons */
.app-container .display-1,
.app-container .display-4 {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* =============================================
   GLOBAL RESPONSIVE STYLES
   ============================================= */

/* Tablet Breakpoint */
@media (max-width: 992px) {
    /* Container adjustments */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Grid adjustments */
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
    
    /* Headings */
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.35rem; }
    
    /* Buttons */
    .btn-lg {
        padding: 0.6rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Container adjustments */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Grid adjustments */
    .row.g-4 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
    
    /* Headings */
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.35rem; }
    h3, .h3 { font-size: 1.2rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    
    /* Cards */
    .card {
        border-radius: 0.75rem !important;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.55rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 0.95rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 1rem;
    }
    
    /* Tables - Stack on mobile */
    .table-responsive {
        border-radius: 0.5rem;
        overflow-x: auto;
    }
    
    /* Flex adjustments */
    .d-flex.justify-content-between.align-items-center {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    /* Text adjustments */
    .text-muted {
        font-size: 0.85rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    /* Container adjustments */
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Headings */
    h1, .h1 { font-size: 1.35rem; }
    h2, .h2 { font-size: 1.25rem; }
    h3, .h3 { font-size: 1.1rem; }
    
    /* Cards */
    .card-header,
    .card-body,
    .card-footer {
        padding: 0.75rem !important;
    }
    
    /* Buttons */
    .btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 0.9rem;
    }
    
    /* Stack flex items vertically */
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 > * {
        width: 100%;
    }
}

/* Touch-friendly adjustments for mobile */
@media (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .form-control,
    .form-select,
    .form-check-input {
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
    }
    
    /* Better spacing for touch */
    .list-group-item {
        padding: 0.85rem 1rem;
    }
}

/* ===========================================
   AUTH FORMS - High Contrast Labels & Text
   =========================================== */

/* Login, Register, Signup forms - force visible labels */
.login-container .form-floating > label,
.register-container .form-floating > label,
.signup-container .form-floating > label,
.accept-invite-container .form-floating > label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500 !important;
    background: transparent !important;
}

/* Labels when floating (field has value) */
.login-container .form-floating > .form-control:focus ~ label,
.login-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.register-container .form-floating > .form-control:focus ~ label,
.register-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.signup-container .form-floating > .form-control:focus ~ label,
.signup-container .form-floating > .form-control:not(:placeholder-shown) ~ label,
.accept-invite-container .form-floating > .form-control:focus ~ label,
.accept-invite-container .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #a5b4fc !important;
    background: transparent !important;
    background-color: transparent !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

/* Force remove any background from floating labels */
.login-form .form-floating > label,
.register-form .form-floating > label,
.login-container .form-floating label,
.register-container .form-floating label,
.form-floating > label {
    background: transparent !important;
    background-color: transparent !important;
}

/* Override Bootstrap form-floating label background - ALL pseudo-elements */
.login-container .form-floating label::before,
.login-container .form-floating label::after,
.register-container .form-floating label::before,
.register-container .form-floating label::after,
.form-floating > label::before,
.form-floating > label::after,
.form-floating > .form-control ~ label::before,
.form-floating > .form-control ~ label::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Additional overrides for Bootstrap 5 form-floating */
.login-container .form-floating,
.register-container .form-floating {
    --bs-form-floating-input-padding-t: 1.625rem;
    --bs-form-floating-input-padding-b: 0.625rem;
}

.login-container .form-floating > label,
.register-container .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    height: 100%;
    padding: 1rem 0.75rem;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    background: none !important;
}

/* Placeholders */
.login-container .form-control::placeholder,
.register-container .form-control::placeholder,
.signup-container .form-control::placeholder,
.accept-invite-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

/* Subtitles and descriptions */
.login-header p,
.register-header p,
.signup-header p {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Form labels (non-floating) */
.signup-container .form-label,
.accept-invite-container .form-label {
    color: white !important;
    font-weight: 600 !important;
}

/* Form hints and help text */
.login-container .form-text,
.register-container .form-text,
.signup-container .form-text,
.signup-container .form-hint,
.accept-invite-container .form-hint {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Section titles in signup */
.signup-container .section-title {
    color: white !important;
    font-weight: 700 !important;
}

/* Terms text */
.signup-container .terms-text {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Footer text */
.login-container small,
.register-container small,
.signup-container .signup-footer p,
.register-container .register-footer small {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hide native checkbox in custom checkbox styles */
.terms-checkbox input,
.terms-checkbox input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}