html, body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #0a0f1a;
    min-height: 100vh;
}

a, .btn-link {
    color: #006bb7;
}

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

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTI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jY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #0a0f1a;
    color: #e2e8f0;
}

.login-panel {
    width: min(100%, 420px);
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.login-heading {
    margin-bottom: 24px;
}

.login-heading h1 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.75rem;
    font-weight: 700;
}

.login-heading p {
    margin: 6px 0 0;
    color: #94a3b8;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form .form-label {
    color: #cbd5e1;
    font-weight: 600;
}

.login-form .form-control {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.85);
}

.login-button {
    width: 100%;
    margin-top: 4px;
    font-weight: 700;
}

.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 {
    color: var(--bs-secondary-color);
    text-align: end;
}

/* Reconnect modal */
#components-reconnect-modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    width: 22rem;
    max-width: 90vw;
    margin: 20vh auto;
    padding: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 1rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: reconnect-fadeOut 0.5s both;
    color: #e2e8f0;
}

#components-reconnect-modal[open] {
    animation: reconnect-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, reconnect-fadeIn 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    animation: reconnect-fadeIn 0.5s ease-in-out;
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

#components-reconnect-modal p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal button {
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    font-weight: 600;
    padding: 8px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#components-reconnect-modal button:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.components-rejoining-animation {
    position: relative;
    width: 64px;
    height: 64px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid #60a5fa;
    opacity: 1;
    border-radius: 50%;
    animation: reconnect-ripple 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes reconnect-ripple {
    0% { top: 32px; left: 32px; width: 0; height: 0; opacity: 0; }
    4.9% { top: 32px; left: 32px; width: 0; height: 0; opacity: 0; }
    5% { top: 32px; left: 32px; width: 0; height: 0; opacity: 1; }
    100% { top: 0; left: 0; width: 64px; height: 64px; opacity: 0; }
}

@keyframes reconnect-slideUp {
    0% { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes reconnect-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes reconnect-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
