/* ============================================================
   Metropolitan Studio — Client Portal design system
   Extracted from the approved prototype (Design replication)
   ============================================================ */

:root {
  --bg: #F8F5EF;
  --card: #FCFAF5;
  --card-border: #EAE2D3;
  --border-soft: #E4DBCB;
  --border-input: #E6DDCD;
  --divider: #EFE7D8;
  --ink: #211E1A;
  --ink-soft: #5C574E;
  --muted: #8B857A;
  --faint: #B4AEA2;
  --accent: #C1622E;
  --accent-warm: #C97B45;
  --accent-soft: #F6E7D6;
  --accent-pill: #F4E4D6;
  --chip-bg: #EFE7D8;
  --header-top: #211D18;
  --header-bot: #191510;
  --cream: #F6F0E6;
  --cream-deep: #F4EEE3;
  --success: #556B4D;
  --success-bg: #E7ECDD;
  --danger: #9A3B2E;
  --danger-bg: #F3DED8;
  --font-display: 'Cormorant Garamond', serif;
  --font-ui: 'Hanken Grotesk', system-ui, sans-serif;
  --font-script: 'Dancing Script', cursive;
  --shadow-card: 0 1px 2px rgba(30,25,20,.04), 0 16px 34px -24px rgba(30,25,20,.16);
  --shadow-card-lg: 0 1px 2px rgba(30,25,20,.04), 0 20px 40px -28px rgba(30,25,20,.2);
  --shadow-panel: 0 18px 40px -30px rgba(30,25,20,.2);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
input, textarea, button, select { font-family: inherit; }
::placeholder { color: var(--faint); }
button { cursor: pointer; }
a { color: inherit; }
::-webkit-scrollbar { height: 8px; width: 8px; }
::-webkit-scrollbar-thumb { background: #D8CEBC; border-radius: 8px; }

@keyframes msfade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes msspin { to { transform: rotate(360deg); } }
.btn__spinner { animation: msspin .7s linear infinite; }
@keyframes msshim { 0%,100% { opacity: .5; } 50% { opacity: .85; } }
@keyframes mstoast { from { opacity: 0; transform: translate(-50%,12px); } to { opacity: 1; transform: translate(-50%,0); } }

/* ---------- typography helpers ---------- */
.eyebrow {
  font-size: 12px; letter-spacing: .17em; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
}
.eyebrow--muted { color: var(--muted); letter-spacing: .13em; font-size: 11.5px; }
.display { font-family: var(--font-display); font-weight: 500; line-height: 1; margin: 0; }
h1.display { font-size: clamp(40px, 6vw, 66px); margin: 6px 0 8px; }
h1.display--page { font-size: clamp(40px, 5.4vw, 60px); margin: 6px 0 10px; }
h2.display { font-size: clamp(28px, 3.4vw, 38px); margin: 4px 0 0; }
.lede { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; }
.script { font-family: var(--font-script); color: #CE844E; font-weight: 600; }

/* ---------- layout ---------- */
.page {
  max-width: 1680px; margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) clamp(18px, 4vw, 44px) 90px;
  animation: msfade .4s ease;
}
.page--narrow { max-width: 1300px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ---------- header / chrome ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, var(--header-top), var(--header-bot));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header__inner {
  max-width: 1680px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(16px, 3vw, 34px); height: 72px;
}
.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; text-decoration: none; }
.brand__m { font-family: var(--font-display); font-weight: 600; font-size: 30px; color: var(--accent-warm); line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 500; font-size: 20px; color: #F2EBDF; white-space: nowrap; }
.site-header__rule { width: 1px; height: 26px; background: rgba(255,255,255,.13); margin-left: 4px; }
.main-nav {
  display: flex; gap: 22px; margin-left: 6px; min-width: 0;
  overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  background: none; border: none; padding: 6px 0; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(243,236,224,.72); white-space: nowrap; flex: 0 0 auto;
}
.main-nav a.active { color: #D9884C; }
.site-header__spacer { flex: 1; }
.site-header__actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.floating-back-btn {
  position: fixed; left: 20px; top: 84px; z-index: 39;
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--ink, #23201B); border: 1px solid rgba(255,255,255,.12); color: #EFE8DC; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); transition: background .15s ease, transform .15s ease;
}
.floating-back-btn svg { width: 15px; height: 15px; }
.floating-back-btn:hover { background: #35302A; transform: translateY(-1px); }
.floating-back-btn:active { transform: translateY(0); }
@media (max-width: 640px) { .floating-back-btn { left: 14px; top: 80px; } }
.bell-btn { position: relative; background: none; border: none; color: #EDE6DA; display: flex; padding: 4px; }
.bell-btn__dot {
  position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-warm); border: 1.5px solid var(--header-bot);
}
.role-chip {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10);
  color: #EFE8DC; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.role-chip svg { color: var(--accent-warm); display: block; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent-warm); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; letter-spacing: .03em; flex: 0 0 auto;
}
.signout-btn { background: none; border: none; color: #C9C1B3; display: flex; padding: 4px; }
.menu-btn {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.10);
  border-radius: 9px; color: #EFE8DC; display: none; padding: 8px;
}
.mobile-menu { display: none; background: #181410; border-top: 1px solid rgba(255,255,255,.06); padding: 8px clamp(16px,3vw,34px) 20px; }
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; width: 100%; text-align: left; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.06); color: rgba(243,236,224,.72);
  padding: 14px 2px; font-size: 13px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
}
.mobile-menu a.active { color: #D9884C; }
@media (max-width: 1079px) {
  .main-nav, .site-header__rule, .role-chip { display: none; }
  .menu-btn { display: flex; }
}
@media (max-width: 480px) {
  .site-header__inner { gap: 10px; }
  .site-header__actions { gap: 9px; }
  .brand__name { font-size: 17px; }
  .signout-btn { display: none; }
}

/* nav "Admin" dropdown (Admin/Invoices/Accounts/Reports grouped) */
.nav-dropdown { position: relative; flex: 0 0 auto; }
.nav-dropdown__trigger {
  background: none; border: none; padding: 6px 0; cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: rgba(243,236,224,.72); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px;
}
.nav-dropdown__trigger.active { color: #D9884C; }
.nav-dropdown__trigger svg { transition: transform .15s ease; }
.nav-dropdown.open .nav-dropdown__trigger svg { transform: rotate(180deg); }
.nav-dropdown__panel {
  display: none; position: absolute; left: 0; top: calc(100% + 12px); min-width: 190px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); overflow: hidden; z-index: 60;
}
.nav-dropdown.open .nav-dropdown__panel { display: block; }
.nav-dropdown__panel a {
  display: block; padding: 12px 16px; text-decoration: none; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: none;
  border-bottom: 1px solid var(--divider);
}
.nav-dropdown__panel a:last-child { border-bottom: none; }
.nav-dropdown__panel a:hover { background: var(--cream-deep); }
.nav-dropdown__panel a.active { color: var(--accent); background: var(--accent-soft); }

/* notifications dropdown */
.notif-wrap { position: relative; }
.notif-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 12px); width: min(360px, 86vw);
  background: var(--card); border: 1px solid var(--card-border); border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); overflow: hidden; z-index: 60; color: var(--ink);
}
.notif-panel.open { display: block; }
.notif-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--divider); }
.notif-panel__head span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.notif-panel__head button { background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.notif-item { display: block; text-decoration: none; padding: 13px 18px; border-bottom: 1px solid var(--divider); font-size: 13.5px; }
.notif-item--unread { background: #FBF4E9; font-weight: 600; }
.notif-item time { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.notif-empty { padding: 22px 18px; color: var(--muted); font-size: 13.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 11px 17px; font-size: 13px; font-weight: 600;
  border: none; text-decoration: none;
}
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--dark-lg { background: var(--ink); color: var(--cream); border-radius: 12px; padding: 14px 20px; font-size: 14px; gap: 9px; }
.btn--outline { background: #fff; border: 1px solid var(--border-soft); color: var(--ink); }
.btn--outline-sm { background: #fff; border: 1px solid var(--border-soft); color: var(--ink); border-radius: 9px; padding: 9px 13px; font-size: 12.5px; gap: 6px; }
.btn--accent { background: var(--accent); color: #fff; padding: 11px 19px; font-size: 13.5px; gap: 7px; }
.btn--gradient {
  background: linear-gradient(135deg, #D08A57, #C0662F); color: #fff;
  border-radius: 12px; padding: 14px 22px; font-size: 14px; gap: 9px;
  box-shadow: 0 14px 28px -14px rgba(192,102,47,.6);
}
.btn--ghost { background: none; border: none; color: var(--accent); font-size: 13.5px; font-weight: 600; padding: 0; }
.btn--back { background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 0; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--busy { position: relative; color: transparent !important; pointer-events: none; }
.btn--busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 15px;
  margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: msspin .7s linear infinite;
}
.btn--outline.btn--busy::after, .btn--outline-sm.btn--busy::after { border-color: rgba(38,34,29,.25); border-top-color: var(--ink); }

/* ---------- top-of-page request progress bar (shown while a background fetch is in flight) ---------- */
.ms-progressbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 2000;
  background: transparent; pointer-events: none;
}
.ms-progressbar__fill {
  height: 100%; width: 0%; background: var(--accent);
  box-shadow: 0 0 8px rgba(192,102,47,.6);
  transition: width .35s ease;
}
.ms-progressbar.active .ms-progressbar__fill { width: 78%; transition: width 6s cubic-bezier(.1,.6,.2,1); }
.ms-progressbar.done .ms-progressbar__fill { width: 100%; transition: width .2s ease; }
.ms-progressbar.hide { opacity: 0; transition: opacity .3s ease; }

/* ---------- cards & badges ---------- */
.card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; box-shadow: var(--shadow-card);
}
.panel {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 18px;
  padding: clamp(22px, 2.6vw, 32px); box-shadow: var(--shadow-panel);
}
.profile-banner {
  display: flex; align-items: center; gap: 26px; padding: clamp(28px, 4vw, 44px);
  background: linear-gradient(180deg, var(--header-top), var(--header-bot));
  border-radius: 18px 18px 0 0; margin-top: 30px;
}
.profile-banner__avatar {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%; background: var(--accent-warm);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; letter-spacing: .02em;
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pill { display: inline-flex; align-items: center; background: var(--accent-pill); color: #B4632E; font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; }
.pill--neutral { background: var(--chip-bg); color: var(--muted); font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.pill--count { background: #EDE7DA; color: var(--ink-soft); font-size: 13px; padding: 4px 12px; }
.pill--flag { background: var(--accent-soft); color: #B4632E; font-size: 11px; padding: 3px 9px; }

/* ---------- forms ---------- */
.field-label {
  display: block; font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  font-weight: 600; color: var(--muted); margin-bottom: 8px;
}
.input, .select, .textarea {
  width: 100%; background: #fff; border: 1px solid var(--border-input); border-radius: 12px;
  padding: 15px 17px; font-size: 15px; color: var(--ink); outline: none;
}
.select { appearance: none; -webkit-appearance: none; padding: 12px 38px 12px 14px; border-radius: 10px; font-size: 14px; color: var(--ink-soft);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%235C574E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
}
.textarea { min-height: 88px; padding: 14px; font-size: 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-warm); }

/* ---------- sign-in screen ---------- */
.signin { min-height: 100vh; background: radial-gradient(1200px 700px at 12% 6%, #2C2620 0%, #171310 62%); }
.signin__grid { max-width: 1460px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); align-items: stretch; }
.signin__hero {
  padding: clamp(30px, 5vw, 74px); display: flex; flex-direction: column;
  justify-content: space-between; gap: 40px; color: #EBE3D6; min-height: 100vh;
}
.signin__hero .brand__m { font-size: 42px; }
.signin__hero .brand__name { font-size: 25px; color: #F3ECE0; }
.signin__script { font-size: 31px; }
.signin__title {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(46px, 6.4vw, 82px);
  line-height: 1.02; margin: 12px 0 0; color: #F6EFE3; letter-spacing: -.01em;
}
.signin__body { color: rgba(235,227,214,.6); font-size: 16px; line-height: 1.65; max-width: 430px; margin: 24px 0 0; }
.signin__foot { color: rgba(235,227,214,.3); font-size: 12px; letter-spacing: .17em; text-transform: uppercase; font-weight: 600; }
.signin__cardwrap { display: flex; align-items: center; justify-content: center; padding: clamp(20px, 3vw, 52px); }
.signin__card {
  width: 100%; max-width: 540px; background: var(--cream); border-radius: 24px;
  padding: clamp(28px, 3.2vw, 46px); box-shadow: 0 40px 90px -34px rgba(0,0,0,.55); animation: msfade .5s ease;
}
.signin__card .eyebrow { letter-spacing: .18em; }
.signin__h2 { font-family: var(--font-display); font-weight: 500; font-size: 46px; margin: 8px 0 6px; line-height: 1; }
.signin__sub { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 26px; max-width: 400px; }
.signin__submit { width: 100%; border-radius: 12px; padding: 16px; font-size: 14.5px; }
.signin__note { text-align: center; color: #A9A294; font-size: 12.5px; margin-top: 26px; }
.signin__error {
  background: var(--danger-bg); color: var(--danger); border-radius: 10px;
  padding: 12px 15px; font-size: 13.5px; font-weight: 600; margin-bottom: 18px;
}
@media (max-width: 800px) { .signin__hero { min-height: 0; gap: 26px; } }

/* ---------- stat cards (dashboard) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 34px; }
.stat-grid--compact { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 18px; }
.stat-grid--compact .stat-card { padding: 14px 16px 16px; border-radius: 12px; }

/* ---------- reports: tab-switched sections ---------- */
.report-tabs { display: flex; gap: 8px; margin: 22px 0 26px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.report-tab {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer;
  padding: 12px 4px; font-size: 14px; font-weight: 600; white-space: nowrap; margin: 0 10px -1px 0;
}
.report-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.report-panel__head { margin-bottom: 18px; }
.report-panel__head h2 { font-size: 22px; margin: 0 0 4px; }
.report-panel__head p { color: var(--muted); font-size: 13.5px; margin: 0; }
.report-subgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 20px; }
.report-subcard { border: 1px solid var(--card-border); border-radius: 14px; padding: 18px 20px; }
.report-subcard h3 { margin: 0 0 10px; font-size: 14.5px; }
.report-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--divider); font-size: 13.5px; }
.report-row:first-of-type { border-top: none; }
.report-row__num { font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-card { text-align: left; background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 22px 24px; box-shadow: var(--shadow-card); text-decoration: none; display: block; }
.stat-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card__icon { display: flex; background: var(--accent-soft); color: var(--accent); padding: 7px; border-radius: 9px; }
.stat-card__num { font-family: var(--font-display); font-weight: 500; font-size: 52px; line-height: 1; margin: 16px 0 8px; }
.stat-card__sub { color: var(--muted); font-size: 14px; }

/* ---------- project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 22px; }
.project-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card-lg); display: flex; flex-direction: column; }
.project-card__cover { height: 150px; padding: 16px; display: flex; justify-content: space-between; align-items: flex-start; }
.project-card__tag { background: var(--cream-deep); color: #2A251F; font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 999px; }
.project-card__pending { background: rgba(246,238,227,.94); color: #B4632E; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 5px; }
.project-card__body { padding: 22px; display: flex; flex-direction: column; gap: 15px; flex: 1; }
.project-card__name { font-family: var(--font-display); font-weight: 500; font-size: 27px; margin: 0 0 5px; line-height: 1.05; }
.project-card__loc { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.progress-head { display: flex; justify-content: space-between; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.progress-track { height: 7px; background: #E9E1D3; border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #D08A57, #BF6631); border-radius: 99px; }
.project-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hr { height: 1px; background: var(--divider); border: none; margin: 0; }

/* ---------- timeline (updates) ---------- */
.timeline-item { display: flex; gap: 16px; padding-bottom: 28px; }
.timeline-item__rail { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.timeline-item__icon {
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid currentColor;
  color: var(--accent);
}
.timeline-item__icon--shipped, .timeline-item__icon--info { color: #9A9384; }
.timeline-item__line { width: 1px; flex: 1; background: #E7DECF; margin-top: 8px; }
.timeline-item__title { font-weight: 700; font-size: 16px; }
.timeline-item__meta { color: var(--muted); font-size: 13px; margin: 6px 0 9px; }
.timeline-item__meta strong { color: #B4632E; font-weight: 600; }
.timeline-item__body { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; margin: 0 0 13px; max-width: 640px; }

/* ---------- attention list ---------- */
.attn-item {
  width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; border: 1px solid var(--card-border); border-radius: 13px; padding: 16px 18px; text-decoration: none;
}
.attn-item__proj { font-weight: 700; font-size: 15px; }
.attn-item__note { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.attn-item__count {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft);
  color: #B4632E; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* ---------- stage tracker ---------- */
.stage-tracker { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 6px; }
.stage-step { flex: 1; min-width: 104px; display: flex; flex-direction: column; align-items: center; position: relative; }
.stage-step__line { position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: #E1D8C8; }
.stage-step__line--done { background: var(--accent); }
.stage-step__circle {
  position: relative; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
  background: #fff; border: 1px solid #E1D8C8; color: var(--faint);
}
.stage-step--done .stage-step__circle, .stage-step--active .stage-step__circle { background: var(--accent); border-color: var(--accent); color: #fff; }
.stage-step__label { margin-top: 12px; text-align: center; font-size: 12.5px; font-weight: 600; color: #9A9384; line-height: 1.25; padding: 0 4px; }
.stage-step--done .stage-step__label { color: #4A463F; }
.stage-step--active .stage-step__label { color: var(--accent); }
.stage-step__state { margin-top: 4px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; }

/* ---------- info cards (project) ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 30px; }
.info-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 15px; padding: 22px; box-shadow: 0 14px 30px -24px rgba(30,25,20,.2); }
.info-card__label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.info-card__value { font-family: var(--font-display); font-weight: 500; font-size: 24px; margin-top: 12px; }
.info-card__value--action { font-family: var(--font-ui); color: #B4632E; font-weight: 600; font-size: 16px; line-height: 1.4; }

/* ---------- studio controls bar ---------- */
.studio-bar {
  background: #F8EBDD; border: 1px solid #EEDFCC; border-radius: 16px; padding: 20px 22px;
  margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.studio-bar__label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #B4632E; }
.studio-bar .btn--outline { border-radius: 10px; padding: 11px 16px; font-size: 13.5px; }

/* ---------- action-needed nudge (e.g. Procurement stage with no vendor yet) ---------- */
.nudge-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #FCF1E4; border: 1px solid #F0D4B0; border-radius: 16px;
  padding: 18px 22px; margin-top: 18px;
}
.nudge-card__icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  background: #F3C98A; color: #7A4A0E; display: flex; align-items: center; justify-content: center;
}
.nudge-card__body { flex: 1; min-width: 220px; }
.nudge-card__title { font-weight: 600; font-size: 14.5px; color: var(--ink-soft); }
.nudge-card__sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* ---------- file rows ---------- */
.file-row { display: flex; align-items: center; gap: 14px; padding: 16px 2px; border-top: 1px solid var(--divider); flex-wrap: wrap; }
.file-row--flush { border-top: none; border-bottom: 1px solid var(--card-border); padding: 16px 4px; }
.file-row__icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: var(--cream-deep);
  color: #B4632E; display: flex; align-items: center; justify-content: center;
}
.file-row__main { flex: 1; min-width: 200px; }
.file-row__name-line { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.file-row__name { font-weight: 600; font-size: 15px; }
.file-row__meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.file-row__meta strong { color: #B4632E; font-weight: 600; }
.file-row__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-row__comments { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }

/* ---------- add-file: selected-file preview list ---------- */
.file-pick-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.file-pick-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--card-border); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.file-pick-item__thumb {
  flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; background: var(--cream-deep);
  color: #B4632E; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 10px; font-weight: 700;
}
.file-pick-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-pick-item__info { flex: 1; min-width: 0; }
.file-pick-item__name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-pick-item__size { font-size: 12px; color: var(--muted); margin-top: 1px; }
.file-pick-item__remove {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; border: none; background: transparent;
  color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.file-pick-item__remove:hover { background: var(--accent-soft); color: #B4632E; }

/* ---------- filter bar ---------- */
.filter-bar {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px; margin-top: 26px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; align-items: end;
  box-shadow: 0 14px 30px -26px rgba(30,25,20,.2);
}
.filter-bar__search { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border-input); border-radius: 10px; padding: 2px 14px; }
.filter-bar__search input { flex: 1; border: none; outline: none; padding: 10px 0; font-size: 14px; background: none; color: var(--ink); }

/* stage groups on files page */
.stage-group { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: clamp(18px, 2.4vw, 28px); box-shadow: 0 14px 34px -28px rgba(30,25,20,.2); }
.stage-group__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; cursor: pointer; }
.stage-group__title { display: flex; align-items: center; gap: 12px; }
.stage-group__title h2 { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 0; }
.stage-group__chev { transition: transform .2s ease; color: var(--faint); }
.stage-group.collapsed .stage-group__chev { transform: rotate(-90deg); }
.stage-group.collapsed .stage-group__body { display: none; }

/* ---------- approvals ---------- */
.approval-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: clamp(20px, 2.6vw, 28px); box-shadow: 0 14px 34px -28px rgba(30,25,20,.2); }
.approval-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.approval-card__title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.approval-card__title { font-family: var(--font-display); font-weight: 500; font-size: 26px; margin: 0; }
.approval-card__meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.approval-card__meta strong { color: #B4632E; font-weight: 600; }
.approval-card__actions { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.readonly-note {
  background: #F3EDE1; border: 1px dashed #D8CEBC; border-radius: 12px;
  padding: 16px 20px; color: var(--muted); font-size: 14.5px;
}
.readonly-note strong { color: var(--ink-soft); }

/* ---------- procurement ---------- */
.proc-tabs { display: flex; gap: 8px; margin-top: 30px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.proc-tab {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted);
  padding: 12px 14px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  white-space: nowrap; margin-bottom: -1px;
}
.proc-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Add File modal: upload-vs-link tabs (visually similar to proc-tab but standalone) */
.file-tab {
  background: none; border: 1px solid var(--border-soft); border-radius: 9px; color: var(--muted);
  padding: 10px 14px; font-size: 13px; font-weight: 600;
}
.file-tab.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.proc-tab__count { background: #EDE7DA; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.proc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; margin-top: 26px; }
.proc-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; box-shadow: 0 16px 36px -28px rgba(30,25,20,.22); display: flex; flex-direction: column; }
.proc-card__cat { display: flex; align-items: center; gap: 7px; color: #B4632E; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; font-weight: 600; }
.proc-card__name { font-family: var(--font-display); font-weight: 500; font-size: 25px; margin: 14px 0 20px; line-height: 1.1; }
.proc-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kv-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.kv-value { font-size: 14px; font-weight: 500; margin-top: 5px; }

/* ---------- procurement: compact step timeline ---------- */
.proc-timeline { margin-top: 16px; }
.proc-timeline__bar { display: flex; gap: 4px; }
.proc-timeline__seg { flex: 1; height: 5px; border-radius: 3px; background: var(--border-soft, #ECE6D9); }
.proc-timeline__seg--done { background: var(--accent); }
.proc-timeline__caption { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.proc-timeline__details { margin-top: 10px; }
.proc-timeline__details summary { font-size: 12.5px; font-weight: 600; color: var(--accent); cursor: pointer; list-style: none; }
.proc-timeline__details summary::-webkit-details-marker { display: none; }
.proc-timeline__details summary::before { content: '›'; display: inline-block; margin-right: 5px; transition: transform .15s ease; }
.proc-timeline__details[open] summary::before { transform: rotate(90deg); }
.proc-timeline__list { display: flex; align-items: flex-start; gap: 0; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.proc-step { flex: 1; min-width: 78px; display: flex; flex-direction: column; align-items: center; position: relative; }
.proc-step__line { position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: #E1D8C8; }
.proc-step__line--done { background: var(--accent); }
.proc-step__circle {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; border: 1.5px solid #E1D8C8; color: var(--muted); background: #fff; position: relative; z-index: 1;
}
.proc-step--done .proc-step__circle, .proc-step--active .proc-step__circle { background: var(--accent); border-color: var(--accent); color: #fff; }
.proc-step__label { margin-top: 8px; text-align: center; font-size: 11px; font-weight: 600; color: #9A9384; line-height: 1.25; padding: 0 3px; }
.proc-step--done .proc-step__label { color: #4A463F; }
.proc-step--active .proc-step__label { color: var(--accent); }

/* ---------- procurement: products disclosure ---------- */
.proc-products summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.proc-products summary::-webkit-details-marker { display: none; }
.proc-products summary .proc-products__chev { transition: transform .15s ease; color: var(--accent); }
.proc-products[open] summary .proc-products__chev { transform: rotate(90deg); }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 34px; }
.admin-action { text-align: left; background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 24px; box-shadow: 0 14px 32px -26px rgba(30,25,20,.2); }
.admin-action__icon { display: flex; width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); align-items: center; justify-content: center; }
.admin-action__title { font-weight: 700; font-size: 16.5px; margin: 16px 0 5px; }
.admin-action__sub { color: var(--muted); font-size: 14px; }
.admin-table-wrap { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; box-shadow: 0 16px 36px -30px rgba(30,25,20,.2); }
.admin-table-scroll { overflow-x: auto; }
.admin-table { display: grid; grid-template-columns: 2.4fr 1.4fr 1.4fr 1.2fr .8fr .9fr; gap: 16px; padding: 17px 24px; border-bottom: 1px solid var(--divider); align-items: center; font-size: 14px; min-width: 860px; transition: background .12s ease; }
.admin-table:not(.admin-table--head):hover { background: var(--border-soft); }
.admin-table--head { padding: 16px 24px; border-bottom: 1px solid var(--card-border); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.person-chip { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.person-chip__avatar { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: #26221D; color: #F0E9DC; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 10.5px; }
.person-chip__body { min-width: 0; }
.person-chip__name { font-weight: 500; font-size: 13.5px; }
.person-chip__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 2px; }
.person-chip__email { color: var(--muted); font-size: 12px; }
.person-chip__actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.icon-btn { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px; border: 1px solid var(--border-soft); background: #fff; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.icon-btn:hover { background: var(--border-soft); color: var(--ink); }
.icon-btn--danger:hover { background: #FBE9E4; color: #B4462E; border-color: #EFC9BC; }
.org-row__head { display: flex; align-items: center; gap: 6px; }
.org-row__name { font-weight: 500; }
.org-row__actions { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.pill--role { font-size: 10.5px; padding: 2px 9px; }

/* ---------- modal (preview + admin forms) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(20,16,12,.62); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: clamp(10px, 3vw, 40px); animation: msfade .25s ease;
}
.modal-overlay.open { display: flex; }
.preview-modal {
  width: 100%; max-width: 1180px; max-height: 92vh; overflow: auto; background: var(--header-bot);
  border-radius: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.7);
}
.preview-modal__doc { padding: clamp(20px, 2.6vw, 32px); display: flex; flex-direction: column; min-height: 420px; }
.preview-modal__doc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.preview-modal__doc-head span { color: rgba(235,227,214,.6); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.preview-modal__doc-head a { color: rgba(235,227,214,.7); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; text-decoration: none; }
.preview-modal__doc-head .doc-head__right { display: flex; align-items: center; gap: 16px; }
.preview-modal__maximize { background: none; border: none; color: rgba(235,227,214,.7); display: flex; padding: 2px; cursor: pointer; }
.preview-modal__maximize:hover { color: rgba(235,227,214,1); }
.preview-modal.is-maximized { max-width: 98vw; width: 98vw; max-height: 98vh; height: 98vh; grid-template-columns: 1fr; }
.preview-modal.is-maximized .preview-modal__side { display: none; }
.preview-modal.is-maximized .preview-modal__doc { min-height: 0; height: 100%; }
.preview-modal.is-maximized .preview-modal__icon--shrink { display: block; }
.preview-modal.is-maximized .preview-modal__icon--expand { display: none; }
.preview-modal__icon--shrink { display: none; }
.preview-modal__sheet { flex: 1; background: var(--cream); border-radius: 12px; margin: 22px 0; padding: 34px; display: flex; flex-direction: column; gap: 16px; }
.preview-modal__doc [data-pv="preview-img"] { flex: 1; margin: 22px 0; border-radius: 12px; background: var(--cream); }
.preview-modal__doc [data-pv="preview-pdf"] { flex: 1; margin: 22px 0; }
.preview-modal__sheet .shim { border-radius: 6px; animation: msshim 1.6s ease-in-out infinite; background: #E7E0D2; height: 12px; }
.preview-modal__sheet .shim--title { height: 22px; width: 44%; background: #EAD6C4; }
.preview-modal__script { text-align: center; font-size: 26px; }
.preview-modal__side { background: #FBF6EC; padding: clamp(22px, 2.6vw, 34px); }
.preview-modal__title { font-family: var(--font-display); font-weight: 500; font-size: 27px; margin: 0; line-height: 1.1; }
.preview-modal__proj { color: var(--muted); font-size: 14px; margin-top: 6px; }
.preview-modal__close { background: none; border: none; color: var(--muted); display: flex; padding: 4px; }
.preview-modal__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin: 24px 0; }
.preview-modal__meta .kv-value { font-weight: 600; font-size: 14.5px; }
.preview-modal__rule { height: 1px; background: #EDE5D6; margin: 24px 0; }
.preview-modal__section { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.comment { display: flex; gap: 11px; margin-top: 14px; }
.comment__avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #26221D; color: #F0E9DC; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.comment__name { font-weight: 700; font-size: 13.5px; }
.comment__time { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 7px; }
.comment__body { color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; margin: 3px 0 0; }

/* generic form modal (admin) */
.form-modal { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--cream); border-radius: 20px; padding: clamp(24px, 3vw, 36px); box-shadow: 0 40px 100px -30px rgba(0,0,0,.7); }
/* Forms with a wide data-entry area (e.g. the procurement product line-item
   table) need real room — a 560px modal squeezes Code/Description/Qty/Price
   into unusable slivers. */
.form-modal--wide { max-width: 1200px; }
.form-modal h3 { font-family: var(--font-display); font-weight: 500; font-size: 30px; margin: 6px 0 18px; }
.form-modal .field { margin-bottom: 16px; }
.form-modal .input, .form-modal .select, .form-modal .textarea { background: #fff; }
.form-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 80; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); padding: 14px 22px; border-radius: 12px;
  font-size: 14px; font-weight: 500; box-shadow: 0 20px 44px -18px rgba(0,0,0,.5);
  animation: mstoast .3s ease; display: none; align-items: center; gap: 10px; max-width: 90vw;
}
.toast.show { display: flex; }
.toast svg { color: #CE844E; flex: 0 0 auto; }

/* ---------- misc layout helpers ---------- */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 22px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.meta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 15px; margin-top: 14px; }
.meta-row span { display: flex; align-items: center; gap: 6px; }
.team-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 15px; padding: 20px; display: flex; gap: 15px; align-items: center; box-shadow: 0 14px 30px -26px rgba(30,25,20,.2); text-decoration: none; color: inherit; transition: box-shadow .15s ease, transform .15s ease; }
a.team-card:hover { box-shadow: 0 18px 36px -22px rgba(30,25,20,.28); transform: translateY(-2px); }

/* ---------- org / person summary cards (Admin directory grids) ---------- */
.org-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.org-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-card); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .15s ease, transform .15s ease; }
.org-card:hover { box-shadow: var(--shadow-card-lg); transform: translateY(-2px); }
.org-card__head { display: flex; align-items: center; gap: 12px; }
.org-card__avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: #26221D; color: #F0E9DC; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.org-card__name { font-weight: 700; font-size: 16px; }
.org-card__sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.org-card__stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.detail-head__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- access / allocation toggle rows (admin_access.php) ---------- */
.access-org-block { border: 1px solid var(--card-border); border-radius: 14px; padding: 16px; margin-bottom: 14px; background: var(--bg); }
.access-org-block__head { font-weight: 700; font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.access-org-block__head .org-card__avatar { width: 30px; height: 30px; font-size: 11px; border-radius: 9px; }
.access-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--card-border); border-radius: 12px; background: var(--card); cursor: pointer; margin-bottom: 8px; transition: border-color .12s ease, background .12s ease; }
.access-row:last-child { margin-bottom: 0; }
.access-row:hover { border-color: var(--accent-warm); }
.access-row:has(input:checked) { border-color: var(--accent-warm); background: var(--accent-soft); }
.access-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
.access-row__avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: #26221D; color: #F0E9DC; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11.5px; }
.access-row__body { min-width: 0; }
.access-row__name { font-weight: 600; font-size: 13.5px; }
.access-row__meta { color: var(--muted); font-size: 12px; margin-top: 1px; }
/* ---------- toggle card (checkbox that reveals nested fields, e.g. Add File modal) ---------- */
.toggle-card { border: 1px solid var(--card-border); border-radius: 12px; padding: 13px 15px; background: var(--bg); transition: border-color .12s ease, background .12s ease; }
.toggle-card:has(input:checked) { border-color: var(--accent-warm); background: var(--accent-soft); }
.toggle-card__head { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.toggle-card__head input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
.toggle-card__title { font-weight: 600; font-size: 13.5px; }
.toggle-card__sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.toggle-card__fields { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 12px; }

.team-card__avatar { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: #26221D; color: #F0E9DC; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.team-card__body { min-width: 0; flex: 1 1 auto; }
.team-card__name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.team-card__role { color: var(--muted); font-size: 13.5px; margin: 2px 0 5px; overflow-wrap: anywhere; }
.team-card__email { color: #B4632E; font-size: 13.5px; font-weight: 500; text-decoration: none; display: block; overflow-wrap: anywhere; }
.team-card__actions { flex: 0 0 auto; display: flex; gap: 6px; align-self: flex-start; }
.team-card__iconbtn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--card-border); background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.team-card__iconbtn:hover { background: var(--hover, rgba(0,0,0,.05)); color: var(--ink, #26221D); }
