:root {
    --auth-blue: #1565d8;
    --auth-blue-hover: #0f4fb0;
    --auth-orange: #f97316;
    --auth-navy: #0c1b33;
    --auth-ink: #122033;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-card-radius: 0;
    --auth-input-radius: 0.7rem;
}

body.app-blank {
    background: #fff;
    margin: 0;
}

.auth-page {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 82% 12%, rgba(255, 243, 196, 0.85), transparent 28%),
        linear-gradient(180deg, #7ec8f8 0%, #d4eefc 38%, #f8f1e2 68%, #d5e8cf 100%);
}

.auth-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1565d8 0%, #1565d8 62%, #f97316 100%);
    z-index: 6;
}

.auth-page__panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(28.5rem, 100%);
    max-height: calc(100vh - 3rem);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 1.75rem 2rem 1.5rem;
    background: #fff;
    border: 0;
    border-radius: 1.15rem;
    box-shadow: 0 24px 70px rgba(2, 8, 20, 0.35);
}

.auth-page__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.auth-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.auth-page__lang {
    position: static;
}

.auth-lang-switch {
    display: inline-flex;
    padding: 0.2rem;
    border: 1px solid var(--auth-border);
    border-radius: 999px;
    background: #f8fafc;
}

.auth-lang-switch a {
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    line-height: 1.2;
}

.auth-lang-switch a.is-active {
    background: var(--auth-navy);
    color: #fff;
}

.auth-page__card-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    padding: 1.5rem 0 1rem;
}

.auth-page__brand {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-brand-mark {
    position: absolute;
    inset: 0;
    height: 100%;
    pointer-events: none;
}

.auth-brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.auth-page[dir='rtl'] .auth-brand-mark {
    transform: none;
}

.tm-glow {
    animation: tm-glow 8s ease-in-out infinite;
}

.tm-cloud {
    animation: tm-drift 22s ease-in-out infinite alternate;
}

.tm-cloud--late {
    animation-duration: 28s;
    animation-delay: -8s;
}

.tm-route path {
    animation: tm-march 2.6s linear infinite;
}

.tm-pulse {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0.55;
    animation: tm-pulse 2.8s ease-out infinite;
}

.tm-courier {
    offset-path: path("M150 250 C 230 210 300 300 390 250");
    offset-rotate: 0deg;
    animation: tm-drive 7s linear infinite;
}

.tm-courier--b {
    offset-path: path("M1100 210 C 1200 160 1300 250 1380 200");
    animation-duration: 8.5s;
    animation-delay: -3s;
}

.tm-courier--c {
    offset-path: path("M160 690 C 280 640 360 760 470 700");
    animation-duration: 9s;
    animation-delay: -5s;
}

@keyframes tm-glow {
    0%, 100% { opacity: 0.72; }
    50% { opacity: 1; }
}

@keyframes tm-drift {
    from { transform: translate(0, 0); }
    to { transform: translate(90px, 10px); }
}

@keyframes tm-march {
    to { stroke-dashoffset: -48; }
}

@keyframes tm-pulse {
    0% { transform: scale(0.35); opacity: 0.55; }
    100% { transform: scale(1.7); opacity: 0; }
}

@keyframes tm-drive {
    to { offset-distance: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-glow,
    .tm-cloud,
    .tm-route path,
    .tm-pulse,
    .tm-courier {
        animation: none;
    }
}

.auth-brand {
    display: none;
}

.auth-brand__kicker {
    margin: 0 0 0.85rem;
    color: #fdba74 !important;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-brand__title {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(1.55rem, 2vw, 2.05rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

.auth-brand__text {
    margin: 1rem 0 0;
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 1rem;
    line-height: 1.7;
}

.auth-brand__list {
    list-style: none;
    margin: 1.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
}

.auth-brand__list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-brand__list li::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 2px;
    background: var(--auth-orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
    flex: none;
}

html[dir='rtl'] .auth-card,
.auth-page[dir='rtl'] .auth-card {
    direction: rtl;
}

.auth-card {
    width: 100%;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.auth-card__title {
    color: var(--auth-ink);
    font-size: 1.85rem;
    font-weight: 700;
    text-align: start;
    margin: 0 0 0.4rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.auth-card__subtitle {
    color: var(--auth-muted);
    font-size: 0.98rem;
    text-align: start;
    margin: 0 0 1.75rem;
    line-height: 1.6;
}

.auth-card__alert {
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.auth-card__alert--danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.auth-card__alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap__icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.95rem;
    transform: translateY(-50%);
    color: #94a3b8;
    display: inline-flex;
    pointer-events: none;
}

.auth-input-wrap__icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.auth-input {
    box-sizing: border-box;
    width: 100%;
    height: 3.15rem;
    border: 1px solid #dbe3ee;
    border-radius: var(--auth-input-radius);
    padding-inline: 2.7rem 0.95rem;
    font-size: 0.98rem;
    color: var(--auth-ink);
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-blue);
    box-shadow: 0 0 0 4px rgba(21, 101, 216, 0.12);
}

.auth-input.is-invalid {
    border-color: #ef4444;
    background: #fff;
}

.auth-input-wrap--password .auth-input {
    padding-inline-end: 2.7rem;
}

.auth-input-wrap__toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.75rem;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.25rem;
    display: inline-flex;
    cursor: pointer;
}

.auth-input-wrap__toggle svg {
    width: 1.1rem;
    height: 1.1rem;
}

.auth-input-wrap__toggle:hover {
    color: var(--auth-blue);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.15rem 0 1.35rem;
    flex-wrap: wrap;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
}

.auth-remember input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--auth-blue);
}

.auth-forgot {
    color: var(--auth-blue);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-forgot:hover {
    color: var(--auth-blue-hover);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    height: 3.15rem;
    border: 0;
    border-radius: var(--auth-input-radius);
    background: linear-gradient(180deg, #1d6fe0 0%, #1565d8 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(21, 101, 216, 0.22);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
    background: var(--auth-blue-hover);
    box-shadow: 0 12px 24px rgba(21, 101, 216, 0.28);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-card__footer {
    margin-top: 1.75rem;
    text-align: start;
    color: #94a3b8;
    font-size: 0.78rem;
}

.auth-field-error {
    margin-top: 0.35rem;
    color: #dc2626;
    font-size: 0.8125rem;
}

@media (max-width: 991.98px) {
    .auth-page {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 1.25rem;
    }

    .auth-page__panel {
        max-height: none;
        padding: 1.35rem 1.15rem 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .auth-card__title {
        font-size: 1.55rem;
    }

    .auth-logo img {
        height: 34px;
    }
}
