/* =====================================================================
   AH5 ID — design system
   Palette taken from the Creatives iT identity.
   Identifiers (sub, IDs, tokens, timestamps) are always set in mono —
   in an identity system the identifier is the artifact, so it gets its
   own typeface rather than blending into the prose.
   Designed & Developed by Anwar Hossain — https://anwar.com.bd
   ===================================================================== */

:root {
  /* Colour */
  --ink:          #0C0C1E;
  --ink-soft:     #4A4A5A;
  --ink-faint:    #8A8A98;
  --signal:       #EC1C24;
  --signal-deep:  #BA000E;
  --indigo:       #292561;
  --indigo-soft:  #1A1C49;
  --paper:        #F5F5F8;
  --card:         #FFFFFF;
  --line:         #E3E3EA;
  --line-soft:    #EFEFF3;
  --ok:           #0E7A4B;
  --ok-bg:        #E6F4EC;
  --warn:         #A66300;
  --warn-bg:      #FDF3E2;
  --danger:       #BA000E;
  --danger-bg:    #FCEAEB;
  --info-bg:      #EDEEF7;

  /* Type */
  --display: 'Anek Bangla', 'Hind Siliguri', system-ui, sans-serif;
  --body:    'Hind Siliguri', 'Anek Bangla', system-ui, -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Space */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(12,12,30,.06);
  --shadow:    0 4px 16px rgba(12,12,30,.07);
  --shadow-lg: 0 18px 48px rgba(12,12,30,.13);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 1em; }
