:root {
  --ink: #142027;
  --muted: #66747c;
  --line: #d6dde2;
  --soft: #f2f5f7;
  --white: #ffffff;
  --blue: #0b61e8;
  --blue-dark: #084db7;
  --yellow: #f5bc2e;
  --green: #16845e;
  --admin: #164a6a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--white);
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.auth-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: var(--white);
  border-bottom: 1px solid rgba(20, 32, 39, .12);
}
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.auth-brand img { width: 36px; height: 36px; border-radius: 6px; }
.auth-brand b { color: var(--blue); }
.auth-header-actions { display: flex; align-items: center; gap: 10px; }
.auth-header-actions a { min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; color: #435159; border-radius: 6px; font-size: 13px; font-weight: 700; }
.auth-header-actions a:hover { background: var(--soft); }
.auth-header-actions svg { width: 17px; height: 17px; }
.auth-header-actions .home-link { border: 1px solid var(--line); }

.auth-layout { min-height: calc(100svh - 72px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(520px, .92fr); }
.auth-visual { position: relative; min-height: 680px; overflow: hidden; background: #1b2b34; }
.auth-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.visual-shade { position: absolute; inset: 0; background: rgba(13, 31, 41, .68); }
.visual-copy { position: relative; z-index: 2; width: min(620px, calc(100% - 80px)); height: 100%; margin: 0 auto; padding: 90px 0 140px; display: flex; flex-direction: column; justify-content: center; color: var(--white); }
.visual-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: #bcd4ff; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.visual-kicker span { width: 34px; height: 3px; background: var(--yellow); }
.visual-copy h1 { max-width: 560px; margin: 0; font-size: clamp(42px, 5vw, 66px); line-height: 1.06; font-weight: 800; }
.visual-copy > p:not(.visual-kicker) { max-width: 560px; margin: 24px 0 0; color: #d8e2e7; font-size: 16px; line-height: 1.75; }
.visual-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; }
.visual-points span { display: inline-flex; align-items: center; gap: 8px; color: #edf5f8; font-size: 12px; font-weight: 700; }
.visual-points svg { width: 18px; height: 18px; color: var(--yellow); }
.visual-status { position: absolute; z-index: 2; left: max(40px, calc((100% - 620px) / 2)); bottom: 40px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--white); background: rgba(15, 29, 37, .84); border-left: 4px solid var(--green); border-radius: 5px; }
.visual-status > i { width: 10px; height: 10px; background: #36d695; border-radius: 50%; box-shadow: 0 0 0 5px rgba(54, 214, 149, .13); }
.visual-status span, .visual-status b { display: block; }
.visual-status span { color: #b9c8cf; font-size: 10px; line-height: 1.55; }
.visual-status b { color: var(--white); font-size: 12px; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 56px 54px; background: var(--white); }
.auth-panel-inner { width: min(100%, 460px); }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; }
.role-switch button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #59676f; background: transparent; border: 0; border-radius: 5px; font-size: 13px; font-weight: 800; }
.role-switch button svg { width: 18px; height: 18px; }
.role-switch button[aria-selected="true"] { color: var(--white); background: var(--blue); }
body.is-admin .role-switch button[aria-selected="true"] { background: var(--admin); }
.customer-login-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: -10px 0 22px; }
.customer-login-modes button { min-height: 38px; color: #56656d; background: var(--white); border: 1px solid var(--line); border-radius: 5px; font-size: 11px; font-weight: 800; }
.customer-login-modes button[aria-selected="true"] { color: var(--blue); background: #edf4ff; border-color: #9ec0f4; }
.auth-title { margin: 38px 0 30px; }
.auth-title p { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; text-transform: uppercase; }
body.is-admin .auth-title p { color: var(--admin); }
.auth-title h2 { margin: 0; font-size: 31px; line-height: 1.2; }
.auth-title span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-form { display: grid; gap: 10px; }
.login-form > label, .password-label label { font-size: 12px; font-weight: 800; }
.license-login-fields { display: grid; gap: 10px; }
.license-login-fields > label { font-size: 12px; font-weight: 800; }
.license-login-fields > .field + label { margin-top: 8px; }
.password-label { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.password-label a { color: var(--blue); font-size: 11px; font-weight: 700; }
.field { height: 50px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; background: var(--white); border: 1px solid #bbc7ce; border-radius: 6px; }
.field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 97, 232, .1); }
body.is-admin .field:focus-within { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(22, 74, 106, .1); }
.field > svg { justify-self: center; width: 18px; height: 18px; color: #77858d; }
.field input { width: 100%; min-width: 0; height: 100%; padding: 0 8px 0 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.field input::placeholder { color: #9aa6ad; }
.password-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: #77858d; background: transparent; border: 0; }
.password-toggle:hover { color: var(--ink); }
.password-toggle svg { width: 18px; height: 18px; }
.remember-row { display: inline-flex; align-items: center; gap: 9px; margin: 5px 0 8px; color: #536169; font-size: 12px; font-weight: 600 !important; cursor: pointer; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--blue); }
.submit-button { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: var(--white); background: var(--blue); border: 0; border-radius: 6px; font-size: 14px; font-weight: 800; }
.submit-button:hover { background: var(--blue-dark); }
body.is-admin .submit-button { background: var(--admin); }
body.is-admin .submit-button:hover { background: #0f3c58; }
.submit-button svg { width: 19px; height: 19px; }
.form-notice { display: none; padding: 11px 13px; color: #155a42; background: #eaf8f2; border: 1px solid #bde3d3; border-radius: 6px; font-size: 11px; line-height: 1.55; }
.form-notice.is-visible { display: block; }
.auth-help { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; margin-top: 24px; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; }
.auth-help > svg { width: 22px; height: 22px; color: var(--blue); }
.auth-help span, .auth-help b { display: block; }
.auth-help span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.auth-help b { color: var(--ink); font-size: 11px; }
.auth-help a { color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
body.is-admin .auth-help > svg, body.is-admin .auth-help a { color: var(--admin); }
.security-note { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; color: #849098; font-size: 10px; line-height: 1.55; }
.security-note svg { flex: 0 0 auto; width: 14px; height: 14px; margin-top: 1px; }

@media (max-width: 980px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-visual { min-height: 350px; }
  .visual-copy { width: calc(100% - 48px); padding: 54px 0 100px; }
  .visual-copy h1 { font-size: 42px; }
  .visual-copy > p:not(.visual-kicker) { font-size: 14px; }
  .visual-status { left: 24px; bottom: 20px; }
  .auth-panel { padding: 54px 24px 70px; }
}

@media (max-width: 600px) {
  .auth-header { height: 64px; padding: 0 16px; }
  .auth-brand { font-size: 17px; }
  .auth-brand img { width: 32px; height: 32px; }
  .auth-header-actions > a:first-child { display: none; }
  .auth-header-actions a { padding: 0 10px; font-size: 11px; }
  .auth-layout { min-height: calc(100svh - 64px); }
  .auth-visual { min-height: 300px; }
  .visual-copy { width: calc(100% - 32px); padding: 44px 0 88px; justify-content: flex-start; }
  .visual-kicker { font-size: 10px; }
  .visual-copy h1 { max-width: 360px; font-size: 34px; }
  .visual-copy > p:not(.visual-kicker), .visual-points { display: none; }
  .visual-status { left: 16px; right: 16px; bottom: 16px; }
  .auth-panel { padding: 38px 16px 56px; }
  .auth-title { margin: 30px 0 24px; }
  .auth-title h2 { font-size: 27px; }
  .auth-help { grid-template-columns: 28px 1fr; }
  .auth-help a { grid-column: 2; }
}
