:root {
  --navy: #172634;
  --navy-soft: #243746;
  --ink: #1b2b38;
  --muted: #72808b;
  --line: #e6ebec;
  --canvas: #f5f7f5;
  --white: #ffffff;
  --teal: #20a18b;
  --teal-deep: #168872;
  --teal-pale: #e2f4ee;
  --orange: #e7a35b;
  --shadow: 0 12px 36px rgba(27, 43, 56, 0.045);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: var(--navy);
  color: #dce5e6;
  padding: 30px 18px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 3px 10px;
}

.brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: #d7f1e7;
  color: #177b6a;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 800;
  font-family: Georgia, serif;
  box-shadow: inset 0 -3px 0 rgba(17, 120, 96, .12);
  flex-shrink: 0;
}

.brand-copy, .login-logo > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -.03em;
  color: white;
}

.brand small {
  font-size: 11px;
  color: #91a8ad;
  margin-top: 4px;
}

.nav-caption {
  font-size: 10px;
  letter-spacing: .16em;
  color: #789098;
  font-weight: 800;
  padding: 0 15px;
  margin: 56px 0 17px;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 11px;
  padding: 12px 14px;
  color: #b1c4c8;
  font-weight: 600;
  transition: background .18s, color .18s;
}

.nav-link:hover {
  background: #263b49;
  color: white;
}

.nav-link.current {
  background: #254c4e;
  color: #d8fff1;
  box-shadow: inset 3px 0 0 #5ed6b0;
}

.nav-icon {
  width: 20px;
  font-size: 19px;
  text-align: center;
  font-weight: 400;
}

.sidebar-bottom {
  margin-top: auto;
}

.sidebar-note {
  font-size: 11px;
  color: #a9bdc1;
  padding: 16px 13px 23px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-dot, .mini-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72d7a4;
  display: inline-block;
  flex-shrink: 0;
}