a  { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Identifiers get the mono face wherever they appear */
.mono, code, .id-value, time.mono {
  font-family: var(--mono);
  font-size: .82em;
  letter-spacing: -.01em;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------------
   The chip — signature element. A smart-card contact pad, drawn in CSS.
   Appears once per auth screen and on the account card. Nothing else
   in the interface is allowed to be this decorative.
   --------------------------------------------------------------------- */
.chip {
  width: 42px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, var(--signal) 0%, var(--signal-deep) 55%, var(--indigo) 100%);
  position: relative; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.chip::before, .chip::after {
  content: ''; position: absolute; background: rgba(255,255,255,.55);
}
.chip::before { left: 0; right: 0; top: 33%; height: 1px; }
.chip::after  { left: 0; right: 0; top: 66%; height: 1px; }
.chip i {
  position: absolute; inset: 6px 40% 6px 40%;
  border-left: 1px solid rgba(255,255,255,.55);
  border-right: 1px solid rgba(255,255,255,.55);
}

/* ---------------------------------------------------------------------
   Auth screens
   --------------------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-card__top {
  display: flex; align-items: center; gap: 14px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.auth-card__brand { display: flex; flex-direction: column; line-height: 1.25; }
.auth-card__brand strong {
  font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: .01em;
}
.auth-card__brand span { font-size: .78rem; color: var(--ink-faint); }
.auth-card__body { padding: 26px 28px 28px; }
.auth-card__body > h1 { font-size: 1.32rem; margin-bottom: .35em; }
.auth-card__lede { color: var(--ink-soft); font-size: .9rem; margin-bottom: 22px; }
.auth-card__foot {
  padding: 16px 28px;
  background: var(--paper);
  border-top: 1px solid var(--line-soft);
  font-size: .88rem;
  text-align: center;
  color: var(--ink-soft);
}
.auth-below {
  margin-top: 18px; text-align: center; font-size: .78rem; color: var(--ink-faint);
}
.auth-below a { color: var(--ink-faint); text-decoration: underline; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field > label {
  display: block; font-size: .84rem; font-weight: 600;
  margin-bottom: 6px; color: var(--ink);
}
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: .8rem; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: .93rem;
  color: var(--ink);
  background: #FFF;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #CFCFDA; }
.input:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(236,28,36,.12);
}
.input[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder { color: #B4B4C2; }
.input[disabled], .input[readonly] { background: var(--paper); color: var(--ink-faint); }

.field-error { display: block; margin-top: 5px; font-size: .8rem; color: var(--danger); }

.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-group button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 6px;
  color: var(--ink-faint); border-radius: 6px; line-height: 0;
}
.input-group button:hover { color: var(--ink); background: var(--line-soft); }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: .88rem; cursor: pointer; }
.check input { margin: 3px 0 0; accent-color: var(--signal); width: 16px; height: 16px; flex: none; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; gap: 0; } }

.form-row-between {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font: inherit; font-size: .93rem; font-weight: 600;
  border: 1px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .06s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--signal); color: #FFF; }
.btn--primary:hover { background: var(--signal-deep); }
.btn--ghost { background: #FFF; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: #C9C9D6; background: var(--paper); }
.btn--dark { background: var(--ink); color: #FFF; }
.btn--dark:hover { background: var(--indigo); }
.btn--danger { background: #FFF; color: var(--danger); border-color: #F0C4C7; }
.btn--danger:hover { background: var(--danger-bg); }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 13px; font-size: .84rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-sm);
  font-size: .88rem; line-height: 1.6; margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert svg { flex: none; margin-top: 2px; }
.alert--ok     { background: var(--ok-bg);     color: var(--ok);     border-color: #C6E5D4; }
.alert--error  { background: var(--danger-bg); color: var(--danger); border-color: #F0C4C7; }
.alert--warn   { background: var(--warn-bg);   color: var(--warn);   border-color: #F0DDBA; }
.alert--info   { background: var(--info-bg);   color: var(--indigo); border-color: #D3D5EA; }

/* ---------------------------------------------------------------------
   App shell (profile + admin)
   --------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 11px 20px;
}
.topbar__logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  color: var(--ink); text-decoration: none;
}
.topbar__logo .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--signal); }
.topbar__spacer { flex: 1; }

.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle a {
  padding: 4px 13px; font-size: .78rem; font-weight: 600;
  color: var(--ink-soft); text-decoration: none; background: #FFF;
}
.lang-toggle a.is-on { background: var(--ink); color: #FFF; }
.lang-toggle a:hover { text-decoration: none; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; background: var(--indigo); color: #FFF;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; letter-spacing: .02em; flex: none;
  border: 1px solid var(--line);
}
.avatar--lg { width: 96px; height: 96px; font-size: 1.7rem; }

.usermenu { position: relative; }
.usermenu__trigger {
  display: flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer; padding: 3px; border-radius: 999px;
  font: inherit; color: var(--ink);
}
.usermenu__trigger:hover { background: var(--line-soft); }
.usermenu__name { font-size: .88rem; font-weight: 600; }
@media (max-width: 640px) { .usermenu__name { display: none; } }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 232px; background: #FFF;
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.usermenu__panel.is-open { display: block; }
.usermenu__head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.usermenu__head strong { display: block; font-size: .9rem; }
.usermenu__head span { font-size: .78rem; color: var(--ink-faint); word-break: break-all; }
.usermenu__panel a, .usermenu__panel button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; font: inherit; font-size: .88rem; color: var(--ink);
  background: none; border: 0; border-radius: var(--r-sm);
  cursor: pointer; text-align: left; text-decoration: none;
}
.usermenu__panel a:hover, .usermenu__panel button:hover { background: var(--paper); text-decoration: none; }

.page { max-width: 1180px; margin: 0 auto; padding: 26px 20px 60px; }
.page__head { margin-bottom: 22px; }
.page__head h1 { margin-bottom: 4px; }
.page__head p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

.layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.card__head {
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; }
.card__body { padding: 20px; }
.card__foot {
  padding: 14px 20px; border-top: 1px solid var(--line-soft);
  background: var(--paper); border-radius: 0 0 var(--r) var(--r);
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
.card + .card { margin-top: 20px; }

/* Sidebar navigation */
.sidenav { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.sidenav__label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-faint); font-weight: 700; padding: 12px 12px 6px;
}
.sidenav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--r-sm);
  font-size: .9rem; color: var(--ink-soft); text-decoration: none;
}
.sidenav a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.sidenav a.is-active { background: var(--ink); color: #FFF; font-weight: 600; }
.sidenav a.is-active svg { opacity: 1; }
.sidenav svg { opacity: .65; flex: none; }

/* ---------------------------------------------------------------------
   Account card — the user's identity rendered as a card
   --------------------------------------------------------------------- */
.acct {
  background: linear-gradient(150deg, var(--ink) 0%, var(--indigo-soft) 70%, var(--indigo) 100%);
  color: #FFF; border-radius: var(--r-lg); padding: 22px;
  position: relative; overflow: hidden;
}
.acct::after {
  content: ''; position: absolute; right: -70px; bottom: -90px;
  width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,28,36,.4) 0%, transparent 68%);
}
.acct__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.acct__name { font-family: var(--display); font-size: 1.12rem; font-weight: 700; margin: 14px 0 2px; }
.acct__contact { font-size: .84rem; color: rgba(255,255,255,.72); word-break: break-all; }
.acct__sub {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14);
  position: relative; z-index: 1;
}
.acct__sub-label {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.55); display: block; margin-bottom: 3px;
}
.acct__sub-value {
  font-family: var(--mono); font-size: .74rem; color: rgba(255,255,255,.92);
  display: flex; align-items: center; gap: 8px; word-break: break-all;
}
.acct__sub-value button {
  background: rgba(255,255,255,.12); border: 0; color: #FFF;
  border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: .68rem; flex: none;
}
.acct__sub-value button:hover { background: rgba(255,255,255,.22); }

