/* Al Mawarid — admin / login styles */

/* ---------- Login ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--cream) 0%, #fff 100%);
  padding: 24px;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { display: block; text-align: center; text-decoration: none; color: inherit; margin-bottom: 24px; }
.auth-title { text-align: center; font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.auth-sub   { text-align: center; color: var(--ink-soft); margin: 0 0 28px; font-size: 14px; }
.auth-error {
  background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 18px;
}
.auth-foot { text-align: center; margin-top: 20px; font-size: 13px; }
.auth-foot a { color: var(--ink-soft); text-decoration: none; }
.auth-foot a:hover { color: var(--gold-deep); }

/* ---------- Admin shell (sidebar layout) ---------- */
.admin-shell { min-height: 100vh; background: var(--cream); }
.admin-shell.has-sidebar {
  display: grid;
  grid-template-columns: 244px 1fr;
}
body.rtl { font-family: 'Tajawal', 'Poppins', sans-serif; }
body.rtl .wcard-top { flex-direction: row-reverse; }
body.rtl .wcard .actions { flex-direction: row-reverse; }
body.rtl .salary-row, body.rtl .phone-row { flex-direction: row-reverse; }
body.rtl .admin-bar-inner { flex-direction: row-reverse; }
body.rtl .admin-user { flex-direction: row-reverse; }
body.rtl .brand-text { text-align: right; }

/* ---------- Admin sidebar ---------- */
.admin-sidebar {
  background: #fff;
  border-inline-end: 1px solid var(--line);
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  z-index: 40;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: inherit;
}
.sidebar-logo { width: 36px; height: auto; flex: 0 0 36px; }
.sidebar-brand-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-brand-name { font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -.1px; }
.sidebar-brand-sub {
  font-size: 10.5px; color: var(--gold-deep); font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; margin-top: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
  scrollbar-width: thin;
}

.sidebar-link {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.sidebar-link:hover { background: var(--cream); color: var(--ink); }
.sidebar-link.is-active {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--gold-soft);
  font-weight: 600;
}
.sidebar-link.is-active .sidebar-ico { color: var(--gold-deep); }
.sidebar-ico { color: var(--ink-soft); flex: 0 0 18px; }
.sidebar-link:hover .sidebar-ico { color: var(--ink); }
.sidebar-lbl { overflow: hidden; text-overflow: ellipsis; }
.sidebar-badge {
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  line-height: 1.5;
  letter-spacing: .2px;
}
.sidebar-link-ext { margin-top: 8px; color: var(--muted); }

