/* Teams and Users, copied from Bid Assist (bidprep/static/style.css) so these pages keep that design.
   Selectors that were #main are #people-view, which is where DocBid draws the pages. */

#people-view .muted { color: var(--text-muted); }
#people-view .small { font-size: 12px; }
#people-view .spacer { flex: 1; }
#people-view .error { color: var(--red); margin: 0; }

#people-view button {
  font-family: var(--font); font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  padding: 7px 14px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
#people-view button:hover:not(:disabled) { background: var(--accent-tint); color: var(--accent); }
#people-view button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#people-view button.primary:hover:not(:disabled) { background: var(--accent-strong); color: #fff; }
#people-view button.ghost { border-color: transparent; background: transparent; }
#people-view button:disabled { opacity: .5; cursor: default; }
#people-view a.primary, #people-view a.um-add, #people-view a.um-back {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  padding: 9px 16px; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
#people-view a.primary, #people-view a.um-add { background: var(--accent); border: 1px solid var(--accent); color: #fff; }
#people-view a.um-back { background: var(--card); border: 1px solid var(--border); color: var(--text); font-weight: 650; padding: 8px 14px; }
#people-view :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  font-family: var(--font); font-size: 15px; font-weight: 600; padding: 10px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 28%, transparent); background: #fff; color: var(--text);
  width: 100%; min-height: 44px; box-sizing: border-box;
}
#people-view :is(input, select, textarea):focus {
  outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-tint);
}
#people-view textarea { resize: vertical; }
#people-view label.field { display: block; }
/* Teams and Users Management. */
.perm-off { display: none !important; }
.um-page { max-width: 1240px; }
#people-view .um-page > .um-facts,
#people-view .um-page > .um-panel,
#people-view .um-page > .um-shell { margin-top: 4px; }
#people-view .um-page > .um-panel + .um-panel { margin-top: 14px; }
.um-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 18px 0 16px; }
.um-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.um-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.um-head-right { display: flex; align-items: center; gap: 10px; }
.um-seats { font-size: 12.5px; font-weight: 700; color: var(--text-muted); padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
#people-view button.um-add, #people-view button.um-back, .modal.um-modal button, .um-drawer button, .um-sheet button { display: inline-flex; align-items: center; gap: 7px; }
#people-view button.um-add { padding: 9px 16px; font-size: 13.5px; font-weight: 700; border-radius: 10px; }
#people-view button.um-back { padding: 8px 14px; font-size: 13.5px; font-weight: 650; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
.um-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 1px 2px rgba(20, 24, 40, 0.05), 0 6px 20px rgba(20, 24, 40, 0.04); }
.um-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; margin-bottom: 16px; }
.um-search { position: relative; display: flex; align-items: center; width: min(320px, 100%); }
.um-search svg { position: absolute; left: 12px; color: var(--text-faint); pointer-events: none; }
#people-view .um-search input { padding-left: 38px !important; min-height: 40px; font-size: 14px; font-weight: 500; border-radius: 10px; border-color: var(--border); }
#people-view button.um-tool { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; color: var(--text); }
#people-view button.um-tool.on { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-tint); }
.um-view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
#people-view .um-view-toggle button { border: none; border-radius: 0; padding: 8px 11px; background: var(--card); color: var(--text-muted); line-height: 0; }
#people-view .um-view-toggle button.on { background: var(--accent); color: #fff; }
.um-filter-row { flex-basis: 100%; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
#people-view .um-filter-row select { width: auto; min-width: 170px; min-height: 38px; font-size: 13.5px; font-weight: 500; }
.um-table-card { overflow: hidden; }
.um-table-wrap { overflow-x: auto; }
table.um-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.um-table thead th { text-align: left; font-size: 13px; font-weight: 700; color: var(--text-muted); background: color-mix(in srgb, var(--text) 6%, var(--card)); padding: 13px 16px; white-space: nowrap; }
.um-table tbody td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.um-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, var(--card)); }
.um-table tbody tr.off td { opacity: .62; }
.um-table .um-num { width: 48px; color: var(--text-muted); }
.um-table th.um-actions-h { text-align: center; width: 170px; }
#people-view button.um-sort { border: none; background: none; padding: 0; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: 5px; }
#people-view button.um-sort:hover { background: none; color: var(--text); }
.um-name { font-weight: 700; color: var(--text); }
.um-desc { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-empty { text-align: center; color: var(--text-muted); padding: 34px 16px !important; }
.um-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.um-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.35;
  background: color-mix(in srgb, #3b82f6 13%, var(--card)); color: color-mix(in srgb, #1d4ed8 82%, var(--text)); white-space: nowrap; }
.um-chip i { font-style: normal; font-weight: 700; opacity: .7; padding-left: 5px; border-left: 1px solid currentColor; }
.um-chip.more { background: color-mix(in srgb, var(--text) 8%, var(--card)); color: var(--text-muted); }
.um-chip.all { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-strong); }
.um-actions { white-space: nowrap; text-align: center; }
#people-view button.um-icon, .um-drawer button.um-icon { border: none; background: transparent; color: var(--text-muted); padding: 6px; margin: 0 2px; border-radius: 8px; line-height: 0; box-shadow: none; }
#people-view button.um-icon:hover:not(:disabled) { background: var(--accent-tint); color: var(--accent-strong); }
#people-view button.um-icon[data-act="delete"]:hover, #people-view button.um-icon[data-act="remove"]:hover, #people-view button.um-icon[data-act="unshare"]:hover { background: var(--red-tint, #fdeceb); color: var(--red, #b42318); }
.um-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  font-size: 13px; font-weight: 800; color: #1f2937; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--card); }
.um-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.um-avatar.lg { width: 46px; height: 46px; font-size: 15px; }
.um-faces { display: inline-flex; margin-right: 8px; vertical-align: middle; }
.um-members { white-space: nowrap; }
.um-faces .um-avatar + .um-avatar { margin-left: -8px; }
.um-person { display: flex; align-items: center; gap: 12px; }
.um-person > span:not(.um-avatar), .um-list li > span:not(.um-level):not(.um-avatar), .um-user-card-top div { display: flex; flex-direction: column; min-width: 0; }
.um-person b, .um-list b { font-weight: 700; color: var(--text); }
#people-view button.um-name-btn { border: none; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--text); border-radius: 0; text-align: left; }
#people-view button.um-name-btn:hover { background: none; color: var(--accent-strong); text-decoration: underline; }
.um-person small, .um-list small, .um-user-card-top small { color: var(--text-muted); font-size: 12.5px; }
.um-you { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent-strong); background: var(--accent-tint); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.um-role { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: color-mix(in srgb, #3b82f6 13%, var(--card)); color: color-mix(in srgb, #1d4ed8 82%, var(--text)); }
.um-role.admin { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-strong); }
.um-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.um-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green, #2f7448); }
.um-status.off::before { background: var(--text-faint); }
.um-status.off { color: var(--text-muted); }
.um-date { white-space: nowrap; color: var(--text-muted); }
.um-date svg, .um-user-card-foot svg { vertical-align: -2px; margin-right: 6px; }
.um-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 13.5px; }
.um-rows { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
#people-view .um-rows select { width: 76px; min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
.um-pager { display: inline-flex; gap: 6px; }
#people-view .um-pager button { padding: 7px 12px; font-size: 13px; font-weight: 600; background: var(--card); border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); }
#people-view .um-pager button.um-page-num.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.um-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; padding: 16px; }
.um-user-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 12px; background: var(--card); }
.um-user-card.off { opacity: .62; }
.um-user-card-top { display: flex; gap: 12px; align-items: center; }
.um-user-card-meta { display: flex; gap: 10px; align-items: center; }
.um-user-card-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; }
.um-noaccess { max-width: 560px; margin: 40px auto; text-align: center; padding: 28px; }

