﻿:root {
    --viallies-navy: #0A1236;
    --viallies-orange: #FFA14B;
    --viallies-orange-soft: #FFEDDD;
    --viallies-text: #415A78;
    --viallies-text-muted: #879EB7;
    --viallies-border: rgba(10, 18, 54, 0.12);
    --viallies-danger: #c0392b;
    --viallies-surface: rgba(255, 255, 255, 0.94);
    --font-display: "Bai Jamjuree", sans-serif;
    --font-body: "Manrope", sans-serif;
    color-scheme: light;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--viallies-navy);
    -webkit-text-size-adjust: 100%;
}

body.auth-page {
    background:
        radial-gradient(circle at top, rgba(255, 161, 75, 0.16), transparent 32%),
        linear-gradient(180deg, #fff8f1 0%, #fffaf5 45%, #ffffff 100%);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    position: relative;
    width: min(100%, 420px);
    padding: 36px 32px 32px;
    border: 1px solid rgba(255, 161, 75, 0.20);
    border-radius: 28px;
    background: var(--viallies-surface);
    box-shadow:
        0 20px 60px rgba(80, 57, 24, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--viallies-orange) 0%, #ffb86f 100%);
}

.auth-logo {
    display: block;
    max-width: min(168px, 56vw);
    height: auto;
    margin: 0 auto;
}

.auth-eyebrow {
    margin: 22px 0 8px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    color: #b56a22;
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--viallies-navy);
}

.auth-subtitle {
    margin: 8px 0 0;
    font-family: var(--font-body);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--viallies-text);
}

.auth-form {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
}

.auth-label {
    margin: 0 0 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--viallies-navy);
}

.auth-label + .auth-field + .auth-label,
.auth-label + .auth-field + .auth-error + .auth-label {
    margin-top: 16px;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--viallies-border);
    border-radius: 12px;
    background: #fff;
    color: var(--viallies-navy);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-field-password input {
    padding-right: 3rem;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--viallies-orange);
    box-shadow: 0 0 0 3px rgba(255, 161, 75, 0.22);
}

.auth-password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--viallies-text-muted);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
    color: var(--viallies-navy);
    background: var(--viallies-orange-soft);
    outline: none;
}

.auth-password-icon {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.auth-password-icon-show {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.auth-password-icon-hide {
    display: none;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.auth-password-toggle.is-visible .auth-password-icon-show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-icon-hide {
    display: block;
}

.auth-error {
    margin: 8px 0 0;
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--viallies-danger);
}

.auth-error-banner {
    margin-top: 16px;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: rgba(192, 57, 43, 0.08);
}

.auth-submit {
    margin-top: 24px;
    width: 100%;
    padding: 0.95rem 1rem;
    border: 0;
    border-radius: 12px;
    background: var(--viallies-orange);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.auth-submit:hover {
    background: #f08f35;
}

.auth-submit:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 161, 75, 0.35);
}

.auth-submit:active {
    transform: translateY(1px);
}

/* Shared layout pages (e.g. already signed-in claims table) */
body:not(.auth-page) {
    align-items: center;
    background:
        radial-gradient(circle at top, rgba(255, 161, 75, 0.12), transparent 34%),
        #f7f8fb;
    display: flex;
    justify-content: center;
}

.contact-wrapper {
    background: #fff;
    border: 1px solid rgba(255, 161, 75, 0.18);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(10, 18, 54, 0.08);
    padding: 2em;
    width: min(100%, 36em);
}

.login-cta > h2 {
    font-family: var(--font-display);
    color: var(--viallies-navy);
    font-size: 1.5rem;
    text-align: center;
}

@media (max-width: 640px) {
    .auth-wrapper {
        padding: 16px;
    }

    .auth-card {
        padding: 30px 20px 26px;
        border-radius: 22px;
    }
}
