/* ============================================================
   NDC 66 Member – Mobile-first phonebook UI
   Theme: Red (#C53030) · Blue (#2F5BAD) · White · NDC 66 style
   ============================================================ */

/* ── Suppress Drupal chrome on all NDC 66 pages ─────────────── */
.page-title,
h1.page-title,
.page-header h1,
.region-content > h1,
.views-page-title,
.hero__heading {
  display: none !important;
}

.tabs-wrapper,
.block-local-tasks-block,
nav.tabs,
nav.tabs--primary,
ul.tabs,
ul.tabs.primary,
ul.tabs--primary,
.local-tasks,
.nav-tabs {
  display: none !important;
}

.breadcrumb,
.breadcrumb__wrapper,
.region-breadcrumb,
nav[aria-labelledby="system-breadcrumb"] {
  display: none !important;
}

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --ndc66-red:        #C53030;   /* primary header / active */
  --ndc66-red-dk:     #9B1F1F;   /* dark red – footer, hover */
  --ndc66-red-lt:     #D94545;   /* light red */
  --ndc66-blue:       #2F5BAD;   /* accent, links, pills */
  --ndc66-blue-dk:    #1E3F80;   /* dark blue – footer bg */
  --ndc66-blue-lt:    #4477CC;   /* light blue – hover */
  --ndc66-white:      #FFFFFF;
  --ndc66-bg:         #EEF3FB;   /* very light blue background */
  --ndc66-card:       #FFFFFF;
  --ndc66-border:     #C8D8F0;
  --ndc66-text:       #1A1A2E;
  --ndc66-muted:      #5A6A8A;
  --ndc66-success:    #2E7D32;
  --ndc66-danger:     #C62828;
  --ndc66-shadow-sm:  0 2px 8px rgba(47,91,173,.13);
  --ndc66-shadow-md:  0 6px 24px rgba(47,91,173,.20);
  --ndc66-radius:     14px;
  --ndc66-radius-sm:  8px;
}

/* ── Layout shell ───────────────────────────────────────────── */
.ndc66-ph-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--ndc66-bg);
  font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
}

/* ── Header ─────────────────────────────────────────────────── */
.ndc66-ph-header {
  background: linear-gradient(180deg,
    var(--ndc66-red-dk) 0%,
    var(--ndc66-red)    50%,
    var(--ndc66-blue)   100%);
  box-shadow: 0 3px 14px rgba(197,48,48,.45);
  position: sticky;
  top: 0;
  z-index: 200;
}

.ndc66-ph-header-inner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 16px 10px;
  max-width: 560px;
  margin: 0 auto;
}

/* Logo */
.ndc66-ph-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ndc66-ph-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.35));
}

.ndc66-ph-emblem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2.5px solid rgba(255,255,255,.50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}

a.ndc66-ph-logo-box,
a.ndc66-ph-emblem {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity .15s;
}

/* ── Home hero logo ─────────────────────────────────────────── */
.ndc66-home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 16px;
  text-align: center;
}

.ndc66-home-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(47,91,173,.30));
  animation: ndc66-logo-in .5s ease both;
}

