@import url('../vendor/google-fonts/inter-400-600-700.css');

:root {
    --auth-ink: #1c2940;
    --auth-muted: #75839a;
    --auth-blue: #2055d7;
    --auth-blue-hover: #1746bd;
    --auth-line: #dfe5ee;
    --auth-field: #f8f9fc;
}

* { box-sizing: border-box; }
body.auth-page { margin: 0; background: #fff; color: var(--auth-ink); font-family: 'Inter', 'Segoe UI', sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
.auth-page a { color: var(--auth-blue); text-decoration: none; }
.auth-page a:hover { color: var(--auth-blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.auth-page :is(a, button, input, select):focus-visible { outline: 3px solid #9bb9ff; outline-offset: 3px; }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1.29fr) minmax(430px, 1fr); min-height: 100vh; min-height: 100svh; }
.auth-brand { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: space-between; height: 100vh; height: 100svh; min-height: 620px; padding: 40px clamp(32px, 4.5vw, 72px); overflow: hidden; isolation: isolate; background: #d8e3ee; }
.auth-brand-photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.auth-brand::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16,35,56,.64) 0%, rgba(16,35,56,.64) 14%, rgba(16,35,56,.2) 30%, transparent 46%, transparent 64%, rgba(7,22,26,.5)); pointer-events: none; }
.auth-brand-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; }
.auth-brand-title { margin: 0 0 5px; color: #fff; font-size: 19px; font-weight: 600; letter-spacing: -.3px; white-space: nowrap; }
.auth-brand-subtitle { margin: 0; color: #fff; font-size: 12px; line-height: 1.6; }
.auth-brand-rule { display: block; width: 34px; height: 2px; margin-top: 17px; background: var(--auth-blue); }
.auth-brand-access { display: inline-flex; align-items: center; gap: 7px; padding-top: 5px; color: #fff; font-size: 8px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; }
.auth-brand-access i { font-size: 13px; }
.auth-brand-caption { color: #fff; }
.auth-brand-caption > span { display: block; width: 34px; height: 1px; margin-bottom: 14px; background: rgba(255,255,255,.8); }
.auth-brand-caption p { margin: 0; font-size: 12px; line-height: 1.65; font-weight: 400; }
.auth-panel { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 56px clamp(40px, 7.5vw, 112px); }
.auth-content { width: 100%; max-width: 380px; }
.auth-logo { display: block; width: 150px; height: auto; margin-bottom: 26px; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h1 { margin: 0 0 10px; color: var(--auth-ink); font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -.85px; }
.auth-subtitle { margin: 0; color: var(--auth-muted); font-size: 13px; line-height: 1.65; }
.auth-field { margin-bottom: 20px; }
.auth-field > label { display: block; margin: 0 0 8px; font-size: 12px; line-height: 1.4; font-weight: 600; }
.auth-input { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; background: var(--auth-field); border: 1px solid var(--auth-line); border-radius: 7px; transition: border-color .15s, box-shadow .15s; }
.auth-input:focus-within { border-color: #81a4f4; box-shadow: 0 0 0 3px rgba(32,85,215,.09); background: #fff; }
.auth-input > i { flex: 0 0 auto; color: #8393ab; font-size: 16px; }
.auth-input > :is(input, select) { width: 100%; min-width: 0; flex: 1; padding: 12px 0; color: var(--auth-ink); background: transparent; border: 0; border-radius: 0; outline: 0 !important; box-shadow: none; font: inherit; font-size: 12px; line-height: 20px; }
.auth-input input::placeholder { color: #95a1b6; opacity: 1; }
.auth-input input[readonly] { color: #748297; }
.auth-input:has(input[readonly]) { background: #f0f3f7; }
.auth-password-toggle { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 38px; margin-right: -7px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #8b9ab0; cursor: pointer; }
.auth-password-toggle:hover { color: var(--auth-blue); }
.auth-field-hint { display: block; margin: 7px 0 0; color: var(--auth-muted); font-size: 11px; line-height: 1.6; }
.auth-help, .auth-step-copy { margin: 7px 0 0; color: var(--auth-muted); font-size: 11px; line-height: 1.65; }
.auth-guidance { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #bfdbfe; border-radius: 7px; background: #eff6ff; color: #1e3a8a; font-size: 11px; line-height: 1.55; }
.auth-guidance i { margin-top: 1px; color: #2563eb; }
.auth-guidance strong, .auth-guidance span { display: block; }
.auth-field.is-invalid .auth-input { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.auth-field.is-invalid .auth-guidance { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.auth-step-copy { margin: -7px 0 20px; font-size: 12px; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 25px; font-size: 11px; }
.auth-options > a { font-weight: 600; padding: 5px 0; }
.auth-remember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #4d5d75; }
.auth-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--auth-blue); cursor: pointer; }
.auth-primary, .auth-secondary { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 46px; padding: 12px 16px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; line-height: 20px; text-align: center; cursor: pointer; transition: background-color .15s, border-color .15s; }
.auth-page .auth-primary { background: var(--auth-blue); color: #fff; }
.auth-page .auth-primary:hover { background: var(--auth-blue-hover); color: #fff; text-decoration: none; }
.auth-primary i { font-size: 16px; font-weight: 400; }
.auth-primary[aria-disabled=true] { opacity: .7; cursor: wait; }
.auth-page .auth-secondary { background: #fff; color: #51617b; border-color: var(--auth-line); }
.auth-page .auth-secondary:hover { background: #f5f7fa; text-decoration: none; }
.auth-actions { display: flex; gap: 12px; margin-top: 26px; }
.auth-actions > .auth-secondary { flex: 0 0 34%; }
.auth-divider { display: flex; align-items: center; gap: 18px; margin: 28px 0; color: #8594ab; font-size: 8px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e8ecf2; }
.auth-info { display: grid; gap: 19px; padding: 19px 18px; border-radius: 9px; background: #f5f6f8; }
.auth-info-row { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.auth-info-icon { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 31px; border-radius: 50%; background: #fafbfc; color: #8291a8; font-size: 18px; }
.auth-info-row strong { display: block; margin-bottom: 2px; color: #5d6d85; font-size: 11px; font-weight: 600; }
.auth-info-row p { margin: 0; color: #7f8da3; font-size: 10px; line-height: 1.65; overflow-wrap: anywhere; }
.auth-footer { margin: 22px 0 0; color: #7a879b; text-align: center; font-size: 11px; line-height: 1.7; }
.auth-footer a { font-weight: 600; }
.auth-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px; font-size: 12px; font-weight: 600; }
.auth-note, .auth-message, .maintenance-alert { margin: 0 0 22px; padding: 14px 16px; color: #5c6d84; border: 1px solid var(--auth-line); border-radius: 7px; background: #f8fafc; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.auth-note { margin-top: 22px; }
.auth-note p, .auth-message p { margin: 0; }
.auth-note:has(> i), .auth-message:has(> i) { display: flex; align-items: flex-start; gap: 10px; }
.auth-note > i, .auth-message > i { flex: 0 0 auto; font-size: 16px; }
.auth-note strong, .auth-message strong, .maintenance-alert strong { display: block; margin-bottom: 4px; font-weight: 600; }
.maintenance-alert { color: #8a5c21; background: #fffaf0; border-color: #eee0c7; }
.auth-message-error, .auth-message.error { color: #9b4242; background: #fff7f7; border-color: #efdbdb; }
.auth-message-success { color: #35624d; background: #f3faf6; border-color: #d8e9df; }
.auth-success { color: #35624d; background: #f3faf6; border-color: #d8e9df; }
.auth-error { color: #9b4242; background: #fff7f7; border-color: #efdbdb; }
.auth-state-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border: 1px solid var(--auth-line); border-radius: 10px; color: #7c8da5; font-size: 22px; }
.auth-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 27px; list-style: none; }
.auth-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: #98a3b4; font-size: 10px; }
.auth-step::after { position: absolute; content: ''; top: 13px; right: 2px; left: 35px; height: 1px; background: #e2e7ef; }
.auth-step:last-child::after { display: none; }
.auth-step > span:first-child { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid #dde3ec; border-radius: 50%; font-size: 11px; font-weight: 600; }
.auth-step[aria-current=step] { color: var(--auth-blue); font-weight: 600; }
.auth-step[aria-current=step] > span:first-child { color: #fff; border-color: var(--auth-blue); background: var(--auth-blue); }
.auth-step.is-complete { color: #5b7192; }
.auth-step.is-complete > span:first-child { background: #edf3ff; border-color: #d5e2fc; color: var(--auth-blue); }
.step-box { display: none; }
.step-box.active { display: block; }
.auth-step-title { font-size: 15px; font-weight: 600; margin: 0 0 18px; }
.auth-review { margin: 0; padding: 3px 16px; border: 1px solid var(--auth-line); border-radius: 7px; background: var(--auth-field); }
.auth-review > div { display: grid; grid-template-columns: 95px minmax(0,1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid #e5eaf1; font-size: 12px; }
.auth-review > div:last-child { border-bottom: 0; }
.auth-review :is(dt, b) { margin: 0; font-weight: 400; color: #7b889d; }
.auth-review dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.auth-input .ts-wrapper { flex: 1; width: 100%; min-width: 0; }
.auth-input .ts-control { min-height: 44px; align-items: center; padding: 9px 24px 9px 0 !important; border: 0; box-shadow: none !important; background: transparent !important; color: var(--auth-ink); font-size: 12px; }
.auth-input .ts-control input { font-size: 12px; }
.auth-input .ts-dropdown { margin-top: 6px; border-color: var(--auth-line); border-radius: 7px; box-shadow: 0 8px 24px rgba(28,41,64,.1); overflow: hidden; font-size: 12px; }
.auth-input .ts-dropdown .option { padding: 10px 12px; }
.auth-input .ts-dropdown .active { background: #edf3ff; color: var(--auth-blue); }
.auth-select .ts-control { min-height: 46px; padding: 12px 36px 12px 14px; border: 1px solid var(--auth-line); border-radius: 7px; box-shadow: none; background: var(--auth-field); color: var(--auth-ink); font-size: 12px; }
.auth-select .ts-control input { font-size: 12px; }
.auth-select .ts-wrapper.focus .ts-control { background: #fff; border-color: #81a4f4; box-shadow: 0 0 0 3px rgba(32,85,215,.09); }
.auth-select > select:not(.tomselected) { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--auth-line); border-radius: 7px; background: var(--auth-field); color: var(--auth-ink); font: inherit; font-size: 12px; }
.auth-select .ts-dropdown { border-color: var(--auth-line); border-radius: 7px; overflow: hidden; box-shadow: 0 8px 24px rgba(28,41,64,.1); font-size: 12px; }
.auth-select .ts-dropdown .option { padding: 10px 12px; }
.auth-select .ts-dropdown .active { background: #edf3ff; color: var(--auth-blue); }
.auth-page .swal2-popup { border-radius: 12px; font-family: inherit; }
.auth-page .swal2-title { font-size: 22px; letter-spacing: -.4px; }
.auth-page .swal2-html-container { font-size: 14px; line-height: 1.65; }
.auth-page .swal2-styled { border-radius: 6px; box-shadow: none; }

@media (min-width: 1600px) {
    .auth-content { max-width: 410px; }
    .auth-heading h1 { font-size: 32px; }
    .auth-subtitle { font-size: 14px; }
    .auth-input { min-height: 50px; }
    .auth-primary { min-height: 50px; }
}
@media (max-width: 1199px) {
    .auth-brand-access { white-space: normal; max-width: 118px; font-size: 7px; line-height: 1.6; }
    .auth-brand-access i { flex: 0 0 auto; }
}
@media (max-width: 959px) and (min-width: 761px) {
    .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr); }
    .auth-brand { padding: 32px; }
    .auth-brand-header { display: block; }
    .auth-brand-access { margin-top: 22px; max-width: none; font-size: 8px; }
    .auth-brand-title { font-size: 17px; }
    .auth-desktop-break { display: none; }
    .auth-panel { padding: 42px 40px; }
}
@media (max-width: 760px) {
    .auth-shell { display: block; }
    .auth-brand { position: relative; height: 152px; min-height: 0; padding: 27px 28px; }
    .auth-brand-photo { object-position: center 23%; }
    .auth-brand::after { background: linear-gradient(180deg, rgba(16,35,56,.68), rgba(16,35,56,.52)); }
    .auth-brand-title { font-size: 18px; }
    .auth-brand-subtitle { font-size: 11px; }
    .auth-brand-access { max-width: 105px; font-size: 7px; }
    .auth-brand-caption { display: none; }
    .auth-panel { padding: 34px 28px 36px; }
    .auth-content { max-width: 420px; }
    .auth-logo { width: 135px; margin-bottom: 24px; }
    .auth-heading { margin-bottom: 26px; }
    .auth-heading h1 { font-size: 27px; }
    .auth-subtitle { font-size: 13px; }
    .auth-input > :is(input, select), .auth-input .ts-control input, .auth-select .ts-control input { font-size: 16px; }
    .auth-input input::placeholder { font-size: 13px; }
    .auth-input, .auth-primary, .auth-secondary { min-height: 48px; }
    .auth-options { font-size: 11px; }
    .auth-back { margin-bottom: 25px; }
}
@media (max-width: 359px) {
    .auth-brand, .auth-panel { padding-left: 20px; padding-right: 20px; }
    .auth-brand-access { display: none; }
    .auth-options { gap: 8px; font-size: 10px; }
    .auth-step { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page *, .auth-page *::before, .auth-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
