/* ==========================================================================
   PicklePulse — Shared Auth, PayMongo Checkout & Quick-Start Guide Styles
   Uses base.css design tokens exclusively.
   ========================================================================== */

/* ---------- Topbar Account Pill & Role Switch ---------- */
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-800);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.account-pill:hover {
  background: var(--surface-2);
  border-color: var(--ink-400);
}
.account-pill .mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-800);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.account-pill .role-dot {
  padding: 1px 6px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  color: var(--ink-600);
  font-size: 10px;
  font-weight: 600;
}

.help-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: var(--r-full);
  color: var(--brand-800);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.help-pill:hover {
  background: var(--brand-100);
  border-color: var(--brand-500);
}

/* ---------- Login Page Layout (login.html) ---------- */
.auth-page {
  min-height: 100vh;
  background: radial-gradient(circle at 15% 10%, var(--brand-50) 0%, var(--surface-2) 42%, var(--surface-2) 100%);
  display: flex;
  flex-direction: column;
}
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--s-10) 0 var(--s-16);
}
.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: var(--s-8);
  align-items: start;
}
.auth-card {
  padding: var(--s-8);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border-radius: var(--r-md);
  margin-bottom: var(--s-6);
}
.auth-tabs button {
  height: 36px;
  border: none;
  border-radius: var(--r-sm);
  background: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-600);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.auth-tabs button.active {
  background: var(--surface);
  color: var(--ink-900);
  box-shadow: var(--shadow-xs);
}
.auth-alert {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  margin-bottom: var(--s-4);
  border: 1px solid var(--line);
}
.auth-alert.error {
  background: var(--danger-50);
  border-color: #fecdd3;
  color: var(--danger-700);
}
.auth-alert.info {
  background: var(--warn-50);
  border-color: #fde68a;
  color: var(--warn-700);
}

/* 1-Click Demo Role Switcher Cards */
.demo-panel {
  padding: var(--s-8);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.demo-role-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.demo-role-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  width: 100%;
  padding: var(--s-3) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.12s var(--ease);
}
.demo-role-btn:hover {
  border-color: var(--brand-600);
  background: var(--brand-50);
  transform: translateY(-1px);
}
.demo-role-left {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
}
.demo-role-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--ink-800);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.demo-role-btn:hover .demo-role-icon {
  background: var(--brand-100);
  color: var(--brand-800);
}
.demo-role-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.demo-role-desc {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin-top: 2px;
}

/* ---------- Role Gate Overlay / Notice ---------- */
.role-gate-card {
  max-width: 520px;
  margin: var(--s-12) auto;
  padding: var(--s-8);
  text-align: center;
}
.role-gate-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: var(--warn-50);
  color: var(--warn-700);
  display: grid;
  place-items: center;
  margin: 0 auto var(--s-4);
}
.role-gate-actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s-6);
}

/* ---------- Slide-Over Quick-Start Guide Drawer ---------- */
.guide-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
  display: none;
  justify-content: flex-end;
}
.guide-backdrop.open {
  display: flex;
  animation: fade 0.15s var(--ease);
}
.guide-drawer {
  width: 100%;
  max-width: 500px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.2s var(--ease);
}
@keyframes slideInRight {
  from { transform: translateX(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.guide-head {
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--s-4);
}
.guide-role-pills {
  display: flex;
  gap: 6px;
  padding: var(--s-3) var(--s-6);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.guide-role-pill {
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-600);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.guide-role-pill.active {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}
.guide-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.guide-banner {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  font-size: var(--text-xs);
  color: var(--brand-900);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
}
.guide-step {
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.guide-step.is-current {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
  background: #fcfffd;
}
.guide-step-top {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.guide-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-800);
  font-size: var(--text-xs);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.guide-step h4 {
  font-size: var(--text-sm);
  flex: 1;
}
.guide-step p {
  font-size: var(--text-xs);
  color: var(--ink-600);
  line-height: 1.55;
  margin-bottom: var(--s-3);
}
.guide-foot {
  padding: var(--s-3) var(--s-6);
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--ink-500);
}

/* ---------- PayMongo Checkout Simulator Modal ---------- */
.pm-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4);
  background: #0f172a;
  color: #fff;
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  font-size: var(--text-xs);
}
.pm-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  margin-bottom: var(--s-4);
  text-align: center;
}
.pm-qr-grid {
  width: 112px;
  height: 112px;
  border-radius: var(--r-md);
  background:
    linear-gradient(90deg, #0f172a 25%, transparent 25%, transparent 75%, #0f172a 75%),
    linear-gradient(#0f172a 25%, #fff 25%, #fff 75%, #0f172a 75%);
  background-size: 16px 16px;
  border: 6px solid #fff;
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
}
.pm-qr-center {
  background: var(--brand-600);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}

@media (max-width: 960px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-card, .demo-panel {
    padding: var(--s-6);
  }
}
