/* ================================================================
   Users Department Plugin — Frontend CSS v3.0
   All colours/sizes come from :root CSS variables injected by PHP
   via wp_add_inline_style() — no inline style="" attributes needed
================================================================ */

/* ── Global defaults (overridden by PHP-injected :root vars) ── */
:root {
    --ud-primary:          #1a3c6e;
    --ud-accent:           #2eb8b8;
    --ud-card-bg:          #ffffff;
    --ud-name-color:       #1d2327;
    --ud-name-size:        16px;
    --ud-role-color:       #646970;
    --ud-role-size:        13px;
    --ud-border-radius:    10px;
    --ud-cols:             3;
    --ud-font:             inherit;
    /* Dept grid */
    --ud-dept-card-bg:     #ffffff;
    --ud-dept-text:        #1d2327;
    --ud-dept-accent:      #2eb8b8;
    --ud-dept-name-size:   15px;
    --ud-dept-role-size:   12px;
    /* Profile */
    --ud-profile-bg:       #ffffff;
    --ud-profile-text:     #1d2327;
    --ud-profile-label:    #646970;
    --ud-profile-name-size:24px;
    --ud-profile-text-size:14px;
    --ud-profile-br:       12px;
    --ud-profile-font:     inherit;
    /* All members */
    --ud-allm-accent:      #1a3c6e;
    --ud-allm-card-bg:     #ffffff;
    --ud-allm-bg:          #f0f4f8;
    --ud-allm-text:        #1d2327;
    --ud-allm-name-size:   15px;
    --ud-allm-font:        inherit;
    --ud-allm-br:          10px;
}