@keyframes ndc66-logo-in {
  from { opacity: 0; transform: scale(.85) translateY(-8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.ndc66-home-title {
  margin: 12px 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ndc66-red-dk);
  letter-spacing: .02em;
}

.ndc66-home-sub {
  margin: 0;
  font-size: .95rem;
  color: var(--ndc66-muted);
}

a.ndc66-ph-logo-box:hover,
a.ndc66-ph-emblem:hover { opacity: .82; }

a.ndc66-ph-brand {
  text-decoration: none;
  transition: opacity .15s;
}

a.ndc66-ph-brand:hover { opacity: .85; }

a.ndc66-ph-footer-logo {
  display: block;
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

a.ndc66-ph-footer-logo:hover { opacity: .82; color: #fff; }

a.ndc66-ph-footer-logo-box,
a.ndc66-ph-footer-emblem {
  display: inline-flex;
  text-decoration: none;
  transition: opacity .15s;
}

a.ndc66-ph-footer-logo-box:hover,
a.ndc66-ph-footer-emblem:hover { opacity: .75; }

.ndc66-ph-brand {
  flex: 1;
  min-width: 0;
}

.ndc66-ph-brand-title {
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0,0,0,.30);
}

.ndc66-ph-brand-sub {
  color: rgba(255,255,255,.82);
  font-size: 0.72rem;
  margin-top: 2px;
}

/* ── Nav bar ────────────────────────────────────────────────── */
.ndc66-ph-nav {
  display: flex;
  border-top: 1px solid rgba(255,255,255,.22);
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.ndc66-ph-nav-link {
  flex: 1;
  text-align: center;
  padding: 9px 8px;
  color: rgba(255,255,255,.85);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s;
  letter-spacing: 0.3px;
}

.ndc66-ph-nav-link:hover,
.ndc66-ph-nav-link.is-active {
  background: rgba(255,255,255,.20);
  color: #fff;
}

.ndc66-ph-nav-link--manage,
.ndc66-ph-nav-link--login {
  background: rgba(255,255,255,.12);
  border-left: 1px solid rgba(255,255,255,.22);
}

.ndc66-ph-nav-link--login  { color: #ffe082; }
.ndc66-ph-nav-link--manage { color: rgba(255,255,255,.95); }

.ndc66-ph-nav-link--manage:hover,
.ndc66-ph-nav-link--login:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
}

/* ── Main content ───────────────────────────────────────────── */
.ndc66-ph-main {
  flex: 1;
  padding: 12px 16px 24px;
  box-sizing: border-box;
  background: var(--ndc66-bg);
}

.ndc66-ph-main .ndc66-admin-wrap { padding: 0; }

/* ── Footer ─────────────────────────────────────────────────── */
.ndc66-ph-footer {
  background: var(--ndc66-blue-dk);
  text-align: center;
  padding: 22px 16px 28px;
}

.ndc66-ph-footer-logo-box {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}

.ndc66-ph-footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.30));
}

.ndc66-ph-footer-emblem {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin: 0 auto 8px;
}

.ndc66-ph-footer-logo {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.ndc66-ph-footer-sub {
  color: rgba(255,255,255,.55);
  font-size: 0.72rem;
  margin: 0;
}

.ndc66-ph-footer-divider {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,.22);
  margin: 10px auto 8px;
  border-radius: 2px;
}

/* ── In-page title ──────────────────────────────────────────── */
.ndc66-ph-page-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ndc66-blue);
  margin: 0 0 14px;
  padding: 10px 0;
  border-bottom: 3px solid var(--ndc66-red);
}

/* ── Group grid (10 groups) ─────────────────────────────────── */
.ndc66-unit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.ndc66-unit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 16px;
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius);
  box-shadow: var(--ndc66-shadow-sm);
  text-decoration: none;
  color: var(--ndc66-text);
  border: 2px solid transparent;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}

.ndc66-unit-card:hover,
.ndc66-unit-card:focus {
  border-color: var(--ndc66-red);
  box-shadow: var(--ndc66-shadow-md);
  transform: translateY(-2px);
}

.ndc66-unit-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.ndc66-unit-card span {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  color: var(--ndc66-blue-dk);
}

/* ── Check / gate form ──────────────────────────────────────── */
.ndc66-check-wrap {
  max-width: 400px;
  margin: 32px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.ndc66-check-card {
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius);
  box-shadow: var(--ndc66-shadow-md);
  padding: 32px 24px;
  text-align: center;
  border-top: 5px solid var(--ndc66-red);
}

.ndc66-check-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.ndc66-check-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ndc66-blue);
  margin: 0 0 20px;
}

.ndc66-check-wrap input[type="text"],
.ndc66-check-wrap input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 1.2rem;
  padding: 12px 16px;
  border: 2px solid var(--ndc66-border);
  border-radius: var(--ndc66-radius-sm);
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  transition: border-color .2s;
}

.ndc66-check-wrap input[type="text"]:focus,
.ndc66-check-wrap input[type="password"]:focus {
  border-color: var(--ndc66-blue);
}

/* ── Shared button row ──────────────────────────────────────── */
.ndc66-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.ndc66-btn-row > * { flex: 1; min-width: 0; }