/* ---------------------------------------------------------------------
   Badges, tables, stats
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.badge--ok      { background: var(--ok-bg);     color: var(--ok); }
.badge--warn    { background: var(--warn-bg);   color: var(--warn); }
.badge--danger  { background: var(--danger-bg); color: var(--danger); }
.badge--muted   { background: var(--line-soft); color: var(--ink-soft); }
.badge--indigo  { background: var(--info-bg);   color: var(--indigo); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat__label { font-size: .78rem; color: var(--ink-faint); margin-bottom: 4px; }
.stat__value { font-family: var(--display); font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat__value small { font-size: .8rem; font-weight: 500; color: var(--ink-faint); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .89rem; }
table.tbl th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint); font-weight: 700; padding: 11px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FCFCFD; }
.tbl__user { display: flex; align-items: center; gap: 10px; }
.tbl__user strong { display: block; font-weight: 600; font-size: .9rem; }
.tbl__user span { font-size: .78rem; color: var(--ink-faint); }

.empty { padding: 44px 20px; text-align: center; color: var(--ink-faint); }
.empty strong { display: block; color: var(--ink); font-size: .98rem; margin-bottom: 4px; font-family: var(--display); }

.pager { display: flex; gap: 6px; justify-content: center; padding: 16px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 6px 12px; border-radius: var(--r-sm); font-size: .85rem;
  border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; background: #FFF;
}
.pager .is-on { background: var(--ink); color: #FFF; border-color: var(--ink); }

/* Device / session list */
.device { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.device:last-child { border-bottom: 0; }
.device__icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--info-bg); color: var(--indigo);
  display: flex; align-items: center; justify-content: center;
}
.device__meta { flex: 1; min-width: 0; }
.device__meta strong { display: block; font-size: .9rem; }
.device__meta span { font-size: .79rem; color: var(--ink-faint); }

/* Definition list used on user detail */
.dl { display: grid; grid-template-columns: 165px 1fr; gap: 10px 18px; font-size: .89rem; }
.dl dt { color: var(--ink-faint); }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dd { margin-bottom: 12px; } }

.site-footer {
  text-align: center; padding: 26px 20px 34px;
  font-size: .8rem; color: var(--ink-faint);
}
.site-footer a { color: var(--ink-soft); }

