/* Zaleo Enterprise sign-in. Obsidian with Zaleo blue. Used only by access/login.php */
:root, :root[data-theme="dark"] {
  --bg: #0D1216;
  --bg-2: #121A20;
  --panel: #151E25;
  --line: #24313B;
  --ink: #E9EEF2;
  --ink-2: #B9C4CC;
  --muted: #7F8E99;
  --faint: #55636E;
  --blue: #3F83F2;
  --blue-hi: #5C97F5;
  --blue-soft: rgba(63, 131, 242, .16);
  --on-blue: #FFFFFF;
  --bad: #F08A8A;
  --bad-bg: rgba(240, 138, 138, .08);
  --rule: rgba(255, 255, 255, .035);
  --hover: rgba(255, 255, 255, .05);
  --disabled: #2A3642;
  --shadow: 0 12px 30px rgba(0, 0, 0, .45);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: dark;
}
/* light: cool paper, same Zaleo blue (deepened slightly for contrast on white) */
:root[data-theme="light"] {
  --bg: #F4F6F8;
  --bg-2: #FFFFFF;
  --panel: #FFFFFF;
  --line: #D8DEE4;
  --ink: #14202A;
  --ink-2: #3A4855;
  --muted: #5F6E7A;
  --faint: #8D99A3;
  --blue: #2F6FDB;
  --blue-hi: #2560C4;
  --blue-soft: rgba(47, 111, 219, .12);
  --on-blue: #FFFFFF;
  --bad: #B3261E;
  --bad-bg: rgba(179, 38, 30, .06);
  --rule: rgba(20, 32, 42, .045);
  --hover: rgba(20, 32, 42, .05);
  --disabled: #D5DCE2;
  --shadow: 0 12px 30px rgba(20, 32, 42, .14);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F4F6F8; --bg-2: #FFFFFF; --panel: #FFFFFF; --line: #D8DEE4; --ink: #14202A; --ink-2: #3A4855; --muted: #5F6E7A;
    --faint: #8D99A3; --blue: #2F6FDB; --blue-hi: #2560C4; --blue-soft: rgba(47, 111, 219, .12); --bad: #B3261E;
    --bad-bg: rgba(179, 38, 30, .06); --rule: rgba(20, 32, 42, .045); --hover: rgba(20, 32, 42, .05); --disabled: #D5DCE2;
    --shadow: 0 12px 30px rgba(20, 32, 42, .14); color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body#loginscreen { transition: background-color .2s, color .2s; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 2px; }

.signin { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* brand side: one quiet statement, the logo, three plain facts */
.signin-brand {
  position: relative; padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; gap: 28px;
  border-right: 1px solid var(--line); overflow: hidden;
  background:
    linear-gradient(var(--bg-2), var(--bg-2)) padding-box;
}
.signin-brand::before {           /* faint ledger rules: the one decorative move */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--rule) 39px 40px);
}
.signin-brand > * { position: relative; }
.signin-logo { width: 210px; height: auto; display: block; }
.signin-line { font: 400 clamp(2rem, 3.4vw, 3.1rem)/1.12 var(--serif); letter-spacing: -.015em; margin: 0; max-width: 15ch; }
.signin-points { list-style: none; margin: 0; padding: 0; max-width: 40ch; color: var(--ink-2); }
.signin-points li { padding: 11px 0 11px 22px; border-top: 1px solid var(--line); position: relative; }
.signin-points li:last-child { border-bottom: 1px solid var(--line); }
.signin-points li::before { content: ''; position: absolute; left: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* form side */
.signin-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px 24px; }
#_page_body { width: 100%; flex: 1; display: flex; justify-content: center; align-items: center; }
#_page_body form { width: 100%; max-width: 380px; margin: 0; padding: 0; background: none; box-shadow: none; }
.signin-card { width: 100%; }
.signin-logo-sm { display: none; width: 150px; margin-bottom: 28px; }
.signin-card h1 { font: 500 2.1rem/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 6px; }
.signin-card .lede { color: var(--muted); margin: 0 0 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 500; color: var(--ink-2); margin-bottom: 7px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; }
.field-row a { font-size: .84rem; }
.field input, .field select {
  width: 100%; height: 48px; padding: 0 14px; font: 500 1rem var(--sans); color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: var(--faint); font-weight: 400; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input[readonly] { color: var(--muted); }

.pin-wrap { position: relative; }
.pin-wrap input { letter-spacing: .55em; font-variant-numeric: tabular-nums; padding-right: 72px; }
.pin-wrap input::placeholder { letter-spacing: normal; }
.pin-toggle {
  position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 12px; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted); font: 500 .85rem var(--sans); cursor: pointer;
}
.pin-toggle:hover { color: var(--ink); background: var(--hover); }

.signin-submit {
  width: 100%; height: 50px; margin-top: 6px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--blue); color: var(--on-blue); font: 600 1rem var(--sans); letter-spacing: .01em; transition: background .15s;
}
.signin-submit:hover { background: var(--blue-hi); }
.signin-submit:active { transform: translateY(1px); }
.signin-submit[disabled] { background: var(--disabled); color: var(--muted); cursor: not-allowed; }

.notice { border-radius: 6px; padding: 11px 14px; margin: 0 0 18px; font-size: .9rem; line-height: 1.45; }
.notice.is-hidden { display: none; }
.notice.is-error { background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); }
.notice.is-info { background: var(--blue-soft); border: 1px solid rgba(63, 131, 242, .35); color: var(--ink-2); }

.signin-foot { padding-top: 32px; color: var(--faint); font-size: .8rem; }

/* intl-tel-input on dark */
.iti { display: block; width: 100%; }
.iti__flag-container { padding: 1px; }
.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag,
.iti--allow-dropdown input[disabled] + .iti__flag-container:hover .iti__selected-flag { background: var(--hover); }
.iti__selected-flag { border-radius: 6px 0 0 6px; padding: 0 8px 0 12px; }
.iti__arrow { border-top-color: var(--muted); }
.iti__arrow--up { border-bottom-color: var(--muted); }
.iti__country-list { background: var(--panel); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); border-radius: 6px; max-width: 340px; white-space: normal; }
.iti__country.iti__highlight { background: var(--blue-soft); }
.iti__divider { border-bottom-color: var(--line); }
.iti__dial-code { color: var(--muted); }
.iti input.phone { padding-left: 52px; }

/* legacy FA wrappers that might still render */
#loginscreen table { border: 0; }

@media (max-width: 900px) {
  .signin { grid-template-columns: 1fr; }
  .signin-brand { display: none; }
  .signin-logo-sm { display: block; }
  .signin-main { padding-top: 48px; }
  #_page_body { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* theme switch */
.theme-switch {
  position: fixed; top: 16px; right: 18px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel);
  color: var(--ink-2); font: 500 .82rem var(--sans); cursor: pointer;
}
.theme-switch:hover { color: var(--ink); border-color: var(--muted); }
.theme-switch svg { width: 15px; height: 15px; }
.theme-switch .ico-sun { display: none; }
:root[data-theme="dark"] .theme-switch .ico-sun, :root:not([data-theme]) .theme-switch .ico-sun { display: block; }
:root[data-theme="dark"] .theme-switch .ico-moon, :root:not([data-theme]) .theme-switch .ico-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-switch .ico-sun { display: none; }
  :root:not([data-theme]) .theme-switch .ico-moon { display: block; }
}
