/**
 * UniWeb Auth Portals — shared premium login shell (merchant / admin / staff / customer).
 * Presentation only. Form field names, CSRF, and POST handlers stay in each *.php file.
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

body.auth-portal-shell {
  --ap-bg: #f4f7fb;
  --ap-surface: #ffffff;
  --ap-ink: #0b1220;
  --ap-muted: #5b6b7c;
  --ap-line: #e6edf5;
  --ap-brand: #0d9488;
  --ap-brand-deep: #0f766e;
  --ap-accent: #0369a1;
  --ap-btn: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  --ap-btn-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
  --ap-panel: linear-gradient(155deg, rgba(15, 118, 110, 0.94), rgba(3, 105, 161, 0.88));
  --ap-chip: #f0f7f6;
  --ap-chip-line: #d7ebe8;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ap-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(13, 148, 136, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(3, 105, 161, 0.08), transparent 50%),
    linear-gradient(180deg, #eef5f8 0%, var(--ap-bg) 45%, #eef2f7 100%);
  min-height: 100vh;
}

body.auth-portal-shell.auth-portal--admin {
  --ap-brand: #e11d48;
  --ap-brand-deep: #be123c;
  --ap-accent: #9f1239;
  --ap-btn: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
  --ap-btn-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
  --ap-panel: linear-gradient(155deg, rgba(30, 41, 59, 0.96), rgba(127, 29, 29, 0.88));
  --ap-chip: #fff1f2;
  --ap-chip-line: #fecdd3;
}

body.auth-portal-shell.auth-portal--staff {
  --ap-brand: #0284c7;
  --ap-brand-deep: #0369a1;
  --ap-accent: #075985;
  --ap-btn: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  --ap-btn-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
  --ap-panel: linear-gradient(155deg, rgba(7, 89, 133, 0.94), rgba(14, 116, 144, 0.88));
  --ap-chip: #f0f9ff;
  --ap-chip-line: #bae6fd;
}

body.auth-portal-shell .ap-display {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
}

body.auth-portal-shell .ap-wrap {
  display: grid;
  min-height: 100vh;
}

@media (min-width: 960px) {
  body.auth-portal-shell .ap-wrap {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

body.auth-portal-shell .ap-visual {
  display: none;
  position: relative;
  overflow: hidden;
  background: var(--ap-panel);
  color: #fff;
  padding: 3rem;
}

@media (min-width: 960px) {
  body.auth-portal-shell .ap-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

body.auth-portal-shell .ap-visual::after {
  content: '';
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 70%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.22), transparent 65%);
  pointer-events: none;
  animation: apPulse 7s ease-in-out infinite;
}

@keyframes apPulse {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-18px) scale(1.08); opacity: 1; }
}

body.auth-portal-shell .ap-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

body.auth-portal-shell .ap-card {
  width: 100%;
  max-width: 420px;
  background: var(--ap-surface);
  border: 1px solid var(--ap-line);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  padding: 2rem 1.5rem;
  animation: apRise 0.55s ease both;
}

@keyframes apRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

body.auth-portal-shell .ap-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ap-brand-deep);
}

body.auth-portal-shell .ap-card h1 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 0.55rem;
  color: var(--ap-ink);
}

body.auth-portal-shell .ap-sub {
  color: var(--ap-muted);
  font-size: 0.875rem;
  margin-top: 0.4rem;
  line-height: 1.45;
}

body.auth-portal-shell .ap-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ap-muted);
  margin-bottom: 0.4rem;
}

body.auth-portal-shell .ap-input,
body.auth-portal-shell .input-field {
  width: 100%;
  border: 1px solid #d5dee8 !important;
  background: #fff !important;
  color: var(--ap-ink) !important;
  border-radius: 12px !important;
  padding: 0.85rem 0.95rem !important;
  font-size: 1rem;
  outline: none;
  box-shadow: none !important;
}

body.auth-portal-shell .ap-input:focus,
body.auth-portal-shell .input-field:focus {
  border-color: var(--ap-brand) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ap-brand) 18%, transparent) !important;
}

/* Customer login: one large +91 | number control (mobile + laptop) */
body.auth-portal-shell .ap-phone {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 3.35rem;
  border: 1.5px solid #c5d0dc;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.auth-portal-shell .ap-phone:focus-within {
  border-color: var(--ap-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ap-brand) 18%, transparent);
}

body.auth-portal-shell .ap-phone-cc {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.25rem;
  padding: 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f766e;
  background: #f0fdfa;
  border-right: 1.5px solid #d5dee8;
}

body.auth-portal-shell .ap-phone-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 0 !important;
  background: transparent !important;
  color: var(--ap-ink) !important;
  border-radius: 0 !important;
  padding: 1rem 1rem !important;
  font-size: 1.2rem !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  outline: none;
  box-shadow: none !important;
}

body.auth-portal-shell .ap-phone-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  body.auth-portal-shell .ap-phone {
    min-height: 3.6rem;
  }
  body.auth-portal-shell .ap-phone-input {
    font-size: 1.35rem !important;
    padding: 1.1rem 1.15rem !important;
  }
  body.auth-portal-shell .ap-phone-cc {
    min-width: 4.75rem;
    font-size: 1.15rem;
  }
}

body.auth-portal-shell .ap-otp {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

body.auth-portal-shell .ap-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.15rem;
  color: #fff !important;
  background: var(--ap-btn) !important;
  box-shadow: var(--ap-btn-shadow);
  border: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.auth-portal-shell .ap-btn:hover {
  box-shadow: 0 14px 28px color-mix(in srgb, var(--ap-brand) 36%, transparent);
}

body.auth-portal-shell .ap-btn:active {
  transform: translateY(1px);
}

body.auth-portal-shell .ap-alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

body.auth-portal-shell .ap-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

body.auth-portal-shell .ap-alert-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

body.auth-portal-shell .ap-alert-demo {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

body.auth-portal-shell .ap-alert-info {
  background: #f8fafc;
  border: 1px solid var(--ap-line);
  color: var(--ap-muted);
}

body.auth-portal-shell .ap-link {
  color: var(--ap-brand-deep);
  font-weight: 600;
}

body.auth-portal-shell .ap-link:hover {
  text-decoration: underline;
}

body.auth-portal-shell .ap-foot {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ap-muted);
  margin-top: 1.75rem;
}

body.auth-portal-shell .ap-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  word-break: break-all;
  background: #f8fafc;
  border: 1px solid var(--ap-line);
  border-radius: 10px;
  padding: 0.75rem;
}

body.auth-portal-shell .glass {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.auth-portal-shell .ap-card,
  body.auth-portal-shell .ap-visual::after,
  body.auth-portal-shell .ap-btn {
    animation: none !important;
    transition: none !important;
  }
}