.ndc66-btn-row .button,
.ndc66-btn-row button,
.ndc66-btn-row input[type="submit"],
.ndc66-btn-row input[type="button"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 12px 8px;
  border-radius: var(--ndc66-radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}

.ndc66-btn-row .button:active,
.ndc66-btn-row button:active,
.ndc66-btn-row input:active {
  transform: scale(.97);
  opacity: .9;
}

/* ── Drupal button colour classes ───────────────────────────── */
.btn-primary {
  background: var(--ndc66-red) !important;
  color: #fff !important;
}

.btn-primary:hover { background: var(--ndc66-red-dk) !important; }

.btn-secondary {
  background: var(--ndc66-blue) !important;
  color: #fff !important;
}

.btn-secondary:hover { background: var(--ndc66-blue-dk) !important; }

.btn-danger {
  background: var(--ndc66-danger) !important;
  color: #fff !important;
}

.btn-dark {
  background: #333 !important;
  color: #fff !important;
}

/* ── Show-all toggle button ─────────────────────────────────── */
.ndc66-showall-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 12px;
  padding: 10px 16px;
  border: 2px dashed var(--ndc66-blue);
  border-radius: var(--ndc66-radius-sm);
  background: var(--ndc66-card);
  color: var(--ndc66-blue);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.ndc66-showall-btn:hover {
  background: var(--ndc66-blue);
  color: #fff;
  border-color: var(--ndc66-blue);
}

.ndc66-showall-btn--active {
  border-style: solid;
  background: var(--ndc66-bg);
  color: var(--ndc66-blue-dk);
  border-color: var(--ndc66-blue-dk);
}

.ndc66-showall-btn--active:hover {
  background: var(--ndc66-blue-dk);
  color: #fff;
}

/* ── Search bar ─────────────────────────────────────────────── */
.ndc66-search-wrap {
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius);
  box-shadow: var(--ndc66-shadow-sm);
  padding: 16px;
  margin-bottom: 16px;
}

.ndc66-search-wrap .form-item { margin: 0 0 10px; }

.ndc66-search-wrap input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--ndc66-border);
  border-radius: var(--ndc66-radius-sm);
  outline: none;
  transition: border-color .2s;
}

.ndc66-search-wrap input[type="text"]:focus {
  border-color: var(--ndc66-blue);
}

.ndc66-search-wrap .ndc66-btn-row { margin-top: 0; }

/* ── Member list rows (public) ──────────────────────────────── */
.ndc66-member-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ndc66-member-row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius-sm);
  padding: 14px 16px;
  box-shadow: var(--ndc66-shadow-sm);
  text-decoration: none;
  color: var(--ndc66-text);
  border-left: 4px solid var(--ndc66-red);
  transition: box-shadow .15s, transform .1s;
}

.ndc66-member-row-link:hover,
.ndc66-member-row-link:active {
  box-shadow: var(--ndc66-shadow-md);
  transform: translateX(3px);
  border-left-color: var(--ndc66-blue);
}

.ndc66-member-row-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ndc66-bg);
  border: 2px solid var(--ndc66-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--ndc66-blue-lt);
  overflow: hidden;
}

.ndc66-member-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ndc66-member-row-info { flex: 1; min-width: 0; }

.ndc66-member-row-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ndc66-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ndc66-member-row-nick {
  font-size: 0.8rem;
  color: var(--ndc66-red);
  font-weight: 600;
}

.ndc66-member-row-pos {
  font-size: 0.8rem;
  color: var(--ndc66-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ndc66-member-row-arrow {
  color: var(--ndc66-blue-lt);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ── Profile detail card ────────────────────────────────────── */
.ndc66-profile {
  max-width: 420px;
  margin: 16px auto;
}

.ndc66-profile-header {
  background: linear-gradient(180deg,
    var(--ndc66-red-dk) 0%,
    var(--ndc66-red)    45%,
    var(--ndc66-blue)   100%);
  border-radius: var(--ndc66-radius) var(--ndc66-radius) 0 0;
  padding: 32px 20px 24px;
  text-align: center;
}

.ndc66-profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 16px rgba(0,0,0,.30);
  display: block;
  margin: 0 auto 14px;
}

.ndc66-profile-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,.20);
  border: 4px solid rgba(255,255,255,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 3rem;
}

.ndc66-profile-name {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0,0,0,.30);
}

