/* =========================
   Company Manager (MLN)
========================= */

.pageGrid{
  display:grid;
  gap:16px;
}

@media (min-width: 980px){
  .pageGrid{
    grid-template-columns: 1.05fr 0.95fr; /* left: info, right: editor */
    align-items:start;
  }
}

.cardTitle{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
  margin-bottom:12px;
}

.cardTitle h2{
  margin:0;
  font-size:22px;
  font-weight:900;
}

.cardTitle .sub{
  margin-top:4px;
  font-size:13px;
  opacity:.75;
}

.kvGrid{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap:8px 12px;
  align-items:center;
  margin-top:10px;
}

.kvGrid .k{
  font-size:12px;
  opacity:.75;
  font-weight:800;
  letter-spacing:.02em;
}

/* merged + includes “editable pops” left align */
.kvGrid .v{
  font-size:14px;
  font-weight:800;
  text-align:left;
  justify-self:start;
}

.pillsRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.sectionHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:6px;
}

.sectionHead .sectionTitle{
  font-weight:900;
  font-size:14px;
}

.inputGrid{
  display:grid;
  gap:12px;
}

@media (min-width: 560px){
  .inputGrid.two{
    grid-template-columns: 1fr 1fr;
  }
}

.miniHint{
  font-size:12px;
  opacity:.8;
  margin-top:8px;
}

.listClean{
  list-style:none;
  margin:10px 0 0 0;
  padding:0;
  display:grid;
  gap:8px;
}

.listClean li{
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:12px;
  background: var(--surface2);
  font-weight:800;
  font-size:13px;
}


/* =========================
   Company Manager polish
========================= */

.hr{
  height:1px;
  background: var(--stroke);
  margin: 14px 0;
  border-radius: 999px;
  opacity: .9;
}

.kv{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:8px 0;
  border-bottom:1px dashed rgba(255,255,255,.08);
}
.kv:last-child{ border-bottom:none; }

.kv .k{
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
  min-width: 140px;
}
.kv .v{
  font-weight: 800;
  text-align:right;
}

.row{
  display:flex;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
}

.row > div{
  flex:1 1 260px;
}

label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 6px;
}

input, select{
  width:100%;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255,255,255,.03);
  color: var(--text);
}

.hint{
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:wrap;
}


/* Header chips */

.headerRow{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
}

