:root {
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-primary-focus-rgb: 37, 99, 235;
    --auth-brand-dark: #1e3a8a;
    --auth-muted: #64748b;
    --auth-on-primary: #ffffff;
    --auth-surface: #ffffff;
    --auth-page-start: #f5f7fb;
    --auth-page-end: #eef2f7;
    --auth-text: #334155;
    --auth-border: #cbd5e1;
}

[data-theme-version='dark'] {
    --auth-primary: #60a5fa;
    --auth-primary-hover: #3b82f6;
    --auth-primary-focus-rgb: 96, 165, 250;
    --auth-brand-dark: #e2e8f0;
    --auth-muted: #94a3b8;
    --auth-on-primary: #0b1220;
    --auth-surface: #121a2b;
    --auth-page-start: #0b1220;
    --auth-page-end: #080e18;
    --auth-text: #d5deeb;
    --auth-border: #334155;
}

.brand-title {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-title strong {
    color: var(--auth-brand-dark);
    font-size: 2rem;
    font-weight: 900;
}

.brand-title span {
    margin-top: 0.3rem;
    color: var(--auth-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-primary,
.btn.btn-primary {
    color: var(--auth-on-primary);
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    color: var(--auth-on-primary);
    background-color: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.btn-primary:focus,
.btn-check:focus + .btn-primary,
.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus {
    color: var(--auth-on-primary);
    background-color: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(var(--auth-primary-focus-rgb), 0.25);
}

.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--auth-primary-focus-rgb), 0.14);
}

.auth-theme-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.theme-control {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.72);
    color: #1e3a8a;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
}

.theme-control:hover {
    border-color: var(--auth-primary);
}

.theme-control-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.auth-logo-light,
.auth-logo-dark { max-height: 50px; }
.auth-logo-light { display: inline-block; }
.auth-logo-dark { display: none; }

[data-theme-version='dark'] .authincation {
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.14), transparent 24rem),
        linear-gradient(180deg, var(--auth-page-start) 0%, var(--auth-page-end) 100%);
}

[data-theme-version='dark'] body {
    color: var(--auth-text);
}

[data-theme-version='dark'] .authincation-content,
[data-theme-version='dark'] .auth-form {
    background: var(--auth-surface);
    color: var(--auth-text);
}

[data-theme-version='dark'] .auth-form h4,
[data-theme-version='dark'] .auth-form label,
[data-theme-version='dark'] .auth-form strong {
    color: #e2e8f0;
}

[data-theme-version='dark'] .auth-form .form-control {
    background: #0e1626;
    color: #e2e8f0;
    border-color: var(--auth-border);
}

[data-theme-version='dark'] .auth-form .form-control::placeholder {
    color: #64748b;
}

[data-theme-version='dark'] .auth-form .form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 0.25rem rgba(var(--auth-primary-focus-rgb), 0.18);
}

[data-theme-version='dark'] .theme-control {
    background: rgba(15, 23, 42, 0.7);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.28);
}

[data-theme-version='dark'] .auth-logo-light { display: none; }
[data-theme-version='dark'] .auth-logo-dark { display: inline-block; }