.notice-strip {
  background: var(--info-bg); border: 1px solid #D3D5EA;
  color: var(--indigo); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: .85rem; margin-bottom: 18px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Phase 1b — auth screens and full profile
   Primary actions move to the government-portal green seen in the
   reference screens; the Creatives iT red stays as the brand mark.
   ===================================================================== */

:root {
  --green:       #1B7F4E;
  --green-deep:  #14653D;
  --green-soft:  #E8F3ED;
  --link:        #1A73E8;
  --fb:          #3B5998;
}

/* ---- Auth: logo header ------------------------------------------- */
.auth-logo { text-align: center; padding: 30px 28px 4px; }
.auth-logo img { max-width: 190px; height: auto; }
.auth-logo h1 {
  font-size: 1.12rem; font-weight: 600; margin: 12px 0 0; color: var(--ink);
}

/* ---- Method switch (মোবাইল / ইমেইল) ------------------------------- */
.method-switch { display: flex; gap: 22px; margin-bottom: 18px; flex-wrap: wrap; }
.method-switch label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .93rem; cursor: pointer; color: var(--ink);
}
.method-switch input { accent-color: var(--link); width: 16px; height: 16px; margin: 0; }

/* ---- Phone field with country prefix ------------------------------ */
.phone-row { display: flex; gap: 12px; }
.phone-row .prefix {
  flex: none; width: 92px; text-align: center;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 11px 8px; font-size: .93rem;
}
.phone-row .input { flex: 1; }
@media (max-width: 420px) { .phone-row .prefix { width: 76px; } }

