
/* Premium management header */
.topbar {
  align-items: center;
  padding: 0 28px;
  border: 0;
  background:
    radial-gradient(circle at 68% -80%, rgb(100 108 255 / 9%), transparent 32%),
    linear-gradient(90deg, rgb(255 255 255 / 98%), rgb(250 251 255 / 96%) 58%, rgb(255 255 255 / 98%));
  box-shadow: 0 8px 30px rgb(25 32 52 / 6%);
  backdrop-filter: blur(20px);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 0;
  left: 28px;
  height: 1px;
  background: linear-gradient(90deg, rgb(94 100 219 / 23%), rgb(223 226 237 / 72%) 30%, transparent 92%);
}
.title { gap: 11px; }
.title-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  flex: 0 0 30px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #5d63dc;
  box-shadow: none;
}
.title-mark svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.85; stroke-linecap: round; stroke-linejoin: round; }
.title-copy h1 { color: #1d2433; font-size: 18px; font-weight: 760; letter-spacing: -.025em; }
.actions { margin-left: auto; gap: 14px; }
.service-state {
  height: auto;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #5f6b78;
  font-size: 12px;
  font-weight: 620;
}
.state-dot { width: 8px; height: 8px; flex: 0 0 8px; }
.state-dot.ok { background: #25a875; box-shadow: 0 0 0 4px rgb(37 168 117 / 10%); }
.state-dot.bad { background: #d54855; box-shadow: 0 0 0 4px rgb(213 72 85 / 10%); }
.header-icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: linear-gradient(145deg, rgb(93 99 220 / 11%), rgb(112 119 230 / 6%));
  color: #575dd3;
  box-shadow: inset 0 0 0 1px rgb(91 97 218 / 8%), 0 4px 12px rgb(73 79 177 / 6%);
  cursor: pointer;
  transition: color .18s, background .18s, box-shadow .18s, transform .18s;
}
.header-icon-button svg { width: 19px; height: 19px; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-icon-button:hover:not(:disabled) { background: linear-gradient(145deg, rgb(93 99 220 / 15%), rgb(112 119 230 / 8%)); color: #4f55c8; box-shadow: inset 0 0 0 1px rgb(80 87 211 / 12%), 0 6px 16px rgb(73 79 177 / 8%); transform: translateY(-1px); }
.header-icon-button:active:not(:disabled) { transform: translateY(0); }
.header-icon-button:disabled { cursor: wait; opacity: .7; }
.header-icon-button:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgb(91 97 218 / 13%); }
.header-icon-button.is-spinning svg { animation: header-refresh-spin .75s linear infinite; }
@keyframes header-refresh-spin { to { transform: rotate(360deg); } }
.account-menu { position: relative; margin-left: 2px; }
.admin-chip {
  min-width: 224px;
  height: 54px;
  gap: 11px;
  border: 0;
  border-radius: 0;
  padding: 4px 0 4px 8px;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
}
.admin-chip::before { display: none; }
.admin-chip:hover { background: transparent; }
.admin-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 3px solid #fff;
  background:
    radial-gradient(circle at 34% 24%, rgb(255 255 255 / 36%), transparent 30%),
    linear-gradient(145deg, #777cf0, #555acb 64%, #4549ad);
  box-shadow: 0 5px 15px rgb(69 74 173 / 23%), 0 0 0 1px rgb(80 86 190 / 10%);
}
.admin-avatar svg { width: 23px; height: 23px; stroke: #fff; stroke-width: 1.65; stroke-linecap: round; }
.admin-identity { gap: 4px; text-align: left; }
.admin-identity strong { color: #252b38; font-size: 13px; font-weight: 720; }
.admin-identity span { max-width: 152px; color: #8a93a2; font-size: 10.5px; }
.admin-menu-chevron { width: 16px; height: 16px; flex: 0 0 16px; margin-left: 2px; color: #9ba3b1; stroke-width: 1.7; transition: transform .18s, color .18s; }
.account-menu.open .admin-menu-chevron { color: #5d63dc; transform: rotate(180deg); }
.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  width: 184px;
  overflow: hidden;
  border: 1px solid rgb(222 225 234 / 92%);
  border-radius: 13px;
  padding: 6px;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 18px 46px rgb(23 31 52 / 15%);
  backdrop-filter: blur(18px);
  transform-origin: top right;
  animation: account-menu-in .16s ease-out;
}
@keyframes account-menu-in { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: none; } }
.account-dropdown button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 0 11px;
  background: transparent;
  color: #4f5968;
  font-size: 12px;
  font-weight: 620;
  text-align: left;
}
.account-dropdown button svg { width: 17px; height: 17px; flex: 0 0 17px; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-dropdown button:hover { background: #f5f6fb; color: #5258cf; }
.account-dropdown .account-logout { color: #c84653; }
.account-dropdown .account-logout:hover { background: #fff3f4; color: #b93644; }

@media (max-width: 1180px) {
  .topbar { padding-inline: 20px; }
  .topbar::after { right: 20px; left: 20px; }
  .admin-chip { min-width: 202px; }
}
@media (max-width: 840px) {
  .topbar { padding-inline: 16px; }
  .topbar::after { right: 16px; left: 16px; }
  .service-state { display: none; }
  .admin-chip { min-width: auto; width: 48px; display: inline-flex; padding: 3px; }
  .admin-identity, .admin-menu-chevron { display: none; }
  .account-dropdown { right: -2px; }
}

/* User membership management and mandatory confirmation */
.membership-management-card { position: relative; }
.membership-current-state {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border: 1px solid rgb(85 91 214 / 14%);
  border-radius: 999px;
  padding: 0 11px;
  background: #f7f8ff;
  color: #555bd6;
  font-size: 11px;
  font-weight: 680;
}
.membership-field-disabled { opacity: .45; }
.membership-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(16 23 38 / 52%);
  backdrop-filter: blur(7px);
}
.membership-confirm-dialog {
  width: min(500px, 94vw);
  border: 1px solid rgb(223 226 235 / 88%);
  border-radius: 17px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 28px 80px rgb(10 18 34 / 26%);
  animation: membership-confirm-in .18s ease-out;
}
@keyframes membership-confirm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.membership-confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border-radius: 13px;
  background: linear-gradient(145deg, #f0f1ff, #fafaff);
  color: #5b61da;
  box-shadow: inset 0 0 0 1px rgb(91 97 218 / 12%);
}
.membership-confirm-icon svg { width: 23px; height: 23px; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.membership-confirm-dialog > h3 { margin: 0; color: #202736; font-size: 18px; font-weight: 760; }
.membership-confirm-dialog > p { margin: 8px 0 20px; color: #788292; font-size: 12px; line-height: 1.65; }
.membership-confirm-change {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}
.membership-confirm-change > div {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  padding: 13px;
  background: #fafbfc;
}
.membership-confirm-change > div:last-child { border-color: rgb(85 91 214 / 18%); background: #f8f8ff; }
.membership-confirm-change span { color: #8b94a2; font-size: 10px; font-weight: 650; }
.membership-confirm-change strong { overflow: hidden; margin-top: 7px; color: #303744; font-size: 14px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.membership-confirm-change > div:last-child strong { color: #555bd6; }
.membership-confirm-change small { overflow: hidden; margin-top: 5px; color: #7e8795; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.membership-confirm-change > i { color: #a5adba; font: normal 26px/1 Arial, sans-serif; text-align: center; }
.membership-confirm-reason { margin-top: 12px; border-left: 3px solid #676de1; border-radius: 7px; padding: 10px 12px; background: #f8f9fc; }
.membership-confirm-reason span { display: block; color: #8a93a1; font-size: 10px; }
.membership-confirm-reason strong { display: block; margin-top: 5px; color: #4d5664; font-size: 12px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.membership-confirm-dialog .action-row { margin-top: 20px; }

@media (max-width: 520px) {
  .membership-confirm-dialog { padding: 20px; }
  .membership-confirm-change { grid-template-columns: 1fr; }
  .membership-confirm-change > i { transform: rotate(90deg); }
}
.role-accounts-panel { overflow: visible; border: 0; background: transparent; box-shadow: none; }
.role-toolbar { margin-bottom: 14px; border: 1px solid #e1e5ec; border-radius: 12px; box-shadow: 0 8px 24px rgb(31 41 55 / 5%); }
#rolesView .result-summary { border: 1px solid #e1e5ec; border-radius: 12px; }
#systemView .module-panel { overflow: visible; background: transparent; }
#systemView .module-panel > .list-tools { margin: 0 0 14px; padding: 15px; border: 1px solid #e1e5ec; border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgb(31 41 55 / 5%); }
#usersView .table-wrap { border-top: 1px solid #e4e7ed; border-radius: 10px 10px 0 0; }

/* Complete data-panel borders after separating summaries from tables. */
#ordersView .table-wrap,
#rolesView .table-wrap,
#systemView .module-panel .table-wrap {
  border: 1px solid #e1e5ec;
  border-radius: 12px 12px 0 0;
}
#ordersView .pager,
#rolesView .pager,
#systemView .module-panel .pager {
  border: 1px solid #e1e5ec;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}
#systemView #systemStoragePanel .table-wrap { border-radius: 12px; }
#usersTableWrap th:nth-child(n + 6):nth-child(-n + 11),
#usersTableWrap td:nth-child(n + 6):nth-child(-n + 11) { text-align: center; }
#usersTableWrap th:nth-child(12), #usersTableWrap td:nth-child(12) { text-align: right; }

/* System status: grouped, high-contrast operational overview. */
.system-status-body { padding: 0; }
.system-status-layout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.app-release-history-card { grid-column: 1 / -1; }
.app-release-history-card .table-wrap { padding: 0 16px; }
.app-release-history-card .pager { padding: 12px 16px 16px; }

.release-management{display:grid;gap:18px;max-width:1180px}.release-page-head{padding:2px 0;display:flex;align-items:center;justify-content:space-between;gap:20px}.release-page-head h2{margin:0;color:#172235;font-size:25px;letter-spacing:-.025em}.release-create-button{min-width:108px}.release-current-card{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#fff;border-radius:18px;background:radial-gradient(circle at 82% 5%,rgba(142,200,255,.34),transparent 38%),linear-gradient(135deg,#1767d4,#368aeb);box-shadow:0 16px 38px rgba(23,104,218,.16)}.release-current-card>div{min-width:0;display:grid;grid-template-columns:auto auto auto;align-items:baseline;gap:0 14px}.release-current-card span{font-size:12px;opacity:.78}.release-current-card strong{font-size:25px;letter-spacing:-.02em}.release-current-card small{font-size:11px;opacity:.72}.release-current-card a{padding:9px 14px;color:#1768d7;border-radius:10px;background:#fff;font-size:12px;font-weight:720;text-decoration:none}.release-current-card a:hover{background:#f2f7ff}.release-records-head{display:flex;align-items:baseline;justify-content:space-between;padding:3px 1px 0}.release-records-head h3{margin:0;color:#263247;font-size:16px}.release-records-head span{color:#8994a4;font-size:12px}.release-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.release-record-card{position:relative;min-width:0;border:1px solid #e4eaf2;border-radius:15px;background:#fff;box-shadow:0 7px 22px rgba(34,67,112,.045);overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.release-record-card:hover{transform:translateY(-2px);border-color:#c9d9ef;box-shadow:0 13px 30px rgba(34,67,112,.085)}.release-record-card.is-current{border-color:#afd0f8;box-shadow:0 8px 26px rgba(36,117,220,.08)}.release-record-main{width:100%;padding:17px 18px 13px;display:block;color:#273449;border:0;background:transparent;cursor:pointer;text-align:left}.release-record-status{display:inline-block;padding:3px 7px;color:#718096;border-radius:999px;background:#f0f3f7;font-size:9px;font-weight:700}.release-record-card.is-current .release-record-status{color:#1768d8;background:#eaf3ff}.release-record-main strong{display:block;margin-top:12px;font-size:19px;letter-spacing:-.02em}.release-record-main small{display:block;margin-top:4px;color:#909aaa;font-size:10px}.release-record-main p{min-height:35px;margin:12px 0 0;color:#687589;font-size:11px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.release-record-delete{width:calc(100% - 36px);margin:0 18px 12px;padding:8px;color:#a04b55;border:0;border-top:1px solid #edf0f4;background:transparent;cursor:pointer;font-size:10px}.release-record-delete:hover{color:#d13b4c}.release-record-pager{padding-top:0}.release-view-card h3{margin:22px 0 12px;font-size:15px}.release-view-meta{display:flex;align-items:center;justify-content:space-between;gap:16px;color:#7b8798;font-size:12px}.release-view-meta span{padding:5px 9px;color:#1768d8;border-radius:999px;background:#eaf3ff;font-weight:680}.release-view-card ul{margin:0;padding:0;display:grid;gap:9px;list-style:none}.release-view-card li{padding:12px 14px;color:#59677a;border-radius:11px;background:#f5f7fa;font-size:13px;line-height:1.55}@media(max-width:980px){.release-record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.release-page-head{align-items:center}.release-page-head h2{font-size:22px}.release-current-card{align-items:stretch;flex-direction:column}.release-current-card>div{display:block}.release-current-card span,.release-current-card strong,.release-current-card small{display:block}.release-current-card strong{margin-top:5px;font-size:23px}.release-current-card small{margin-top:4px}.release-current-card a{text-align:center}.release-record-grid{grid-template-columns:1fr}}
.system-status-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe4ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(31 41 55 / 5%);
}
.system-status-card-head { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid #e9edf3; background: #fafbfc; }
.system-status-card-head h3 { margin: 0; color: #293548; font-size: 14px; font-weight: 720; }
.system-status-icon { width: 28px; height: 28px; display: grid; flex: 0 0 28px; place-items: center; border-radius: 50%; background: #eef2ff; color: #5364d8; }
.system-status-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service-card .system-status-icon { background: #eaf8f2; color: #14845e; }
.storage-card .system-status-icon { background: #fff5e7; color: #b66b10; }
.security-card .system-status-icon { background: #f2edff; color: #7450cf; }
.system-status-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.system-status-metric { min-width: 0; min-height: 74px; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding: 13px 16px; border-right: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.system-status-metric:nth-child(2n) { border-right: 0; }
.system-status-metric:nth-last-child(-n + 2) { border-bottom: 0; }
.system-status-metric span { color: #7a8597; font-size: 11px; font-weight: 560; }
.system-status-metric strong { overflow: hidden; color: #273449; font-size: 14px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.system-status-metric.success strong { color: #12815c; }
.system-status-metric.warning strong { color: #b66b10; }
.system-status-metric.danger strong { color: #c63f4b; }
.system-service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; gap: 8px; }
.system-service-metric { min-width: 0; height: 56px; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid #e7ebf1; border-radius: 10px; background: #fbfcfd; }
.system-service-metric i { width: 9px; height: 9px; border-radius: 50%; background: #17a673; box-shadow: 0 0 0 4px rgb(23 166 115 / 10%); }
.system-service-metric span { overflow: hidden; color: #657185; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.system-service-metric strong { color: #147654; font-size: 12px; font-weight: 700; white-space: nowrap; }
.system-service-metric.offline i { background: #d54855; box-shadow: 0 0 0 4px rgb(213 72 85 / 10%); }
.system-service-metric.offline strong { color: #bb3c48; }
.system-service-metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
.release-card .system-status-metric:last-child { grid-column: 1 / -1; border-right: 0; }

@media (max-width: 980px) {
  .system-status-layout { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .result-summary { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .result-summary .result-summary-item { flex: 0 0 auto; }
}

/* Compact modern detail dialogs. */
.modal .modal-panel {
  width: min(760px, 96vw);
  background: #fff;
  box-shadow: 0 24px 72px rgb(15 23 42 / 20%);
}
.modal .modal-head {
  min-height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid #edf0f4;
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(14px);
}
.modal .modal-head h2 { color: #172033; font-size: 17px; font-weight: 720; letter-spacing: -.015em; }
.modal .modal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f3f5f8;
  color: #667085;
  font-size: 21px;
  line-height: 1;
}
.modal .modal-close:hover { background: #e9edf3; color: #172033; }
.modal .modal-body { display: block; padding: 0 22px 24px; background: #fff; }
.modal .detail-card {
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.modal .detail-card:last-child { border-bottom: 0; }
.modal .detail-card > h3,
.modal .section-title-row h3,
.modal .task-data-grid h3,
.modal .audit-change-grid h3 {
  margin: 0 0 11px;
  color: #344054;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .02em;
}
.modal .modal-body > .detail-card:first-child > h3,
.modal .modal-body > .detail-card:first-child > .section-title-row > h3 { display: none; }
.modal .section-title-row { min-height: 30px; margin: 0 0 11px; }
.modal .section-title-row:has(> h3:only-child) { min-height: 0; }
.modal .detail-grid,
.modal .payment-verification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 22px;
}
.modal .detail-item { min-width: 0; padding: 0; background: transparent; }
.modal .detail-item span { display: block; margin: 0 0 4px; color: #98a2b3; font-size: 10px; font-weight: 560; }
.modal .detail-item strong {
  display: block;
  overflow: hidden;
  color: #273142;
  font-size: 13px;
  font-weight: 620;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal .detail-quick-actions { display: flex; gap: 7px; }
.modal .detail-quick-actions .ghost-button,
.modal .section-title-row > .ghost-button { height: 30px; padding: 0 10px; border-color: #e3e7ee; font-size: 11px; }
.modal .relation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  margin: 0 0 11px;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
  background: #f8fafc;
}
.modal .relation-stat { min-width: 0; padding: 10px 12px; border: 0; border-radius: 0; background: transparent; }
.modal .relation-stat + .relation-stat { border-left: 1px solid #e8ecf2; }
.modal .relation-stat span { font-size: 10px; font-weight: 560; }
.modal .relation-stat strong { margin-top: 3px; font-size: 15px; font-weight: 720; }
.modal .relation-list { gap: 0; }
.modal .relation-row {
  min-height: 46px;
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid #f0f2f5;
  border-radius: 0;
  background: transparent;
}
.modal .relation-row:last-child { border-bottom: 0; }
.modal .relation-row.current { padding-inline: 10px; border-radius: 8px; background: #f4f7ff; }
.modal .relation-row .relation-main strong { font-size: 12px; }
.modal .relation-row .relation-main span { margin-top: 2px; font-size: 10px; }
.modal .detail-segmented {
  display: inline-flex;
  gap: 3px;
  max-width: 100%;
  margin-bottom: 11px;
  padding: 3px;
  overflow-x: auto;
  border-radius: 9px;
  background: #f1f3f7;
}
.modal .detail-segment {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7b8493;
  font-size: 11px;
  font-weight: 620;
  white-space: nowrap;
  cursor: pointer;
}
.modal .detail-segment strong { margin-left: 5px; color: inherit; font-size: 10px; }
.modal .detail-segment.active { background: #fff; color: #3157d5; box-shadow: 0 1px 4px rgb(16 24 40 / 10%); }
.modal .user-business-panel,
.modal .rights-history-panel,
.modal .device-session-panel { display: none; }
.modal .user-business-panel.active,
.modal .rights-history-panel.active,
.modal .device-session-panel.active { display: block; }
.modal .rights-history-row,
.modal .feedback-history-row,
.modal .device-session-row {
  min-height: 46px;
  padding: 8px 2px;
  border-bottom: 1px solid #f0f2f5;
  color: #667085;
  font-size: 11px;
}
.modal .rights-history-row:last-child,
.modal .feedback-history-row:last-child,
.modal .device-session-row:last-child { border-bottom: 0; }
.modal .action-form {
  gap: 10px;
  margin-top: 12px !important;
  padding: 12px;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: #f8fafc;
}
.modal .action-form label,
.modal .detail-card > label { gap: 5px !important; color: #7b8493 !important; font-size: 11px !important; }
.modal .action-row { justify-content: flex-end; gap: 8px; margin-top: 10px; }
.modal .feedback-content,
.modal .confirm-message,
.modal .audit-reason,
.modal .storage-key {
  margin: 0 0 12px;
  padding: 11px 13px;
  border: 1px solid #e9edf3;
  border-radius: 9px;
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  line-height: 1.6;
}
.modal .storage-key { margin: 12px 0 0; }
.modal .confirm-message { border-color: #f2dddd; background: #fff8f8; color: #a53b43; }
.modal .json-detail { max-height: 240px; margin: 0; padding: 12px 13px; font-size: 11px; line-height: 1.6; }
.modal .json-detail-large { max-height: 62vh; }
.modal .task-data-grid,
.modal .audit-change-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.modal .empty { min-height: 36px; padding: 9px 0; color: #98a2b3; background: transparent; }
.modal .detail-card .relation-list > .empty,
.modal .detail-card > .empty { min-height: 36px; padding: 9px 0; }
.modal .line-item { min-height: 40px; padding: 7px 2px; }
.modal .line-item .item-title { font-size: 12px; }

/* User detail: compact identity, data and management layers. */
.modal .user-detail-modal { width: min(900px, 96vw); }
.modal .user-detail-modal .modal-body { padding-bottom: 20px; }
.modal .user-detail-hero { padding-block: 16px 14px; }
.user-detail-identity { display: flex; min-width: 0; align-items: center; gap: 12px; }
.user-detail-avatar { width: 42px; height: 42px; display: grid; flex: 0 0 42px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #6268dc, #7a7fe8); color: #fff; font-size: 16px; font-weight: 760; box-shadow: 0 6px 14px rgb(98 104 220 / 20%); }
.user-detail-name { min-width: 0; }
.user-detail-title-line { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.user-detail-title-line strong, .user-detail-title-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-detail-title-line strong { max-width: 260px; color: #1f2937; font-size: 16px; font-weight: 750; letter-spacing: -.015em; }
.user-detail-title-line span { color: #7b8493; font-size: 12px; font-variant-numeric: tabular-nums; }
.user-detail-badges { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; }
.user-detail-meta { display: flex; min-width: 0; align-items: center; gap: 0; margin: 9px 0 0 54px; color: #98a2b3; font-size: 10px; }
.user-detail-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-detail-meta span + span::before { content: ""; height: 10px; display: inline-block; margin: 0 10px; border-left: 1px solid #e4e7ec; vertical-align: -1px; }
.user-detail-surface { margin: 0; }
.modal .user-data-card { padding: 15px 0 18px; border-bottom: 1px solid #edf0f4; }
.modal .user-data-card .section-title-row { margin-bottom: 10px; }
.modal .user-data-card .section-title-row h3 { margin: 0; font-size: 11px; }
.user-data-strip { display: grid; grid-template-columns: .9fr 1fr 1.45fr 1fr; overflow: hidden; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.user-data-metric { min-width: 0; min-height: 68px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 14px; }
.user-data-metric + .user-data-metric { border-left: 1px solid #e6eaf0; }
.user-data-metric span { color: #98a2b3; font-size: 10px; font-weight: 560; }
.user-data-metric > strong { overflow: hidden; color: #273142; font-size: 15px; line-height: 1.15; font-weight: 740; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.user-data-metric > small { overflow: hidden; color: #8b95a5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.user-data-breakdown > div { display: flex; align-items: center; gap: 14px; }
.user-data-breakdown > div > span { min-width: 0; display: flex; align-items: baseline; gap: 4px; }
.user-data-breakdown > div strong { color: #273142; font-size: 14px; font-weight: 740; font-variant-numeric: tabular-nums; }
.user-data-breakdown > div small { color: #8b95a5; font-size: 9px; white-space: nowrap; }
.modal .user-management-card { padding: 14px 0 0; }
.modal .user-management-tabs { width: 100%; display: flex; gap: 24px; margin: 0 0 15px; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; padding: 0; background: transparent; }
.modal .user-management-tabs .detail-segment { position: relative; min-width: 0; width: auto; height: 34px; padding: 0 2px 10px; border-radius: 0; background: transparent; color: #8a94a5; box-shadow: none; }
.modal .user-management-tabs .detail-segment:hover { color: #4f5fd5; }
.modal .user-management-tabs .detail-segment.active { background: transparent; color: #3f51c6; box-shadow: none; }
.modal .user-management-tabs .detail-segment.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: #5964d8; }
.user-management-panel { display: none; }
.user-management-panel.active { display: block; }
.user-management-heading { min-height: 28px; display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.user-management-heading span { color: #98a2b3; font-size: 10px; }
.user-management-heading strong { color: #273142; font-size: 13px; font-weight: 720; }
.user-management-heading small { overflow: hidden; color: #8b95a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.user-compact-form { display: grid; align-items: end; gap: 8px; }
.membership-compact-form { grid-template-columns: .85fr 1.15fr; }
.membership-compact-form button { grid-column: 2; justify-self: end; }
.user-compact-form label { min-width: 0; display: grid; gap: 5px; color: #7b8493; font-size: 10px; }
.user-compact-form .field, .user-compact-form .select { min-width: 0; height: 34px; font-size: 11px; }
.user-compact-form button { height: 34px; padding-inline: 12px; white-space: nowrap; }
.user-quota-list { display: flex; align-items: stretch; overflow: hidden; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.user-quota-item { min-width: 0; min-height: 58px; display: grid; flex: 1 1 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-content: center; column-gap: 8px; padding: 8px 12px; }
.user-quota-item + .user-quota-item { border-left: 1px solid #e6eaf0; }
.user-quota-item > span { align-self: end; overflow: hidden; color: #7f899a; font-size: 9px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.user-quota-item > div { grid-row: 1 / -1; grid-column: 2; display: flex; align-items: baseline; gap: 3px; }
.user-quota-item strong { color: #344054; font-size: 15px; line-height: 1; font-weight: 740; }
.user-quota-item small { color: #98a2b3; font-size: 8px; }
.user-quota-item em { align-self: start; color: #a0a8b5; font-size: 8px; font-style: normal; }
.user-account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; padding-top: 3px; }
.user-account-actions .field { min-width: 0; flex: 1 0 100%; height: 34px; font-size: 11px; }
.user-account-actions button { height: 34px; padding-inline: 11px; white-space: nowrap; }

/* Keep the dense user table within the standard content width when data is short. */
#usersTableWrap th,
#usersTableWrap td { padding-inline: 10px; }

@media (max-width: 860px) {
  .user-data-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-data-metric + .user-data-metric { border-left: 0; }
  .user-data-metric:nth-child(2n) { border-left: 1px solid #e6eaf0; }
  .user-data-metric:nth-child(n + 3) { border-top: 1px solid #e6eaf0; }
}

@media (max-width: 760px) {
  .modal .modal-panel { width: 100vw; max-height: 100vh; border-radius: 0; }
  .modal .modal-body { padding-inline: 18px; }
  .modal .detail-grid, .modal .payment-verification-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal .relation-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal .task-data-grid, .modal .audit-change-grid { grid-template-columns: 1fr; }
  .task-payload-grid { grid-template-columns: 1fr; }
  .json-viewer-toolbar { align-items: flex-start; flex-direction: column; }
  .json-viewer-actions { width: 100%; justify-content: flex-end; }
  .json-viewer-body { min-height: 280px; max-height: 66vh; }
  .json-viewer-meta code { max-width: 42%; }
  .user-detail-title-line { gap: 7px; }
  .user-detail-title-line strong { max-width: 130px; }
  .user-detail-meta { margin-left: 0; overflow-x: auto; }
  .user-data-strip { grid-template-columns: 1fr; }
  .user-data-metric:nth-child(2n), .user-data-metric:nth-child(n + 2) { border-left: 0; border-top: 1px solid #e6eaf0; }
  .membership-compact-form { grid-template-columns: 1fr; }
  .membership-compact-form button { grid-column: 1; }
  .user-quota-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-quota-item + .user-quota-item { border-left: 0; }
  .user-quota-item:nth-child(2n) { border-left: 1px solid #e6eaf0; }
  .user-quota-item:nth-child(n + 3) { border-top: 1px solid #e6eaf0; }
  .user-account-actions { flex-wrap: wrap; }
  .user-account-actions .field { flex-basis: 100%; }
}

/* App release management */
.release-management { display: block; max-width: none; }
.release-toolbar { min-height: 40px; display: flex; align-items: center; justify-content: flex-start; margin-bottom: 14px; }
.release-toolbar-actions { display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
.release-latest-label { color: var(--soy-text-3); font-size: 12px; white-space: nowrap; }
.release-latest-label strong { margin-left: 5px; color: var(--soy-primary); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; font-weight: 650; }
.release-create-button { min-width: 104px; }
.release-table-wrap { border: 1px solid #e4e7ed; border-radius: 10px 10px 0 0; }
.release-table-wrap th:first-child, .release-table-wrap td:first-child { width: 170px; }
.release-table-wrap th:nth-child(2), .release-table-wrap td:nth-child(2) { width: 180px; }
.release-table-wrap th:nth-child(4), .release-table-wrap td:nth-child(4) { width: 240px; }
.release-table-wrap th:last-child, .release-table-wrap td:last-child { width: 82px; }
.release-notes-cell { max-width: 460px; color: var(--soy-text-2); }
.release-link-cell { max-width: 240px; overflow: hidden; color: var(--soy-text-3); text-overflow: ellipsis; white-space: nowrap; }
.release-record-pager { margin-top: 0; border: 1px solid #e4e7ed; border-top: 0; border-radius: 0 0 10px 10px; background: #fff; }
.release-edit-form { padding-top: 2px; }
.release-delete-button { margin-right: auto; }
@media(max-width:640px) {
  .release-toolbar-actions { width: 100%; justify-content: flex-start; }
  .release-table-wrap th:first-child, .release-table-wrap td:first-child { min-width: 145px; }
  .release-table-wrap th:nth-child(2), .release-table-wrap td:nth-child(2) { min-width: 165px; }
  .release-notes-cell { min-width: 280px; }
  .release-link-cell { min-width: 220px; }
}