/* ── Utilities ── */
.ud-hidden-member  { display: none !important; }
.ud-error          { color: #d63638; font-size: 14px; padding: 12px; }
.ud-empty          { color: #888; font-size: 14px; padding: 12px; }
#ud-no-results-msg { display: none; text-align: center; padding: 40px; color: var(--ud-allm-text); }

/* Show More button */
.ud-show-more-wrap {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 24px;
    padding: 8px 0 4px;
}
.ud-show-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 32px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
    background: var(--ud-primary); color: #fff;
    border: none; border-radius: 8px;
    font-family: var(--ud-font, inherit);
}
.ud-show-more-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ================================================================
   DEPARTMENT GRID — 5 STYLES
================================================================ */

.ud-members-grid {
    font-family: var(--ud-font, inherit);
    padding: 4px 0 20px;
}

/* ── Shared card ── */
.ud-members-grid .ud-member-card {
    background: var(--ud-dept-card-bg);
    border-radius: var(--ud-border-radius);
}

/* ──────────────────────────────────────────
   STYLE 1 — Classic Photo Cards
   Square photo top, name/role/position below
─────────────────────────────────────────── */
.ud-members-grid.ud-style1 {
    display: grid;
    grid-template-columns: repeat(var(--ud-cols, 3), 1fr);
    gap: 22px;
}
.ud-style1 .ud-member-card {
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform .22s, box-shadow .22s;
}
.ud-style1 .ud-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.13);
}
.ud-style1 .ud-card-link   { text-decoration: none; color: inherit; display: block; }
.ud-style1 .ud-member-photo { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f0f4f8; }
.ud-style1 .ud-member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ud-style1 .ud-member-info  { padding: 16px; text-align: center; }
.ud-style1 .ud-member-name  { font-size: var(--ud-dept-name-size); color: var(--ud-dept-text); font-weight: 700; margin: 0 0 5px; line-height: 1.3; }
.ud-style1 .ud-member-role  { display: block; font-size: var(--ud-dept-role-size); color: var(--ud-role-color); margin-bottom: 5px; }
.ud-style1 .ud-member-position {
    display: inline-block; font-size: 11px; font-weight: 600;
    color: var(--ud-dept-accent);
    background: color-mix(in srgb, var(--ud-dept-accent) 12%, transparent);
    padding: 2px 10px; border-radius: 20px; margin-bottom: 4px;
}
.ud-style1 .ud-member-contact,
.ud-style1 .ud-member-extra { display: block; font-size: 12px; color: var(--ud-role-color); margin-top: 3px; }
.ud-style1 .ud-member-contact a { color: var(--ud-dept-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   STYLE 2 — Circle Avatar Cards
   Circle photo overlapping top of card
─────────────────────────────────────────── */
.ud-members-grid.ud-style2 {
    display: grid;
    grid-template-columns: repeat(var(--ud-cols, 3), 1fr);
    gap: 28px;
    padding-top: 56px;
}
.ud-style2 .ud-member-card {
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    border: 1px solid rgba(0,0,0,0.06);
    position: relative;
    text-align: center;
    padding: 0 0 20px;
    transition: box-shadow .22s, transform .22s;
}
.ud-style2 .ud-member-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }
.ud-style2 .ud-card-link { text-decoration: none; color: inherit; display: block; padding-top: 60px; }
.ud-style2 .ud-member-photo {
    width: 96px; height: 96px;
    border-radius: 50%; overflow: hidden;
    border: 4px solid var(--ud-dept-accent);
    background: #f0f4f8;
    position: absolute; top: -48px; left: 50%; transform: translateX(-50%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.ud-style2 .ud-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-style2 .ud-member-info { padding: 0 18px 4px; }
.ud-style2 .ud-member-name { font-size: var(--ud-dept-name-size); color: var(--ud-dept-text); font-weight: 800; margin: 0 0 5px; }
.ud-style2 .ud-member-role {
    display: inline-block;
    background: var(--ud-primary); color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 12px; border-radius: 20px; margin-bottom: 8px;
}
.ud-style2 .ud-member-position { display: block; font-size: 12px; color: var(--ud-dept-accent); font-weight: 600; margin-bottom: 4px; }
.ud-style2 .ud-member-contact,
.ud-style2 .ud-member-extra { display: block; font-size: 12px; color: var(--ud-role-color); margin-top: 3px; }
.ud-style2 .ud-member-contact a { color: var(--ud-dept-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   STYLE 3 — Horizontal Row Cards
   Avatar left, info right, 2-col layout
─────────────────────────────────────────── */
.ud-members-grid.ud-style3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.ud-style3 .ud-member-card {
    border: 1px solid #e8ecf0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow .2s, transform .2s;
}
.ud-style3 .ud-member-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,0.12); transform: translateY(-2px); }
.ud-style3 .ud-card-link { text-decoration: none; color: inherit; display: flex; align-items: center; padding: 20px; gap: 18px; }
.ud-style3 .ud-member-photo { width: 78px; height: 78px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f4f8; border: 3px solid var(--ud-dept-accent); }
.ud-style3 .ud-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-style3 .ud-member-info { flex: 1; }
.ud-style3 .ud-member-role-label { display: block; font-size: 11px; color: var(--ud-role-color); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.ud-style3 .ud-member-name { font-size: var(--ud-dept-name-size); color: var(--ud-dept-text); font-weight: 800; margin: 0 0 4px; }
.ud-style3 .ud-member-role { display: block; font-size: var(--ud-dept-role-size); color: var(--ud-role-color); margin-bottom: 4px; }
.ud-style3 .ud-member-position {
    display: inline-block; background: var(--ud-dept-accent); color: #fff;
    font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 20px; margin-bottom: 5px;
}
.ud-style3 .ud-member-contact,
.ud-style3 .ud-member-extra { display: block; font-size: 12px; color: var(--ud-role-color); margin-top: 3px; }
.ud-style3 .ud-member-contact a { color: var(--ud-dept-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   STYLE 4 — Overlay Hero Cards
   Full photo, gradient overlay, text bottom
─────────────────────────────────────────── */
.ud-members-grid.ud-style4 {
    display: grid;
    grid-template-columns: repeat(var(--ud-cols, 3), 1fr);
    gap: 18px;
}
.ud-style4 .ud-member-card {
    background: #222;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3/4;
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    transition: transform .22s, box-shadow .22s;
}
.ud-style4 .ud-member-card:hover { transform: scale(1.02); box-shadow: 0 12px 36px rgba(0,0,0,0.24); }
.ud-style4 .ud-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.ud-style4 .ud-member-photo { position: absolute; inset: 0; }
.ud-style4 .ud-member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ud-style4 .ud-member-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.7) 55%, rgba(0,0,0,0.9) 100%);
    padding: 50px 16px 18px;
    color: #fff;
}
.ud-style4 .ud-member-name  { font-size: var(--ud-dept-name-size); color: #fff !important; font-weight: 800; margin: 0 0 3px; }
.ud-style4 .ud-member-role  { display: block; font-size: var(--ud-dept-role-size); color: rgba(255,255,255,0.8); margin-bottom: 4px; }
.ud-style4 .ud-member-position {
    display: inline-block; background: var(--ud-dept-accent); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px;
}
.ud-style4 .ud-member-contact,
.ud-style4 .ud-member-extra { display: block; font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 3px; }
/* Arrow badge */
.ud-style4 .ud-member-card::after {
    content: "→";
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--ud-primary); transition: background .2s;
}
.ud-style4 .ud-member-card:hover::after { background: var(--ud-dept-accent); color: #fff; }

/* ──────────────────────────────────────────
   STYLE 5 — Minimal List View
   Compact rows with dividers, all in one card
─────────────────────────────────────────── */
.ud-members-grid.ud-style5 {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--ud-dept-card-bg);
    border-radius: var(--ud-border-radius);
    box-shadow: 0 2px 14px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}
.ud-style5 .ud-member-card {
    background: transparent !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.ud-style5 .ud-member-card:last-of-type { border-bottom: none; }
.ud-style5 .ud-member-card:hover { background: #f8fafc !important; }
.ud-style5 .ud-show-more-wrap { border-top: 1px solid #f0f0f0; }
.ud-style5 .ud-card-link { text-decoration: none; color: inherit; display: flex; align-items: center; padding: 13px 20px; gap: 16px; }
.ud-style5 .ud-member-photo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f4f8; }
.ud-style5 .ud-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-style5 .ud-member-info { flex: 1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ud-style5 .ud-member-name { font-size: var(--ud-dept-name-size); color: var(--ud-dept-text); font-weight: 700; margin: 0; min-width: 120px; }
.ud-style5 .ud-member-role { font-size: var(--ud-dept-role-size); color: var(--ud-role-color); }
.ud-style5 .ud-member-position {
    font-size: 11px; color: var(--ud-dept-accent); font-weight: 600;
    background: color-mix(in srgb, var(--ud-dept-accent) 12%, transparent);
    padding: 2px 9px; border-radius: 20px;
}
.ud-style5 .ud-member-contact,
.ud-style5 .ud-member-extra { font-size: 12px; color: var(--ud-role-color); margin-left: auto; }
.ud-style5 .ud-member-contact a { color: var(--ud-dept-accent); text-decoration: none; }


/* ================================================================
   PROFILE STYLES — 5 STYLES
   All use CSS vars from :root injected by PHP
================================================================ */

.ud-profile { font-family: var(--ud-profile-font, inherit); }

/* ── Shared field helpers ── */
.ud-profile-field-block { flex-direction: column !important; align-items: flex-start !important; }
.ud-schools-list { margin: 6px 0 0 18px; padding: 0; list-style: disc; }
.ud-schools-list li { font-size: 14px; padding: 2px 0; color: inherit; }

/* ──────────────────────────────────────────
   PROFILE 1 — Employee Card
   Photo left (circle), bio + field list right
─────────────────────────────────────────── */
.ud-profile.ud-profile1 {
    max-width: 860px; margin: 0 auto;
    border-radius: var(--ud-profile-br);
    box-shadow: 0 4px 28px rgba(0,0,0,0.09);
    overflow: hidden;
    background: var(--ud-profile-bg);
}
.ud-profile1 .ud-p1-inner { display: flex; min-height: 320px; }
.ud-profile1 .ud-p1-left {
    width: 280px; flex-shrink: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 28px;
    background: color-mix(in srgb, var(--ud-profile-bg) 80%, #e8ecf0 20%);
    border-right: 1px solid rgba(0,0,0,0.06);
}
.ud-profile1 .ud-profile-avatar {
    width: 150px; height: 150px; border-radius: 50%; overflow: hidden;
    border: 5px solid var(--ud-primary); background: #dde1e7;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); margin-bottom: 20px;
}
.ud-profile1 .ud-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-profile1 .ud-p1-name  { font-size: var(--ud-profile-name-size); font-weight: 800; color: var(--ud-profile-text); text-align: center; margin: 0 0 8px; }
.ud-profile1 .ud-p1-team { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ud-profile-label, #888); font-weight: 700; margin-bottom: 4px; }
.ud-profile1 .ud-p1-dept  { display: inline-block; background: var(--ud-primary); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.ud-profile1 .ud-p1-position { display: block; font-size: 12px; color: var(--ud-accent); font-weight: 600; text-align: center; }
.ud-profile1 .ud-p1-right { flex: 1; padding: 32px 36px; background: var(--ud-profile-bg); }
.ud-profile1 .ud-p1-bio   { font-size: var(--ud-profile-text-size); color: var(--ud-profile-text); line-height: 1.7; margin: 0 0 24px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.ud-profile1 .ud-p1-fields { display: flex; flex-direction: column; }
.ud-profile1 .ud-profile-field { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: var(--ud-profile-text-size); }
.ud-profile1 .ud-profile-field:last-child { border: none; }
.ud-profile1 .ud-field-label { font-weight: 700; color: var(--ud-primary); min-width: 160px; flex-shrink: 0; font-size: 13px; }
.ud-profile1 .ud-field-value { color: var(--ud-profile-text); word-break: break-word; }
.ud-profile1 .ud-field-value a { color: var(--ud-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   PROFILE 2 — LinkedIn Style
   Left card photo + right 2-col fields grid
─────────────────────────────────────────── */
.ud-profile.ud-profile2 { max-width: 960px; margin: 0 auto; display: flex; gap: 20px; align-items: flex-start; }
.ud-profile2 .ud-p2-left {
    width: 260px; flex-shrink: 0;
    background: var(--ud-profile-bg);
    border-radius: var(--ud-profile-br);
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf0;
    padding: 32px 24px 28px; text-align: center;
}
.ud-profile2 .ud-profile-avatar { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.14); background: #dde1e7; border: 4px solid #fff; }
.ud-profile2 .ud-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-profile2 .ud-p2-name     { font-size: var(--ud-profile-name-size); font-weight: 800; color: var(--ud-profile-text); margin: 0 0 6px; }
.ud-profile2 .ud-p2-position { display: block; font-weight: 700; font-size: 14px; color: var(--ud-primary); margin-bottom: 4px; }
.ud-profile2 .ud-p2-team { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ud-profile-label, #888); font-weight: 700; margin-bottom: 3px; }
.ud-profile2 .ud-p2-dept     { display: block; font-size: 13px; color: var(--ud-profile-label); margin-bottom: 8px; }
.ud-profile2 .ud-p2-bio      { font-size: 13px; color: var(--ud-profile-label); line-height: 1.6; margin: 12px 0 0; text-align: left; }
.ud-profile2 .ud-p2-right {
    flex: 1;
    background: var(--ud-profile-bg);
    border-radius: var(--ud-profile-br);
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border: 1px solid #e8ecf0;
    padding: 28px 32px;
}
.ud-profile2 .ud-p2-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.ud-profile2 .ud-profile-field { display: flex; flex-direction: column; gap: 3px; font-size: var(--ud-profile-text-size); }
.ud-profile2 .ud-field-label  { font-size: 12px; font-weight: 600; color: var(--ud-profile-label); }
.ud-profile2 .ud-field-value  { font-size: 14px; font-weight: 700; color: var(--ud-profile-text); word-break: break-word; }
.ud-profile2 .ud-field-value a { color: var(--ud-accent); text-decoration: none; }
.ud-profile2 .ud-profile-field-block { grid-column: span 2; }

/* ──────────────────────────────────────────
   PROFILE 3 — Banner Hero
   Gradient banner top, avatar overlapping
─────────────────────────────────────────── */
.ud-profile.ud-profile3 {
    max-width: 780px; margin: 0 auto;
    border-radius: var(--ud-profile-br);
    box-shadow: 0 4px 28px rgba(0,0,0,0.10);
    overflow: hidden;
    background: var(--ud-profile-bg);
}
.ud-profile3 .ud-p3-banner { height: 160px; background: linear-gradient(120deg, var(--ud-primary) 0%, var(--ud-accent) 100%); position: relative; }
.ud-profile3 .ud-profile-avatar {
    width: 116px; height: 116px; border-radius: 50%;
    border: 5px solid var(--ud-profile-bg);
    overflow: hidden; background: #dde1e7;
    position: absolute; bottom: -52px; left: 40px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.ud-profile3 .ud-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-profile3 .ud-p3-header   { padding: 62px 40px 24px; border-bottom: 1px solid #f0f0f0; }
.ud-profile3 .ud-p3-name     { font-size: var(--ud-profile-name-size); font-weight: 800; color: var(--ud-profile-text); margin: 0 0 5px; }
.ud-profile3 .ud-p3-position { display: block; font-weight: 700; font-size: 14px; color: var(--ud-primary); margin-bottom: 4px; }
.ud-profile3 .ud-p3-team { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ud-profile-label, #888); font-weight: 700; margin-bottom: 4px; }
.ud-profile3 .ud-p3-dept     { display: inline-block; background: var(--ud-accent); color: #fff; padding: 3px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.ud-profile3 .ud-p3-bio      { font-size: 14px; color: var(--ud-profile-label); margin: 8px 0 0; line-height: 1.65; }
.ud-profile3 .ud-p3-body     { padding: 24px 40px 32px; }
.ud-profile3 .ud-profile-field { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f5f5f5; font-size: var(--ud-profile-text-size); }
.ud-profile3 .ud-profile-field:last-child { border: none; }
.ud-profile3 .ud-field-label { font-weight: 700; color: var(--ud-primary); min-width: 160px; flex-shrink: 0; font-size: 13px; }
.ud-profile3 .ud-field-value { color: var(--ud-profile-text); word-break: break-word; }
.ud-profile3 .ud-field-value a { color: var(--ud-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   PROFILE 4 — Sidebar Layout
   Dark primary sidebar left, white body right
─────────────────────────────────────────── */
.ud-profile.ud-profile4 {
    max-width: 820px; margin: 0 auto; display: flex; gap: 0;
    border-radius: var(--ud-profile-br);
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(0,0,0,0.10);
}
.ud-profile4 .ud-p4-sidebar {
    width: 240px; flex-shrink: 0;
    background: linear-gradient(160deg, var(--ud-primary) 0%, color-mix(in srgb, var(--ud-primary) 60%, #000) 100%);
    padding: 40px 24px; text-align: center; color: #fff;
}
.ud-profile4 .ud-profile-avatar { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; border: 4px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); }
.ud-profile4 .ud-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-profile4 .ud-p4-name     { font-size: 17px; font-weight: 800; margin: 0 0 6px; line-height: 1.3; }
.ud-profile4 .ud-p4-team { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.75); font-weight: 700; margin-bottom: 3px; }
.ud-profile4 .ud-p4-dept     { display: block; background: rgba(255,255,255,0.18); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.ud-profile4 .ud-p4-position { display: block; font-size: 12px; opacity: 0.8; margin-bottom: 10px; }
.ud-profile4 .ud-p4-bio      { font-size: 12px; opacity: 0.8; line-height: 1.6; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); text-align: left; }
.ud-profile4 .ud-p4-main     { flex: 1; background: var(--ud-profile-bg); padding: 32px 36px; }
.ud-profile4 .ud-p4-section-title { font-size: 14px; font-weight: 700; color: var(--ud-primary); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ud-accent); }
.ud-profile4 .ud-profile-field { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid #f5f5f5; font-size: var(--ud-profile-text-size); }
.ud-profile4 .ud-profile-field:last-child { border: none; }
.ud-profile4 .ud-field-label { font-weight: 700; color: var(--ud-primary); min-width: 145px; flex-shrink: 0; font-size: 13px; }
.ud-profile4 .ud-field-value { color: var(--ud-profile-text); word-break: break-word; }
.ud-profile4 .ud-field-value a { color: var(--ud-accent); text-decoration: none; }

/* ──────────────────────────────────────────
   PROFILE 5 — Compact Card
   Centered avatar + header, clean field list
─────────────────────────────────────────── */
.ud-profile.ud-profile5 {
    max-width: 560px; margin: 0 auto;
    border-radius: var(--ud-profile-br);
    box-shadow: 0 4px 28px rgba(0,0,0,0.10);
    overflow: hidden;
    background: var(--ud-profile-bg);
    border: 1px solid rgba(0,0,0,0.06);
}
.ud-profile5 .ud-p5-header  { padding: 36px 28px 24px; text-align: center; background: color-mix(in srgb, var(--ud-profile-bg) 60%, #f0f4f8 40%); border-bottom: 1px solid #eff0f2; }
.ud-profile5 .ud-profile-avatar { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; border: 5px solid var(--ud-profile-bg); box-shadow: 0 4px 16px rgba(0,0,0,0.14); background: #dde1e7; }
.ud-profile5 .ud-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-profile5 .ud-p5-name    { font-size: var(--ud-profile-name-size); font-weight: 800; color: var(--ud-profile-text); margin: 0 0 6px; }
.ud-profile5 .ud-p5-position { display: block; font-weight: 700; font-size: 13px; color: var(--ud-primary); margin-bottom: 4px; }
.ud-profile5 .ud-p5-team { display: block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--ud-profile-label, #888); font-weight: 700; margin-bottom: 4px; }
.ud-profile5 .ud-p5-dept    { display: inline-block; background: var(--ud-accent); color: #fff; padding: 3px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.ud-profile5 .ud-p5-bio     { font-size: 13px; color: var(--ud-profile-label); line-height: 1.65; margin: 14px 0 0; text-align: left; }
.ud-profile5 .ud-p5-body    { padding: 20px 28px 28px; }
.ud-profile5 .ud-profile-field { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f5f5f5; font-size: var(--ud-profile-text-size); }
.ud-profile5 .ud-profile-field:last-child { border: none; }
.ud-profile5 .ud-field-label { font-weight: 700; color: var(--ud-primary); min-width: 140px; flex-shrink: 0; font-size: 13px; }
.ud-profile5 .ud-field-value { color: var(--ud-profile-text); word-break: break-word; }
.ud-profile5 .ud-field-value a { color: var(--ud-accent); text-decoration: none; }


/* ================================================================
   ALL MEMBERS — 5 TEMPLATES
================================================================ */

.ud-all-departments-wrap { font-family: var(--ud-allm-font, inherit); padding: 20px 0; }

/* ── Filter Bar — compact single line ── */
.ud-filter-bar {
    margin-bottom: 20px;
}
.ud-filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.ud-filter-select {
    padding: 9px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    min-width: 160px;
    flex: 1;
    max-width: 240px;
    cursor: pointer;
    transition: border-color .2s;
    color: var(--ud-allm-text, #1d2327);
}
.ud-filter-select:focus {
    outline: none;
    border-color: var(--ud-allm-accent, #1a3c6e);
}
.ud-filter-reset-btn {
    padding: 9px 18px;
    background: #f0f4f8;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.ud-filter-reset-btn:hover {
    background: var(--ud-allm-accent, #1a3c6e);
    color: #fff;
    border-color: var(--ud-allm-accent, #1a3c6e);
}
@media (max-width: 600px) {
    .ud-filter-select { max-width: 100%; }
}

/* ── ALLM 1 — Classic Photo Grid ── */
.ud-allm-allm1 .ud-all-departments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.ud-allm-allm1 .ud-dept-member-card { display: block; text-decoration: none; color: inherit; background: var(--ud-allm-card-bg); border-radius: var(--ud-allm-br); box-shadow: 0 2px 12px rgba(0,0,0,0.07); border: 1px solid rgba(0,0,0,0.06); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.ud-allm-allm1 .ud-dept-member-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.ud-allm-allm1 .ud-dept-member-photo { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f0f4f8; }
.ud-allm-allm1 .ud-dept-member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ud-allm-allm1 .ud-dept-member-info { padding: 14px 16px 16px; text-align: center; }
.ud-allm-allm1 .ud-dept-member-name { font-weight: 800; font-size: var(--ud-allm-name-size); color: var(--ud-allm-text); margin-bottom: 3px; }
.ud-allm-allm1 .ud-dept-member-dept { font-size: 12px; color: var(--ud-allm-accent); font-weight: 600; margin-bottom: 3px; }
.ud-allm-allm1 .ud-dept-member-position { font-size: 11px; color: var(--ud-allm-accent); }
.ud-allm-allm1 .ud-dept-member-bio { font-size: 12px; color: #777; margin-top: 6px; line-height: 1.5; }

/* ── ALLM 2 — Circle Team Grid ── */
.ud-allm-allm2 .ud-all-departments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px; }
.ud-allm-allm2 .ud-dept-member-card { display: block; text-decoration: none; color: inherit; text-align: center; transition: transform .2s; }
.ud-allm-allm2 .ud-dept-member-card:hover { transform: translateY(-4px); }
.ud-allm-allm2 .ud-dept-member-photo { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; border: 4px solid #e8ecf0; background: #f0f4f8; transition: border-color .2s; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.ud-allm-allm2 .ud-dept-member-card:hover .ud-dept-member-photo { border-color: var(--ud-allm-accent); }
.ud-allm-allm2 .ud-dept-member-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); transition: filter .2s; }
.ud-allm-allm2 .ud-dept-member-card:hover .ud-dept-member-photo img { filter: none; }
.ud-allm-allm2 .ud-dept-member-name { font-weight: 800; font-size: var(--ud-allm-name-size); color: var(--ud-allm-text); margin-bottom: 3px; }
.ud-allm-allm2 .ud-dept-member-dept { font-size: 12px; color: var(--ud-allm-accent); font-weight: 600; }
.ud-allm-allm2 .ud-dept-member-position { font-size: 11px; color: #888; font-style: italic; margin-top: 2px; }

/* ── ALLM 3 — Horizontal Team Cards ── */
.ud-allm-allm3 .ud-all-departments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.ud-allm-allm3 .ud-dept-member-card { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; background: var(--ud-allm-card-bg); border-radius: var(--ud-allm-br); padding: 20px 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); border: 1px solid #e8ecf0; transition: box-shadow .2s, transform .2s; }
.ud-allm-allm3 .ud-dept-member-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.ud-allm-allm3 .ud-dept-member-photo { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: #f0f4f8; border: 3px solid var(--ud-allm-accent); }
.ud-allm-allm3 .ud-dept-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-allm-allm3 .ud-dept-member-info { flex: 1; }
.ud-allm-allm3 .ud-dept-member-role-label { font-size: 11px; color: var(--ud-allm-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; display: block; }
.ud-allm-allm3 .ud-dept-member-name { font-weight: 800; font-size: var(--ud-allm-name-size); color: var(--ud-allm-text); margin-bottom: 3px; }
.ud-allm-allm3 .ud-dept-member-position { font-size: 11px; color: var(--ud-allm-accent); font-weight: 600; }
.ud-allm-allm3 .ud-dept-member-dept { font-size: 12px; color: #888; margin-bottom: 3px; display: block; }

/* ── ALLM 4 — Grouped by Department ── */
.ud-allm-allm4 .ud-allm4-group { margin-bottom: 40px; }
.ud-allm-allm4 .ud-allm4-group-title { font-size: 17px; font-weight: 800; color: var(--ud-allm-text); padding: 10px 20px 10px 16px; border-left: 4px solid var(--ud-allm-accent); background: color-mix(in srgb, var(--ud-allm-accent) 8%, transparent); border-radius: 0 6px 6px 0; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.ud-allm-allm4 .ud-allm4-group-title span { font-weight: 400; font-size: 13px; color: #888; }
.ud-allm-allm4 .ud-all-departments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.ud-allm-allm4 .ud-dept-member-card { display: block; text-decoration: none; color: inherit; background: var(--ud-allm-card-bg); border-radius: var(--ud-allm-br); box-shadow: 0 2px 10px rgba(0,0,0,0.07); overflow: hidden; text-align: center; transition: transform .2s, box-shadow .2s; border: 1px solid rgba(0,0,0,0.06); }
.ud-allm-allm4 .ud-dept-member-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.ud-allm-allm4 .ud-dept-member-photo { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f0f4f8; }
.ud-allm-allm4 .ud-dept-member-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-allm-allm4 .ud-dept-member-info { padding: 12px 14px; }
.ud-allm-allm4 .ud-dept-member-name { font-weight: 700; font-size: var(--ud-allm-name-size); color: var(--ud-allm-text); margin-bottom: 3px; }
.ud-allm-allm4 .ud-dept-member-position { font-size: 11px; color: #888; }

/* ── ALLM 5 — Directory Table ── */
.ud-allm-allm5 .ud-allm5-table-wrap { overflow-x: auto; border-radius: var(--ud-allm-br); box-shadow: 0 2px 14px rgba(0,0,0,0.08); }
.ud-allm5-table { width: 100%; border-collapse: collapse; font-size: var(--ud-allm-name-size); background: var(--ud-allm-card-bg); }
.ud-allm5-table thead tr { background: var(--ud-allm-accent); color: #fff; }
.ud-allm5-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ud-allm5-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.ud-allm5-table tbody tr { transition: background .15s; }
.ud-allm5-table tbody tr:hover td { background: #f8fafc; }
.ud-allm5-table tbody tr:last-child td { border-bottom: none; }
.ud-allm5-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; vertical-align: middle; border: 2px solid #eee; }
.ud-allm5-name-cell { font-weight: 700; color: var(--ud-allm-accent); text-decoration: none; }
.ud-allm5-name-cell:hover { text-decoration: underline; }
.ud-allm5-dept-badge { display: inline-block; background: color-mix(in srgb, var(--ud-allm-accent) 10%, transparent); color: var(--ud-allm-accent); padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.ud-allm5-position { font-size: 12px; color: #888; }


/* ================================================================
   PROFILE SETTINGS FORM (frontend)
================================================================ */
.ud-profile-settings-form { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); padding: 32px; max-width: 700px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.ud-profile-settings-form h2 { color: var(--ud-primary); margin-top: 0; font-size: 22px; }
.ud-ps-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid #f0f0f0; }
.ud-ps-section h3 { font-size: 15px; color: var(--ud-primary); margin: 0 0 16px; font-weight: 700; }
.ud-ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ud-ps-field { display: flex; flex-direction: column; gap: 6px; }
.ud-ps-field label { font-size: 13px; font-weight: 600; color: #444; }
.ud-ps-field input, .ud-ps-field textarea { padding: 10px 14px; border: 1.5px solid #dde1e7; border-radius: 8px; font-size: 14px; background: #f9fafb; transition: border-color .2s; }
.ud-ps-field input:focus, .ud-ps-field textarea:focus { outline: none; border-color: var(--ud-accent); background: #fff; }
.ud-ps-photo-area { display: flex; align-items: center; gap: 24px; }
.ud-ps-avatar { width: 90px; height: 90px; border-radius: 50%; overflow: hidden; border: 3px solid #dde1e7; background: #f0f4f8; }
.ud-ps-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-ps-upload-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--ud-primary); color: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.ud-ps-upload-btn input { display: none; }
.ud-ps-hint { font-size: 11px; color: #888; margin-top: 4px; }
.ud-ps-submit { background: var(--ud-primary); color: #fff; border: none; padding: 12px 32px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background .2s; }
.ud-ps-submit:hover { filter: brightness(0.88); }
.ud-ps-status { font-size: 13px; margin-left: 16px; }
.ud-ps-status.success { color: #00a32a; }
.ud-ps-status.error   { color: #d63638; }


/* ================================================================
   RESPONSIVE BREAKPOINTS
================================================================ */
@media (max-width: 960px) {
    .ud-profile.ud-profile2 { flex-direction: column; }
    .ud-profile.ud-profile2 .ud-p2-left { width: 100%; }
    .ud-profile.ud-profile2 .ud-p2-fields-grid { grid-template-columns: 1fr; }
    .ud-profile.ud-profile2 .ud-profile-field-block { grid-column: span 1; }
}
@media (max-width: 820px) {
    .ud-profile.ud-profile1 .ud-p1-inner { flex-direction: column; }
    .ud-profile.ud-profile1 .ud-p1-left { width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,0.08); }
    .ud-profile.ud-profile4 { flex-direction: column; }
    .ud-profile.ud-profile4 .ud-p4-sidebar { width: 100%; }
    .ud-allm-allm3 .ud-all-departments-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .ud-members-grid.ud-style1,
    .ud-members-grid.ud-style2,
    .ud-members-grid.ud-style4 { grid-template-columns: repeat(2, 1fr) !important; }
    .ud-members-grid.ud-style3 { grid-template-columns: 1fr !important; }
    .ud-profile3 .ud-p3-header,
    .ud-profile3 .ud-p3-body { padding-left: 24px; padding-right: 24px; }
    .ud-ps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .ud-members-grid.ud-style1,
    .ud-members-grid.ud-style2,
    .ud-members-grid.ud-style4 { grid-template-columns: 1fr !important; }
}

/* ================================================================
   Add User Frontend — Tab Interface (UPDATE ONE)
================================================================ */
.ud-add-user-frontend .ud-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--ud-border, #e0e5ee);
    padding-bottom: 0;
}
.ud-add-user-frontend .ud-tab-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ud-muted, #888);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.ud-add-user-frontend .ud-tab-btn:hover  { color: var(--ud-blue, #1a3c6e); }
.ud-add-user-frontend .ud-tab-btn.active { color: var(--ud-blue, #1a3c6e); border-bottom-color: var(--ud-blue, #1a3c6e); }

/* CRITICAL: hide all panels, show only the active one */
.ud-add-user-frontend .ud-tab-panel          { display: none !important; }
.ud-add-user-frontend .ud-tab-panel.active   { display: block !important; }

/* ================================================================
   DAPc / DAPall — Department Access Page Control
================================================================ */
.ud-dapc-wrap {
    max-width: 1000px;
    margin: 0 auto;
    font-family: var(--ud-font, inherit);
    color: var(--ud-profile-text, #1d2327);
}
.ud-dapc-header h2 {
    margin: 0 0 4px;
    color: var(--ud-primary, #1a3c6e);
    font-size: 22px;
    font-weight: 800;
}
.ud-dapc-sub {
    margin: 0 0 20px;
    color: #646970;
    font-size: 13.5px;
    line-height: 1.6;
}
.ud-dapc-loading,
.ud-dapc-empty {
    background: #f8fafc;
    border: 1.5px dashed #dde1e7;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    color: #646970;
    font-size: 14px;
}
.ud-dapc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.ud-dapc-search {
    flex: 1;
    min-width: 200px;
    padding: 9px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13.5px;
}
.ud-dapc-status-msg { font-size: 13px; font-weight: 600; }
.ud-dapall-dept-label { font-weight: 700; font-size: 13px; color: var(--ud-primary, #1a3c6e); }
.ud-dapall-dept-select {
    padding: 9px 14px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: 13.5px;
    min-width: 220px;
}

.ud-dapc-staff-list { display: flex; flex-direction: column; gap: 14px; }

.ud-dapc-staff-card {
    background: var(--ud-card-bg, #ffffff);
    border: 1.5px solid #e5e9ef;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ud-dapc-staff-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ud-dapc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e9ef;
    flex-shrink: 0;
}
.ud-dapc-staff-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ud-dapc-staff-name { font-size: 15px; font-weight: 700; color: var(--ud-profile-text, #1d2327); }
.ud-dapc-staff-position {
    font-size: 12px;
    color: var(--ud-accent, #2eb8b8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.ud-dapc-row-select {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ud-dapc-row-select input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--ud-primary, #1a3c6e);
}
.ud-dapc-source-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.ud-dapc-source-badge.ud-dapc-source-override   { background: #fff4e0; color: #b45309; }
.ud-dapc-source-badge.ud-dapc-source-position   { background: #e0f2fe; color: #0369a1; }
.ud-dapc-source-badge.ud-dapc-source-department { background: #f1f5f9; color: #64748b; }

.ud-dapc-position-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f0f7ff;
    border: 1px solid #c7d8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.ud-dapc-position-row label { font-size: 12px; font-weight: 700; color: var(--ud-primary, #1a3c6e); white-space: nowrap; }
.ud-dapc-position-select {
    padding: 6px 10px;
    border: 1.5px solid #c7d8f0;
    border-radius: 6px;
    font-size: 13px;
    flex: 1;
    min-width: 160px;
}

.ud-dapc-pages-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 4px;
}
.ud-dapc-no-pages { font-size: 13px; color: #888; margin: 0; }
.ud-dapc-page-chk {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    background: #fafbfc;
    cursor: pointer;
    font-size: 13px;
    transition: all .15s;
}
.ud-dapc-page-chk:hover { border-color: var(--ud-accent, #2eb8b8); background: #f0fdfc; }
.ud-dapc-page-chk input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--ud-primary, #1a3c6e);
}

.ud-dapc-staff-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ud-dapc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 7px;
    border: 1.5px solid #dde1e7;
    background: #fff;
    color: #1d2327;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.ud-dapc-btn:hover { background: #f0f4f8; border-color: #c7d8f0; }
.ud-dapc-btn-sm { padding: 6px 13px; font-size: 12px; }
.ud-dapc-btn-primary {
    background: var(--ud-primary, #1a3c6e);
    border-color: var(--ud-primary, #1a3c6e);
    color: #fff;
}
.ud-dapc-btn-primary:hover { background: #142f57; border-color: #142f57; }

/* ── Config panels (Head positions, Default Pages Per Position) ── */
.ud-dapc-config-panel {
    background: #f8fafc;
    border: 1.5px solid #e5e9ef;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
}
.ud-dapc-config-panel h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ud-primary, #1a3c6e);
}
.ud-dapc-config-sub {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: #646970;
    line-height: 1.6;
}
.ud-dapc-checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.ud-dapc-inline-chk {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid #dde1e7;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.ud-dapc-inline-chk input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--ud-primary, #1a3c6e);
}
.ud-dapc-position-defaults-row { margin-bottom: 14px; }

/* ── Bulk toolbar ── */
.ud-dapc-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #fffbea;
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.ud-dapc-bulk-count {
    font-size: 12.5px;
    font-weight: 700;
    color: #92400e;
    white-space: nowrap;
}
.ud-dapc-bulk-divider {
    width: 1px;
    height: 22px;
    background: #fde68a;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ud-dapc-staff-head { flex-wrap: wrap; }
    .ud-dapc-position-row { flex-direction: column; align-items: stretch; }
    .ud-dapall-toolbar { flex-direction: column; align-items: stretch; }
    .ud-dapc-bulk-toolbar { flex-direction: column; align-items: stretch; }
    .ud-dapc-bulk-divider { display: none; }
}


/* ============================================================
   USER MANAGEMENT UPDATE - ACTIVE/DEACTIVATED ACCOUNTS
   ============================================================ */
#ud-fe-users-table,
.ud-fe-modern-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
#ud-fe-users-table thead th,
.ud-fe-modern-table thead th {
    padding: 12px 13px !important;
    background: #f7f9fc !important;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
    text-align: left;
}
#ud-fe-users-table tbody td,
.ud-fe-modern-table tbody td {
    padding: 12px 13px !important;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
}
#ud-fe-users-table tbody tr:last-child td,
.ud-fe-modern-table tbody tr:last-child td { border-bottom: 0; }
#ud-fe-users-table tbody tr:hover,
.ud-fe-modern-table tbody tr:hover { background: #f8fbff; }
.ud-fe-table-wrap { overflow-x: auto; }
.ud-fe-empty-state { text-align: center; color: #64748b; padding: 30px !important; }
.ud-fe-action-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ud-fe-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 29px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    white-space: nowrap;
}
.ud-fe-action-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(15,23,42,.10); }
.ud-fe-action-btn:disabled { opacity: .55; cursor: wait; transform: none; }
.ud-fe-action-edit { color: #174ea6; background: #edf4ff; border-color: #c9dcff; }
.ud-fe-action-deactivate { color: #8a4b00; background: #fff7e6; border-color: #f4d39a; }
.ud-fe-action-delete { color: #b42318; background: #fff0ef; border-color: #ffc9c5; }
.ud-fe-action-restore { color: #166534; background: #edfdf3; border-color: #b7ebc6; }
.ud-fe-users-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }

.ud-password-intent {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    margin: 2px 0 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.ud-password-intent input { width: auto !important; margin: 0 !important; }
.ud-password-change-row input[type="password"]:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }

.ud-ps-add-school-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto !important;
    min-height: 38px;
    margin-top: 6px;
    padding: 8px 16px !important;
    border: 1.5px solid #b9c9dd !important;
    border-radius: 7px !important;
    background: #f0f6fc !important;
    color: #173d74 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
}
.ud-ps-add-school-btn:hover { background: #e3effc !important; border-color: #7fa6d8 !important; }

.ud-fe-overlay-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, .68);
    overflow-y: auto;
}
.ud-fe-restore-card {
    position: relative;
    width: min(650px, 100%);
    padding: 30px;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.ud-fe-restore-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; font-size: 28px; color: #64748b; cursor: pointer; }
.ud-fe-restore-symbol { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: #edf4ff; color: #174ea6; font-size: 30px; }
.ud-fe-restore-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.ud-fe-restore-choice {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-height: 145px;
    padding: 18px;
    border: 1.5px solid #d8e0ea;
    border-radius: 12px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.ud-fe-restore-choice-primary { background: #f4f8ff; border-color: #9ebef0; }
.ud-fe-restore-choice strong { font-size: 15px; color: #173d74; }
.ud-fe-restore-choice span { font-size: 12px; line-height: 1.55; color: #64748b; }

@media (max-width: 700px) {
    .ud-fe-restore-options { grid-template-columns: 1fr; }
    .ud-fe-action-btn { padding: 6px 8px; }
    .ud-fe-action-btn { font-size: 0; }
    .ud-fe-action-btn span { font-size: 13px; }
}

/* ============================================================
   FRONTEND USER ACCOUNT SUBTABS, MESSAGES & CONFIGURATION
   ============================================================ */
.ud-fe-user-directory-header { gap: 14px; align-items: flex-start; }
.ud-fe-user-directory-header #ud-fe-user-search { width: min(320px, 100%); }
.ud-fe-user-list-tabs {
    display: flex;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 16px;
    padding: 5px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #f5f8fc;
}
.ud-fe-user-list-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    font-weight: 700;
    cursor: pointer;
}
.ud-fe-user-list-tab-btn span { display: inline-grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 999px; background: #e2e8f0; font-size: 11px; }
.ud-fe-user-list-tab-btn.active { background: var(--ud-primary, #173d74); color: #fff; }
.ud-fe-user-list-tab-btn.active span { background: rgba(255,255,255,.18); color: #fff; }
.ud-fe-user-list-panel { display: none; }
.ud-fe-user-list-panel.active { display: block; }
.ud-fe-user-login,
.ud-fe-user-created { display: block; margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 500; }
.ud-fe-user-created { color: #166534; }
.ud-fe-action-reset { color: #6b3fa0; background: #f7f0ff; border-color: #ddc7f5; }
.ud-fe-action-welcome { color: #08705f; background: #ecfdf8; border-color: #afe8d9; }
.ud-fe-bulk-toolbar { padding: 16px; margin-bottom: 16px; border: 1px solid #c3d4e8; border-radius: 10px; background: #f0f6fc; }
.ud-fe-bulk-fields { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.ud-fe-bulk-fields > div { flex: 1 1 190px; }
.ud-fe-bulk-fields label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.ud-fe-password-inline { display: flex; gap: 6px; }
.ud-fe-password-inline input { flex: 1; }
.ud-fe-password-inline button { border: 1px solid #c5ced8; border-radius: 5px; background: #fff; cursor: pointer; }
.ud-fe-warning-text { margin: 4px 0 0; color: #b42318; font-size: 11px; }
.ud-fe-bulk-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.ud-fe-bulk-welcome-btn { color: #fff !important; background: #08705f !important; border-color: #08705f !important; }
.ud-fe-bulk-reset-btn { color: #6b3fa0 !important; background: #f7f0ff !important; border-color: #ddc7f5 !important; }

.ud-fe-message-config-grid,
.ud-fe-message-template-grid { display: grid; gap: 18px; }
.ud-fe-message-config-grid { grid-template-columns: minmax(240px, .7fr) minmax(300px, 1.3fr); }
.ud-fe-message-template-grid { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: 18px; }
.ud-fe-message-config-grid section,
.ud-fe-message-template-grid section { padding: 18px; border: 1px solid #dce5ef; border-radius: 12px; background: #fbfdff; }
.ud-fe-message-config-grid h3,
.ud-fe-message-template-grid h3 { margin: 0 0 13px; color: var(--ud-primary, #173d74); }
.ud-fe-message-template-grid textarea { min-height: 230px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 12px; line-height: 1.55; }
.ud-fe-shortcode-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ud-fe-shortcode-list code { padding: 6px 9px; border: 1px solid #cfe0f2; border-radius: 6px; background: #edf5ff; color: #174ea6; font-weight: 700; }
.ud-fe-security-note { padding: 11px; border: 1px solid #bfe3d6; border-radius: 8px; background: #f0fdf8; color: #166534; }

@media (max-width: 900px) {
    .ud-fe-message-config-grid,
    .ud-fe-message-template-grid { grid-template-columns: 1fr; }
    .ud-fe-user-directory-header { flex-direction: column; }
}
@media (max-width: 700px) {
    .ud-fe-user-list-tabs { width: 100%; }
    .ud-fe-user-list-tab-btn { flex: 1; justify-content: center; }
}

/* ============================================================
   v1.6.0 — [ud_team_pages]
   ============================================================ */
.ud-team-pages-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid #e5eaf1; padding-bottom: 14px; }
.ud-team-pages-tab {
    padding: 9px 18px; border: 1px solid #cfe0f2; border-radius: 20px; background: #fff;
    color: #174ea6; font-weight: 600; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 8px;
    transition: all .15s ease;
}
.ud-team-pages-tab:hover { background: #edf5ff; }
.ud-team-pages-tab.active { background: #174ea6; color: #fff; border-color: #174ea6; }
.ud-team-home-badge { font-size: 10px; background: rgba(255,255,255,.25); padding: 2px 7px; border-radius: 10px; }
.ud-team-pages-tab.active .ud-team-home-badge { background: rgba(255,255,255,.3); }
.ud-team-pages-tab:not(.active) .ud-team-home-badge { background: #eef6ee; color: #166534; }
.ud-team-pages-panel { display: none; }
.ud-team-pages-panel.active { display: block; }
.ud-team-pages-dept-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ud-team-dept-filter-btn {
    padding: 6px 14px; border: 1px solid #dde5ee; border-radius: 16px; background: #f7f9fc;
    color: #445; font-size: 12px; cursor: pointer;
}
.ud-team-dept-filter-btn.active { background: #2eb8b8 !important; color: #fff !important; border-color: #2eb8b8 !important; }

.ud-team-pages-status { font-size: 12px; color: #888; margin: 12px 0 0; }
.ud-team-pages-pagination { margin-top: 16px; text-align: center; }
.ud-team-pages-pagination button {
    background: #174ea6 !important; color: #fff !important; border: 1px solid #174ea6 !important;
    padding: 9px 24px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.ud-team-pages-pagination button:hover { background: #123c82 !important; }
.ud-tp-scroll-sentinel { height: 1px; }

/* ── Grid template ── */
.ud-tp-grid {
    display: grid;
    grid-template-columns: repeat(var(--ud-tp-cols, 3), minmax(0, 1fr));
    gap: 16px;
}
.ud-tp-grid-card {
    background: #fff; border: 1px solid #e5eaf1; border-radius: 10px; padding: 16px; text-align: center;
    transition: box-shadow .15s ease;
}
.ud-tp-grid-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.ud-tp-photo img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #e5eaf1; margin-bottom: 10px; }
.ud-tp-grid-card .ud-tp-name { font-weight: 700; font-size: 13px; color: #1d2327; }
.ud-tp-grid-card .ud-tp-sub { font-size: 12px; color: #667; margin-top: 2px; }

/* ── Table template ── */
.ud-tp-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border: 1px solid #e5eaf1; border-radius: 8px; overflow: hidden; }
.ud-tp-table th { text-align: left; padding: 10px 14px; background: #f7f9fc; color: #646970; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.ud-tp-table td { padding: 10px 14px; border-top: 1px solid #f0f2f5; }
.ud-tp-table-user { display: flex; align-items: center; gap: 8px; }
.ud-tp-table-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #e5eaf1; }

/* ── Masonry template ── */
.ud-tp-masonry { display: grid; grid-template-columns: repeat(var(--ud-tp-cols, 3), minmax(0, 1fr)); gap: 16px; align-items: start; }
.ud-tp-masonry-col { display: flex; flex-direction: column; gap: 16px; }
.ud-tp-masonry-card {
    background: #fff; border: 1px solid #e5eaf1; border-radius: 10px; padding: 14px; text-align: center;
}
.ud-tp-masonry-card .ud-tp-photo img { width: 56px; height: 56px; }
.ud-tp-masonry-card .ud-tp-name { font-weight: 700; font-size: 13px; color: #1d2327; }
.ud-tp-masonry-card .ud-tp-sub { font-size: 11px; color: #667; margin-top: 2px; }

/* ── Cards template (large, single column, more detail) ── */
.ud-tp-cards { display: flex; flex-direction: column; gap: 14px; }
.ud-tp-bigcard {
    display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e5eaf1;
    border-radius: 10px; padding: 18px;
}
.ud-tp-bigcard img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e5eaf1; }
.ud-tp-bigcard-body .ud-tp-name { font-weight: 700; font-size: 15px; color: #1d2327; }
.ud-tp-bigcard-body .ud-tp-sub { font-size: 12px; color: #667; margin: 2px 0 4px; }
.ud-tp-bigcard-body .ud-tp-email a { font-size: 12px; color: #174ea6; text-decoration: none; }
.ud-tp-bigcard-body .ud-tp-email a:hover { text-decoration: underline; }

/* ── Compact list template ── */
.ud-tp-compact { display: flex; flex-direction: column; background: #fff; border: 1px solid #e5eaf1; border-radius: 8px; overflow: hidden; }
.ud-tp-compact-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #f0f2f5; font-size: 13px;
}
.ud-tp-compact-row:last-child { border-bottom: none; }
.ud-tp-compact-row img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #e5eaf1; flex-shrink: 0; }
.ud-tp-compact-row .ud-tp-name { font-weight: 600; color: #1d2327; }
.ud-tp-compact-row .ud-tp-sub { color: #888; font-size: 12px; margin-left: auto; }

@media (max-width: 700px) {
    .ud-tp-grid, .ud-tp-masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ud-tp-table-wrap { overflow-x: auto; }
}
@media (max-width: 480px) {
    .ud-tp-grid, .ud-tp-masonry { grid-template-columns: 1fr; }
}

/* ============================================================
   v1.6.1 — [ud_invite_users]
   Full-width layout (was accidentally capped at 640px and centered).
   All buttons on this page set BOTH background and color explicitly,
   with !important, specifically because several WordPress themes define
   a global `button { color: #fff }` (or similar) rule that otherwise wins
   the specificity fight against a plain `background` declaration here —
   the visible symptom was buttons appearing entirely blank (white text on
   a white/near-white background) until :hover revealed them. Every button
   class below is guarded against that.
   ============================================================ */
.ud-invite-users-frontend {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.ud-invite-users-frontend * { box-sizing: border-box; }
.ud-invite-users-frontend h2 { margin: 0 0 4px; }
.ud-invite-users-frontend h3 { margin: 0 0 14px; font-size: 15px; color: #1a3c6e; }

.ud-fi-columns {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr);
    gap: 20px;
    margin-top: 18px;
    align-items: start;
}
@media (max-width: 860px) {
    .ud-fi-columns { grid-template-columns: 1fr; }
}

.ud-fi-card {
    background: #fff;
    border: 1px solid #e5eaf1;
    border-radius: 10px;
    padding: 22px;
}
.ud-fi-card .ud-form-row { margin-bottom: 18px; }
.ud-fi-card label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #223; }
.ud-fi-card input[type="text"],
.ud-fi-card input[type="number"],
.ud-fi-card select {
    width: 100%; padding: 9px 12px; border: 1px solid #dde1e7; border-radius: 6px;
    font-size: 13px; box-sizing: border-box; background: #fff; color: #1d2327;
}
.ud-fi-radio-row { display: flex; gap: 16px; margin-bottom: 8px; }
.ud-fi-radio-row label { display: flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; margin-bottom: 0; }

/* ── Staff picker (department -> checkbox list, bulk invite) ── */
.ud-fi-staff-toolbar { display: flex; gap: 10px; align-items: center; margin: 14px 0 8px; flex-wrap: wrap; }
.ud-fi-staff-toolbar input[type="text"] { flex: 1; min-width: 160px; }
.ud-fi-select-all { display: flex; align-items: center; gap: 6px; font-weight: 400 !important; font-size: 12px; white-space: nowrap; margin-bottom: 0 !important; cursor: pointer; }
.ud-fi-staff-list {
    max-height: 320px; overflow-y: auto; border: 1px solid #e5eaf1; border-radius: 8px;
    padding: 6px; background: #fafbfc;
}
.ud-fi-staff-row {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer;
}
.ud-fi-staff-row:hover { background: #edf5ff; }
.ud-fi-staff-row img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #e5eaf1; }
.ud-fi-staff-row .ud-fi-staff-meta { display: flex; flex-direction: column; min-width: 0; }
.ud-fi-staff-row .ud-fi-staff-name { font-size: 13px; font-weight: 600; color: #1d2327; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-fi-staff-row .ud-fi-staff-sub { font-size: 11px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-fi-selected-count { font-size: 12px; color: #646970; margin: 10px 0 0; }
.ud-fi-empty-msg { padding: 14px; text-align: center; color: #888; font-size: 12px; font-style: italic; }

/* ── Positions grid, duration presets ── */
.ud-fi-pos-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ud-fi-pos-label {
    display: flex; align-items: center; gap: 6px; font-weight: 400 !important; cursor: pointer;
    background: #f0f4f8 !important; color: #1d2327 !important; padding: 5px 12px; border-radius: 6px;
    font-size: 13px; margin-bottom: 0 !important; border: 1px solid transparent;
}
.ud-fi-preset-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ud-fi-preset {
    padding: 6px 12px; border: 1px solid #cfe0f2 !important; border-radius: 16px;
    background: #f7f9fc !important; color: #174ea6 !important; font-size: 12px; cursor: pointer;
    font-weight: 600;
}
.ud-fi-preset:hover { background: #e4eefc !important; }
.ud-fi-preset.active { background: #174ea6 !important; color: #fff !important; border-color: #174ea6 !important; }
.ud-fi-duration-row { display: flex; gap: 8px; align-items: center; }
.ud-fi-duration-row input[type="number"] { width: 90px; flex: none; }

.ud-fi-status { margin-left: 10px; font-size: 13px; }

/* ── Buttons (explicit, defensive colors) ── */
.ud-btn-primary-fi {
    background: #174ea6 !important; color: #fff !important; border: 1px solid #174ea6 !important;
    padding: 10px 22px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer;
}
.ud-btn-primary-fi:hover  { background: #123c82 !important; border-color: #123c82 !important; color: #fff !important; }
.ud-btn-primary-fi:disabled { opacity: .6; cursor: default; }

.ud-btn-secondary-fi {
    background: #fff !important; color: #445 !important; border: 1px solid #dde1e7 !important;
    padding: 10px 20px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; margin-left: 8px;
}
.ud-btn-secondary-fi:hover { background: #f4f6f9 !important; color: #223 !important; }

.ud-btn-danger-fi {
    background: #fbeaea !important; color: #b32d2e !important; border: 1px solid #f0c9c9 !important;
    padding: 8px 16px; border-radius: 6px; font-weight: 600; font-size: 12px; cursor: pointer;
}
.ud-btn-danger-fi:hover:not(:disabled)  { background: #f6d7d7 !important; color: #8a1f20 !important; }
.ud-btn-danger-fi:disabled { opacity: .45; cursor: default; }

.ud-btn-link-fi {
    background: transparent !important; color: #174ea6 !important; border: none !important;
    padding: 4px 8px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.ud-btn-link-fi:hover { color: #0d3169 !important; }
.ud-btn-link-danger-fi { color: #b32d2e !important; }
.ud-btn-link-danger-fi:hover { color: #8a1f20 !important; }

/* ── Invited to Other Team Summary ── */
.ud-fi-summary-section { margin-top: 28px; background: #fff; border: 1px solid #e5eaf1; border-radius: 10px; padding: 22px; }
.ud-fi-summary-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.ud-fi-summary-header h3 { margin: 0; }
.ud-fi-summary-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ud-fi-summary-toolbar input[type="text"] {
    padding: 8px 12px; border: 1px solid #dde1e7; border-radius: 6px; font-size: 13px; min-width: 220px;
    background: #fff; color: #1d2327;
}
.ud-fi-summary-toolbar select {
    padding: 8px 12px; border: 1px solid #dde1e7; border-radius: 6px; font-size: 13px; background: #fff; color: #1d2327;
}
.ud-fi-summary-table-wrap { overflow-x: auto; }
.ud-fi-summary-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ud-fi-summary-table th {
    text-align: left; padding: 10px 12px; border-bottom: 2px solid #e5eaf1; color: #646970;
    font-size: 11px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.ud-fi-summary-table td { padding: 10px 12px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.ud-fi-summary-table tr:last-child td { border-bottom: none; }
.ud-fi-summary-loading, .ud-fi-summary-empty { text-align: center; padding: 24px !important; color: #888; font-style: italic; }
.ud-fi-summary-user { display: flex; align-items: center; gap: 8px; }
.ud-fi-summary-user img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #e5eaf1; }
.ud-fi-summary-user-name { font-weight: 600; color: #1d2327; }
.ud-fi-summary-user-email { font-size: 11px; color: #888; }
.ud-fi-status-pill {
    display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 700;
}
.ud-fi-status-pill.active  { background: #e6f6ea !important; color: #146c2e !important; }
.ud-fi-status-pill.expired { background: #fbeaea !important; color: #b32d2e !important; }
.ud-fi-team-badge { display: inline-block; margin-left: 4px; font-size: 10px; color: #888; }

@media (max-width: 700px) {
    .ud-fi-summary-header { flex-direction: column; align-items: stretch; }
    .ud-fi-summary-toolbar { flex-direction: column; align-items: stretch; }
    .ud-fi-summary-toolbar input[type="text"] { min-width: 0; }
}