/* Softer field fill, matching the reference screens */
.auth-card .input, .profile-form .input { background: #FAFAFC; }
.auth-card .input:focus, .profile-form .input:focus {
  background: #FFF; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27,127,78,.13);
}

/* ---- Green primary ------------------------------------------------- */
.btn--green { background: var(--green); color: #FFF; }
.btn--green:hover { background: var(--green-deep); }

/* ---- Social sign-in ------------------------------------------------- */
.social-stack { display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }
.btn--social {
  width: 100%; justify-content: center; gap: 12px;
  padding: 12px 18px; font-weight: 600; font-size: .95rem;
  border-radius: var(--r-sm);
}
.btn--facebook { background: var(--fb); color: #FFF; border-color: var(--fb); }
.btn--facebook:hover { background: #2F4A80; }
.btn--google { background: #FFF; color: #3C4043; border: 1px solid var(--line); }
.btn--google:hover { background: var(--paper); }
.btn--social .mark {
  width: 26px; height: 26px; display: inline-flex;
  align-items: center; justify-content: center; flex: none;
}
.btn--facebook .mark { background: #FFF; border-radius: 3px; }

.auth-divider {
  border: 0; border-top: 1px solid var(--line-soft); margin: 22px 0 18px;
}
.auth-swap { text-align: center; font-size: .92rem; color: var(--ink); margin: 18px 0 0; }
.auth-swap a { color: var(--link); }

/* =====================================================================
   Full profile page
   ===================================================================== */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
@media (max-width: 940px) { .profile-layout { grid-template-columns: 1fr; } }

/* ---- Left column -------------------------------------------------- */
.pcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 24px 20px;
}
.pcard__photo { position: relative; width: 150px; margin: 0 auto 14px; }
.pcard__photo img, .pcard__photo .ph {
  width: 150px; height: 150px; border-radius: 50%;
  object-fit: cover; display: block;
  background: var(--indigo); color: #FFF;
  font-size: 2.6rem; font-weight: 700;
  align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.pcard__photo .ph { display: flex; }
.pcard__cam {
  position: absolute; right: 8px; bottom: 8px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #FFF; border: 3px solid #FFF;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.pcard__cam:hover { background: var(--green-deep); }
.pcard__name { text-align: center; font-size: 1.02rem; font-weight: 600; }
.pcard__phone {
  text-align: center; font-size: .93rem; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 2px;
}
.pcard hr { border: 0; border-top: 1px solid var(--line-soft); margin: 20px 0; }

.pmenu { margin-bottom: 6px; }
.pmenu__head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 9px 4px;
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink);
  text-align: start;
}
.pmenu__head .chev { margin-inline-start: auto; transition: transform .18s; }
.pmenu__head[aria-expanded="true"] .chev { transform: rotate(180deg); }
.pmenu__body { padding: 2px 0 8px 6px; }
.pmenu__body a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-radius: var(--r-sm);
  color: var(--ink-soft); font-size: .92rem; text-decoration: none;
}
.pmenu__body a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.pmenu__body[hidden] { display: none; }

.pverify {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .97rem; padding: 9px 4px;
}
.pverify.is-ok { color: var(--green); }
.pverify.is-pending { color: var(--warn); }

/* ---- Right column ------------------------------------------------- */
.tab-strip { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-strip a {
  padding: 7px 16px; border-radius: 6px; font-size: .9rem;
  background: #FFF; border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none;
}
.tab-strip a.is-on { background: var(--link); border-color: var(--link); color: #FFF; }
.tab-strip a:hover { text-decoration: none; }

.profile-form {
  background: var(--card); border: 1px solid var(--green);
  border-radius: var(--r); padding: 26px 26px 24px;
}
.profile-form > h2 {
  font-family: var(--display); font-size: 1.55rem; font-weight: 600; margin: 0 0 20px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 22px; }
@media (max-width: 780px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.field--src { margin-bottom: 14px; }
.src-note {
  display: block; margin-top: 4px; font-size: .74rem; color: var(--ink-faint);
}
.src-note.is-verified { color: var(--green); }

.skills-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 8px 0 6px; flex-wrap: wrap;
}
.skills-head a { color: var(--link); font-size: .92rem; }
.skill-row {
  display: grid; grid-template-columns: 1.6fr 1fr 1.4fr .7fr auto;
  gap: 10px; align-items: start; margin-bottom: 10px;
}
@media (max-width: 780px) { .skill-row { grid-template-columns: 1fr 1fr; } }
.skill-row .btn { align-self: center; }

.profile-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* ---- App launcher (9-dot grid) ------------------------------------- */
.launcher { position: relative; }
.launcher__trigger {
  width: 36px; height: 36px; border-radius: 50%;
  background: none; border: 0; cursor: pointer; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.launcher__trigger:hover { background: var(--line-soft); color: var(--ink); }
.launcher__panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 296px; background: #FFF; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  padding: 14px; display: none; z-index: 50;
}
.launcher__panel.is-open { display: block; }
.launcher__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.launcher__grid a {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 6px; border-radius: var(--r-sm);
  font-size: .76rem; color: var(--ink-soft); text-align: center; text-decoration: none;
}
.launcher__grid a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.launcher__grid .tile {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(140deg, var(--indigo), var(--indigo-soft));
  color: #FFF; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.launcher__empty { padding: 22px 8px; text-align: center; font-size: .84rem; color: var(--ink-faint); }

/* ---- Admin: method toggles ----------------------------------------- */
.toggle-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row__icon {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink-soft);
}
.toggle-row__meta { flex: 1; min-width: 0; }
.toggle-row__meta strong { display: block; font-size: .93rem; }
.toggle-row__meta span { font-size: .8rem; color: var(--ink-faint); }
.toggle-row__switches { display: flex; gap: 18px; flex-wrap: wrap; }

.switch { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 38px; height: 22px; border-radius: 999px; background: #D2D2DE;
  position: relative; transition: background .18s; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #FFF;
  transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--green); outline-offset: 2px; }

.danger-zone { border-color: #F0C4C7; }
.danger-zone .card__head { background: var(--danger-bg); border-radius: var(--r) var(--r) 0 0; }
.danger-zone .card__head h2 { color: var(--danger); }

/* ---------------------------------------------------------------------
   Return-to-your-site bar
   --------------------------------------------------------------------- */
.return-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  background: var(--green-soft); border: 1px solid #C6E5D4;
  border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 18px;
}
.return-bar__text {
  display: flex; align-items: center; gap: 9px;
  font-size: .88rem; color: var(--green-deep); font-weight: 500;
}
.return-bar .btn { flex: none; }

/* Which app the person is signing in to */
.app-context {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 12px; margin-bottom: 16px;
  font-size: .84rem; color: var(--ink-soft);
}
