/* Auth shell — Rahim Affiliate light theme (#12b779 / #f3f5f7) */

.auth-shell {
  --al-bg: #f3f5f7;
  --al-surface: #ffffff;
  --al-border: #e2e8f0;
  --al-text: #0f172a;
  --al-muted: #64748b;
  --al-accent: #12b779;
  --al-accent-dark: #0f9f68;
  --al-accent-soft: #ecfdf5;
  --al-max: 26rem;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--al-bg);
  color: var(--al-text);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  color-scheme: light;
}

.auth-shell .public-main.auth-main {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -18%, rgba(18, 183, 121, 0.16), transparent 58%),
    radial-gradient(ellipse 55% 40% at 100% 100%, rgba(18, 183, 121, 0.06), transparent 55%),
    linear-gradient(180deg, #eef6f2 0%, var(--al-bg) 42%, #eef1f4 100%);
}

.al {
  width: 100%;
  max-width: var(--al-max);
  margin: 0 auto;
  padding: 28px 18px 40px;
  box-sizing: border-box;
  min-width: 0;
  animation: al-rise .45s ease both;
}

@keyframes al-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.al-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.al-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.al-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--al-border);
  box-shadow: 0 8px 20px rgba(15, 39, 68, 0.08);
}

.al-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.al-brand-text strong {
  font-size: clamp(1.05rem, 4.2vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--al-text);
}

.al-brand-text em {
  margin-top: 4px;
  font-style: normal;
  font-size: .78rem;
  font-weight: 600;
  color: var(--al-accent);
}

.al-panel {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  border-radius: 22px;
  padding: 22px 20px 24px;
  box-shadow: 0 18px 40px rgba(15, 39, 68, 0.07);
}

.al-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5f9;
  border: 1px solid #e8edf3;
  margin-bottom: 22px;
}

.al-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 11px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  color: var(--al-muted);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.al-tab i { font-size: .92rem; }

.al-tab.active {
  background: var(--al-accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 183, 121, 0.28);
}

.al-tab:not(.active):hover {
  color: var(--al-text);
  background: rgba(255, 255, 255, 0.8);
}

.al-head {
  margin-bottom: 18px;
  text-align: left;
}

.al-head h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--al-text);
  line-height: 1.15;
}

.al-head p {
  margin: 0;
  color: var(--al-muted);
  font-size: .94rem;
  line-height: 1.45;
}

.al-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .86rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.al-alert.ok {
  background: var(--al-accent-soft);
  border: 1px solid rgba(18, 183, 121, 0.28);
  color: #047857;
}

.al-alert.err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.al-alert.err a { color: #991b1b; font-weight: 700; }

.al-field { margin-bottom: 14px; }

.al-field > label,
.al-label-row label {
  display: block;
  margin: 0 0 8px;
  font-size: .86rem;
  font-weight: 700;
  color: #334155;
}

.al-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.al-label-row label { margin: 0; }

.al-forgot {
  font-size: .82rem;
  font-weight: 700;
  color: var(--al-accent);
  text-decoration: none;
}

.al-forgot:hover {
  color: var(--al-accent-dark);
  text-decoration: underline;
}

.al-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--al-border);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.al-input:focus-within {
  background: #fff;
  border-color: rgba(18, 183, 121, 0.55);
  box-shadow: 0 0 0 4px rgba(18, 183, 121, 0.12);
}

.al-input > i {
  color: #94a3b8;
  font-size: .95rem;
  width: 18px;
  text-align: center;
}

.al-input:focus-within > i { color: var(--al-accent); }

.al-input input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--al-text);
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  padding: 12px 0;
}

.al-input input::placeholder { color: #94a3b8; }

.al-eye {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 8px;
}

.al-eye:hover {
  color: var(--al-text);
  background: #eef2f7;
}

.al-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 16px;
  font-size: .88rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.al-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--al-accent);
}

.al-submit {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--al-accent) 0%, var(--al-accent-dark) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 12px 24px rgba(18, 183, 121, 0.28);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}

.al-submit:hover {
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(18, 183, 121, 0.34);
}

.al-submit:active { transform: scale(.985); }

.al-foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--al-border);
  text-align: center;
}

.al-foot p {
  margin: 0 0 10px;
  font-size: .88rem;
  color: var(--al-muted);
  font-weight: 600;
}

.al-foot-plain {
  border-top: none;
  padding-top: 14px;
}

.al-foot-plain p { margin: 0; }
.al-foot-plain a {
  color: var(--al-accent);
  font-weight: 700;
  text-decoration: none;
}
.al-foot-plain a:hover { text-decoration: underline; }

.al-register-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1.5px solid rgba(18, 183, 121, 0.45);
  background: var(--al-accent-soft);
  color: var(--al-accent-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.al-register-btn:hover {
  background: #d1fae5;
  border-color: var(--al-accent);
  color: #065f46;
}

/* Shared shell for register / forgot / otp pages */
.auth-shell .auth-container {
  min-height: calc(100vh - 40px);
  padding: 28px 16px 40px;
}

.auth-shell .auth-card {
  background: var(--al-surface);
  border: 1px solid var(--al-border);
  box-shadow: 0 18px 40px rgba(15, 39, 68, 0.07);
  color: var(--al-text);
  border-radius: 22px;
}

.auth-shell .auth-header h1 { color: var(--al-text); }
.auth-shell .auth-header p { color: var(--al-muted); }
.auth-shell .auth-form label { color: #334155; }
.auth-shell .auth-form input[type="text"],
.auth-shell .auth-form input[type="email"],
.auth-shell .auth-form input[type="password"],
.auth-shell .auth-form input[type="tel"],
.auth-shell .auth-form input[type="search"] {
  background: #f8fafc;
  border-color: var(--al-border);
  color: var(--al-text);
  border-radius: 12px;
}
.auth-shell .auth-form input:focus {
  border-color: rgba(18, 183, 121, 0.55);
  box-shadow: 0 0 0 4px rgba(18, 183, 121, 0.12);
  outline: none;
}

.auth-pw-wrap {
  position: relative;
  display: block;
}
.auth-pw-wrap input {
  width: 100%;
  padding-right: 44px !important;
  box-sizing: border-box;
}
.auth-pw-eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: #eef2f7;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1rem;
}
.auth-pw-eye:hover { color: var(--al-text); background: #e2e8f0; }
.auth-shell .auth-footer,
.auth-shell .auth-footer a { color: var(--al-muted); }
.auth-shell .auth-footer a { color: var(--al-accent); font-weight: 700; }
.auth-shell .btn-primary {
  background: linear-gradient(135deg, var(--al-accent), var(--al-accent-dark));
  border: none;
  box-shadow: 0 10px 22px rgba(18, 183, 121, 0.25);
}
.auth-shell .auth-channel {
  background: #f8fafc;
  border-color: var(--al-border);
  color: #475569;
}
.auth-shell .auth-channel.active {
  border-color: var(--al-accent);
  background: var(--al-accent-soft);
  color: var(--al-accent-dark);
}

@media (max-width: 420px) {
  .al { padding: 22px 14px 32px; }
  .al-panel { padding: 18px 14px 20px; }
  .al-tab { font-size: .84rem; gap: 6px; }
}
