/* megatel-login-20261127 — Megatel sign-in screen polish (CSS only).
   Every selector is under .mg-auth, which exists only on the Megatel auth
   screens (/megatel/login, forgot/reset/setup/change-password). No ATC page
   has that class, so this file cannot change anything outside Megatel.
   Rollback = drop this <link> from index.html. */

/* ── brand panel ─────────────────────────────────────────────────────── */
.mg-auth .mg-auth-brand {
  padding: 56px 64px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(640px 420px at 100% 0%, rgb(44 197 178 / 0.30), transparent 65%),
    radial-gradient(520px 360px at 0% 100%, rgb(242 163 58 / 0.12), transparent 65%),
    linear-gradient(150deg, #041f1a 0%, #073a32 55%, #0a4a40 100%);
}
/* faint network grid so the panel isn't a flat slab */
.mg-auth .mg-auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  pointer-events: none;
}
.mg-auth .mg-auth-brand > * { position: relative; }
.mg-auth .mg-auth-brand > img.mg-logo { width: 210px !important; }

.mg-auth .mg-auth-brand h1 {
  font-size: clamp(32px, 3.1vw, 44px) !important;
  line-height: 1.12 !important;
  max-width: 640px !important;
  text-wrap: balance;
  color: #ffffff;
}
.mg-auth .mg-auth-brand h1 + p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  max-width: 520px !important;
  margin-top: 18px !important;
  color: #a9cfc8 !important;
}
.mg-auth .mg-auth-brand .flex { gap: 10px !important; margin-top: 28px !important; }
.mg-auth .mg-auth-brand .flex > span {
  font-size: 13.5px !important;
  padding: 7px 14px !important;
  color: #c9f1ea !important;
  background: rgb(44 197 178 / 0.14) !important;
  border-color: rgb(44 197 178 / 0.35) !important;
}
.mg-auth .mg-auth-brand > div:last-child {
  font-size: 12.5px !important;
  color: #7fa9a2 !important;
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding-top: 16px;
}

/* ── form side ───────────────────────────────────────────────────────── */
.mg-auth .mg-auth-form {
  padding: 40px 28px;
  background:
    radial-gradient(700px 480px at 50% 0%, var(--mg-brand-wash), transparent 70%),
    var(--mg-bg);
}
.mg-auth .mg-auth-card {
  max-width: 440px;
  background: #ffffff;
  border: 1px solid var(--mg-line);
  border-radius: 20px;
  padding: 40px 40px 32px;
  box-shadow: 0 1px 2px rgb(10 40 36 / 0.04), 0 24px 56px -24px rgb(10 40 36 / 0.28);
}
.mg-auth .mg-auth-card > img.mg-logo { width: 150px !important; margin-bottom: 28px !important; }
.mg-auth .mg-auth-card h2 { font-size: 28px !important; color: var(--mg-ink); }
.mg-auth .mg-auth-card h2 + p { font-size: 14.5px !important; margin-top: 6px !important; color: var(--mg-ink-soft) !important; }

