/* TGC Webmail — sign-in & change-password pages */
:root {
  --brand: #8f1d1f; --brand-dark: #5e1113; --brand-hover: #761719; --brand-soft: #fbeeee;
  --ink: #1f2330; --ink-2: #555b6e; --ink-3: #8a8fa3; --line: #dfe2ea; --bg: #f4f5f8; --card: #fff;
  --ok: #0f7a45; --ok-bg: #e8f6ee; --err: #b42318; --err-bg: #fdecea;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

.auth-wrap { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }

/* ---- Brand panel ---- */
.brand { position: relative; overflow: hidden; color: #fff; padding: 44px 56px; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at -10% -10%, #b3292d 0%, transparent 60%), linear-gradient(150deg, #9a2124 0%, #6e1416 55%, #43090b 100%); }
.brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .09;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px; }
.brand > * { position: relative; z-index: 1; }
.brand-top { display: flex; align-items: center; gap: 14px; }
.mark { width: 52px; height: 52px; border-radius: 14px; background: #fff; color: var(--brand); display: grid; place-items: center;
  font-weight: 800; font-size: 17px; letter-spacing: .02em; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.org { font-weight: 600; font-size: 15px; opacity: .95; }
.org small { display: block; font-weight: 400; opacity: .75; font-size: 12.5px; }
.brand-mid { margin: auto 0; max-width: 460px; padding: 40px 0; }
.brand-mid h1 { font-size: 40px; line-height: 1.12; margin: 0 0 14px; font-weight: 700; letter-spacing: -.01em; }
.brand-mid > p { font-size: 17px; opacity: .88; margin: 0 0 34px; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.feats li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; }
.feats .ic { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.feats b { display: block; font-weight: 600; font-size: 15px; }
.feats span { display: block; opacity: .78; font-size: 13.5px; }
.brand-foot { font-size: 12.5px; opacity: .7; }

/* ---- Form panel ---- */
.panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.card { width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 38px 36px 30px; box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 12px 32px rgba(16,24,40,.07); }
.mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 26px; }
.mobile-brand .mark { width: 42px; height: 42px; font-size: 14px; background: var(--brand); color: #fff; box-shadow: none; }
.mobile-brand b { font-size: 16px; }
.card h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.card .sub { margin: 4px 0 26px; color: var(--ink-2); font-size: 14.5px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
input { width: 100%; height: 46px; padding: 0 14px 0 42px; border: 1px solid #cfd3de; border-radius: 10px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(143,29,31,.12); }
input.has-toggle { padding-right: 70px; }
.toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
.toggle:hover { background: #f1f2f6; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 18px; font-size: 13.5px; }
.btn { width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-size: 15.5px;
  font-weight: 600; cursor: pointer; transition: background .15s, transform .05s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .7; cursor: wait; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); margin-top: 10px; }
.btn.secondary:hover { background: #f7f7fa; }
.msg { margin-top: 16px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.divider { height: 1px; background: var(--line); margin: 24px 0 16px; }
.help { color: var(--ink-3); font-size: 12.5px; line-height: 1.55; }
.secure { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-size: 12.5px; margin-top: 20px; }

/* password strength */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.meter i { height: 5px; border-radius: 3px; background: #e5e7ee; transition: background .2s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: #d92d20; }
.meter[data-score="2"] i:nth-child(-n+2) { background: #f79009; }
.meter[data-score="3"] i:nth-child(-n+3) { background: #12b76a; }
.meter[data-score="4"] i { background: #0f7a45; }
.rules { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12.5px; color: var(--ink-3); display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.rules li::before { content: "○ "; }
.rules li.met { color: var(--ok); }
.rules li.met::before { content: "✓ "; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .brand { display: none; }
  .mobile-brand { display: flex; }
  .card { padding: 30px 22px 24px; }
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e8eaf2; --ink-2: #b6bacb; --ink-3: #8b90a7; --line: #343a52; --bg: #161925; --card: #1f2333; --ok-bg: #12301f; --err-bg: #3a1615; --ok: #5fd39a; --err: #ff8a80; }
  input { background: #262b3e; border-color: #3d4360; color: var(--ink); }
  .toggle:hover, .btn.secondary:hover { background: #2b3045; }
  .btn.secondary { background: transparent; color: var(--ink); }
  a { color: #f28b8d; }
}