/* ---------- Sidebar footer (user + lang + logout) ---------- */
.sidebar-footer {
  border-top: 1px solid var(--line-soft);
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #fff; font-weight: 800; font-size: 13.5px;
  flex: 0 0 34px;
}
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-name { font-size: 13.5px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-role { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.sidebar-actions {
  display: flex; align-items: center; gap: 8px;
}
.sidebar-actions .lang { position: relative; }
.sidebar-actions .lang-btn {
  height: 32px; padding: 0 10px; font-size: 12px;
  background: var(--line-soft); border: 1px solid var(--line);
}
.sidebar-actions .lang-menu { top: auto; bottom: calc(100% + 4px); right: auto; left: 0; min-width: 140px; }
[dir="rtl"] .sidebar-actions .lang-menu { left: auto; right: 0; }
.sidebar-logout {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px;
  border-radius: 8px;
  background: var(--line-soft);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 12px; font-weight: 600;
  transition: background .12s, color .12s, border-color .12s;
}
.sidebar-logout:hover { background: #FEF2F2; color: #991B1B; border-color: #FCA5A5; }

/* ---------- Mobile: hamburger + slide-in sidebar ---------- */
.admin-topstrip {
  display: none;
  align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.admin-topstrip-title { font-weight: 700; color: var(--ink); font-size: 15px; }
.sidebar-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.admin-sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 35;
  backdrop-filter: blur(2px);
}

@media (max-width: 960px) {
  .admin-shell.has-sidebar { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0;
    width: 280px; max-width: 80vw;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
  }
  [dir="rtl"] .admin-sidebar { transform: translateX(100%); }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-topstrip { display: flex; }
}
.admin-bar {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.admin-bar-inner {
  max-width: 1480px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.admin-nav { display: flex; gap: 24px; align-items: center; }
.admin-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 14px;
  padding: 8px 0; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.is-active { color: var(--ink); border-bottom-color: var(--gold); }
.admin-user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-soft); }
.admin-user .who { font-weight: 600; color: var(--ink); }
.admin-user a { color: var(--ink-soft); text-decoration: none; }
.admin-user a:hover { color: var(--ink); }

.admin-main { min-width: 0; padding: 24px; }
.admin-container { max-width: 1380px; margin: 0 auto; }

/* ---------- Filters card ---------- */
.filters-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  /* overflow must stay visible so the searchable-select dropdowns can float
     out over the page instead of being clipped to the card edges. */
  position: relative; overflow: visible; margin-bottom: 18px;
}
.filters-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, var(--gold) 100%);
  /* round the top corners to match the card now that it no longer clips */
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.filters-title {
  font-size: 15px; font-weight: 600; margin: 0 0 16px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.filters-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.filters-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  gap: 12px; align-items: end;
}
.filters-grid .field label {
  font-size: 11px; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .5px;
}
.filters-grid .field input, .filters-grid .field select {
  height: 40px; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 0 12px; font: inherit; font-size: 13.5px;
  outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.filters-grid .field input:focus, .filters-grid .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,183,61,.18);
}
.filter-actions { display: flex; gap: 8px; }
.btn-sm {
  height: 40px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink);
  /* center content for both <button> and <a> (anchors don't self-center a fixed
     height the way buttons do) and drop the default link underline + icon gap. */
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn-sm:hover { border-color: var(--gold); }
.btn-sm.primary { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-sm.primary:hover { background: var(--gold-soft); }
.btn-sm.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm.dark:hover { background: #000; }
@media (max-width: 1100px) { .filters-grid { grid-template-columns: repeat(3, 1fr); } .filter-actions { grid-column: 1 / -1; } }
@media (max-width: 700px)  { .filters-grid { grid-template-columns: 1fr 1fr; } }

/* Searchable-select triggers inside the filter bars: the base .ss-button is
   48px (sized for the larger public-site forms). Inside the admin filter grids
   the inputs and action buttons are 40px, so match the trigger to 40px — then
   dropdowns, text inputs, and buttons all line up on one baseline. */
.filters-grid .ss-button,
.pipe-filters .ss-button {
  height: 40px;
  font-size: 14px;
  border-radius: 10px;
}

/* ---------- Toolbar ---------- */
.list-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin: 18px 4px 14px; gap: 14px; flex-wrap: wrap;
}
.list-count { font-size: 15px; color: var(--ink-soft); }
.list-count b { color: var(--ink); font-weight: 700; font-size: 17px; }
.list-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Worker cards grid ---------- */
.worker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1280px) { .worker-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .worker-grid { grid-template-columns: 1fr; } }

.wcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,20,20,.04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.wcard::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .2s ease;
}
.wcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(20,20,20,.08);
  border-color: var(--gold-soft);
}
.wcard:hover::before { opacity: 1; }
.wcard.is-verified {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--cream) 0%, #fff 20%);
}
.wcard.is-verified::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold) 100%);
}

/* Top row: avatar + title block + chevron */
.wcard-top {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 14px;
}
.wcard .avatar {
  width: 56px; height: 56px; flex: 0 0 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(232,183,61,.35);
  position: relative;
  overflow: hidden;
}
.wcard .avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.wcard .avatar.has-photo { background: var(--cream); padding: 0; }
.wcard.is-verified .avatar {
  background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold) 100%);
  box-shadow: 0 4px 12px rgba(138,106,20,.3);
}
.wcard .avatar .ready-check {
  position: absolute; bottom: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: var(--gold);
  display: none; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; border: 2px solid #fff;
}
.wcard.is-verified .avatar .ready-check { display: flex; }

