:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #e5e5e7;
  --line: var(--border);
  --text: #0a0a0a;
  --text-muted: #6b6b70;
  --black: #0a0a0a;
  --black-hover: #1f1f23;
  --green: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html {
  height: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none;   /* Safari */
  -moz-user-select: none;      /* Firefox */
  -ms-user-select: none;       /* Internet Explorer/Edge */
  user-select: none;
}

/* Forms and copy-friendly regions */
input, textarea, select, option, [contenteditable],
.sltl-feedback,
code, pre, kbd {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Mobile: allow vertical scroll + avoid "center lock" */
@media (max-height: 700px), (max-width: 520px) {
  body {
    justify-content: flex-start;
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* Feedback (success/error) */
.sltl-feedback {
  display: grid;
  gap: 10px;
  margin: 14px 0 18px;
}
.sltl-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #fff;
}
.sltl-alert__icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
  margin-top: 1px;
}
.sltl-alert__text {
  font-size: 13px;
  line-height: 1.45;
}
.sltl-alert--error {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(254, 242, 242, 0.6);
  color: #7f1d1d;
}
.sltl-alert--error .sltl-alert__icon {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}
.sltl-alert--success {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(236, 253, 245, 0.75);
  color: #065f46;
}
.sltl-alert--success .sltl-alert__icon {
  background: rgba(16, 185, 129, 0.18);
  color: #047857;
}
.sltl-alert {
  transition: opacity 220ms ease, transform 220ms ease, max-height 220ms ease, margin 220ms ease, padding 220ms ease;
}
.sltl-alert.sltl-alert--hide {
  opacity: 0;
  transform: translateY(-6px);
  max-height: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Brand divider (used on login/register/verify) */
.brand-rule {
  border: none;
  height: 2px;
  margin: 1.25rem 0 1.35rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(207, 92, 54, 0.85) 0%,
    rgba(207, 92, 54, 0.35) 35%,
    var(--line) 72%,
    rgba(232, 235, 242, 0.35) 100%
  );
  position: relative;
  overflow: hidden;
}

/* The moving glow lives in a pseudo-element so it doesn't disturb the base gradient */
.brand-rule::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(207, 92, 54, 0) 0%,
    rgba(207, 92, 54, 0) 30%,
    rgba(207, 92, 54, 0.95) 50%,
    rgba(207, 92, 54, 0) 70%,
    rgba(207, 92, 54, 0) 100%
  );
  background-size: 200% 100%;
  background-position: -100% 0;
  animation: brand-rule-glow 3.6s ease-in-out infinite alternate;
}

@keyframes brand-rule-glow {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

/* Respect users who don't want motion */
@media (prefers-reduced-motion: reduce) {
  .brand-rule::before { animation: none; }
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 36px 32px 24px;
}

/* HEAD */
.head { text-align: center; margin-bottom: 24px; }
.icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}
.head h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.head p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ALERT */
.alert {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
}

/* TABS */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 22px;
}
.tab {
  padding: 8px 12px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* PANEL */
.panel { display: none; }
.panel.active { display: block; }

/* FIELDS */
.field { margin-bottom: 14px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
}
input::placeholder { color: #9ca3af; }

/* CHECKBOX */
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 20px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: all .15s;
  flex-shrink: 0;
}
.checkbox input:checked {
  background: var(--black);
  border-color: var(--black);
}
.checkbox input:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* BUTTON */
.btn {
  width: 100%;
  padding: 12px 16px;
  background: var(--black);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--black-hover); }