.um-shell { background: color-mix(in srgb, var(--card) 55%, var(--bg)); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: grid; gap: 20px; }
.um-section { padding: 20px 22px; }
.um-section h3 { margin: 0; font-size: 16px; font-weight: 750; color: var(--text); }
.um-section > p.muted { margin: 4px 0 14px; font-size: 13.5px; }
.um-note { margin: -8px 0 14px; font-size: 12.5px; color: var(--amber, #875900); font-weight: 600; }
.um-req { color: var(--red, #b42318); font-style: normal; }
.um-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.um-grid2.tight { gap: 12px; }
.um-grid2 .field, .um-modal .field { display: grid; gap: 6px; }
.um-grid2 label.field > span, .um-modal label.field > span, .um-modal .field > span, .um-sheet label.field > span, .um-sheet .field > span { font-size: 13.5px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; margin: 0; }
.um-grid2 { align-items: start; }
.um-grid2 > .um-span2 { grid-column: 1 / -1; }
#people-view .um-grid2 textarea { min-height: 70px; resize: vertical; font-weight: 500; }
#people-view .um-grid2 input, #people-view .um-grid2 textarea { font-weight: 500; }
.um-perm-all, .um-module-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; background: color-mix(in srgb, var(--text) 5%, var(--card)); }
.um-perm-all { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; }
.um-module { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(20, 24, 40, 0.04); }
.um-module-head { border-bottom: 1px solid var(--border); }
.um-perm-all label, .um-module-head label { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; }
.um-module-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 18px; padding: 12px 14px; }
.um-module-body label { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer; }
.um-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.um-page input[type="checkbox"], .um-modal input[type="checkbox"], .um-sheet input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--green, #2f7448); cursor: pointer; }
.um-form-foot { display: flex; justify-content: flex-end; gap: 10px; }
#people-view .um-form-foot button { padding: 9px 18px; font-size: 13.5px; }
.um-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
#people-view .um-inline select { width: auto; min-width: 150px; max-width: 320px; min-height: 40px; font-size: 13.5px; font-weight: 500; }
#people-view #te-person-level, #people-view #user-role { min-width: 280px; max-width: 520px; flex: 1 1 280px; }
.um-list { list-style: none; margin: 0; padding: 0; }
.um-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.um-list li:first-child { border-top: none; }
.um-list li > span:not(.um-level):not(.um-avatar) { flex: 1; }
#people-view .um-list-rows select { width: auto; min-width: 120px; min-height: 36px; font-size: 13px; font-weight: 500; }
.um-level { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, var(--card)); color: var(--text-muted); white-space: nowrap; }
.um-level.viewer { background: color-mix(in srgb, var(--text) 8%, var(--card)); color: var(--text-muted); }
.um-level.evaluator { background: color-mix(in srgb, #b45309 16%, var(--card)); color: #9a3412; }
.um-level.approver { background: color-mix(in srgb, #1d4ed8 14%, var(--card)); color: #1e40af; }
.um-level.admin { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent-strong); }
.um-roles { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.um-role-line { display: flex; align-items: baseline; gap: 10px; }
.um-role-line > span:last-child { color: var(--text-muted); font-size: 13px; }
.um-role-pick { display: grid; gap: 8px; padding: 12px 14px; }
.um-role-pick label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.um-role-pick input { margin-top: 3px; }
.um-role-pick b { display: block; font-size: 13.5px; }
.um-role-pick small { display: block; color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.um-ms { position: relative; }
.um-ms-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); cursor: text; }
.um-ms.open .um-ms-box, .um-ms-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.um-ms-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.um-ms-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--accent-tint, color-mix(in srgb, var(--accent) 14%, var(--card))); color: var(--text); font-size: 13px; font-weight: 650; }
#people-view .um-ms-chip button { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; box-shadow: none; }
.um-ms-chip button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
#people-view .um-ms-box input { flex: 1 1 140px; min-width: 140px; min-height: 28px; margin: 0; padding: 4px 6px; border: none; outline: none; background: transparent; box-shadow: none; font-size: 14px; font-weight: 500; }
.um-ms-menu { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 24, 40, 0.14); }
#people-view .um-ms-menu button.um-ms-opt { display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 8px; background: transparent; color: var(--text); font-size: 13.5px; font-weight: 550; cursor: pointer; box-shadow: none; }
#people-view .um-ms-menu button.um-ms-opt:hover { background: var(--accent-tint, color-mix(in srgb, var(--accent) 12%, var(--card))); }
.um-ms-empty { padding: 10px 12px; color: var(--text-muted); font-size: 13px; }

.modal-back.um-modal-back { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(28, 26, 20, 0.28); }
@keyframes qdfade { from { opacity: 0; } }
@keyframes qdslide { from { transform: translateX(40px); opacity: .4; } }
.um-sheet button, .modal.um-modal button {
  font-family: var(--font); font-size: 13px; font-weight: 650;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  padding: 8px 14px; border-radius: 10px; cursor: pointer;
}
.um-sheet button.primary, .modal.um-modal button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.um-sheet button.primary:hover:not(:disabled), .modal.um-modal button.primary:hover:not(:disabled) { background: var(--accent-strong); color: #fff; }
.um-sheet button.ghost, .modal.um-modal button.ghost { border-color: transparent; background: transparent; }
.um-sheet button:disabled, .modal.um-modal button:disabled { opacity: .5; cursor: default; }
.um-sheet :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea),
.modal.um-modal :is(input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea) {
  font-family: var(--font); font-size: 15px; font-weight: 600; padding: 10px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 28%, transparent); background: #fff; color: var(--text);
  width: 100%; min-height: 44px; box-sizing: border-box;
}
.um-sheet :is(input, select, textarea):focus, .modal.um-modal :is(input, select, textarea):focus {
  outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-tint);
}
.um-sheet .error, .modal.um-modal .error { color: var(--red, #b42318); margin: 0; }
.um-sheet .field, .modal.um-modal .field { display: grid; gap: 6px; }
.modal.um-modal { padding: 0; width: min(560px, 100%); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 48px); margin: 0; }
.um-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.um-modal-head h2 { margin: 0; font-size: 17px; font-weight: 750; }
.modal.um-modal button.um-modal-x { border: none; background: none; padding: 6px; color: var(--text-muted); line-height: 0; box-shadow: none; }
.um-modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; min-height: 0; flex: 0 1 auto; }
.modal.um-modal .field { flex: 0 0 auto; }
.modal.um-modal .field input, .modal.um-modal .field select { min-height: 40px; font-size: 14px; font-weight: 500; }
.um-modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--card); }
.modal.um-modal .um-modal-foot button { padding: 9px 18px; font-size: 13.5px; }
.um-team-field { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 1 1 auto; }
.um-team-field[hidden] { display: none; }
.um-team-picks { display: grid; gap: 4px; align-content: start; border: 1px solid var(--border); border-radius: 10px; padding: 6px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.um-team-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; }
.um-team-pick.on { background: color-mix(in srgb, var(--green, #2f7448) 8%, var(--card)); }
.um-team-pick label { display: flex; align-items: center; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.um-team-pick label b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-team-pick label small { color: var(--text-muted); font-size: 11.5px; margin-left: auto; padding-right: 6px; white-space: nowrap; flex: none; }
#um-modal .um-team-pick select { width: 148px; flex: 0 0 148px; min-height: 40px; padding: 4px 10px; font-size: 13.5px; }
.um-team-field > small { font-size: 12.5px; flex: 0 0 auto; }
.um-sheet-back { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: flex-end; background: rgba(28, 26, 20, 0.22); backdrop-filter: blur(3px); animation: qdfade .15s ease; }
.um-sheet { width: min(760px, 100vw); height: 100%; background: var(--card); color: var(--text); display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(20, 24, 40, 0.18); animation: qdslide .2s ease; font-family: var(--font); }
.um-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex: 0 0 auto; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.um-sheet-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.um-sheet-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.um-sheet button.um-drawer-x { border: 1px solid var(--border); background: var(--card); color: var(--text-muted); width: 36px; height: 36px; border-radius: 10px; justify-content: center; cursor: pointer; padding: 0; box-shadow: none; }
.um-sheet button.um-drawer-x:hover { color: var(--text); background: var(--accent-tint); }
.um-sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 18px 24px 8px; overflow: hidden; }
.um-sheet-body > .um-grid2, .um-sheet-body > .error { flex: 0 0 auto; }
.um-sheet .field input:disabled { background: color-mix(in srgb, var(--text) 5%, var(--card)); color: var(--text-muted); }
.um-sheet-foot { display: flex; justify-content: flex-end; gap: 10px; flex: 0 0 auto; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--card); }
.um-sheet .um-sheet-foot button { padding: 9px 18px; font-size: 13.5px; }
.note-badge { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; }
.header-dropdown .note-menu { left: auto; right: 0; width: min(380px, 86vw); padding: 0; }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.note-head b { font-size: 14px; }
.note-menu button.note-read { width: auto; border: none; background: none; color: var(--accent-strong); font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.note-list { max-height: min(420px, 60vh); overflow-y: auto; }
.note-menu button.note-item { display: grid; gap: 3px; width: 100%; text-align: left; border: none; border-bottom: 1px solid var(--border); background: transparent; padding: 10px 14px; cursor: pointer; border-radius: 0; color: var(--text); }
.note-menu button.note-item.unread { background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.note-menu button.note-item b { font-size: 13px; font-weight: 750; }
.note-menu button.note-item span, .note-empty { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; white-space: normal; }
.note-menu button.note-item small { font-size: 11px; color: var(--text-faint); }
.note-empty { margin: 0; padding: 16px 14px; }
.um-pass-back { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(20, 20, 25, 0.45); }
.um-pass { width: min(520px, 100%); background: var(--card); color: var(--text); border-radius: 16px; box-shadow: 0 18px 50px rgba(20, 24, 40, 0.28); display: flex; flex-direction: column; overflow: hidden; font-family: var(--font); }
.um-pass-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.um-pass-head h2 { margin: 0; font-size: 17px; font-weight: 750; }
.um-pass button.um-pass-x { border: none; background: none; color: var(--text-muted); width: 32px; height: 32px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: none; }
.um-pass button.um-pass-x:hover { background: var(--accent-tint); color: var(--text); }
.um-pass-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 18px; }
.um-pass-body p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-muted); }
.um-pass-foot { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--card); }
.um-pass button { font-family: var(--font); font-size: 13.5px; font-weight: 650; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.um-pass button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.um-pass button.primary:hover { background: var(--accent-strong); color: #fff; }
.um-secret { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, var(--card)); }
.um-secret code { flex: 1; min-width: 0; font-size: 16px; font-weight: 750; letter-spacing: .04em; word-break: break-all; }
.um-pass .um-secret button { display: inline-flex; align-items: center; gap: 6px; flex: none; background: var(--card); }

.um-drawer-back { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: flex-end; background: rgba(28, 26, 20, 0.22); backdrop-filter: blur(3px); animation: qdfade .15s ease; }
.um-drawer { width: min(440px, 100vw); height: 100%; background: var(--card); color: var(--text); display: flex; flex-direction: column; box-shadow: -18px 0 50px rgba(20, 24, 40, 0.18); animation: qdslide .2s ease; font-family: var(--font); }
.um-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; }
.um-drawer-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.um-drawer-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted); letter-spacing: .02em; }
.um-drawer button.um-drawer-x { border: 1px solid var(--border); background: var(--card); color: var(--text-muted); width: 36px; height: 36px; border-radius: 10px; justify-content: center; cursor: pointer; }
.um-drawer button.um-drawer-x:hover { color: var(--text); background: var(--accent-tint); }
.um-drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.um-drawer-body > * { flex-shrink: 0; }
.um-facts { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.um-facts > div { padding: 12px 14px; display: grid; gap: 4px; border-bottom: 1px solid var(--border); }
.um-facts > div:nth-child(odd) { border-right: 1px solid var(--border); }
.um-facts > div:nth-last-child(-n+2) { border-bottom: none; }
.um-facts span { font-size: 12px; color: var(--text-muted); }
.um-facts b { font-size: 13.5px; font-weight: 800; letter-spacing: .01em; word-break: break-word; }
.um-panel { border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: 0 6px 20px rgba(20, 24, 40, 0.05); }
.um-panel-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.um-panel-head h3 { margin: 0; font-size: 14.5px; font-weight: 800; }
.um-panel-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-muted); }
.um-panel-body { padding: 10px 16px 14px; font-size: 13.5px; }
.um-panel-copy { margin: 0; color: var(--text-muted); line-height: 1.5; }
.um-pgroup { padding: 8px 0; border-top: 1px solid var(--border); }
.um-pgroup:first-child { border-top: none; padding-top: 2px; }
.um-pgroup > b { display: block; font-size: 12.5px; margin-bottom: 6px; }
.um-pgroup > div { display: flex; flex-wrap: wrap; gap: 5px; }
.um-drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.um-drawer-actions button { font-family: var(--font); font-size: 13.5px; font-weight: 700; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.um-drawer-actions button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink, #fff); }
.um-drawer-actions button:hover { filter: brightness(.97); }
@media (max-width: 980px) {
  .um-module-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .um-grid2 { grid-template-columns: 1fr; }
}