.ndc66-profile-nick {
  display: inline-block;
  background: rgba(255,255,255,.22);
  color: #fff;
  font-size: 0.85rem;
  padding: 3px 12px;
  border-radius: 20px;
}

.ndc66-profile-body {
  background: var(--ndc66-card);
  border-radius: 0 0 var(--ndc66-radius) var(--ndc66-radius);
  box-shadow: var(--ndc66-shadow-md);
  padding: 20px;
}

.ndc66-profile-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ndc66-border);
}

.ndc66-profile-info-row:last-of-type { border-bottom: none; }

.ndc66-profile-info-icon {
  font-size: 1.1rem;
  width: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.ndc66-profile-info-label {
  font-size: 0.75rem;
  color: var(--ndc66-muted);
  display: block;
}

.ndc66-profile-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ndc66-text);
}

.ndc66-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  margin: 16px 0 0;
  background: linear-gradient(135deg, var(--ndc66-success), #43a047);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--ndc66-radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(46,125,50,.35);
  transition: opacity .15s, transform .1s;
}

.ndc66-call-btn:hover,
.ndc66-call-btn:active { opacity: .9; transform: scale(.98); }

.ndc66-qr-section { margin-top: 16px; text-align: center; }

.ndc66-qr-label {
  font-size: 0.8rem;
  color: var(--ndc66-muted);
  margin-bottom: 8px;
}

.ndc66-line-qr {
  width: 130px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: var(--ndc66-radius-sm);
  border: 2px solid var(--ndc66-border);
  padding: 4px;
}

/* ── Member row (display only – no hover/click) ─────────────── */
.ndc66-member-row-display {
  cursor: default;
  pointer-events: none;
  border-left-color: var(--ndc66-border);
}

/* ── Back button ────────────────────────────────────────────── */
.ndc66-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-top: 14px;
  border-radius: var(--ndc66-radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Utility ────────────────────────────────────────────────── */
.ndc66-empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--ndc66-muted);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════
   ADMIN MANAGEMENT UI
   ═══════════════════════════════════════════════════════════ */

/* ── Admin wrapper ──────────────────────────────────────────── */
.ndc66-admin-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 4px;
}

/* ── Group navigation pills ─────────────────────────────────── */
.ndc66-admin-unit-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 2px 0 8px;
  margin-bottom: 4px;
}

.ndc66-admin-unit-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--ndc66-card);
  color: var(--ndc66-blue);
  border: 2px solid var(--ndc66-border);
  box-shadow: var(--ndc66-shadow-sm);
  transition: background .2s, border-color .2s, color .15s;
  word-break: break-word;
  line-height: 1.3;
}

.ndc66-admin-unit-pill:hover {
  border-color: var(--ndc66-blue);
  background: var(--ndc66-bg);
  color: var(--ndc66-blue-dk);
}

.ndc66-admin-unit-pill.is-active {
  background: var(--ndc66-red);
  color: #fff;
  border-color: var(--ndc66-red);
  box-shadow: 0 4px 12px rgba(197,48,48,.35);
}

/* ── Stats / action bar ─────────────────────────────────────── */
.ndc66-admin-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: var(--ndc66-shadow-sm);
  flex-wrap: wrap;
  gap: 8px;
  border-left: 4px solid var(--ndc66-red);
}

.ndc66-admin-count {
  font-size: 0.9rem;
  color: var(--ndc66-muted);
}

.ndc66-admin-count strong {
  color: var(--ndc66-red);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ── Export button ──────────────────────────────────────────── */
.ndc66-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--ndc66-success);
  color: #fff;
  border-radius: var(--ndc66-radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(46,125,50,.3);
  transition: opacity .15s, transform .1s;
}

.ndc66-export-btn:hover { opacity: .85; color: #fff; transform: translateY(-1px); }

/* ── Admin data table ───────────────────────────────────────── */
.ndc66-admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--ndc66-radius-sm);
  box-shadow: var(--ndc66-shadow-sm);
  margin-bottom: 12px;
}

.ndc66-admin-table-wrap table {
  min-width: 520px;
  width: 100%;
  border-collapse: collapse;
  background: var(--ndc66-card);
}