.chips{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.chip .muted{
  font-weight: 900;
  opacity: .85;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  font-size:12px;
  font-weight:900;
}

.badge.good{ border-color: rgba(46, 204, 113, .35); }
.badge.warn{ border-color: rgba(241, 196, 15, .35); }


/* Members list rows */

.memberList{
  display:grid;
  gap:8px;
  margin-top:10px;
}

.memberRow{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}

.memberMain{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width: 0;
}

.memberName{
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.memberUid{
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}


/* =========================
   Toast (Readable, Not Burnt)
========================= */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  min-width: 280px;
  max-width: 420px;

  background: #ffffff;           /* 🔥 force light background */
  color: #1f2937;                /* slate-800 */
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);

  padding: 14px 16px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all .25s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toastTitle {
  font-weight: 700;
  margin-bottom: 4px;
  color: #111827; /* almost-black */
}

.toastMsg {
  font-size: 14px;
  color: #374151; /* slate-700 */
}

/* Toast base */
.toast{
  --toastAccent: #22c55e;                 /* default = success */
  border-left: 8px solid var(--toastAccent);
}

/* Types only set the variable (so no fighting) */
.toast.success{ --toastAccent:#22c55e; }
.toast.error  { --toastAccent:#ef4444; }
.toast.warn   { --toastAccent:#f59e0b; }

/* Make error more pronounced */
.toast.error{
  --toastAccent:#ef4444;
  border-left: 8px solid var(--toastAccent);
  border: 2px solid rgba(239, 68, 68, .55);
  background: rgba(239, 68, 68, .06);
  box-shadow: 0 22px 50px rgba(239, 68, 68, 0.30);
}
}

.toast,
.toast *{
  box-shadow: none !important;
}

/* =========================
   Company Manager (Table + Expand)
   (ADD-ON only — scoped so it won’t stomp accordion)
========================= */

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

.coTable{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
}

.coTable thead th{
  text-align:left;
  font-size:12px;
  letter-spacing:.02em;
  color: var(--muted);
  font-weight: 900;
  padding: 12px 14px;
  border-bottom:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
}

.coTable tbody td{
  padding: 14px;
  border-bottom:1px solid var(--stroke);
  vertical-align: middle;
}

.coTable tbody tr:last-child td{
  border-bottom:none;
}

.coRow{
  cursor:pointer;
  transition: background .12s ease;
}

.coRow:hover{
  background: rgba(255,255,255,.04);
}

/* scoped table name/meta so accordion styles don’t collide */
.coTable .coName{
  font-weight: 900;
  font-size: 16px;
  display:flex;
  gap:10px;
  align-items:center;
}

.coTable .coMeta{
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.disclosure{
  width: 18px;
  height: 18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(0,0,0,.10);
  font-size: 12px;
  line-height: 1;
}

.coActions{
  display:flex;
  justify-content:flex-end;
}


/* =========================
   Buttons — Premium Pass (Unified)
   - Single system: .btn + intent classes
   - Back-compat: .primary -> .save, .danger -> .cancel
========================= */

:root{
  --btnRadius: 14px;

  --btnBorder: rgba(0,0,0,.10);
  --btnBg: rgba(255,255,255,.70);
  --btnBgHover: rgba(255,255,255,.88);

  --btnText: #0f172a;
  --btnShadow: 0 8px 16px rgba(0,0,0,.08);
  --btnShadowHover: 0 14px 26px rgba(0,0,0,.14);

  --ring: 0 0 0 3px rgba(16,185,129,.25);

  --save1: rgba(34,197,94,.96);
  --save2: rgba(16,185,129,.96);
  --saveBorder: rgba(16,185,129,.42);
  --saveShadow: 0 12px 24px rgba(16,185,129,.22);
  --saveShadowHover: 0 16px 30px rgba(16,185,129,.28);

  --cancel1: rgba(239,68,68,.96);
  --cancel2: rgba(244,63,94,.96);
  --cancelBorder: rgba(239,68,68,.42);
  --cancelShadow: 0 12px 24px rgba(239,68,68,.22);
  --cancelShadowHover: 0 16px 30px rgba(239,68,68,.28);
}
/* =========================
   Auth Pill (Topbar)
   Fix: prevent circular collapse + keep text inside pill
========================= */

button#authPill.authPill{
  appearance:none;
  -webkit-appearance:none;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text);

  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;

  padding: 10px 14px;
  border-radius: 999px;

  cursor:pointer;
  user-select:none;

  /* ✅ critical: don't let it shrink into a circle */
  width: auto;
  min-width: 180px;     /* tweak if you want tighter */
  flex: 0 0 auto;       /* don't shrink in flex rows */
  white-space: nowrap;  /* keep it "pill-ish" */

  line-height: 1;
  font: inherit;
  font-weight: 900;

  box-shadow: 0 10px 18px rgba(0,0,0,.14);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

button#authPill.authPill:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(0,0,0,.18);
  filter: brightness(1.03);
}

button#authPill.authPill:active{
  transform: translateY(0px);
  box-shadow: 0 8px 14px rgba(0,0,0,.12);
}

button#authPill.authPill .authDot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(255,255,255,.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
  flex: 0 0 auto;
}

:root[data-theme="light"] button#authPill.authPill .authDot{
  background: rgba(15,23,42,.35);
  box-shadow: 0 0 0 3px rgba(15,23,42,.08);
}

button#authPill.authPill.signedIn .authDot{
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,.20);
}

button#authPill.authPill .authText{
  display:flex;
  flex-direction:column;
  line-height:1.05;
  text-align:left;

  /* ✅ allows ellipsis to work */
  min-width: 0;
}

button#authPill.authPill .authTop{
  font-size:10px;
  opacity:.65;
  font-weight:900;
  letter-spacing:.3px;
  text-transform: uppercase;
}

button#authPill.authPill .authBottom{
  font-size:13px;
  font-weight:900;

  /* ✅ keep bottom line from wrapping into "Not / signed / in" */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* tweak based on your topbar space */
  max-width: 220px;
}

/* =========================
   Login Modal (MLN)
========================= */

/* ===== Login Modal ===== */

.loginModal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 18px;
}

.loginModal.show{ display:flex; }

.loginCard{
  width: min(440px, 92vw);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 22px 60px rgba(0,0,0,.35);
  padding: 18px;
}