.wcard .head-text { flex: 1; min-width: 0; padding-top: 2px; }
.wcard .job-title {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 0; line-height: 1.2; letter-spacing: -.2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wcard .who {
  font-size: 13.5px; color: var(--ink-soft); font-weight: 500;
  margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Pills row */
.wcard .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.wcard .badge {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  letter-spacing: .2px;
}
.wcard .badge.iqama-active {
  background: var(--ink); color: #fff;
}
.wcard .badge.iqama-active::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.wcard .badge.iqama-inactive {
  background: #FAFAFA; color: var(--muted); border: 1px solid var(--line);
}
.wcard .badge.iqama-inactive::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
}
.wcard .badge.gender { background: var(--gold-light); color: var(--gold-deep); }
.wcard .badge.verified {
  background: var(--gold); color: var(--ink);
}

/* Stats row — clean horizontal layout, no boxy bg */
.wcard .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 14px;
}
.wcard .stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wcard .stat .lbl {
  font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
}
.wcard .stat .val {
  font-size: 13.5px; color: var(--ink); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Salary row — the eye-catcher */
.wcard .salary-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--cream) 0%, #FFFBF0 100%);
  border-radius: 10px;
  border: 1px solid var(--gold-light);
}
.wcard .salary-row .label {
  font-size: 11px; color: var(--gold-deep);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.wcard .salary-row .amount {
  font-size: 20px; font-weight: 800; color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1;
}
.wcard .salary-row .amount .currency {
  font-size: 11px; font-weight: 600; color: var(--gold-deep);
  margin-left: 4px; letter-spacing: 0;
}
.wcard .salary-row .phone {
  font-size: 12px; color: var(--ink-soft); font-weight: 500;
  font-family: 'Poppins', system-ui;
}

.wcard .phone-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--cream) 0%, #FFFBF0 100%);
  border-radius: 10px;
  border: 1px solid var(--gold-light);
}
.wcard .phone-row .phone-label {
  font-size: 11px; color: var(--gold-deep);
  text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.wcard .phone-row .phone-num {
  font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: .3px;
}

.wcard .last-note {
  font-size: 12.5px; color: var(--ink-soft);
  padding: 10px 12px; margin-bottom: 14px;
  background: var(--line-soft); border-left: 3px solid var(--gold);
  border-radius: 4px;
  line-height: 1.5;
}
.wcard .last-note b { color: var(--gold-deep); font-weight: 600; }

/* Floating "move to trash" × button in the top-end corner of each card */
.wcard-delete-form {
  position: absolute;
  top: 10px; inset-inline-end: 10px;
  margin: 0; z-index: 2;
  opacity: 0; transition: opacity .15s;
}
.wcard:hover .wcard-delete-form,
.wcard-delete-form:focus-within { opacity: 1; }
.wcard-delete {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 18px; line-height: 1; font-weight: 400;
  cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.wcard-delete:hover {
  background: #FEF2F2; border-color: #FCA5A5; color: #991B1B;
  transform: rotate(90deg);
}

/* Action row */
.wcard .actions {
  display: flex; gap: 8px; margin-top: auto;
}
/* Every action row child (buttons, links, wrapping forms) shares the same
   height and vertical centering so text never sits off-center. */
.wcard .actions > * {
  height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
  box-sizing: border-box;
  flex: 1;
}
.wcard .actions form { padding: 0; }
.wcard .actions form > button { width: 100%; height: 100%; }

.wcard .actions .btn-open,
.wcard .actions .btn-hire,
.wcard .actions .btn-ready {
  padding: 0 12px;
  border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 600;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; cursor: pointer; border: none;
  transition: all .15s ease;
}
.wcard .actions .btn-open {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
.wcard .actions .btn-open:hover { border-color: var(--ink); }
.wcard .actions .btn-ready {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  padding: 0 8px;
}
.wcard .actions .btn-ready:hover {
  background: var(--cream); color: var(--gold-deep); border-color: var(--gold-soft);
}
.wcard .actions .btn-ready.is-on {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-soft) 100%);
  color: var(--ink); border-color: var(--gold);
}
.wcard .actions .btn-hire {
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 8px rgba(20,20,20,.15);
}
.wcard .actions .btn-hire:hover {
  background: #000;
  box-shadow: 0 4px 12px rgba(20,20,20,.25);
  transform: translateY(-1px);
}
.wcard .actions .btn-hired {
  background: var(--cream);
  color: var(--gold-deep);
  border: 1.5px solid var(--gold);
  font-weight: 700;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.wcard .actions .btn-hired:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138,106,20,.18);
}
/* Screening triage: "move to backup" button */
.wcard .actions .btn-backup {
  padding: 0 12px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  transition: all .15s ease;
}
.wcard .actions .btn-backup:hover { border-color: #FCA5A5; color: #991B1B; background: #FEF2F2; }

/* ---------- Pagination ---------- */
.pager { margin: 24px 0; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 13px;
}
.pager a:hover { border-color: var(--gold); color: var(--ink); }
.pager .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================================
   Pipeline — header / tabs / stage pills (used by both views)
   ============================================================ */
.pipe-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 16px; flex-wrap: wrap;
}
.pipe-tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.pipe-tabs a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none;
  font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.pipe-tabs a:hover { color: var(--ink); }
