/* ============================================================
   Vaadin Aura — Custom Form Area style (card / centered)
   Matches: https://vaadin.com/docs/latest/components/login
   #Custom Form Area — Aura theme
   ============================================================ */

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

:root {
    --aura-card:        #ffffff;
    --aura-radius-card: 20px;
    --aura-radius-inp:  9999px;   /* pill inputs */
    --aura-radius-btn:  9999px;   /* pill button */
    --aura-shadow:      0 4px 32px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);

    --aura-primary:     #3d6bea;  /* Aura blue */
    --aura-primary-h:   #2f58d4;
    --aura-error:       #e53935;

    --aura-text:        #1a1a1a;
    --aura-text-sub:    #6b7280;
    --aura-text-label:  #1a1a1a;
    --aura-required:    #e53935;

    --aura-inp-bg:      #f7f8fa;
    --aura-inp-border:  #dde1e9;
    --aura-inp-focus:   #3d6bea;
}

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    background: #ffffff;
    color: var(--aura-text);
    -webkit-font-smoothing: antialiased;
}

.login-pf body {
    background: #fbfbfb !important;
    background-size: auto;
}

/* ── Page background ── */
.kc-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: var(--vaadin-overlay-backdrop-background, rgba(255, 254, 254, 0.2));
}

/* ── Card ── */
.kc-card {
    background: var(--aura-card);
    border-radius: var(--aura-radius-card);
    box-shadow: var(--aura-shadow);
    width: 100%;
    max-width: 480px;
    padding: 40px 44px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Card header ── */
.kc-card__header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.kc-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--aura-text);
    letter-spacing: -.3px;
}

.kc-card__desc {
    font-size: .9rem;
    color: var(--aura-text-sub);
}

/* ── Alert banner ── */
.kc-alert {
    border-radius: 10px;
    padding: 10px 16px;
    font-size: .875rem;
    line-height: 1.5;
}
.kc-alert--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.kc-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.kc-alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.kc-alert--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Form ── */
#kc-form-login {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Field ── */
.kc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kc-label {
    font-size: .875rem;
    font-weight: 500;
    color: var(--aura-text-label);
}

.kc-required {
    color: var(--aura-required);
}

/* ── Input ── */
.kc-input {
    width: 100%;
    height: 46px;
    padding: 0 18px;
    border: 1.5px solid var(--aura-inp-border);
    border-radius: var(--aura-radius-inp);
    background: var(--aura-inp-bg);
    font-size: .9375rem;
    color: var(--aura-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    appearance: none;
}

.kc-input::placeholder { color: #b8bec9; }

.kc-input:focus {
    border-color: var(--aura-inp-focus);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(61,107,234,.15);
}

.kc-input--error {
    border-color: var(--aura-error);
}
.kc-input--error:focus {
    box-shadow: 0 0 0 3px rgba(229,57,53,.15);
}

/* ── Password wrapper ── */
.kc-input-wrap {
    position: relative;
}

.kc-input-wrap .kc-input {
    padding-right: 48px;
}

.kc-eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 50%;
    transition: color .15s;
    line-height: 0;
}

.kc-eye:hover { color: var(--aura-primary); }

/* ── Field error ── */
.kc-field-error {
    font-size: .8rem;
    color: var(--aura-error);
    padding-left: 4px;
}

/* ── Login button ── */
.kc-btn-login {
    width: 100%;
    height: 48px;
    background: var(--aura-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--aura-radius-btn);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .1s;
    margin-top: 4px;
}

.kc-btn-login:hover {
    background: var(--aura-primary-h);
    box-shadow: 0 4px 16px rgba(61,107,234,.35);
}

.kc-btn-login:active {
    transform: translateY(1px);
}

.kc-btn-login:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* ── Forgot password ── */
.kc-forgot {
    text-align: center;
}

.kc-forgot a {
    font-size: .9rem;
    color: var(--aura-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}

.kc-forgot a:hover {
    color: var(--aura-primary-h);
    text-decoration: underline;
}

/* ── Social providers ── */
.kc-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--aura-text-sub);
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.kc-divider::before,
.kc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--aura-inp-border);
}

.kc-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kc-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    border: 1.5px solid var(--aura-inp-border);
    border-radius: var(--aura-radius-btn);
    background: #ffffff;
    color: var(--aura-text);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.kc-social-btn:hover {
    border-color: var(--aura-primary);
    background: #f5f8ff;
}

/* ── Register link ── */
.kc-register {
    text-align: center;
    font-size: .875rem;
    color: var(--aura-text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.kc-register a {
    color: var(--aura-primary);
    font-weight: 600;
    text-decoration: none;
}

.kc-register a:hover {
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .kc-card {
        padding: 32px 24px 28px;
        border-radius: 16px;
    }
}
