*,
*::before,
*::after {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1A2E24 58%, #2B4A3A 100%);
    color: #fff;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    padding: 2.35rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 1.35rem;
    border-radius: 1rem;
    background: #1A2E24;
    box-shadow: 0 12px 28px rgba(26, 46, 36, 0.4);
}

.auth-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 0.8rem;
}

.auth-logo i {
    font-size: 1.85rem;
}

.auth-title {
    margin: 0 0 0.45rem;
    text-align: center;
    color: #fff;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-subtitle {
    margin: 0 0 1.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.92rem;
    line-height: 1.45;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.48rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

.auth-input-wrap .auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.38);
    font-size: 1.05rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font: inherit;
    font-size: 0.96rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.auth-input:focus {
    border-color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.auth-input-wrap.has-toggle .auth-input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    width: 2.25rem;
    height: 2.25rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.55rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.58);
    cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.auth-button {
    width: 100%;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.25rem;
    padding: 0.9rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: #1A2E24;
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(26, 46, 36, 0.36);
}

.auth-button:hover,
.auth-button:focus {
    background: #223D31;
    color: #fff;
    outline: none;
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
}

.auth-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: #fff;
    outline: none;
}

.auth-message {
    margin-bottom: 1rem;
    padding: 0.78rem 0.95rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
    font-size: 0.9rem;
    line-height: 1.45;
}

.auth-message.danger,
.auth-message.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

.auth-message.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
}

.auth-message.warning {
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(251, 191, 36, 0.16);
    color: #fde68a;
}

.auth-debug-link {
    display: block;
    margin-top: 0.65rem;
    color: #99f6e4;
    word-break: break-all;
}

.auth-footer {
    margin-top: 1.65rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.36);
    font-size: 0.78rem;
}

.auth-footer img {
    width: 1.08rem;
    height: 1.08rem;
    object-fit: contain;
    border-radius: 0.25rem;
    margin-right: 0.32rem;
    vertical-align: -0.22rem;
}

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

    .auth-card {
        padding: 2rem 1.35rem;
        border-radius: 1.1rem;
    }
}
