@font-face {
    font-family: 'Cairo';
    src: url('./fonts/Cairo.ttf') format('truetype');
    font-weight: 200 1000;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Sans';
    src: url('./fonts/InstrumentSans.ttf') format('truetype');
    font-weight: 400 700;
    font-display: swap;
}
:root {
    color-scheme: light;
    --auth-surface: #fff;
    --auth-heading: #25234d;
    --auth-muted: #74778f;
    --auth-border: #dcdde9;
    --auth-control: #fff;
    --auth-accent: #5955d1;
    --auth-focus: rgba(89, 85, 209, 0.16);
    --auth-error: #b4233c;
    --auth-error-bg: #fff2f4;
    --auth-error-border: #f3c2cb;
}
[data-bs-theme='dark'] {
    color-scheme: dark;
    --auth-surface: #1e1e24;
    --auth-heading: #f4f3ff;
    --auth-muted: #aaaac1;
    --auth-border: #444451;
    --auth-control: #25252d;
    --auth-focus: rgba(161, 156, 255, 0.2);
    --auth-error: #ffb3c0;
    --auth-error-bg: #35232b;
    --auth-error-border: #713647;
}
.auth-page,
.auth-page * {
    box-sizing: border-box;
}
.auth-page {
    margin: 0;
    color: var(--auth-heading);
    background: var(--auth-surface);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.7;
}
.auth-page button,
.auth-page input {
    font: inherit;
}
.auth-page button {
    cursor: pointer;
}
.auth-page [hidden] {
    display: none !important;
}
.auth-page a {
    color: inherit;
}
.auth-page :focus-visible {
    outline: 3px solid #9b97ee;
    outline-offset: 4px;
}
.auth-layout {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(440px, 42.3fr) minmax(0, 57.7fr);
    direction: ltr;
}
.auth-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 42px clamp(36px, 4.5vw, 76px) 34px;
    background: var(--auth-surface);
}
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    direction: ltr;
}
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    font-family: 'Instrument Sans', 'Cairo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.8px;
}
.auth-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.auth-theme {
    width: 44px;
    height: 44px;
    border: 1px solid var(--auth-border);
    border-radius: 50%;
    background: var(--auth-control);
    color: var(--auth-heading);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.auth-theme i {
    display: flex;
    font-size: 19px;
}
.auth-content {
    width: 100%;
    max-width: 480px;
    margin: auto;
    padding: 60px 0;
}
.auth-intro {
    margin-bottom: 44px;
}
.auth-intro h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 2.85vw, 44px);
    line-height: 1.55;
    font-weight: 800;
    letter-spacing: -0.8px;
}
.auth-intro p {
    color: var(--auth-muted);
    font-size: 17px;
    line-height: 1.9;
    margin: 0;
}
.auth-field {
    margin-bottom: 28px;
}
.auth-field > label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
}
.auth-control {
    position: relative;
}
.auth-control input {
    width: 100%;
    min-height: 54px;
    padding: 12px 17px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: var(--auth-control);
    color: var(--auth-heading);
    font-size: 15px;
    line-height: 1.7;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
}
.auth-control input::placeholder {
    color: var(--auth-muted);
    opacity: 0.85;
}
.auth-control input[dir='ltr'] {
    text-align: start;
    font-family: 'Instrument Sans', 'Cairo', sans-serif;
    font-size: 16px;
}
.auth-control input:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-focus);
    outline: none;
}
.auth-control input[aria-invalid='true'] {
    border-color: var(--auth-error);
}
.auth-control-password input {
    padding-inline-end: 56px;
}
.auth-password-toggle {
    position: absolute;
    inset-inline-end: 5px;
    top: 5px;
    bottom: 5px;
    width: 44px;
    display: grid;
    place-items: center;
    color: var(--auth-muted);
    background: transparent;
    border: 0;
    border-radius: 7px;
}
.auth-password-toggle i {
    display: flex;
    font-size: 19px;
}
.auth-password-toggle:hover {
    color: var(--auth-accent);
    background: var(--auth-focus);
}
.auth-remember {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    margin: 2px 0 28px;
    cursor: pointer;
    font-size: 15px;
}
.auth-remember input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--auth-accent);
    cursor: pointer;
}
.auth-submit {
    width: 100%;
    min-height: 56px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--auth-accent);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.7;
    transition:
        background 0.15s,
        box-shadow 0.15s;
}
.auth-submit > i {
    display: flex;
    font-size: 24px;
}
.auth-submit:hover {
    background: #4844bb;
    box-shadow: 0 6px 18px rgba(89, 85, 209, 0.18);
}
.auth-submit:disabled {
    opacity: 0.8;
    cursor: wait;
}
.auth-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}
.auth-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: var(--auth-muted);
    font-size: 12px;
}
.auth-visual {
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #24234d;
    isolation: isolate;
}
.auth-artwork {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center;
    z-index: -1;
}
.auth-visual-copy {
    position: relative;
    padding: 76px clamp(36px, 4vw, 70px) 0;
    color: #fff;
}
.auth-visual-copy h2 {
    font-size: clamp(30px, 3vw, 46px);
    font-weight: 800;
    line-height: 1.6;
    letter-spacing: -0.9px;
    margin: 0 0 10px;
}
.auth-visual-copy p {
    color: #d5d3ed;
    font-size: clamp(15px, 1.4vw, 20px);
    line-height: 1.9;
    margin: 0;
}
.auth-alert {
    display: flex;
    align-items: start;
    gap: 12px;
    margin: -14px 0 28px;
    padding: 14px 16px;
    border: 1px solid var(--auth-error-border);
    border-radius: 10px;
    color: var(--auth-error);
    background: var(--auth-error-bg);
    font-size: 13px;
}
.auth-alert > i {
    margin-top: 3px;
    display: flex;
    font-size: 18px;
}
.auth-alert strong {
    display: block;
    font-weight: 700;
}
.auth-alert p {
    margin: 3px 0 0;
}
.auth-field-hint,
.auth-field-error,
.auth-caps-warning {
    margin: 7px 0 0;
    font-size: 12px;
    color: var(--auth-muted);
}
.auth-field-error {
    color: var(--auth-error);
}
.auth-caps-warning {
    color: #a76500;
}
[data-bs-theme='dark'] .auth-caps-warning {
    color: #e5bb70;
}
.auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.auth-skip {
    position: fixed;
    top: -100px;
    inset-inline-start: 16px;
    z-index: 5;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--auth-surface);
}
.auth-skip:focus {
    top: 12px;
}
@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (min-width: 1800px) {
    .auth-visual-copy {
        padding-top: 88px;
    }
}
@media (max-width: 1100px) {
    .auth-panel {
        padding-inline: 36px;
    }
    .auth-intro p {
        font-size: 15px;
    }
    .auth-visual-copy {
        padding-top: 54px;
        padding-inline: 30px;
    }
    .auth-visual-copy h2 {
        font-size: 32px;
    }
}
@media (max-width: 899px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }
    .auth-panel {
        min-height: 100svh;
        padding: 28px 32px;
    }
    .auth-visual {
        display: none;
    }
    .auth-header {
        width: 100%;
        max-width: 480px;
        margin-inline: auto;
    }
    .auth-content {
        max-width: 440px;
        padding: 48px 0;
    }
    .auth-intro h1 {
        font-size: 36px;
    }
}
@media (max-width: 480px) {
    .auth-panel {
        padding: 24px;
    }
    .auth-brand {
        font-size: 26px;
        gap: 10px;
    }
    .auth-brand img {
        width: 38px;
        height: 38px;
    }
    .auth-theme {
        width: 40px;
        height: 40px;
    }
    .auth-intro {
        margin-bottom: 32px;
    }
    .auth-intro h1 {
        font-size: 32px;
    }
    .auth-intro p {
        font-size: 14px;
    }
    .auth-field {
        margin-bottom: 24px;
    }
    .auth-footer {
        font-size: 11px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        transition: none !important;
        animation: none !important;
    }
}