.pipe-tabs a.is-active { background: var(--ink); color: #fff; box-shadow: 0 2px 6px rgba(20,20,20,.15); }

.pipe-total { font-size: 14px; color: var(--ink-soft); }
.pipe-total b { color: var(--ink); font-weight: 700; font-size: 17px; }

.stage-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px;
}
.stage-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line);
  text-decoration: none; color: var(--ink-soft);
  font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.stage-pill .cnt {
  background: var(--line-soft); color: var(--ink-soft);
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  transition: all .15s;
}
.stage-pill:hover { border-color: var(--c, var(--gold)); color: var(--ink); }
.stage-pill.is-active {
  background: var(--c, var(--ink));
  border-color: var(--c, var(--ink));
  color: #fff;
}
.stage-pill.is-active .cnt {
  background: rgba(255,255,255,.25); color: #fff;
}

/* ============================================================
   Pipeline — filter bar
   ============================================================ */
.pipe-filters {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end;
}
.pipe-filters .field label {
  font-size: 11px; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .5px;
}
.pipe-filters .field input, .pipe-filters .field select {
  height: 40px; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px;
  width: 100%; outline: none; transition: border-color .15s, box-shadow .15s;
}
.pipe-filters .field input:focus, .pipe-filters .field select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,183,61,.18);
}
@media (max-width: 900px) { .pipe-filters { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   Pipeline — list table
   ============================================================ */
.pipe-table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.pipe-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pipe-table th {
  text-align: start; padding: 12px 16px;
  background: var(--cream); color: var(--ink-soft);
  font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--line);
}
.pipe-row {
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer; transition: background .12s;
}
.pipe-row:hover { background: var(--cream); }
.pipe-row:last-child { border-bottom: none; }
.pipe-row td { padding: 14px 16px; vertical-align: middle; }

.cand-cell .cand-title { font-weight: 700; color: var(--ink); font-size: 14px; line-height: 1.25; }
.cand-cell .cand-name  { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.cand-cell .cand-meta  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ready-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); color: var(--gold); font-size: 10px; font-weight: 700;
  margin-inline-start: 4px; vertical-align: -2px;
}

.req-cell .req-name { font-weight: 600; color: var(--ink); font-size: 13.5px; }
.req-cell .req-type { font-size: 11.5px; color: var(--muted); text-transform: capitalize; margin-top: 2px; }

.stage-tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .2px;
}