.mg-auth .mg-auth-card form { margin-top: 26px !important; }
.mg-auth .mg-auth-card .mg-label { font-size: 13px; font-weight: 600; color: var(--mg-ink); margin-bottom: 6px; }
.mg-auth .mg-auth-card .mg-input {
  height: 46px;
  font-size: 15px;
  border-radius: 11px;
  background: #fbfdfc;
}
.mg-auth .mg-auth-card .mg-input:focus { background: #ffffff; }
/* leading icons + reveal button sat at fixed top offsets tuned for 34px inputs */
.mg-auth .mg-auth-card form div[style*="relative"] > svg {
  top: 50% !important;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  left: 14px !important;
}
.mg-auth .mg-auth-card form div[style*="relative"] > .mg-input { padding-left: 40px !important; }
.mg-auth .mg-auth-card form div[style*="relative"] > button {
  top: 50% !important;
  transform: translateY(-50%);
  right: 10px !important;
  display: flex;
}
.mg-auth .mg-auth-card form div[style*="relative"] > button svg { width: 17px; height: 17px; }
.mg-auth .mg-auth-card form a.mg-link { font-size: 13px !important; font-weight: 600; }
.mg-auth .mg-auth-card form button[type="submit"] {
  height: 48px !important;
  font-size: 15px;
  font-weight: 600;
  border-radius: 11px;
  box-shadow: 0 8px 20px -10px rgb(15 157 142 / 0.7);
}

/* the "separate portal" notice: a quiet footnote, not a second card */
.mg-auth .mg-auth-card > .mg-card {
  margin-top: 26px !important;
  background: transparent !important;
  border: 0;
  border-top: 1px solid var(--mg-line);
  border-radius: 0;
  box-shadow: none;
  padding: 18px 2px 0;
}
.mg-auth .mg-auth-card > .mg-card > div { font-size: 12.5px !important; color: var(--mg-ink-faint) !important; text-align: center; }

@media (max-width: 1180px) {
  .mg-auth .mg-auth-brand { padding: 44px 44px; }
}
@media (max-width: 899px) {
  .mg-auth { grid-template-columns: 1fr !important; }
  .mg-auth .mg-auth-brand { display: none !important; }
  .mg-auth .mg-auth-form { padding: 24px 16px; align-items: flex-start; padding-top: 48px; }
  .mg-auth .mg-auth-card { padding: 28px 22px 24px; border-radius: 16px; }
}

/* ── one screen, no scrolling (owner 2026-11-27) ─────────────────────────
   The card alone was ~606px tall plus 80px of padding, so 1366x768 laptops
   (≈625px of viewport) and small phones scrolled. Lock the layout to the
   viewport and tighten vertical rhythm as the screen gets shorter. */
.mg-auth { height: 100vh; height: 100dvh; min-height: 0 !important; overflow: hidden; }
.mg-auth .mg-auth-form, .mg-auth .mg-auth-brand { min-height: 0; overflow-y: auto; }

@media (max-height: 820px) {
  .mg-auth .mg-auth-form { padding: 16px 24px; }
  .mg-auth .mg-auth-card { padding: 26px 34px 20px; }
  .mg-auth .mg-auth-card > img.mg-logo { width: 130px !important; margin-bottom: 16px !important; }
  .mg-auth .mg-auth-card h2 { font-size: 24px !important; }
  .mg-auth .mg-auth-card h2 + p { font-size: 14px !important; margin-top: 2px !important; }
  .mg-auth .mg-auth-card form { margin-top: 16px !important; }
  .mg-auth .mg-auth-card form > div { margin-bottom: 10px !important; }
  .mg-auth .mg-auth-card .mg-label { margin-bottom: 4px; }
  .mg-auth .mg-auth-card .mg-input { height: 42px; }
  .mg-auth .mg-auth-card form button[type="submit"] { height: 44px !important; }
  .mg-auth .mg-auth-card > .mg-card { margin-top: 16px !important; padding-top: 12px; }
  .mg-auth .mg-auth-card > .mg-card > div { font-size: 11.5px !important; line-height: 1.5 !important; }
  .mg-auth .mg-auth-brand { padding-top: 36px; padding-bottom: 32px; }
  .mg-auth .mg-auth-brand h1 { font-size: clamp(28px, 2.7vw, 38px) !important; }
  .mg-auth .mg-auth-brand h1 + p { font-size: 15px !important; margin-top: 12px !important; }
  .mg-auth .mg-auth-brand .flex { margin-top: 18px !important; }
}
@media (max-height: 620px) {
  .mg-auth .mg-auth-card { padding: 20px 28px 16px; }
  .mg-auth .mg-auth-card > img.mg-logo { width: 116px !important; margin-bottom: 10px !important; }
  .mg-auth .mg-auth-card h2 { font-size: 22px !important; }
  .mg-auth .mg-auth-card > .mg-card > div { font-size: 11px !important; }
  .mg-auth .mg-auth-brand h1 + p { display: none; }
}
@media (max-width: 899px) {
  .mg-auth .mg-auth-form { align-items: center !important; padding: 12px !important; }
  .mg-auth .mg-auth-card { padding: 22px 20px 16px !important; }
}