.btn:active { transform: scale(0.99); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* FOOT */
.foot {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
}
.foot-row {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.foot-links {
  display: inline-flex;
  gap: 0;
  flex-wrap: wrap;
  font-size: 12px;
}
.foot-links a + a::before {
  content: "|";
  margin: 0 10px;
  color: rgba(107, 107, 112, 0.7);
}
.foot-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.foot-links a:hover { text-decoration: underline; }
.protected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.protected-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.protected-brand {
  font-weight: 800;
  font-size: 12px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.protected-brand .tld {
  opacity: 1;
  color: #FF6600;
  font-weight: 800;
}

.hidden { display: none; }

/* ==========================================================================
   Login page (sltl/views/login.php)
   Scoped to avoid affecting verify/register.
   ========================================================================== */

body.sltl-login {
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e5e7;
  --line: var(--border);
  --text: #1a1a1a;
  --text-muted: #6b6b70;
  --link: #2563eb;
  --black: #1f1f23;
  --black-hover: #0a0a0a;
  --brand: #f97316;
  --green: #10b981;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 32px 16px;
}

body.sltl-login .card {
  max-width: 460px;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

body.sltl-login .card-form {
  padding: 10px 32px 24px;
  display: flex;
  flex-direction: column;
}

body.sltl-login .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

body.sltl-login .brand.has-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px;
}

body.sltl-login .brand-mark {
  width: 32px;
  height: 32px;
  background: var(--brand);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

body.sltl-login .brand-text {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

body.sltl-login .brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

body.sltl-login .lede {
  margin: 0 0 28px;
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  font-weight: bold;
}

body.sltl-login .alert {
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}

body.sltl-login .alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

body.sltl-login .alert-warn {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
}

body.sltl-login .alert form { display: inline; margin-left: 4px; }

body.sltl-login .alert-link {
  background: none;
  border: 0;
  padding: 0;
  color: #b45309;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

body.sltl-login .alert-link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  text-decoration: none;
}

body.sltl-login .hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: -6px 0 12px 2px;
}

body.sltl-login .terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 18px;
  line-height: 1.5;
}
body.sltl-login .terms input { accent-color: var(--black); margin-top: 2px; flex-shrink: 0; }
body.sltl-login .terms a { color: var(--link); text-decoration: none; }
body.sltl-login .terms a:hover { text-decoration: underline; }

body.sltl-login .field { margin-bottom: 14px; }

body.sltl-login input[type=text],
body.sltl-login input[type=email],
body.sltl-login input[type=password] {
  width: 100%;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

body.sltl-login input::placeholder { color: #9ca3af; }

body.sltl-login input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(31,31,35,0.08);
}

body.sltl-login .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 18px;
  font-size: 13px;
}

body.sltl-login .row label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

body.sltl-login .row label input { accent-color: var(--black); }

body.sltl-login .btn {
  width: 100%;
  padding: 14px;
  background: var(--black);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background .15s;
}

body.sltl-login .btn:hover { background: var(--black-hover); }

body.sltl-login .links { margin-top: 22px; font-size: 14px; color: var(--text-muted); }
body.sltl-login .links p { margin: 0 0 6px; }
body.sltl-login .links a { color: var(--link); text-decoration: none; font-weight: 500; }
body.sltl-login .links a:hover { text-decoration: underline; }

body.sltl-login .tabs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0 0 16px;
  padding: 16px 20px;
  border-radius: 10px;
  background: rgba(243, 244, 246, 0.9);
  
  font-size: 13px;
  color: var(--text-muted);
}

body.sltl-login .tab {
  background: none;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 10px;
  transition: background .15s, color .15s;
}

body.sltl-login .tab + .tab::before { content: ""; }

body.sltl-login .tab-divider {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: rgba(107, 107, 112, 0.6);
  font-weight: 500;
  user-select: none;
}

body.sltl-login .tab.active {
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

body.sltl-login .info-card {
  margin-top: 10px;
  height: 45px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

body.sltl-login .panel { display: none; }
body.sltl-login .panel.active { display: block; }

body.sltl-login .footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

body.sltl-login .footer a { color: inherit; text-decoration: none; }
body.sltl-login .footer a:hover { text-decoration: underline; }

body.sltl-login .protected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.sltl-login .protected-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

body.sltl-login .protected-brand {
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}

body.sltl-login .protected-brand .tld { opacity: 0.55; }

@media (max-width: 760px) {
  body.sltl-login .card-form { padding: 36px 28px 24px; }
}

