/* =====================================================================
   Sign-in page (site root, staff.login, intern.login)
   Two portals side by side: Staff (Naandi orange) and Intern (deep teal),
   each with its own sign-in form. On phones one card shows at a time behind
   a Staff / Intern switch. Self-contained: used only by Views/auth/portal.php.
   ===================================================================== */
html, body.pt-body { margin: 0; min-height: 100%; background: #fbf7f2; }
.pt-page {
  --pt-ink: #1c1917; --pt-ink-2: #44403c; --pt-muted: #78716c; --pt-line: #e7e0d6;
  --pt-bg: #fbf7f2; --pt-surface: #ffffff;
  --pt-s1: #f26a1b; --pt-s2: #f59e0b; --pt-s-deep: #c2410c; --pt-s-soft: #fff1e6;
  --pt-i1: #134e4a; --pt-i2: #0e7490; --pt-i-deep: #0f766e; --pt-i-soft: #e6f6f4;
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--pt-bg); color: var(--pt-ink); overflow: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  word-spacing: .05em; -webkit-font-smoothing: antialiased;
}
.pt-page *, .pt-page *::before, .pt-page *::after { box-sizing: border-box; }

/* Decorative background */
.pt-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.pt-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.pt-blob-a { width: 560px; height: 560px; left: -180px; top: -200px; background: radial-gradient(circle, #fdba74, transparent 68%); }
.pt-blob-b { width: 620px; height: 620px; right: -220px; bottom: -260px; background: radial-gradient(circle, #99e0d6, transparent 68%); }
.pt-dots {
  position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(120, 113, 108, .18) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* Top brand bar */
.pt-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); }
.pt-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-brand-logo { width: 50px; height: 50px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 18px rgba(28, 25, 23, .14); flex: none; }
.pt-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pt-brand-text strong { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.pt-brand-text span { font-size: .78rem; color: var(--pt-muted); }
.pt-partner-logo { height: 42px; width: auto; flex: none; }

/* Hero */
.pt-main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 32px) 28px; display: flex; flex-direction: column; justify-content: center; }
.pt-hero { text-align: center; margin-bottom: 26px; }
.pt-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pt-s-deep); background: var(--pt-s-soft); padding: 6px 12px; border-radius: 999px;
}
.pt-hero h1 { font-family: 'Outfit', sans-serif; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 12px 0 6px; color: var(--pt-ink); line-height: 1.15; }
.pt-hero h1 span { background: linear-gradient(120deg, var(--pt-s1), #e0412b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pt-hero p { margin: 0 auto; color: var(--pt-muted); font-size: 1rem; max-width: 52ch; }

/* Phone-only switch */
.pt-switch { display: none; }

/* Cards */
.pt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: stretch; }
.pt-card {
  display: flex; flex-direction: column; background: var(--pt-surface); border-radius: 26px; overflow: hidden;
  border: 1px solid rgba(231, 224, 214, .9);
  box-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 18px 50px -18px rgba(28, 25, 23, .22);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: ptRise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.pt-card.pt-intern { animation-delay: .08s; }
.pt-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(28, 25, 23, .04), 0 26px 60px -20px rgba(28, 25, 23, .3); }
@keyframes ptRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.pt-band { position: relative; padding: 26px 28px 24px; color: #fff; overflow: hidden; isolation: isolate; }
.pt-staff .pt-band { background: linear-gradient(135deg, var(--pt-s1) 0%, var(--pt-s2) 100%); }
.pt-intern .pt-band { background: linear-gradient(135deg, var(--pt-i1) 0%, var(--pt-i2) 100%); }
.pt-band::before, .pt-band-ring { content: ''; position: absolute; border-radius: 50%; z-index: -1; pointer-events: none; }
.pt-band::before { width: 240px; height: 240px; right: -70px; top: -110px; background: rgba(255, 255, 255, .14); }
.pt-band-ring { width: 170px; height: 170px; right: 40px; bottom: -120px; border: 26px solid rgba(255, 255, 255, .1); }
.pt-band-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pt-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); }
.pt-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(0, 0, 0, .14); padding: 5px 10px; border-radius: 999px; }
.pt-band h2 { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 6px; color: #fff; }
.pt-band p { margin: 0; font-size: .9rem; line-height: 1.45; color: rgba(255, 255, 255, .93); max-width: 40ch; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pt-chips span { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28); }
.pt-chips i { font-size: .7rem; opacity: .9; }

/* Form */
.pt-form { padding: 22px 28px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.pt-field { display: flex; flex-direction: column; gap: 6px; }
.pt-label { font-size: .8rem; font-weight: 700; color: var(--pt-ink-2); }
.pt-input {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px;
  height: 50px; border-radius: 14px; background: #faf8f5; border: 1.5px solid var(--pt-line);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.pt-input > i { width: 16px; text-align: center; color: var(--pt-muted); flex: none; font-size: .95rem; }
.pt-input input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; padding: 0;
  font: inherit; font-size: .95rem; color: var(--pt-ink); box-shadow: none;
}
.pt-input input::placeholder { color: #a8a29e; }
.pt-staff .pt-input:focus-within { border-color: var(--pt-s1); background: #fff; box-shadow: 0 0 0 4px rgba(242, 106, 27, .14); }
.pt-intern .pt-input:focus-within { border-color: var(--pt-i-deep); background: #fff; box-shadow: 0 0 0 4px rgba(15, 118, 110, .15); }
.pt-staff .pt-input:focus-within > i { color: var(--pt-s1); }
.pt-intern .pt-input:focus-within > i { color: var(--pt-i-deep); }
.pt-input.is-bad { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220, 38, 38, .12); }
.pt-eye {
  flex: none; width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; font-size: .9rem;
  color: var(--pt-muted); border-radius: 10px;
}
.pt-eye:hover { background: rgba(0, 0, 0, .05); color: var(--pt-ink); }
.pt-eye:focus-visible { outline: 2px solid var(--pt-ink); outline-offset: 1px; }
.pt-caps { font-size: .74rem; font-weight: 600; color: #b45309; display: inline-flex; gap: 6px; align-items: center; }
.pt-caps[hidden] { display: none; }

.pt-submit {
  margin-top: 4px; height: 52px; border: 0; border-radius: 14px; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: .96rem; font-weight: 700; letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.pt-submit i { transition: transform .15s ease; }
.pt-submit:hover { transform: translateY(-1px); filter: brightness(1.04); }
.pt-submit:hover i { transform: translateX(3px); }
.pt-submit:focus-visible { outline: 3px solid var(--pt-ink); outline-offset: 2px; }
.pt-staff .pt-submit { background: linear-gradient(135deg, var(--pt-s1), #f97316); box-shadow: 0 10px 24px -10px rgba(242, 106, 27, .7); }
.pt-intern .pt-submit { background: linear-gradient(135deg, var(--pt-i-deep), var(--pt-i2)); box-shadow: 0 10px 24px -10px rgba(15, 118, 110, .7); }
.pt-submit.is-busy { pointer-events: none; opacity: .85; }
.pt-submit.is-busy i { animation: ptNudge .8s ease-in-out infinite; }
@keyframes ptNudge { 50% { transform: translateX(4px); } }
.pt-note { margin: 2px 0 0; font-size: .78rem; line-height: 1.45; color: var(--pt-muted); text-align: center; }

.pt-alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-size: .86rem; font-weight: 600; line-height: 1.4; }
.pt-alert i { margin-top: 2px; }
.pt-alert-error { background: #fdeceb; color: #b42318; border: 1px solid #fecdca; }
.pt-alert-success { background: #e7fbf1; color: #067647; border: 1px solid #abefc6; }
.pt-alert-info { background: #e9f8ff; color: #026aa2; border: 1px solid #b9e6fe; }

.pt-foot { position: relative; z-index: 1; text-align: center; font-size: .78rem; color: var(--pt-muted); padding: 10px 16px 22px; }

/* Tablet / phone: one portal at a time behind a switch */
@media (max-width: 860px) {
  .pt-hero { margin-bottom: 18px; }
  .pt-switch {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 auto 16px; width: 100%; max-width: 460px;
    background: #fff; border: 1px solid var(--pt-line); border-radius: 14px; box-shadow: 0 6px 18px -10px rgba(28, 25, 23, .2);
  }
  .pt-switch button {
    height: 42px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
    font: inherit; font-size: .9rem; font-weight: 700; color: var(--pt-muted);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  }
  .pt-switch button[aria-selected="true"][data-pt-tab="staff"] { background: linear-gradient(135deg, var(--pt-s1), var(--pt-s2)); color: #fff; }
  .pt-switch button[aria-selected="true"][data-pt-tab="intern"] { background: linear-gradient(135deg, var(--pt-i1), var(--pt-i2)); color: #fff; }
  .pt-cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; width: 100%; }
  .pt-cards[data-active="staff"] .pt-intern,
  .pt-cards[data-active="intern"] .pt-staff { display: none; }
  .pt-card { animation: none; }
}
@media (max-width: 480px) {
  .pt-top { padding: 16px; }
  .pt-brand-logo { width: 42px; height: 42px; }
  .pt-brand-text strong { font-size: 1.1rem; }
  .pt-brand-text span { font-size: .7rem; }
  .pt-partner-logo { height: 30px; }
  .pt-band { padding: 22px 20px 20px; }
  .pt-band h2 { font-size: 1.4rem; }
  .pt-form { padding: 20px; }
  .pt-hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-card, .pt-submit, .pt-submit i { animation: none !important; transition: none !important; }
}