.loginHeader{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom: 14px;
}

.loginLogo{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.loginHeaderText{ min-width:0; }

.loginTitle{
  font-size: 18px;
  font-weight: 950;
  line-height: 1.15;
}

.loginSub{
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  opacity: .9;
}

.pwWrap{
  position: relative;
}

.pwWrap input{
  padding-right: 44px; /* room for eye */
}

.pwToggle{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
}

.pwToggle:hover{
  filter: brightness(1.05);
}

.loginError{
  min-height: 16px;
  margin: 6px 0 10px;
  font-size: 12px;
  color: #e74c3c;
  font-weight: 600;
}

.passwordWrap{
  position: relative;
  display: flex;
  align-items: center;
}

.passwordWrap input{
  flex: 1;
  padding-right: 42px;
}

.pwToggle{
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: .7;
}

.pwToggle:hover{
  opacity: 1;
}

..loginActions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:14px;
}

.loginActions .btn{
  min-width:120px;
}
/* =========================
   Google Sign-In button
========================= */
.googleBtn{
  width:100%;
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  background:#fff;
  color:#1f1f1f;
  border:1px solid rgba(0,0,0,.15);
  border-radius:12px;
  padding:10px 12px;

  font-weight:700;
  cursor:pointer;
}

.googleBtn:hover{
  background:#f7f7f7;
}

.googleBtn .gIcon{
  width:18px;
  height:18px;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;

  /* Google "G" inline SVG */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303C33.747 32.657 29.223 36 24 36c-6.627 0-12-5.373-12-12S17.373 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='M6.306 14.691l6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4c-7.682 0-14.344 4.337-17.694 10.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.197l-6.19-5.238C29.281 35.191 26.784 36 24 36c-5.202 0-9.715-3.317-11.283-7.946l-6.52 5.02C9.505 39.556 16.227 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303c-.748 2.235-2.231 4.126-4.094 5.565l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z'/%3E%3C/svg%3E");
}

/* Base */
.btn{
  appearance:none;
  -webkit-appearance:none;

  border:1px solid var(--btnBorder);
  background: var(--btnBg);
  color: var(--btnText);

  font-weight: 900;
  letter-spacing: .2px;

  padding: 12px 18px;
  border-radius: var(--btnRadius);

  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  cursor:pointer;
  user-select:none;

  box-shadow: var(--btnShadow);

  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background .12s ease,
    border-color .12s ease,
    filter .12s ease,
    opacity .12s ease;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--btnShadowHover);
  background: var(--btnBgHover);
}

.btn:active{
  transform: translateY(0px);
  box-shadow: 0 6px 12px rgba(0,0,0,.10);
}

.btn:focus-visible{
  outline: none;
  box-shadow: var(--ring), var(--btnShadow);
}

/* Sizes */
.btn.sm{
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 12px;
  font-weight: 850;
  letter-spacing: .15px;
}

.btn.lg{
  padding: 14px 22px;
  border-radius: 16px;
  font-size: 15px;
}

/* Intents */
.btn.save{
  background: linear-gradient(180deg, var(--save1), var(--save2));
  color: #07210f;
  border-color: var(--saveBorder);
  box-shadow: var(--saveShadow);
}

.btn.save:hover{
  filter: brightness(1.03);
  box-shadow: var(--saveShadowHover);
}

.btn.save:focus-visible{
  box-shadow:
    0 0 0 3px rgba(16,185,129,.30),
    var(--saveShadow);
}

.btn.cancel{
  background: linear-gradient(180deg, var(--cancel1), var(--cancel2));
  color: #2b0b0b;
  border-color: var(--cancelBorder);
  box-shadow: var(--cancelShadow);
}

.btn.cancel:hover{
  filter: brightness(1.03);
  box-shadow: var(--cancelShadowHover);
}

.btn.cancel:focus-visible{
  box-shadow:
    0 0 0 3px rgba(239,68,68,.26),
    var(--cancelShadow);
}

/* Neutral / outline */
.btn.ghost{
  background: rgba(255,255,255,.55);
  border-color: rgba(0,0,0,.14);
  box-shadow: none;
}

.btn.ghost:hover{
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);
}

.btn.ghost:focus-visible{
  box-shadow:
    0 0 0 3px rgba(148,163,184,.32),
    0 10px 18px rgba(0,0,0,.10);
}