.ndc66-admin-table-wrap table th {
  background: var(--ndc66-blue);
  color: #fff;
  padding: 11px 14px;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
}

.ndc66-admin-table-wrap table th a { color: #fff; text-decoration: none; }

.ndc66-admin-table-wrap table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ndc66-border);
  font-size: 0.88rem;
  vertical-align: middle;
}

.ndc66-admin-table-wrap table tr:last-child td { border-bottom: none; }
.ndc66-admin-table-wrap table tr:hover td { background: var(--ndc66-bg); }

/* Member cell */
.ndc66-table-member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

a.ndc66-table-member-link {
  text-decoration: none;
  color: inherit;
}

a.ndc66-table-member-link:hover .ndc66-table-name {
  color: var(--ndc66-red);
  text-decoration: underline;
}

.ndc66-table-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ndc66-border);
  flex-shrink: 0;
  background: var(--ndc66-bg);
}

.ndc66-table-avatar-ph {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ndc66-bg);
  border: 2px solid var(--ndc66-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ndc66-table-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ndc66-text);
  line-height: 1.3;
}

.ndc66-table-nick {
  font-size: 0.76rem;
  color: var(--ndc66-red);
  font-weight: 600;
}

/* Edit link button in table */
.ndc66-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--ndc66-blue);
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: opacity .15s;
  white-space: nowrap;
}

.ndc66-edit-link:hover { opacity: .8; }

/* Line QR in table */
.ndc66-admin-table-wrap .ndc66-line-qr {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  border: 1px solid var(--ndc66-border);
  object-fit: cover;
}

/* ── Filter card ────────────────────────────────────────────── */
.ndc66-filter-card {
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius-sm);
  box-shadow: var(--ndc66-shadow-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.ndc66-filter-card input[type="text"],
.ndc66-filter-card select {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 14px !important;
  font-size: 0.95rem !important;
  border: 2px solid var(--ndc66-border) !important;
  border-radius: var(--ndc66-radius-sm) !important;
  outline: none !important;
  transition: border-color .2s;
  margin-bottom: 10px;
  background: #fff !important;
  font-family: inherit !important;
  appearance: auto;
  -webkit-appearance: auto;
}

.ndc66-filter-card input[type="text"]:focus,
.ndc66-filter-card select:focus {
  border-color: var(--ndc66-blue) !important;
}

.ndc66-filter-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ndc66-muted);
  margin-bottom: 4px;
}

/* ── Edit form card ─────────────────────────────────────────── */
.ndc66-edit-card {
  background: var(--ndc66-card);
  border-radius: var(--ndc66-radius);
  box-shadow: var(--ndc66-shadow-md);
  padding: 24px 20px;
  max-width: 540px;
  margin: 0 auto;
  border-top: 5px solid var(--ndc66-red);
}

.ndc66-edit-card .form-item { margin-bottom: 16px; }

.ndc66-edit-card label {
  font-weight: 600;
  color: var(--ndc66-blue-dk);
  font-size: 0.9rem;
}

.ndc66-edit-card input[type="text"],
.ndc66-edit-card input[type="tel"],
.ndc66-edit-card select,
.ndc66-edit-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 2px solid var(--ndc66-border);
  border-radius: var(--ndc66-radius-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}

.ndc66-edit-card input:focus,
.ndc66-edit-card select:focus,
.ndc66-edit-card textarea:focus {
  border-color: var(--ndc66-blue);
}

/* ── Pager ──────────────────────────────────────────────────── */
.pager {
  margin-top: 12px;
  text-align: center;
}

/* ── Mobile tweaks ──────────────────────────────────────────── */
@media (max-width: 400px) {
  .ndc66-unit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .ndc66-unit-card { padding: 16px 8px 12px; }
  .ndc66-unit-card img { width: 56px; height: 56px; }

  .ndc66-profile-avatar,
  .ndc66-profile-avatar-placeholder {
    width: 90px;
    height: 90px;
  }

  .ndc66-profile-name { font-size: 1rem; }
  .ndc66-ph-logo-img  { height: 40px; }
  .ndc66-ph-brand-title { font-size: 1rem; }
}
