/* ===========================================================================
   Migration Planner — front-end styles.
   Ported from the "Database Backed" design (Georgia Carolina Orthopedics).
   =========================================================================== */
:root {
  --navy: #1c3557;
  --navy-2: #27466e;
  --navy-border: #2b4a70;
  --navy-input: #16294a;
  --teal: #2a9db0;
  --teal-dark: #22879a;
  --teal-link: #1f8a9c;
  --amber: #e8a33d;
  --page: #f3f5f7;
  --ink: #242628;
  --muted: #6b7683;
  --muted-2: #8a94a0;
  --line: #e2e6ea;
  --line-2: #eef0f2;
  --sidebar-fg: #c3d0e0;
  --sidebar-muted: #7a92b3;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Segoe UI', 'Helvetica Neue', system-ui, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 13px;
}
a { color: var(--teal-link); text-decoration: none; }
a:hover { color: #155e6c; }
input, select, button, textarea { font-family: inherit; }
input:focus, select:focus { outline: 2px solid #2a9db0; outline-offset: -1px; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9d1d9; border-radius: 6px; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes slideup { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flashrow { from { background: #fdf3e0; } to { background: #fff; } }
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }
.spacer { flex: 1 1 0; }
.mono { font-family: Consolas, 'SF Mono', monospace; }

/* ---- Login --------------------------------------------------------------- */
.login {
  position: fixed; inset: 0; display: flex; background: #eef1f4; z-index: 60; overflow: auto;
}
.login__brand {
  flex: 1.1 1 0; min-width: 0; background: var(--navy); display: flex;
  flex-direction: column; justify-content: space-between; padding: 44px 48px; color: #dbe4ef;
}
.login__brandname { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .3px; }
.login__headline { font-size: 30px; font-weight: 600; color: #fff; line-height: 1.25; max-width: 460px; }
.login__sub { font-size: 13.5px; color: #a9bcd4; margin-top: 16px; max-width: 440px; line-height: 1.6; }
.login__foot { font-size: 11px; color: var(--sidebar-muted); }
.login__foot b { color: var(--amber); font-weight: 600; }
.login__panel { flex: 1 1 0; min-width: 340px; display: flex; align-items: center; justify-content: center; padding: 32px; }
.login__card { width: 100%; max-width: 392px; }
.login h1 { font-size: 22px; font-weight: 600; color: var(--navy); margin: 0 0 22px; }
.login__err { background: #fdecec; border: 1px solid #f3c9c9; color: #a5352f; font-size: 12px; border-radius: 6px; padding: 9px 12px; margin-bottom: 14px; }
.field-label { font-size: 11.5px; font-weight: 600; color: #454e58; margin-bottom: 4px; }
.login input[type=text], .login input[type=email], .login input[type=password] {
  width: 100%; padding: 9px 12px; border: 1px solid #cfd5db; border-radius: 6px; font-size: 13px; margin-bottom: 14px;
}
.btn-primary-block { width: 100%; background: var(--teal); color: #fff; border: none; border-radius: 6px; padding: 11px; font-size: 13.5px; font-weight: 600; }
.btn-primary-block:hover { background: var(--teal-dark); }
.or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: #a9b2bc; font-size: 11px; }
.or span.line { flex: 1; height: 1px; background: #dde2e7; }
.btn-sso { width: 100%; background: #fff; color: var(--ink); border: 1px solid #cfd5db; border-radius: 6px; padding: 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 9px; }
.btn-sso:hover { background: #f7f9fa; }
.ms-logo { display: inline-grid; grid-template-columns: 8px 8px; gap: 2px; }
.ms-logo i { width: 8px; height: 8px; display: block; }
.bypass { margin-top: 26px; border: 1px dashed #c8b487; background: #fdf8ec; border-radius: 8px; padding: 13px 14px; }
.bypass__t { font-size: 10.5px; letter-spacing: .8px; font-weight: 700; color: #8a6a1e; text-transform: uppercase; margin-bottom: 9px; }
.bypass__row { display: flex; gap: 7px; flex-wrap: wrap; }
.bypass__btn { flex: 1 1 0; min-width: 88px; background: #fff; border: 1px solid #d9c9a0; border-radius: 6px; padding: 8px 6px; font-size: 12px; font-weight: 600; color: #5f4a17; }
.bypass__btn:hover { background: #faf3e2; }
.bypass__note { font-size: 10.5px; color: #a08a52; margin-top: 9px; line-height: 1.5; }

/* ---- App shell ------------------------------------------------------------ */
.app { display: flex; flex-direction: column; height: 100vh; min-height: 600px; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 16px; height: 58px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.topbar__logo { height: 38px; display: block; }
.topbar__div { width: 1px; height: 28px; background: var(--line); }
.topbar__title { font-size: 14px; font-weight: 600; color: var(--navy); }
.topbar__subtitle { font-size: 11px; color: var(--muted); }
.presence { display: flex; align-items: center; gap: 4px; }
.avatar { border-radius: 50%; color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.presence .avatar { width: 28px; height: 28px; font-size: 11px; border: 2px solid #fff; margin-left: -6px; }
.presence__count { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.live { display: flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 20px; background: #eef7ec; border: 1px solid #d3e8cf; white-space: nowrap; flex: 0 0 auto; }
.live__dot { width: 8px; height: 8px; border-radius: 50%; background: #4a9d4f; animation: pulse 2s infinite; }
.live__txt { font-size: 11.5px; color: #33702f; font-weight: 600; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 8px; }
.me .avatar { width: 30px; height: 30px; font-size: 11px; }
.me__meta { font-size: 11.5px; color: #454e58; line-height: 1.3; }
.me__meta span { color: var(--muted-2); }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11.5px; padding: 5px 9px; white-space: nowrap; }
.btn-ghost:hover { background: var(--page); }

.body { display: flex; flex: 1 1 0; min-height: 0; }
.sidebar { width: 224px; flex: 0 0 224px; background: var(--navy); display: flex; flex-direction: column; overflow-y: auto; }
.sidebar__nav { padding: 14px 10px 8px; flex: 1 1 0; }
.nav-hdr { font-size: 10px; letter-spacing: 1.2px; color: var(--sidebar-muted); font-weight: 600; padding: 14px 12px 5px; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 5px; cursor: pointer; color: var(--sidebar-fg); font-size: 13px; }
.nav-item:hover { background: var(--navy-2); }
.nav-item.active { background: var(--teal); color: #fff; font-weight: 600; }
.nav-item .label { flex: 1 1 0; }
.nav-badge { background: var(--amber); color: #3b2a08; font-size: 10.5px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.nav-count { color: var(--sidebar-muted); font-size: 11px; }
.sidebar__foot { padding: 12px; border-top: 1px solid var(--navy-border); }
.sidebar__msp { font-size: 10.5px; color: var(--sidebar-muted); }
.sidebar__msp b { color: #a9bcd4; font-weight: 600; }

.main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; }
.page-head { padding: 20px 24px 0; }
.page-title { font-size: 19px; font-weight: 600; color: var(--navy); }
.page-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---- Cards / generic ------------------------------------------------------ */
.card { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.btn-primary { background: var(--teal); color: #fff; border: none; border-radius: 5px; padding: 8px 16px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-sm { padding: 7px 14px; }
.btn-outline { background: #fff; color: #454e58; border: 1px solid #cfd5db; border-radius: 5px; padding: 7px 14px; font-size: 12.5px; }
.btn-outline:hover { background: var(--page); }
.empty { background: #fff; border: 1px dashed #cfd5db; border-radius: 8px; padding: 36px; text-align: center; color: var(--muted-2); font-size: 13px; }
.chip { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; border-radius: 4px; padding: 3px 8px; white-space: nowrap; }
.pill { font-size: 10.5px; font-weight: 600; border-radius: 10px; padding: 2px 9px; white-space: nowrap; }

/* ---- Inbox ---------------------------------------------------------------- */
.inbox { padding: 16px 24px 28px; display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.inbox__tools { display: flex; align-items: center; gap: 10px; }
.inbox-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; animation: slideup .25s ease; }
.inbox-card__head { display: flex; align-items: center; gap: 10px; }
.inbox-card__title { font-weight: 600; font-size: 14px; color: var(--ink); }
.inbox-card__by { font-size: 11.5px; color: var(--muted-2); }
.inbox-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; margin-top: 14px; }
.field-k { font-size: 10px; letter-spacing: .8px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; }
.field-v { font-size: 12.5px; color: #3a424b; margin-top: 2px; }
.inbox-card__actions { display: flex; gap: 8px; margin-top: 16px; align-items: center; }
.inbox-card__row { font-size: 11px; color: var(--muted-2); margin-left: auto; }

/* ---- Tables --------------------------------------------------------------- */
.table-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.search { width: 260px; padding: 7px 12px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 12.5px; background: #fff; }
.rowcount { font-size: 11.5px; color: var(--muted-2); }
.io-group { display: flex; gap: 6px; }
.btn-outline-sm { background: #fff; color: #454e58; border: 1px solid #cfd5db; border-radius: 5px; padding: 7px 12px; font-size: 12.5px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-outline-sm:hover { background: var(--page); }
.file-drop { border: 1.5px dashed #cfd5db; border-radius: 7px; padding: 20px; text-align: center; background: #fafbfc; }
.file-drop input[type=file] { display: block; margin: 0 auto; font-size: 12px; }
.file-drop__name { font-size: 12.5px; color: var(--ink); font-weight: 600; margin-top: 8px; }
.import-summary { background: #eef7ec; border: 1px solid #d3e8cf; border-radius: 7px; padding: 12px 14px; font-size: 12.5px; color: #33702f; }
.import-summary.err { background: #fdecec; border-color: #f3c9c9; color: #a5352f; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.table-inner { min-width: 1000px; }
.thead { display: flex; background: #f8f9fa; border-bottom: 1px solid var(--line); }
.th { padding: 9px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; }
.trow { display: flex; align-items: center; border-bottom: 1px solid var(--line-2); cursor: pointer; background: #fff; transition: background .6s; }
.trow:hover { background: #f2f8f9; }
.trow.flash { animation: flashrow 2.5s ease; }
.td { padding: 9px 12px; min-width: 0; }
.td-main { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-sub { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-cell { flex: 0 0 140px; padding: 0 12px; text-align: right; }
.tag { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 3px 7px; white-space: nowrap; }

/* ---- Org chart ------------------------------------------------------------ */
.chart { padding: 16px 24px 28px; max-width: 860px; }
.chart__legend { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.chart__legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.chart__list { display: flex; flex-direction: column; gap: 6px; }
.chart-row { display: flex; align-items: center; }
.chart-tick { width: 18px; height: 1px; background: #c4ccd4; flex: 0 0 18px; }
.chart-node { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 8px 14px 8px 9px; min-width: 280px; }
.chart-node .avatar { width: 30px; height: 30px; font-size: 11px; }
.chart-node__name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.chart-node__sub { font-size: 11px; color: var(--muted-2); }
.npi { margin-left: 6px; background: #e9edf3; color: var(--navy); font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px; }

/* ---- Audit ---------------------------------------------------------------- */
.audit { padding: 16px 24px 28px; max-width: 760px; }
.audit-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.audit-row:last-child { border-bottom: none; }
.audit-row .avatar { width: 28px; height: 28px; font-size: 10.5px; }
.audit-txt { flex: 1 1 0; font-size: 12.5px; color: #3a424b; }
.audit-txt b { font-weight: 600; }
.audit-table { background: #f0f3f5; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.audit-time { font-size: 11px; color: var(--muted-2); white-space: nowrap; }

/* ---- Users ---------------------------------------------------------------- */
.users { padding: 14px 24px 28px; max-width: 960px; }
.users__tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.user-row { display: flex; align-items: center; border-bottom: 1px solid var(--line-2); }
.user-row:last-child { border-bottom: none; }
.user-cell { padding: 10px 14px; }
.role-select { width: 100%; max-width: 170px; padding: 6px 8px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 12px; background: #fff; }
.user-x { background: none; border: none; color: #b83b3b; font-size: 14px; }
.user-x:hover { color: #8f2626; }
.perm { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 16px; padding: 18px; }
.perm__head-row { display: flex; border-bottom: 2px solid var(--line); }
.perm__cap-h { flex: 1.6 1 0; padding: 7px 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.perm__col-h { flex: 1 1 0; padding: 7px 4px; font-size: 11px; font-weight: 700; color: var(--navy); text-align: center; }
.perm__row { display: flex; border-bottom: 1px solid var(--line-2); align-items: center; }
.perm__cap { flex: 1.6 1 0; padding: 9px 4px; font-size: 12.5px; color: #3a424b; }
.perm__mark { flex: 1 1 0; padding: 9px 4px; text-align: center; font-size: 13px; }

/* ---- Migration ------------------------------------------------------------ */
.mig { padding: 14px 24px 30px; max-width: 1040px; }
.mig__top { display: flex; gap: 16px; align-items: stretch; flex-wrap: wrap; }
.mig__sources { flex: 1.4 1 340px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.mig__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card-title { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.tenant { border: 1px solid #e6eaee; border-radius: 7px; padding: 12px 14px; }
.tenant__head { display: flex; align-items: center; gap: 10px; }
.tenant__icon { width: 30px; height: 30px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 30px; }
.tenant__name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant__domain { font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant__meta { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.btn-pull { background: #eef8f9; border: 1px solid #bfe2e7; border-radius: 5px; padding: 5px 11px; font-size: 11.5px; font-weight: 600; color: #17697a; }
.btn-pull:hover { background: #dff1f3; }
.target-card { background: var(--navy); border-radius: 8px; padding: 18px; color: #dbe4ef; }
.target-card .card-title { color: #fff; }
.target-card input { width: 100%; padding: 8px 10px; border: 1px solid var(--navy-border); background: var(--navy-input); color: #fff; border-radius: 5px; font-size: 12.5px; margin-bottom: 10px; }
.target-lbl { font-size: 10.5px; font-weight: 600; color: var(--sidebar-muted); margin-bottom: 3px; }
.pushpull { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.pushpull__row { display: flex; justify-content: space-between; font-size: 12px; color: #3a424b; }
.note-amber { font-size: 10.5px; color: #a08a52; background: #fdf8ec; border: 1px dashed #e0d3a8; border-radius: 6px; padding: 8px 10px; line-height: 1.5; }
.mig__log { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-top: 16px; }
.log-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.log-row:last-child { border-bottom: none; }

/* ---- Settings ------------------------------------------------------------- */
.settings { padding: 16px 24px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 1000px; align-items: start; }
.settings .card { padding: 18px; }
.settings-full { grid-column: 1 / -1; }
.cfg-field { margin-bottom: 10px; }
.cfg-label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.cfg-input { width: 100%; padding: 7px 10px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 12px; }
.map-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.sync-row { display: flex; justify-content: space-between; font-size: 12.5px; color: #3a424b; padding: 4px 0; }
.plan-card { background: var(--navy); border-radius: 8px; padding: 18px; color: #dbe4ef; }
.btn-navy { background: var(--navy); color: #fff; border: none; border-radius: 5px; padding: 8px 16px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.btn-navy:hover { background: var(--navy-2); }

/* ---- Field configuration --------------------------------------------------- */
.fieldcfg-group { margin-bottom: 20px; }
.fieldcfg-group:last-child { margin-bottom: 0; }
.fieldcfg-title { font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.fieldcfg-head, .fieldcfg-row { display: grid; grid-template-columns: 1fr 74px 176px 56px; align-items: center; gap: 8px; }
.fieldcfg-head { padding: 5px 8px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.fieldcfg-row { padding: 6px 8px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.fieldcfg-row:last-child { border-bottom: none; }
.fieldcfg-name { color: var(--ink); }
.fieldcfg-req { position: relative; }
.fieldcfg-req-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #b83b3b; margin-left: 4px; vertical-align: middle; }
.fieldcfg-select { width: 100%; padding: 4px 6px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 11.5px; background: #fff; }
.fieldcfg-custom { background: #fdf8ec !important; border-color: #e0d3a8 !important; }

/* ---- Drawer --------------------------------------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(16,26,38,.28); z-index: 39; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; background: #fff; box-shadow: -8px 0 30px rgba(16,26,38,.18); z-index: 40; display: flex; flex-direction: column; animation: slidein .2s ease; }
.drawer--record { width: 410px; }
.drawer--invite { width: 380px; }
.drawer--users { width: 640px; max-width: 96vw; }
.tenant__actions { display: flex; align-items: center; gap: 6px; }
.link-btn { color: var(--teal-link); cursor: pointer; font-weight: 600; }
.link-btn:hover { color: #155e6c; }
.drawer__head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer__title { font-size: 15px; font-weight: 600; color: var(--navy); }
.drawer__sub { font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.drawer__x { background: none; border: none; font-size: 18px; color: var(--muted-2); padding: 4px 8px; }
.drawer__x:hover { color: var(--ink); }
.lock-banner { background: #fdf1dd; border-bottom: 1px solid #f3ddb3; padding: 9px 20px; font-size: 12px; color: #8a5a13; font-weight: 600; }
.drawer__body { flex: 1 1 0; overflow-y: auto; overflow-x: hidden; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px 10px; align-content: flex-start; }
.drawer-field { min-width: 0; }
.drawer-field label { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 3px; display: block; }
.drawer-field input, .drawer-field select { width: 100%; padding: 7px 10px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 12.5px; background: #fff; }
.drawer-field input:disabled, .drawer-field select:disabled { background: var(--page); color: #6b7683; }
.req-star { color: #b83b3b; font-weight: 700; }
.drawer-field input.input-error, .drawer-field select.input-error { border-color: #d9534f; background: #fdf3f2; }
.field-err { font-size: 10.5px; color: #a5352f; margin-top: 3px; line-height: 1.4; }
.drawer__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.btn-danger-text { background: none; color: #b83b3b; border: none; font-size: 12.5px; font-weight: 600; }
.btn-danger-text:hover { color: #8f2626; }
.invite-role { border: 1.5px solid var(--line); background: #fff; border-radius: 7px; padding: 10px 12px; cursor: pointer; }
.invite-role.selected { border-color: var(--teal); background: #eef8f9; }
.invite-role__k { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.invite-role__d { font-size: 11px; color: var(--muted); margin-top: 2px; }
.drawer--invite input { width: 100%; padding: 8px 10px; border: 1px solid #cfd5db; border-radius: 5px; font-size: 12.5px; margin-bottom: 14px; }

/* ---- Confirm modal -------------------------------------------------------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(16,26,38,.42); z-index: 70; animation: fadein .15s ease; }
.modal { position: fixed; z-index: 71; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 384px; max-width: calc(100vw - 32px); background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(16,26,38,.35); border: 1px solid var(--line); padding: 22px 22px 18px; animation: modalpop .18s ease; }
.modal__head { display: flex; align-items: flex-start; gap: 12px; }
.modal__icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.modal__icon--danger { background: #fdecec; color: #b83b3b; }
.modal__icon--info { background: #e7f4f6; color: #17697a; }
.modal__title { font-size: 15px; font-weight: 600; color: var(--navy); }
.modal__msg { font-size: 13px; color: #3a424b; line-height: 1.5; margin-top: 4px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal__danger { background: #b83b3b; color: #fff; border: none; border-radius: 5px; padding: 8px 16px; font-size: 12.5px; font-weight: 600; }
.modal__danger:hover { background: #8f2626; }
.modal__ok:focus-visible, .modal__cancel:focus-visible { outline: 2px solid #2a9db0; outline-offset: 2px; }
@keyframes modalpop { from { transform: translate(-50%,-46%); opacity: 0; } to { transform: translate(-50%,-50%); opacity: 1; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---- Toast ---------------------------------------------------------------- */
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--navy); color: #fff; border-radius: 7px; padding: 11px 18px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(16,26,38,.3); z-index: 50; animation: slideup .25s ease; display: flex; align-items: center; gap: 9px; max-width: 360px; }
.toast .dot { width: 8px; height: 8px; background: #6fc776; }
.toast.err { background: #7a2b26; }
.toast.err .dot { background: #f6b8b3; }

.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

@media (max-width: 720px) {
  .settings { grid-template-columns: 1fr; }
  .inbox-fields { grid-template-columns: repeat(2, 1fr); }
}