/* Disabled */
.btn:disabled,
.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
  filter:none;
}

/* Backwards compatibility (keep old classes working) */
.btn.primary{ /* ✅ treat old "primary" as save */
  background: linear-gradient(180deg, var(--save1), var(--save2));
  color: #07210f;
  border-color: var(--saveBorder);
  box-shadow: var(--saveShadow);
}

.btn.primary:hover{
  filter: brightness(1.03);
  box-shadow: var(--saveShadowHover);
}

.btn.danger{  /* ✅ treat old "danger" as cancel */
  background: linear-gradient(180deg, var(--cancel1), var(--cancel2));
  color: #2b0b0b;
  border-color: var(--cancelBorder);
  box-shadow: var(--cancelShadow);
}

.btn.danger:hover{
  filter: brightness(1.03);
  box-shadow: var(--cancelShadowHover);
}

.detailsRow td{
  padding: 0;
}

.details{
  padding: 14px;
  border-top: 1px solid var(--stroke);
  background: rgba(0,0,0,.06);
}

.detailsGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

@media (max-width: 720px){
  .detailsGrid{
    grid-template-columns: 1fr;
  }
}

.detailsSectionTitle{
  margin-top: 12px;
  margin-bottom: 8px;
  font-weight: 950;
  font-size: 13px;
}

.userLink{
  color: inherit;
  text-decoration: none;
  font-weight: 900;
}
.userLink:hover{
  text-decoration: underline;
}

.companyLink{
  font-weight: 800;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.companyLink:hover{
  text-decoration: underline;
}

/* =========================
   Company Manager — “editable pops”
   Additions (append only)
========================= */

/* Fixed width pill inputs/spans for Companies */
.companyPill{
  width: 520px;          /* adjust if you want tighter/wider */
  max-width: 100%;
  box-sizing: border-box;
}

/* Make pill inputs visually match valuePill */
input.companyPill{
  display: inline-block;
}

/* Read-only value pill */
.valuePill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  font-weight:900;
  font-size:12px;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Editable value pill (stands out) */
.valuePill.editable{
  border-color: rgba(46, 204, 113, .45);
  background: rgba(46, 204, 113, .10);
}




/* =========================
   Company Manager — Accordion list
   (scoped so it doesn’t collide with table styles)
========================= */

.coList{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.coItem{
  border:1px solid var(--stroke);
  border-radius:16px;
  background: rgba(255,255,255,.02);
  overflow:hidden;
}

.coItem summary{
  list-style:none;
  cursor:pointer;
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:12px;
  padding:12px 14px;
}

.coItem summary::-webkit-details-marker{ display:none; }

.coMain{
  min-width:0;
}

/* scoped accordion name/meta so table styles don’t collide */
.coItem .coName{
  font-weight:950;
  font-size:16px;
  line-height:1.2;
  margin-bottom:4px;
}

.coItem .coMeta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  color: var(--muted);
  font-weight:800;
  font-size:12px;
}

.coRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.coDetailsWrap{
  padding:14px;
  border-top:1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.06);
}

.coDetailsGrid{
  display:grid;
  gap:14px;
}

@media (min-width: 980px){
  .coDetailsGrid{
    grid-template-columns: 1.05fr 0.95fr;
    align-items:start;
  }
}


/* =========================
   User Manager
========================= */

:root {
  --profile-pill-width: 420px; /* tweak once, affects all */
}


/* Profile pills: force Name/Email/UID to the same width */
.kvGrid .v{
  display:flex;
  align-items:center;
}

/* same width for span + input */
.profilePill{
  width: 360px;          /* tweak to taste */
  max-width: 100%;
  box-sizing: border-box;
}

