/* gp.css — GP Client Portal (CP2). Extends /css/style.css tokens only; no new
   colours, shadows or radii. Mobile-first: clinic owners open this on a
   phone. Layout classes are portal-local (gp-*); components are the shared
   ones (.card, .btn, .tab-bar, .brand-mark, .page-header__title, UI.*). */

.gp-root { min-height: 100vh; display: flex; flex-direction: column; }

/* ── Auth screens (sign in, change password) ─────────────────────────── */
.gp-auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.gp-auth__card {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
}

.gp-auth__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.gp-auth__brand-text { min-width: 0; }
.gp-auth__brand-name { font-size: 15px; font-weight: 800; color: var(--color-primary-text); letter-spacing: -0.01em; line-height: 1.2; }
.gp-auth__brand-sub  { font-size: 12px; color: var(--color-on-surface-var); margin-top: 1px; }

.gp-auth__title { font-size: 20px; font-weight: 700; color: var(--color-primary-text); margin: 0 0 6px; }
.gp-auth__lead  { font-size: 13px; color: var(--color-on-surface-var); margin: 0 0 18px; line-height: 1.5; }

.gp-form { display: flex; flex-direction: column; gap: 14px; }

.gp-field { display: flex; flex-direction: column; gap: 6px; }
.gp-field__label { font-size: 12px; font-weight: 600; color: var(--color-on-surface-var); }

.gp-input {
  width: 100%;
  min-height: 44px;                  /* touch target */
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-on-surface);
  background: var(--color-surface);
  border: 0.5px solid var(--color-outline-var);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.1s;
}
.gp-input:focus { border-color: var(--color-secondary); }
.gp-input:focus-visible { box-shadow: var(--focus-ring); }
.gp-input:disabled { color: var(--color-on-surface-var); background: var(--color-surface-low); }

.gp-pw { position: relative; }
.gp-pw .gp-input { padding-right: 48px; }
.gp-pw__toggle {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;                 /* 44 px tap target */
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-on-surface-var);
  border-radius: var(--radius-sm);
  font-size: 18px;
}
.gp-pw__toggle:hover { background: var(--color-surface-low); color: var(--color-on-surface); }

.gp-hint { font-size: 12px; color: var(--color-on-surface-var); line-height: 1.5; }

.gp-error {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-error-bg-faint);
  color: var(--color-error-text);
  font-size: 13px;
  line-height: 1.5;
}
.gp-error[hidden] { display: none; }

.gp-btn-block { width: 100%; justify-content: center; min-height: 44px; font-size: 15px; }

.gp-auth__foot { margin-top: 16px; font-size: 12px; color: var(--color-on-surface-var); text-align: center; line-height: 1.5; }
.gp-tap { min-height: 44px; }              /* any secondary button on the auth screens */

/* ── App shell ───────────────────────────────────────────────────────── */
.gp-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-outline-var);
}
.gp-header__brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.gp-header__word { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary-text); white-space: nowrap; }
.gp-header__divider { width: 1px; height: 16px; background: var(--color-outline-var); flex-shrink: 0; }
.gp-header__clinic { font-size: 13px; font-weight: 600; color: var(--color-on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-header__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.gp-iconbtn {
  width: 44px; height: 44px;                 /* 44 px tap target */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-on-surface-var);
  font-size: 20px;
}
.gp-iconbtn:hover { background: var(--color-surface-low); color: var(--color-on-surface); }

/* Account menu — a small popover under the header */
.gp-menu { position: relative; }
.gp-menu__pop {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 220px;
  padding: 6px;
  background: var(--color-surface);
  border: 0.5px solid var(--color-outline-var);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-cloud);
  z-index: 60;
}
.gp-menu__pop[hidden] { display: none; }
.gp-menu__who { padding: 8px 10px 10px; border-bottom: 0.5px solid var(--color-divider); margin-bottom: 4px; }
.gp-menu__who-name { font-size: 13px; font-weight: 600; color: var(--color-on-surface); overflow: hidden; text-overflow: ellipsis; }
.gp-menu__who-sub  { font-size: 11px; color: var(--color-on-surface-var); }
.gp-menu__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px; min-height: 44px;
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--color-on-surface);
  text-align: left;
}
.gp-menu__item:hover { background: var(--color-surface-low); }
.gp-menu__item .ti { font-size: 18px; color: var(--color-on-surface-var); }

.gp-page-header { padding: 20px 16px 8px; background: var(--color-surface); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gp-page-header .seg-toggle__btn { min-height: 36px; }
.gp-page-header .page-header__title { font-size: 24px; }
.gp-page-header__sub { font-size: 13px; color: var(--color-on-surface-var); margin-top: 2px; }

.gp-tabs {
  background: var(--color-surface);
  padding: 0 8px;
  border-bottom: 1px solid var(--color-divider);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.gp-tabs .tab-bar { min-width: max-content; }
.gp-tabs .tab { min-height: 44px; white-space: nowrap; }

.gp-content { flex: 1; padding: 16px; background: var(--color-bg); display: flex; flex-direction: column; gap: 16px; }

.gp-placeholder .empty-state { padding: 40px 16px; }

/* CP5 — Overview grid + funnel, Ads month picker */
.gp-grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
.gp-funnel { display: flex; flex-direction: column; gap: 10px; }
.gp-monthpick .gps__select {
  min-height: 40px; padding: 7px 10px; font-size: 13px; font-family: inherit;
  border: 0.5px solid var(--color-border); border-radius: 6px;
  background: var(--color-surface); color: var(--color-on-surface); outline: none;
}
.gp-monthpick .gps__select:focus-visible { box-shadow: var(--focus-ring); }
/* The shared tab's KPI strip is five-up on desktop; on a phone two-up (gp-sales.css) */

@media (min-width: 769px) {
  .gp-header { padding: 8px 28px; }
  .gp-page-header { padding: 24px 28px 8px; }
  .gp-page-header .page-header__title { font-size: 28px; }
  .gp-tabs { padding: 0 20px; }
  .gp-content { padding: 20px 28px 28px; }
  .gp-grid-2 { grid-template-columns: 3fr 2fr; }
}