.profile-row {
  border-top: 1px solid #344857;
  padding: 20px 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #415766;
  color: white;
  font-weight: 700;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.profile-copy strong {
  color: white;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-copy small {
  color: #829ba2;
  font-size: 11px;
  margin-top: 3px;
}

.logout-button {
  color: #9db4b9;
  border: 0;
  background: transparent;
  font-size: 22px;
  padding: 4px 8px;
}

.logout-button:hover {
  color: white;
}

.main-content {
  padding: 48px clamp(24px, 4vw, 66px) 24px;
  min-width: 0;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.mobile-topbar {
  display: none;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.eyebrow {
  color: #3d9e88;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(29px, 3vw, 39px);
  letter-spacing: -.045em;
  line-height: 1.15;
  margin: 10px 0 9px;
}

.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.button {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 0 17px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .15s, background .15s, border-color .15s;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 5px 13px rgba(29, 157, 129, .14);
}

.button.primary:hover {
  background: var(--teal-deep);
}

.button.secondary {
  border-color: #dce5e4;
  background: white;
  color: #38635b;
}

.button.secondary:hover {
  border-color: #a4ccc2;
}

.button.ghost {
  color: #5d6d75;
  background: transparent;
}

.button-plus {
  font-size: 19px;
  line-height: 0;
  font-weight: 400;
  margin-top: -2px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card, .panel {
  background: white;
  border: 1px solid #e7ebeb;
  border-radius: 17px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 22px;
  min-height: 152px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64747e;
  font-size: 12px;
  font-weight: 600;
}

.metric-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.metric-icon.blue {
  color: #518ca3;
  background: #eaf2f5;
}

.metric-icon.green {
  color: #1e987b;
  background: #e4f5ed;
}

.metric-icon.orange {
  color: #cd8b41;
  background: #fbf1e6;
}

.metric-icon.violet {
  color: #8a79ba;
  background: #f0ecf7;
}

.metric-card > strong {
  display: block;
  font-size: 36px;
  letter-spacing: -.045em;
  line-height: 1;
  margin: 18px 0 8px;
}

.metric-card > small {
  color: #96a3a8;
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr);
  gap: 20px;
}

.dashboard-grid > *,
.side-stack > * {
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 25px 26px 20px;
}

h2 {
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin: 6px 0 0;
}

.text-link {
  color: #198e7b;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.text-link:hover {
  color: #116952;
}

.compact-list {
  padding: 0 16px 14px;
}

.compact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 12px;
  border-top: 1px solid #eef1f1;
}

.compact-account-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.compact-row form {
  flex-shrink: 0;
}

.compact-row .button {
  min-height: 35px;
  padding: 0 12px;
}

.compact-row .button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.compact-row:hover {
  background: #f8fbf9;
  border-radius: 8px;
}

.list-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: #ecf5f1;
  color: #4c9a83;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

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

.compact-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-main small {
  color: #94a1a5;
}

.row-arrow {
  color: #aab6b5;
  font-size: 17px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pill.success {
  color: #16866a;
  background: #e4f6ed;
}

.pill.neutral {
  color: #7a8990;
  background: #eff2f3;
}

.pill.subtle {
  color: #66777d;
  background: #f2f5f6;
}

.side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.proxy-summary {
  padding: 25px;
}

.proxy-summary-top {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.proxy-summary-top h2 {
  margin-bottom: 7px;
}

.proxy-summary-top p {
  color: #87969b;
  font-size: 12px;
  margin-bottom: 0;
}

.proxy-symbol {
  width: 40px;
  height: 40px;
  background: #eaf3f1;
  color: #419f87;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 24px;
}

.proxy-number {
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -.05em;
  margin: 20px 0 12px;
}

.proxy-number span {
  font-size: 19px;
  color: #adb9ba;
}

.meter {
  background: #edf1ef;
  height: 7px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 17px;
}

.meter > span {
  height: 100%;
  display: block;
  background: #39bd9d;
  border-radius: 8px;
}

.hint-card {
  background: #e8f4ee;
  color: #26564c;
  padding: 20px;
  display: flex;
  gap: 12px;
  border-radius: 14px;
}

.hint-icon {
  width: 20px;
  height: 20px;
  border: 1.5px solid #4ea48a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-family: Georgia, serif;
}

.hint-card strong {
  font-size: 12px;
}

.hint-card p {
  font-size: 11px;
  line-height: 1.55;
  margin: 6px 0 0;
  color: #5b8376;
}

.table-panel {
  overflow: hidden;
}

.toolbar {
  display: flex;
  gap: 10px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  border: 1px solid #dfe7e6;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  min-width: 245px;
  flex: 1;
}

.search-field span {
  font-size: 22px;
  color: #8eaba5;
  line-height: 1;
}

.search-field input {
  border: 0;
  outline: none;
  width: 100%;
  height: 42px;
  background: transparent;
  color: var(--ink);
}

.toolbar select, .field select {
  border: 1px solid #dfe7e6;
  border-radius: 9px;
  padding: 0 33px 0 12px;
  color: #53646d;
  background: #fff;
  min-height: 43px;
}

.table-scroll {
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th {
  color: #96a3a8;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-weight: 800;
  background: #fbfcfb;
  text-align: left;
  padding: 14px 12px;
  overflow-wrap: anywhere;
}

td {
  border-top: 1px solid #eef1f1;
  padding: 15px 12px;
  color: #52616a;
  font-size: 12px;
  overflow-wrap: anywhere;
}

tr:hover td {
  background: #fbfdfc;
}

.cell-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-identity > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cell-identity strong {
  color: #253641;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.link-cell a {
  overflow-wrap: anywhere;
}

.selection-column {
  width: 66px;
  text-align: center;
}

.selection-column input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.account-table th:first-child {
  width: 21%;
}

.account-table th:last-child {
  width: 205px;
}

.account-row-link:hover {
  color: var(--teal-deep);
}

.account-open-cell {
  text-align: right;
}

.account-open-cell .button {
  min-height: 34px;
  padding: 0 10px;
}

.list-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.list-row-actions .button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.danger-link {
  color: #b84c40;
}

.danger-link:hover {
  color: #973b32;
}

.cell-identity small {
  color: #9eaaae;
}

.monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.muted {
  color: #abb6b8;
}

.role-tag {
  font-size: 11px;
  color: #75878c;
  background: #f0f3f3;
  border-radius: 6px;
  padding: 6px 9px;
  white-space: nowrap;
}

.role-tag.role-reactions {
  color: #9c7a39;
  background: #fbf1df;
}

.role-tag.role-broadcast {
  color: #7b70a8;
  background: #f0edfa;
}

.session-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
}

.session-indicator.has-session {
  color: #238b6f;
}

.session-indicator.missing-session {
  color: #bc7a5c;
}

.session-indicator.missing-session .mini-dot {
  background: #d89370;
}

.pill.danger {
  background: #fff0eb;
  color: #bb6049;
}

.actions-column {
  text-align: right;
}

.group-target-table th:first-child {
  width: 18%;
}

.group-target-table th:nth-child(3) {
  width: 20%;
}

.group-target-table th:last-child {
  width: 230px;
}

.group-target-table .row-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.account-detail-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.account-detail-panel {
  padding: 25px;
  min-width: 0;
}

.account-detail-panel h2 {
  margin: 0 0 20px;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-menu {
  display: grid;
}

.account-menu a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.account-menu a:hover span,
.account-menu a:hover b {
  color: var(--teal-deep);
}

.account-menu a.required-action {
  padding: 16px;
  border: 1px solid #e7a195;
  border-radius: 10px;
  background: #fff0ed;
  color: #9c3c30;
}

.account-menu a.required-action small,
.account-menu a.required-action:hover span,
.account-menu a.required-action:hover b {
  color: #9c3c30;
}

.account-menu a.delete-account-link {
  color: #a9473c;
}

.account-delete-panel {
  max-width: 720px;
  padding: 24px;
}

.account-delete-panel p {
  line-height: 1.6;
}

.account-delete-panel .form-actions {
  padding-bottom: 0;
  margin-top: 18px;
}

.login-qr-image {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 24px auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.button.danger {
  background: #b84c40;
  color: #fff;
}

.button.danger:hover {
  background: #973b32;
}

.auth-required-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid #e7a195;
  border-radius: 12px;
  background: #fff0ed;
  color: #9c3c30;
}

.auth-required-panel p {
  margin: 6px 0 0;
}

.auth-required-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff0ed;
  color: #9c3c30;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .auth-required-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

.account-menu span {
  font-weight: 750;
}

.account-menu small {
  color: var(--muted);
  grid-column: 1;
}

.account-menu b {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  font-size: 19px;
  color: #6c8e90;
}

.icon-link:hover {
  color: #188c79;
  background: #edf7f2;
}

.icon-link.danger-link:hover {
  color: #973b32;
  background: #fff0ed;
}

.toggle-button {
  width: 34px;
  height: 19px;
  background: #d5dddc;
  border: 0;
  border-radius: 100px;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: background .15s;
}

.toggle-button > span {
  background: white;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: 0 1px 3px #7b8b8b55;
  transition: transform .15s;
}

.toggle-button.on {
  background: var(--teal);
}

.toggle-button.on > span {
  transform: translateX(15px);
}

.empty-state {
  padding: 52px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-state.small {
  padding: 28px 20px 45px;
}

.empty-icon {
  width: 53px;
  height: 53px;
  border-radius: 15px;
  background: #e7f5ee;
  color: #53a991;
  display: grid;
  place-items: center;
  font-size: 27px;
  margin-bottom: 18px;
}

.empty-state strong {
  font-size: 16px;
}

.empty-state p {
  color: #8c9b9e;
  margin: 8px 0 20px;
}

.pagination {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #829297;
  font-size: 12px;
}

.pagination > div {
  display: flex;
  gap: 15px;
}

.pagination a {
  color: #198e7b;
  font-weight: 700;
}

.below-note {
  color: #87979b;
  font-size: 11px;
  padding: 17px 2px;
}

.breadcrumbs {
  display: flex;
  gap: 10px;
  color: #a1afb0;
  font-size: 11px;
  margin-bottom: 19px;
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.form-page-header {
  margin-bottom: 25px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr);
  gap: 20px;
  align-items: start;
}

.form-layout > *,
.form-aside > *,
.field,
.checkbox-row > span {
  min-width: 0;
}

.form-layout.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.login-methods {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.login-phone-number {
  font-size: 1.4rem;
}

.login-message {
  margin-top: 16px;
}

.login-message p {
  white-space: pre-wrap;
}

.group-join-actions {
  padding: 16px 28px 24px;
}

#qr-video {
  display: block;
  max-width: 100%;
  margin-top: 16px;
}

#qr-video[hidden] {
  display: none;
}

.form-panel {
  padding: 18px 28px 12px;
}

.account-setting-panel {
  max-width: 640px;
}

.setting-current {
  color: #64747e;
  font-size: 12px;
  margin: 14px 0 0;
}

.form-section {
  padding: 24px 0 27px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  gap: 13px;
  margin-bottom: 25px;
}

.step-number {
  border-radius: 8px;
  background: #e6f5ee;
  color: #268f73;
  font-size: 11px;
  font-weight: 800;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.section-heading h2 {
  margin: 2px 0 6px;
  font-size: 17px;
}

.section-heading p {
  color: #97a3a6;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label:not(.checkbox-row) {
  display: block;
  font-size: 11px;
  color: #576a72;
  font-weight: 750;
  margin-bottom: 8px;
}

.field input:not([type=checkbox]):not([type=radio]), .field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dce5e4;
  background: white;
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}


.field input:focus, .field select:focus, .login-form input:focus {
  border-color: #54b69c;
  box-shadow: 0 0 0 3px rgba(42, 170, 137, .1);
}

.field input:disabled {
  color: #8d9a9f;
  background: #f4f7f7;
}

.field-help {
  color: #9daaae;
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  display: block;
  color: #bb5e4d;
  font-size: 11px;
  margin-top: 6px;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  padding: 15px;
  border: 1px solid #e1e9e7;
  border-radius: 10px;
  cursor: pointer;
}

.checkbox-row input {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
}

.checkbox-row > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checkbox-row strong {
  font-size: 12px;
}

.checkbox-row small {
  font-size: 11px;
  color: #97a5a5;
}

.upload-box {
  border: 1.5px dashed #bfd9d0;
  border-radius: 12px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #9aaba9;
  font-size: 11px;
  text-align: center;
  background: #fbfdfb;
}

.avatar-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  color: #576a72;
  font-size: 12px;
  font-weight: 700;
}

.avatar-preview img {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dce5e4;
  background: #f4f7f7;
}

.avatar-preview img[hidden] {
  display: none;
}

.avatar-picker {
  margin-bottom: 18px;
}

.avatar-gallery-heading {
  margin-bottom: 10px;
  color: #576a72;
  font-size: 11px;
  font-weight: 750;
}

.avatar-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 10px;
  max-height: 270px;
  overflow-y: auto;
  padding: 3px;
}

.avatar-gallery-item {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.avatar-delete-button {
  border: 0;
  background: transparent;
  color: #a14e40;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  padding: 3px;
}

.avatar-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 6px;
  border: 2px solid #e2eae7;
  border-radius: 10px;
  cursor: pointer;
}

.avatar-option:has(input:checked) {
  border-color: var(--teal);
  background: #f0faf5;
}

.avatar-option:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.avatar-option input {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal);
}

.avatar-option img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
}

.avatar-option small {
  color: var(--teal-deep);
  font-size: 10px;
  font-weight: 700;
}

.upload-box strong {
  color: #456c61;
  font-size: 12px;
}

.upload-icon {
  font-size: 25px;
  color: #58ab93;
}

.upload-box input {
  margin-top: 9px;
  max-width: 100%;
  color: #70817f;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 19px 0;
}

.broadcast-choice-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.broadcast-choice-form {
  display: grid;
  align-content: end;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.broadcast-choice-form input[type="number"] {
  width: 100%;
  max-width: 160px;
}

@media (max-width: 700px) {
  .broadcast-choice-actions {
    grid-template-columns: 1fr;
  }
}

.login-start-actions {
  flex-wrap: wrap;
}

.form-aside {
  display: grid;
  gap: 15px;
}

.form-aside.single-card {
  grid-template-columns: minmax(0, 1fr);
}

.aside-card {
  background: var(--navy);
  color: white;
  padding: 24px;
  border-radius: 15px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.aside-card.light {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.aside-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #315756;
  color: #9ee1c7;
  font-size: 18px;
}

.aside-card h3 {
  font-size: 14px;
  margin: 20px 0 9px;
}

.aside-card p {
  font-size: 12px;
  line-height: 1.6;
  color: #a7c1c1;
  margin: 0;
}

.aside-card p + p {
  margin-top: 12px;
}

.aside-card > .button {
  width: 100%;
  margin-top: 12px;
}

.aside-card > .aside-detail:first-of-type {
  margin-top: 16px;
}

.marketplace-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 10px;
  background: #9ee1c7;
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.marketplace-link:hover,
.marketplace-link:focus-visible {
  background: white;
  color: var(--navy);
}

.aside-card .marketplace-note {
  font-size: 12px;
  color: white;
}

.aside-detail {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  font-size: 11px;
}

.aside-detail span {
  color: #8e9da2;
}

.aside-error {
  color: #bb6958;
  font-size: 11px;
  line-height: 1.5;
}

.form-alert {
  background: #fff0ed;
  color: #ae5a4b;
  border: 1px solid #f2d4cc;
  border-radius: 9px;
  padding: 13px 15px;
  font-size: 12px;
  margin-top: 18px;
}

.form-alert ul {
  margin: 0;
  padding-left: 18px;
}

.flash-stack {
  margin-bottom: 20px;
}

.flash {
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid #d1ecdf;
  background: #ebf8f0;
  color: #27805f;
  font-size: 12px;
  font-weight: 650;
}

.footer {
  margin-top: 33px;
  color: #a2afb2;
  font-size: 10px;
}

.footer span {
  margin: 0 5px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #162735;
  padding: 20px;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.orb-one {
  width: 440px;
  height: 440px;
  background: #24493f;
  opacity: .42;
  top: -180px;
  right: -100px;
}

.orb-two {
  width: 320px;
  height: 320px;
  border: 1px solid #476e69;
  bottom: -130px;
  left: -120px;
}

.login-card {
  position: relative;
  width: min(100%, 430px);
  background: white;
  border-radius: 22px;
  padding: 36px 38px;
  box-shadow: 0 30px 80px #0a18243d;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-logo strong {
  font-size: 15px;
  letter-spacing: -.03em;
}

.login-logo small {
  font-size: 10px;
  color: #92a1a3;
  margin-top: 3px;
}

.login-intro {
  margin: 37px 0 28px;
}

.login-intro h1 {
  font-size: 29px;
  margin: 10px 0 8px;
}

.login-intro p {
  font-size: 12px;
  color: #87969a;
  line-height: 1.6;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-form label {
  font-size: 11px;
  color: #596c73;
  font-weight: 750;
  margin-bottom: 8px;
}

.login-form input:not([type=hidden]) {
  border: 1px solid #dce5e4;
  border-radius: 9px;
  padding: 12px 13px;
  margin-bottom: 18px;
  outline: none;
}

.login-form .button {
  margin-top: 8px;
}

.login-form .wide {
  width: 100%;
  justify-content: space-between;
}

.login-footnote {
  color: #a7b2b4;
  font-size: 10px;
  text-align: center;
  margin: 26px 0 0;
}

@media (max-width: 1150px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .side-stack {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 24px;
  }
  .mobile-topbar .brand strong {
    color: var(--ink);
  }
  .mobile-topbar nav {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: #5f7778;
    font-weight: 700;
  }
  .main-content {
    padding: 23px 20px;
  }
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .form-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-detail-layout {
    grid-template-columns: 1fr;
  }
  .table-scroll table,
  .table-scroll tbody,
  .table-scroll tr,
  .table-scroll td {
    display: block;
    width: 100%;
  }
  .table-scroll thead {
    display: none;
  }
  .table-scroll tbody {
    padding: 8px;
  }
  .table-scroll tr {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 7px 12px;
    margin-bottom: 8px;
    background: white;
  }
  .table-scroll tr:last-child {
    margin-bottom: 0;
  }
  .table-scroll td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-top: 0;
    min-width: 0;
    text-align: right;
  }
  .table-scroll td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    flex: 0 0 38%;
  }
  .table-scroll td:first-child {
    padding-top: 10px;
  }
  .table-scroll td:last-child {
    padding-bottom: 10px;
  }
  .table-scroll .cell-identity {
    min-width: 0;
    text-align: left;
  }
  .table-scroll .row-actions {
    justify-content: flex-end;
    gap: 12px;
  }
  .table-scroll .link-cell a {
    min-width: 0;
  }
  .table-scroll .selection-column {
    text-align: right;
  }
  .account-table td:first-child::before {
    display: none;
  }
  .account-table td:first-child {
    justify-content: flex-start;
  }
  .account-table tr:hover {
    border-color: #9fcfc1;
  }
}

@media (max-width: 600px) {
  .account-table .account-open-link {
    display: none;
  }
  .account-table .account-open-cell::before {
    display: none;
  }
  .account-table .account-open-cell .list-row-actions {
    width: 100%;
  }
  .account-table .account-open-cell form {
    flex: 1;
    min-width: 0;
  }
  .account-table .account-open-cell form .button {
    width: 100%;
    min-height: 44px;
  }
  .main-content {
    padding: 16px 12px;
  }
  .mobile-topbar {
    display: block;
    padding-bottom: 18px;
  }
  .mobile-topbar nav {
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 4px;
    white-space: nowrap;
  }
  .mobile-topbar nav a {
    flex-shrink: 0;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
  }
  .metrics-grid, .side-stack, .form-aside, .field-grid {
    grid-template-columns: 1fr;
  }
  .field.full {
    grid-column: auto;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-field {
    min-width: 100%;
  }
  .toolbar select {
    flex: 1;
  }
  .toolbar .button {
    width: 100%;
  }
  .panel-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .panel-header .text-link {
    white-space: normal;
  }
  .compact-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .compact-account-link {
    flex-basis: auto;
    width: 100%;
  }
  .compact-row .pill {
    align-self: flex-start;
    white-space: normal;
    text-align: left;
  }
  .compact-row form {
    width: 100%;
    margin: 0;
  }
  .compact-row .button {
    width: 100%;
    min-height: 44px;
  }
  .form-panel {
    padding: 8px 20px 0;
  }
  .aside-card {
    padding: 18px;
  }
  .login-card {
    padding: 27px 24px;
  }
  .account-detail-panel {
    padding: 18px;
  }
  .table-scroll .row-actions .button {
    padding: 0 10px;
  }
}
.reaction-modes[hidden] {
  display: none;
}

.reaction-modes {
  display: grid;
  gap: 0.75rem;
}

.broadcast-history {
  margin-top: 24px;
  padding: 28px;
}

.broadcast-history h2 {
  margin: 0 0 18px;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.broadcast-job-list {
  display: grid;
  gap: 12px;
}

.broadcast-job {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.broadcast-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.broadcast-job p {
  margin: 10px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.broadcast-job small {
  color: var(--muted);
}

.account-runtime-panel {
  margin-bottom: 20px;
  padding: 28px;
}

.account-runtime-heading,
.runtime-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.account-runtime-heading {
  justify-content: space-between;
}

.account-runtime-heading h2 {
  margin: 8px 0 0;
}

.runtime-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.runtime-stats > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.runtime-stats small,
.runtime-actions small {
  color: var(--muted);
}

.runtime-stats strong {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.runtime-actions form {
  margin: 0;
}

.runtime-errors {
  margin-top: 20px;
}

.runtime-errors summary {
  cursor: pointer;
  font-weight: 700;
}

.runtime-errors > div {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.runtime-errors time,
.runtime-errors strong {
  display: inline-block;
  margin-right: 12px;
  font-size: 12px;
}

.runtime-errors p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.runtime-list-error {
  display: block;
  max-width: 180px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
