:root {
    --ink-strong: #16345f;
    --ink-soft: #5c6f89;
    --accent: #1f4f95;
    --accent-dark: #163d79;
    --card: #ffffff;
    --line: rgba(22, 52, 95, 0.12);
    --shadow: 0 30px 80px rgba(7, 28, 58, 0.22);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Aptos", "Helvetica Neue", sans-serif;
    color: var(--ink-strong);
    background: #dfe7ef;
}

.auth-page {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 1.5rem;
    isolation: isolate;
}

.auth-page::before {
    position: absolute;
    inset: 0;
    background: url("../images/deba-login-bg.jpg") center center / cover no-repeat;
    content: "";
}

.auth-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 31rem);
}

.auth-card {
    position: relative;
    padding: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 1.8rem;
    background: var(--card);
    box-shadow: var(--shadow);
}

.auth-card::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 26%);
    content: "";
    pointer-events: none;
}

.auth-card > * {
    position: relative;
}

.language-switch {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.language-switch a {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.language-switch a.is-active {
    background: var(--accent);
    color: #ffffff;
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
    text-align: center;
}

.auth-brand img {
    display: block;
    width: min(100%, 8.5rem);
    height: auto;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1.4rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
    content: "";
}

.auth-card h1 {
    margin: 0;
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-size: clamp(2.1rem, 5vw, 2.8rem);
    line-height: 1.05;
    text-align: center;
    color: #132f57;
}

.auth-copy {
    margin: 0.9rem 0 1.6rem;
    color: var(--ink-soft);
    font-size: 1.01rem;
    line-height: 1.7;
    text-align: center;
}

.auth-flash {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(169, 54, 54, 0.12);
    border-radius: 1rem;
    background: rgba(253, 236, 235, 0.95);
    color: #a23434;
    line-height: 1.5;
    text-align: center;
}

.auth-form {
    display: grid;
    gap: 0.8rem;
}

.auth-methods {
    display: grid;
    gap: 1.2rem;
}

.auth-method {
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 1.3rem;
    background: linear-gradient(180deg, rgba(242, 246, 252, 0.9), rgba(255, 255, 255, 0.98));
}

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

.auth-method__header h2 {
    margin: 0 0 0.4rem;
    font-size: 1.08rem;
    line-height: 1.2;
    color: #173a68;
}

.auth-method__header p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

.auth-separator {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #6c7f99;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
    flex: 1 1 auto;
    height: 1px;
    background: var(--line);
    content: "";
}

.auth-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink-strong);
}

.auth-input {
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #ffffff;
    color: var(--ink-strong);
    font-size: 1rem;
    text-transform: uppercase;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    border-color: rgba(31, 79, 149, 0.42);
    outline: none;
    box-shadow: 0 0 0 4px rgba(31, 79, 149, 0.12);
}

.auth-input--plain {
    text-transform: none;
}

.auth-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.3rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent) 0%, #2f67be 100%);
    color: #ffffff;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    box-shadow: 0 18px 34px rgba(31, 79, 149, 0.26);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.auth-button:hover,
.auth-button:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 22px 38px rgba(31, 79, 149, 0.32);
    filter: saturate(1.05);
}

.auth-button:focus-visible {
    outline: 3px solid rgba(31, 79, 149, 0.2);
    outline-offset: 4px;
}

.auth-button svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.auth-button--secondary {
    background: linear-gradient(135deg, #0f6c7b 0%, #1297a8 100%);
    box-shadow: 0 18px 34px rgba(15, 108, 123, 0.24);
}

.auth-button--secondary:hover,
.auth-button--secondary:focus-visible {
    box-shadow: 0 22px 38px rgba(15, 108, 123, 0.3);
}

.auth-note {
    margin: 1rem 0 0;
    color: #60728d;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: center;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 0.45rem;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 108, 123, 0.12);
    color: #0f6c7b;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 0.95rem;
    color: var(--accent-dark);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus-visible {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .auth-page {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.6rem;
        border-radius: 1.4rem;
    }
}
