@import url("portal-tokens.css");

* { box-sizing: border-box; }
html { color-scheme: light; }

body {
    align-items: center;
    background: var(--canvas);
    color: var(--ink);
    display: flex;
    font-family: var(--font-sans);
    justify-content: center;
    margin: 0;
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 3rem);
}

.container {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: var(--shadow-resting);
    display: grid;
    grid-template-columns: minmax(17rem, 21rem) minmax(22rem, 34rem);
    margin: auto;
    max-width: 880px;
    overflow: hidden;
    width: 100%;
}

.account-brand-panel {
    background: #f8fafb;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: clamp(2rem, 4vw, 3rem);
}

.logo-wrapper {
    align-items: center;
    display: flex;
    gap: 1.35rem;
}

.logo { height: 34px; max-width: 132px; object-fit: contain; width: auto; }
.logo:first-child { filter: none; }
.logo:last-child { height: 30px; }

.brand-panel-content { margin-top: clamp(3rem, 8vh, 5.5rem); }

.programme-title {
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1.5;
    margin: 0 0 2rem;
    text-transform: uppercase;
}

.portal-context-label {
    border-left: 3px solid var(--context);
    color: var(--context);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 0 .8rem;
    padding-left: .7rem;
    text-transform: uppercase;
}

.portal-name {
    color: var(--hyundai-blue);
    font-size: clamp(1.45rem, 3vw, 1.8rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0 0 .9rem;
}

.portal-description { color: var(--muted); font-size: .92rem; line-height: 1.6; margin: 0; }

.form-container {
    align-self: center;
    margin: 0 auto;
    max-width: 34rem;
    padding: clamp(2.25rem, 6vw, 4rem);
    width: 100%;
}

.account-introduction { margin-bottom: 2rem; text-align: left; }
.account-introduction h1 {
    color: var(--hyundai-blue);
    font-size: clamp(1.7rem, 3vw, 2.15rem);
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1.2;
    margin: 0 0 .75rem;
    text-align: left;
}
.account-context-sentence { color: var(--muted); font-size: .94rem; line-height: 1.55; margin: 0; }

.form-group { margin-bottom: 1.25rem; }
label { color: #2e4355; display: block; font-size: .88rem; font-weight: 600; margin-bottom: .5rem; }
label:has(input[type="checkbox"]) { align-items: flex-start; display: flex; font-weight: 400; gap: .65rem; line-height: 1.45; }
input[type="checkbox"] { accent-color: var(--hyundai-blue); flex: 0 0 auto; height: 1rem; margin: .15rem 0 0; width: 1rem; }

input[type="email"], input[type="password"], input[type="text"] {
    appearance: none;
    background: #fff;
    border: 1px solid #aebbc6;
    border-radius: 3px;
    color: var(--ink);
    font: inherit;
    min-height: 46px;
    padding: .75rem .85rem;
    width: 100%;
}
input::placeholder { color: #758491; opacity: 1; }
input:hover { border-color: #718697; }
input:focus { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); outline: none; }
input:focus-visible, .button:focus-visible, a:focus-visible { outline: 3px solid rgba(0, 127, 168, .28); outline-offset: 2px; }

.button {
    align-items: center;
    background: var(--hyundai-blue);
    border: 1px solid var(--hyundai-blue);
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: .94rem;
    font-weight: 600;
    justify-content: center;
    min-height: 46px;
    padding: .75rem 1.2rem;
    text-align: center;
    text-decoration: none;
    width: 100%;
}
.button:hover:not(:disabled) { background: var(--hyundai-blue-dark); border-color: var(--hyundai-blue-dark); }
.button.secondary { background: #fff; border-color: #8798a6; color: var(--hyundai-blue); }
.button.secondary:hover:not(:disabled) { background: var(--context-soft); border-color: var(--context); }
.button:disabled, .button.disabled { background: #e7ebef; border-color: #d2dae0; color: #687785; cursor: not-allowed; pointer-events: none; }

.links { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 1rem 0; text-align: center; }
.links p { margin: 0; }
.links a { color: var(--hyundai-blue); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.resend-section { border-top: 1px solid var(--line); margin-top: 1.75rem; padding-top: 1.5rem; }
.resend-title { color: var(--ink); font-size: .9rem; font-weight: 600; margin: 0 0 .85rem; }

.error-message, .success-message { border: 1px solid; border-radius: 3px; font-size: .9rem; line-height: 1.5; margin-bottom: 1.25rem; padding: .8rem .9rem; text-align: left; }
.error-message { background: #fff5f5; border-color: #c77a7a; color: #752020; }
.success-message { background: #f1f8f3; border-color: #76a989; color: #1f603a; }
.feedback { display: block; font-size: .82rem; line-height: 1.4; margin-top: .4rem; }
.feedback.valid { color: #17643a; }
.feedback.invalid { color: #9b2424; }
.divider { border-top: 1px solid var(--line); margin: 2rem 0; position: relative; text-align: center; }
.divider span { background: #fff; color: var(--muted); font-size: .84rem; padding: 0 .8rem; position: relative; top: -.7rem; }

@media (max-width: 720px) {
    body { padding: 1rem; }
    .container { grid-template-columns: 1fr; }
    .account-brand-panel { border-bottom: 1px solid var(--line); border-right: 0; padding: 1.6rem; }
    .brand-panel-content { margin-top: 1.8rem; }
    .programme-title { margin-bottom: 1.25rem; }
    .portal-description { max-width: 42rem; }
    .form-container { max-width: none; padding: clamp(1.6rem, 7vw, 3rem); }
}

@media (max-width: 420px) {
    body { padding: 0; }
    .container { border: 0; border-radius: 0; min-height: 100vh; }
    .account-brand-panel { padding: 1.35rem; }
    .logo { height: 29px; max-width: 116px; }
    .logo:last-child { height: 26px; }
    .form-container { padding: 1.7rem 1.35rem 2rem; }
    input, .button { font-size: 16px; }
}