/* spans should behave like a “pill block” */
.valuePill.profilePill{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

/* inputs should fill the same pill width */
input.profilePill{
  display: block;
}


/* Make editable inputs match valuePill sizing */
.editableField {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;   /* pill shape */
  font-size: 14px;
  line-height: 38px;
}

/* Align input + pill visually in kvGrid */
.kvGrid .v {
  display: flex;
  align-items: center;
}

.uRow{
  width:100%;
  text-align:left;
  border:1px solid var(--stroke);
  border-radius:14px;
  background: rgba(255,255,255,.02);
  padding:12px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}
.uRow:hover{ background: rgba(255,255,255,.04); }
.uRow.active{
  border-color: rgba(46, 204, 113, .35);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.uMain{ min-width:0; display:flex; flex-direction:column; gap:4px; }
.uName{ font-weight:950; font-size:14px; }
.uMeta{ font-weight:800; font-size:12px; color: var(--muted); }
.uUid{ font-weight:800; font-size:12px; color: var(--muted2); }

.uChevron{
  font-size:22px;
  opacity:.55;
  font-weight:900;
  padding-left:10px;
}

.uCoList{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.uCoRow{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:12px;
  padding:12px 12px;
  border:1px solid var(--stroke);
  border-radius:14px;
  background: rgba(255,255,255,.02);
}

.uCoName{ font-weight:950; }
.uCoMeta{ font-size:12px; color: var(--muted); font-weight:800; margin-top:4px; }
.uCoRole{ display:flex; align-items:center; }


/* =========================
   User Manager polish
========================= */

.uRow{
  width:100%;
  text-align:left;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  padding: 10px 12px;
  cursor: pointer;
}

.uRow:hover{ filter: brightness(1.02); }
.uRow.active{
  border-color: rgba(46,204,113,.35);
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

.uRowInner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.uMain{ min-width:0; }
.uName{ font-weight: 950; }
.uMeta{ color: var(--muted); font-weight: 800; font-size: 12px; margin-top: 2px; }
.uUid { color: var(--muted); font-weight: 800; font-size: 12px; margin-top: 2px; }

.uRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.uChevron{
  font-size: 18px;
  opacity: .65;
}

/* Companies list on right */
.uCoList{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.uCoRow{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding: 12px 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
}

.uCoMain{ min-width:0; }
.uCoName{ font-weight: 950; }
.uCoMeta{ color: var(--muted); font-weight: 800; font-size: 12px; margin-top: 2px; }


/* =========================
   User Manager (match Companies)
========================= */

.uTopGrid{
  display:grid;
  gap:14px;
}
@media (min-width: 980px){
  .uTopGrid{
    grid-template-columns: 1fr 1fr;
    align-items:start;
  }
}

.uAddBox{
  border:1px solid var(--stroke);
  border-radius:16px;
  background: rgba(255,255,255,.02);
  padding:12px;
}

.uAddTitle{
  font-weight:950;
  margin-bottom:10px;
}

.uAddGrid{
  display:grid;
  gap:12px;
}
@media (min-width: 680px){
  .uAddGrid{
    grid-template-columns: 1fr 1fr;
  }
  .uAddGridWide{ grid-column: 1 / -1; }
  .uAddActions{ grid-column: 1 / -1; }
}

.uAddActions{
  display:flex;
  gap:10px;
  justify-content:flex-start;
  flex-wrap:wrap;
  align-items:center;
}

.uList{
  display:grid;
  gap:10px;
}

.uCard{
  border:1px solid var(--stroke);
  border-radius:16px;
  background: rgba(255,255,255,.02);
  overflow:hidden;
}

.uHdr{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  cursor:pointer;
  user-select:none;
}

.uHdr:hover{
  background: rgba(255,255,255,.03);
}

.uHdrMain{
  min-width:0;
}

.uHdrName{
  font-weight:950;
  font-size:18px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.uHdrEmail{
  font-weight:800;
  color: var(--muted);
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:2px;
}

.uHdrRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.uCaret{
  font-size:18px;
  opacity:.8;
}

.uExpand{
  border-top:1px solid var(--stroke);
  padding:14px;
  background: rgba(255,255,255,.01);
}

.uExpandTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.uSectionTitle{
  font-weight:950;
  font-size:14px;
}

.uPanel{
  border:1px solid var(--stroke);
  border-radius:14px;
  background: rgba(255,255,255,.02);
  padding:12px;
}

.uExpandGrid{
  display:grid;
  gap:12px;
}
@media (min-width: 980px){
  .uExpandGrid{
    grid-template-columns: 1fr 1fr;
    align-items:start;
  }
}

.uEditorHead{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  margin-bottom:10px;
}

.uSectionHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:4px;
}

.uCoList{ display:grid; gap:10px; }

.uCoRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius:14px;
  background: rgba(255,255,255,.02);
}

.uCoMain{
  min-width:0;
}

.uCoName{
  font-weight:950;
}

.uCoMeta{
  font-size:12px;
  color: var(--muted);
  font-weight:800;
  margin-top:2px;
}

.uCoRight{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink:0;
}

.uAddMemRow{
  display:grid;
  gap:12px;
  margin-top:10px;
}
@media (min-width: 820px){
  .uAddMemRow{
    grid-template-columns: 1fr 220px auto;
    align-items:end;
  }
}

.uAddMemBtnWrap{
  display:flex;
  align-items:end;
}

/* =========================
   Users (match Company Manager style)
========================= */

.uList{
  display:grid;
  gap:12px;
}

.uCard{
  border:1px solid var(--stroke);
  border-radius: 16px;
  background: var(--surface2);
  overflow:hidden;
  cursor:pointer;
}

.uCardTop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px;
  align-items:center;
}

.uCardMain{
  min-width:0;
}

.uCardName{
  font-size:22px;
  font-weight:950;
  line-height:1.05;
}

.uCardEmail{
  margin-top:6px;
  font-weight:800;
  opacity:.85;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.uCardRight{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.uCaret{
  font-weight:950;
  opacity:.8;
}

.uCardBody{
  border-top:1px solid var(--stroke);
  padding:14px;
  background: rgba(255,255,255,.02);
  cursor:default;
}

.uBodyGrid{
  display:grid;
  gap:16px;
}

@media (min-width: 980px){
  .uBodyGrid{
    grid-template-columns: 1.05fr 0.95fr;
    align-items:start;
  }
}

.uMemList{
  display:grid;
  gap:10px;
  margin-top:10px;
}

.uMemRow{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}

.uMemMain{
  min-width:0;
}

.uMemName{
  font-weight:950;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.uMemMeta{
  margin-top:4px;
  font-size:12px;
  font-weight:800;
  color: var(--muted);
}

.uMemRight{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.uMemBtn{
  padding:6px 10px;
  border-radius: 999px;
}

.uMemAdd{
  border:1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding:12px;
  background: rgba(255,255,255,.02);
}

.uMemAddTitle{
  font-weight:950;
  margin-bottom:10px;
}

.uNewPanel{
  margin-top:12px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  padding:12px;
  background: rgba(255,255,255,.02);
}

.uNewTitle{
  font-weight:950;
  margin-bottom:10px;
}

.uNewGrid{
  display:grid;
  gap:12px;
}

@media (min-width: 820px){
  .uNewGrid{
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* =========================
   Editable vs Locked fields
========================= */

/* Editable inputs stand out */
.editableField{
  background: rgba(46, 204, 113, .10) !important;
  border: 1px solid rgba(46, 204, 113, .55) !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, .10);
}

/* Locked/disabled inputs look locked */
.lockedField,
input:disabled,
select:disabled{
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(231,238,252,.65) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 1 !important; /* keep readable */
}

/* Optional: add a subtle lock icon via a right-side background */
.lockedField{
  background-image: radial-gradient(circle at 92% 50%, rgba(255,255,255,.12) 0 2px, transparent 3px);
  background-repeat: no-repeat;
}

/* Value pills: allow editable pills to show intent */
.valuePill.editable{
  border-color: rgba(46, 204, 113, .55);
  background: rgba(46, 204, 113, .10);
}

/* Small “Locked” hint text */
.lockHint{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 6px;
}

/* =========================
   Compatibility + clarity fixes
   (append at bottom)
========================= */

/* 1) Button size alias: JS uses btnSm, CSS currently uses .btn.sm */
.btnSm,
.btn.sm{
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 12px;
}

/* 2) Make role dropdowns consistent */
.memberRoleSel{
  min-width: 180px;
}

/* 3) Editable fields: use a clear green “intent” ring */
input.editableField,
select.editableField{
  background: rgba(46, 204, 113, .12);
  border: 1px solid rgba(46, 204, 113, .60);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, .12);
}

/* 4) Locked fields: clear lock treatment that still reads well */
input.lockedField,
select.lockedField,
input:disabled,
select:disabled{
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(231,238,252,.68);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1; /* keep readable */
}

/* Optional lock indicator (subtle) */
input.lockedField,
select.lockedField{
  background-image:
    radial-gradient(circle at 96% 50%, rgba(255,255,255,.16) 0 2px, transparent 3px);
  background-repeat: no-repeat;
}

/* 5) Member rows: make the action cluster align nicely */
.memberRow > div:last-child{
  align-items: center;
}