.prio {
  display: inline-block;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .4px;
}
.prio-normal { background: var(--line-soft); color: var(--muted); }
.prio-low    { background: #DBEAFE; color: #1E40AF; }
.prio-high   { background: #FEF3C7; color: #92400E; }
.prio-urgent { background: #FEE2E2; color: #991B1B; }

.dt-cell { font-size: 13px; color: var(--ink-soft); }
.open-arrow { color: var(--muted); font-size: 18px; opacity: 0; transition: opacity .15s, transform .15s; }
.pipe-row:hover .open-arrow { opacity: 1; transform: translateX(2px); }
body.rtl .pipe-row:hover .open-arrow { transform: translateX(-2px); }

/* ============================================================
   Pipeline — condensed board view
   ============================================================ */
.board2 {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
@media (max-width: 1280px) { .board2 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .board2 { grid-template-columns: 1fr 1fr; } }

.bcol {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px;
  display: flex; flex-direction: column;
  min-height: 200px;
}
.bcol-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 3px solid var(--c, var(--gold));
}
.bcol-head h3 {
  margin: 0; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--c, var(--ink));
}
.bcol-cnt {
  background: var(--bg, var(--gold-light));
  color: var(--c, var(--gold-deep));
  font-size: 12px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
}
.bcol-empty {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 12px 0;
}
.bcard {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .15s, border-color .15s;
  display: block;
}
.bcard:hover {
  transform: translateY(-2px);
  border-color: var(--c, var(--gold-soft));
  box-shadow: 0 6px 16px rgba(20,20,20,.06);
}
.bcard-title { font-weight: 700; font-size: 13px; color: var(--ink); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-name  { font-size: 12px; color: var(--ink-soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard-meta  { font-size: 11px; color: var(--muted); margin-top: 4px; }

.bcol-more {
  margin-top: auto;
  padding: 10px 12px; text-align: center;
  background: var(--cream);
  color: var(--gold-deep); font-weight: 700; font-size: 12.5px;
  border-radius: 8px; text-decoration: none;
  transition: background .15s;
}
.bcol-more:hover { background: var(--gold-light); }

.pipe-side {
  margin-top: 22px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px;
}
.pipe-side summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-soft);
}

/* ---------- (legacy) Pipeline board styles kept for show.php ---------- */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.board-col {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
  min-height: 200px;
}
.board-col-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
  padding-bottom: 10px; border-bottom: 2px solid var(--line-soft);
}
.board-col-head h3 { margin: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.board-col-head .count {
  background: var(--gold-light); color: var(--gold-deep);
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.board-col[data-stage="placed"]   .board-col-head { border-bottom-color: var(--gold); }
.board-col[data-stage="placed"]   .count { background: var(--cream); color: var(--gold-deep); }
.board-col[data-stage="closed"]   .board-col-head { border-bottom-color: #FCA5A5; }
.board-col[data-stage="closed"]   .count { background: #FEF2F2; color: #991B1B; }
.board-col[data-stage="on_hold"]  .board-col-head { border-bottom-color: #D1D5DB; }
.board-col[data-stage="on_hold"]  .count { background: #F3F4F6; color: #4B5563; }

.req-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: inherit;
  transition: transform .12s, box-shadow .15s, border-color .15s;
}
.req-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.req-card .title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.req-card .who   { font-size: 12px; color: var(--muted); }
.req-card .meta  { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--ink-soft); }
.req-card .meta .pill { background: var(--line-soft); padding: 2px 7px; border-radius: 999px; }
.req-card .note { font-size: 12px; color: var(--ink-soft); border-top: 1px dashed var(--line); padding-top: 6px; }

@media (max-width: 1280px) { .board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .board { grid-template-columns: 1fr 1fr; } }

/* ---------- Request detail ---------- */
.req-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 980px) { .req-grid { grid-template-columns: 1fr; } }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.panel h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.panel h3 { margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: flex; gap: 12px; }
.tl-dot {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%; background: var(--gold-light); color: var(--gold-deep);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.tl-text { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

.tl-form { margin-top: 14px; }
.tl-form textarea {
  width: 100%; min-height: 70px;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 14px; resize: vertical;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.tl-form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,183,61,.18); }
.tl-form .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.stage-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-switch button {
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600;
  transition: all .15s;
}
.stage-switch button:hover { border-color: var(--gold); color: var(--ink); }
.stage-switch button.is-current {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.empty-pane { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ================================================================== */
/* Executive dashboard                                                  */
/* ================================================================== */
.dash { display: flex; flex-direction: column; gap: 18px; }

/* ---- KPI strip ---- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 1280px) { .kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .kpi-strip { grid-template-columns: repeat(2, 1fr); } }

.kpi-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); }
.kpi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  opacity: .55;
}
.kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px; min-height: 20px;
}
.kpi-label {
  font-size: 11px; font-weight: 700; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .6px;
}
.kpi-num {
  font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.05;
  letter-spacing: -.3px;
}
.kpi-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px; min-height: 22px;
}
.kpi-foot.kpi-spark { justify-content: flex-end; }
.kpi-sub { font-size: 11.5px; color: var(--ink-soft); }
.kpi-sub b { color: var(--ink); font-weight: 700; }
.kpi-link { font-size: 11.5px; color: var(--gold-deep); font-weight: 600; text-decoration: none; }
.kpi-link:hover { text-decoration: underline; }
.kpi-bar {
  flex: 1; height: 4px; background: var(--line-soft); border-radius: 999px; overflow: hidden;
  margin-inline-start: 8px;
}
.kpi-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 999px;
}
.kpi-chip {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 3px;
}
.kpi-chip.up   { background: var(--cream); color: var(--gold-deep); border: 1px solid var(--gold-soft); }
.kpi-chip.down { background: #FEF2F2;  color: #991B1B;     border: 1px solid #FCA5A5; }
.kpi-chip.flat { background: #F3F4F6;  color: #6B7280;     border: 1px solid #E5E7EB; }

/* ---- Generic dashboard cards ---- */
.dash-row {
  display: grid;
  gap: 18px;
}
@media (max-width: 1080px) { .dash-row { grid-template-columns: 1fr !important; } }

.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.dash-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.dash-card-head h3 {
  margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.1px;
}
.dash-sub { font-size: 12px; color: var(--ink-soft); }

/* Segmented range switch (year / month / day) */
.range-switch {
  display: inline-flex; gap: 0;
  background: var(--cream); border: 1px solid var(--gold-soft); border-radius: 10px;
  padding: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.range-switch a {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  padding: 6px 12px; border-radius: 7px; text-decoration: none;
  transition: background .15s, color .15s;
}
.range-switch a:hover { color: var(--ink); }
.range-switch a.is-active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--gold-soft);
}
.dash-card .empty {
  padding: 24px 10px; text-align: center; color: var(--muted); font-size: 13px;
}

/* ---- Funnel ---- */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-row {
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  align-items: center; gap: 12px;
}
.funnel-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.funnel-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.funnel-bar-wrap {
  position: relative; height: 28px;
  background: var(--cream); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--gold-soft);
}
.funnel-bar {
  height: 100%; border-radius: 8px;
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.funnel-count {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; font-weight: 700; color: var(--ink); text-shadow: 0 1px 2px rgba(255,255,255,.6);
}
.funnel-retain {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1;
}
.funnel-retain-pct { font-size: 13px; font-weight: 700; color: var(--gold-deep); }
.funnel-retain-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.funnel-foot { display: flex; gap: 8px; margin-top: 14px; }
.funnel-pill {
  font-size: 11.5px; color: var(--ink-soft); padding: 4px 10px; border-radius: 999px;
  background: var(--line-soft); border: 1px solid var(--line);
}
.funnel-pill b { color: var(--ink); }

/* ---- Donut + legend ---- */
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
}
.donut-num { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1; }
.donut-lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

.legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 12px; font-size: 11.5px;
}
.legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.legend-item b { color: var(--ink); font-weight: 700; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- Ranking bars (channels, nationalities, jobs, cities) ---- */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: grid; grid-template-columns: 140px 1fr 50px; align-items: center; gap: 10px;
}
.rank-name {
  font-size: 12.5px; color: var(--ink); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rank-bar {
  height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden;
}
.rank-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-soft) 0%, var(--gold) 100%);
  border-radius: 999px;
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}
.rank-val { font-size: 12.5px; font-weight: 700; color: var(--ink); text-align: right; }

/* ---- Admin leaderboard ---- */
.leader-list { display: flex; flex-direction: column; gap: 10px; }
.leader-row {
  display: grid; grid-template-columns: 28px 36px 1fr; align-items: center; gap: 10px;
  padding: 6px 4px; border-radius: 8px;
  transition: background .12s;
}
.leader-row:hover { background: var(--cream); }
.leader-rank {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
}
.leader-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ink) 0%, var(--gold-deep) 100%);
  color: var(--gold); font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.leader-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.leader-meta {
  font-size: 11px; color: var(--ink-soft); display: flex; gap: 10px; margin-top: 2px;
}
.leader-meta b { color: var(--ink); font-weight: 700; }

/* ---- Stuck pipeline ---- */
.stuck-list { display: flex; flex-direction: column; gap: 6px; }
.stuck-row {
  display: grid; grid-template-columns: 56px 1fr 20px; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit;
  transition: border-color .12s, transform .12s, background .12s;
}
.stuck-row:hover { border-color: var(--gold); background: var(--cream); transform: translateX(2px); }
.stuck-days {
  width: 48px; height: 36px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.stuck-days.low  { background: var(--gold-light); color: var(--gold-deep); }
.stuck-days.mid  { background: #FED7AA; color: #7C2D12; }
.stuck-days.high { background: #FECACA; color: #991B1B; }
.stuck-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.stuck-meta { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; display: flex; gap: 6px; align-items: center; }
.stuck-stage {
  padding: 1px 7px; border-radius: 999px; font-weight: 700; font-size: 10.5px;
  background: var(--cream); color: var(--gold-deep); border: 1px solid var(--gold-soft);
  text-transform: uppercase; letter-spacing: .3px;
}
.stuck-arrow { color: var(--ink-soft); font-size: 15px; text-align: right; }

/* ---- Recent activity ---- */
.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-row {
  display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: flex-start;
}
.activity-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--ink); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.activity-line { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.activity-line b { color: var(--ink); font-weight: 700; }
.activity-line i { color: var(--gold-deep); font-style: normal; font-weight: 600; }
.activity-quote {
  margin-top: 4px; padding: 6px 10px;
  background: var(--cream); border-inline-start: 3px solid var(--gold);
  border-radius: 4px; font-size: 12px; color: var(--ink); font-style: italic; line-height: 1.4;
}
.activity-time { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ============================================================
   Admins — team management
   ============================================================ */
.admins-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1040px) { .admins-layout { grid-template-columns: 1fr; } }

.admins-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.admins-card-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--line-soft); }
.admins-card-head h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--ink); }
.admins-card-head h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--ink); }
.admins-card-head p  { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ---- member rows ---- */
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 92px minmax(110px, .9fr) 104px auto;
  align-items: center; gap: 18px;
  padding: 15px 24px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.admin-row:last-child { border-bottom: none; }
.admin-row:hover { background: #FCFCFB; }
.admin-row.is-inactive { opacity: .62; }
.admin-row.is-me { background: linear-gradient(90deg, var(--gold-light) 0%, #fff 55%); }

.admin-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.admin-avatar {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 9px rgba(232,183,61,.32);
}
.admin-row.is-inactive .admin-avatar { background: var(--muted); box-shadow: none; }
.admin-identity-text { min-width: 0; flex: 1; }
.admin-name-line { display: flex; align-items: center; gap: 8px; }
.admin-name-input {
  border: 1px solid transparent; background: transparent; border-radius: 7px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink);
  padding: 3px 7px; width: 100%; max-width: 210px;
  transition: border-color .15s, background .15s;
}
.admin-name-input:hover { border-color: var(--line); }
.admin-name-input:focus { border-color: var(--gold); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(232,183,61,.18); }
.admin-you {
  flex: 0 0 auto;
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--gold);
}
.admin-email {
  font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; padding-inline-start: 7px;
  font-family: 'Poppins', system-ui;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.role-chip {
  font-size: 11px; font-weight: 700; letter-spacing: .2px; text-transform: capitalize;
  padding: 4px 12px; border-radius: 999px; display: inline-block;
}
.role-admin  { background: var(--ink); color: var(--gold); }
.role-agent  { background: var(--gold-light); color: var(--gold-deep); border: 1px solid var(--gold-soft); }
.role-viewer { background: var(--line-soft); color: var(--ink-soft); border: 1px solid var(--line); }
.role-screening { background: #EEF4FF; color: #1E40AF; border: 1px solid #C7D7FE; }

.admin-activity { font-size: 12px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; }
.admin-activity .a { display: flex; align-items: baseline; gap: 5px; }
.admin-activity .a b { color: var(--ink); font-weight: 700; font-size: 13px; }
.admin-activity .ll { color: var(--muted); font-size: 11.5px; margin-top: 1px; }

.status-pill {
  font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-on  { background: #ECFDF3; color: #15803D; border: 1px solid #A7F3C9; }
.status-on::before  { background: #16A34A; }
.status-off { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }
.status-off::before { background: #991B1B; }

.admin-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.btn-ghost {
  height: 34px; padding: 0 13px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 600;
  background: #fff; color: var(--ink); border: 1px solid var(--line); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all .15s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); background: var(--cream); }
.btn-ghost.danger:hover { border-color: #FCA5A5; color: #991B1B; background: #FEF2F2; }
.btn-ghost.is-open { border-color: var(--gold); color: var(--gold-deep); background: var(--cream); }

/* slide-in password reveal — full-width row under the member */
.admin-pw {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 6px; padding: 12px 14px;
  background: var(--line-soft); border: 1px solid var(--line); border-radius: 12px;
}
.admin-pw[hidden] { display: none; }
.admin-pw .pw-label { font-size: 12px; font-weight: 600; color: var(--ink); }
.admin-pw input {
  flex: 1; min-width: 180px; max-width: 280px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 13px; background: #fff;
}
.admin-pw input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(232,183,61,.18); }
.admin-pw .hint { font-size: 11.5px; color: var(--ink-soft); margin-inline-start: auto; }

/* ---- add-admin aside ---- */
.admins-add .admins-card-head { background: linear-gradient(135deg, var(--cream) 0%, #fff 100%); }
.admins-add form { padding: 20px 24px 24px; }
.admins-add label {
  display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--ink-soft); margin: 0 0 6px;
}
.admins-add input, .admins-add select {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px;
  font: inherit; font-size: 14px; background: #fff; margin-bottom: 16px; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.admins-add input:focus, .admins-add select:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(232,183,61,.18); }
.admins-add .create-btn { width: 100%; height: 48px; font-size: 14.5px; margin-top: 4px; }

.admins-flash {
  padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
}
.admins-flash.ok  { background: var(--cream); color: var(--gold-deep); border: 1px solid var(--gold-soft); }
.admins-flash.err { background: #FEF2F2; color: #991B1B; border: 1px solid #FCA5A5; }

@media (max-width: 720px) {
  .admin-row { grid-template-columns: 1fr auto; row-gap: 12px; padding: 16px; }
  .admin-identity { grid-column: 1 / -1; }
  .admin-activity { grid-column: 1 / -1; flex-direction: row; gap: 16px; }
  .admin-actions  { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}

/* align enhanced (searchable) selects to the 44px add-form fields */
.admins-add .ss-wrap { margin-bottom: 16px; }
.admins-add .ss-button { height: 44px; border-radius: 11px; font-size: 14px; }

/* ============================================================
   Share links — reuses .admins-layout / .admins-card / .admins-add
   ============================================================ */
.chan-strip { display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 24px 20px; }
.chan-stat {
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border: 1px solid var(--gold-soft); border-radius: 14px; padding: 14px 18px; min-width: 158px;
}
.chan-stat .ch-name { font-size: 13px; font-weight: 700; color: var(--ink); text-transform: capitalize; display: flex; align-items: center; gap: 7px; }
.chan-stat .ch-num  { font-size: 26px; font-weight: 800; color: var(--ink); margin-top: 6px; line-height: 1; }
.chan-stat .ch-sub  { font-size: 11.5px; color: var(--ink-soft); margin-top: 4px; }

.link-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.7fr) 132px auto;
  align-items: center; gap: 18px;
  padding: 15px 24px; border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.link-row:last-child { border-bottom: none; }
.link-row:hover { background: #FCFCFB; }
.link-row.is-inactive { opacity: .58; }

.link-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.link-kind-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  background: var(--gold-light); border: 1px solid var(--gold-soft);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.link-id-text { min-width: 0; }
.link-label { font-size: 14px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-kind  { font-size: 12px; color: var(--ink-soft); margin-top: 2px; display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.link-url { display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-code {
  flex: 1; min-width: 0; background: var(--line-soft); border: 1px solid var(--line);
  padding: 8px 11px; border-radius: 9px; font-family: Consolas, monospace; font-size: 12.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.link-stats { font-size: 12px; color: var(--ink-soft); text-align: right; }
.link-stats b { color: var(--ink); font-weight: 700; font-size: 15px; }
.link-stats .sub { margin-top: 3px; color: var(--muted); font-size: 11.5px; }

.copy-btn.copied { border-color: var(--gold); color: var(--gold-deep); background: var(--cream); }

/* segmented "kind" toggle in the new-link form */
.kind-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.kind-opt {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px solid var(--line); border-radius: 11px; padding: 11px 10px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: #fff; transition: all .15s;
}
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt:hover { border-color: var(--gold-soft); }
.kind-opt:has(input:checked) { border-color: var(--gold); background: var(--cream); color: var(--ink); box-shadow: 0 0 0 3px rgba(232,183,61,.15); }

@media (max-width: 720px) {
  .link-row { grid-template-columns: 1fr auto; row-gap: 12px; padding: 16px; }
  .link-identity, .link-url { grid-column: 1 / -1; }
  .link-stats { text-align: left; }
}
