/* Maya Support - sign-in pages (index.php, screen.php)
   Centered card: navy brand column (menu colors) + form column. */
:root {
  --navy: #393a6b;
  --navy-2: #2b2c55;
  --sky: #54aacf;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dfe3ea;
  --field: #f8fafc;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 5fr 6fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .08);
  overflow: hidden;
}

/* ---------- Brand column ---------- */
.auth-brand {
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
  color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  border-right: 3px solid var(--sky);
}
.brand-mark { display: flex; align-items: center; gap: 12px; }
.brand-mark .logo-tile {
  width: 42px; height: 42px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
}
.brand-mark .logo-tile img { width: 28px; height: 28px; }
.brand-mark .name { font-size: 1.15rem; font-weight: 600; letter-spacing: .2px; }
.brand-mark .name b { color: var(--sky); font-weight: 700; }

.brand-body { margin: auto 0; padding: 36px 0; }
.brand-body .kicker {
  display: inline-block; margin-bottom: 14px;
  font-size: .72rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.brand-body h2 { margin: 0 0 12px; font-size: 1.55rem; font-weight: 700; line-height: 1.3; }
.brand-body p { margin: 0 0 24px; font-size: .92rem; line-height: 1.6; color: rgba(255, 255, 255, .78); }

.brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.brand-points li { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: rgba(255, 255, 255, .9); }
.brand-points i {
  width: 26px; height: 26px; border-radius: 7px; flex: 0 0 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; color: var(--sky); background: rgba(255, 255, 255, .08);
}

.brand-foot { font-size: .78rem; color: rgba(255, 255, 255, .55); }

/* ---------- Form column ---------- */
.auth-main { padding: 44px 48px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-main h1 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.auth-main .lead { margin: 0 0 26px; color: var(--muted); font-size: .92rem; }

.auth-alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 18px; padding: 10px 12px;
  border: 1px solid #fecaca; border-radius: 9px;
  background: var(--danger-bg); color: var(--danger); font-size: .87rem;
}

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 600; color: #374151; }
.field-box { position: relative; }
.field-box .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #9ca3af; pointer-events: none; }
.field-box input,
.field-box select {
  width: 100%; height: 46px; padding: 0 42px 0 40px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--field);
  font: inherit; font-size: .94rem; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field-box select { cursor: pointer; -webkit-appearance: none; appearance: none; }
.field-box input::placeholder { color: #9ca3af; }
.field-box input:focus,
.field-box select:focus { outline: none; border-color: var(--sky); background: #fff; box-shadow: 0 0 0 3px rgba(84, 170, 207, .18); }
.field-box:focus-within .ico { color: var(--navy); }
.field-box .chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: .75rem; color: #9ca3af; pointer-events: none; }
.field-error { display: block; min-height: 16px; margin-top: 5px; font-size: .8rem; color: var(--danger); }

.eye-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 7px; background: transparent;
  color: #9ca3af; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.eye-btn:hover { color: var(--navy); background: #eef1f6; }
.eye-btn:focus-visible { outline: 2px solid var(--sky); }

.btn-primary {
  width: 100%; height: 46px; margin-top: 6px;
  border: 0; border-radius: 9px; background: var(--navy);
  color: #fff; font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover { background: var(--navy-2); box-shadow: 0 6px 16px rgba(57, 58, 107, .22); }
.btn-primary:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn-primary i { font-size: .8rem; }

.help-text { margin: 18px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }
.help-text a { color: var(--navy); font-weight: 600; text-decoration: none; }
.help-text a:hover { text-decoration: underline; }

.user-chip {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 22px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--field);
}
.user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-size: .85rem; font-weight: 600;
}
.user-chip .who { line-height: 1.3; }
.user-chip .who b { display: block; font-size: .93rem; }
.user-chip .who small { color: var(--muted); font-size: .8rem; }

.auth-foot { margin-top: 20px; text-align: center; font-size: .78rem; color: #8a93a3; }
.auth-foot i { color: #16a34a; margin-right: 4px; }

/* ---------- Small screens: brand column becomes a compact top band ---------- */
@media (max-width: 820px) {
  .auth-card { grid-template-columns: 1fr; max-width: 460px; }
  .auth-brand { padding: 20px 24px; border-right: 0; border-bottom: 3px solid var(--sky); }
  .brand-body, .brand-foot { display: none; }
  .auth-main { padding: 28px 24px 26px; }
}
