.accounts-view {
  --accounts-blue: #2f6fed;
  --accounts-ink: #18263a;
}

.management-scope {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #d7e2ef;
  border-radius: 9px;
  padding: 10px 13px;
  background: linear-gradient(90deg, #f7faff, #fbfdff);
  color: #65758a;
  font-size: 10px;
}

.management-scope i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4f88c7;
  box-shadow: 0 0 0 4px #4f88c718;
}

.management-scope b {
  color: #334e72;
}

.accounts-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  border: 1px solid #d7e3f4;
  border-radius: 14px;
  padding: 20px 22px;
  background:
    radial-gradient(circle at 90% 0, #5dcaee30, transparent 31%),
    linear-gradient(125deg, #f8fbff, #eef5ff 62%, #f2fbfb);
  box-shadow: 0 10px 30px #1b4f8a10;
}

.users-hero {
  background:
    radial-gradient(circle at 90% 0, #9f7aea24, transparent 31%),
    linear-gradient(125deg, #fafbff, #f2f5ff 62%, #f8f4ff);
}

.accounts-hero small {
  color: #2a6ddd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.accounts-hero h2 {
  margin: 5px 0;
  color: var(--accounts-ink);
  font-size: 19px;
}

.accounts-hero p {
  margin: 0;
  color: #65758a;
  font-size: 11px;
}

.accounts-hero-actions {
  position: relative;
  z-index: 1;
}

.accounts-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.accounts-metrics article {
  position: relative;
  min-height: 105px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 5px 18px #16365f0a;
}

.accounts-metrics article::after {
  position: absolute;
  top: 17px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72a0db;
  box-shadow: 0 0 0 5px #edf4fc;
  content: '';
}

.accounts-metrics span,
.accounts-metrics small {
  display: block;
  color: #788699;
  font-size: 10px;
}

.accounts-metrics strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--accounts-ink);
  font-size: 25px;
}

.accounts-metrics strong.good {
  color: #0f9a6b;
}

.accounts-panel {
  overflow: hidden;
}

.accounts-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 160px auto;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid #e5ebf2;
  padding: 14px 16px;
}

.accounts-toolbar input,
.accounts-toolbar select {
  height: 36px;
  border: 1px solid #d8e1ec;
  border-radius: 8px;
  padding: 0 11px;
  outline: none;
  background: #fbfcfe;
  color: #34445a;
  font-size: 10px;
}

.accounts-toolbar input:focus,
.accounts-toolbar select:focus {
  border-color: #76a7e9;
  box-shadow: 0 0 0 3px #2f6fed12;
}

.accounts-live {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-self: end;
  color: #69798d;
  font-size: 10px;
}

.accounts-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #13a471;
  box-shadow: 0 0 0 4px #13a47118;
}

.accounts-table-wrap {
  overflow-x: auto;
}

.accounts-table td {
  vertical-align: middle;
}

.account-identity {
  display: grid;
  gap: 3px;
}

.account-identity b {
  color: #26364c;
  font-size: 11px;
}

.account-identity small,
.account-date {
  color: #7c8999;
  font-size: 9px;
}

.account-identity small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.account-state,
.account-role {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  background: #eef3f8;
  color: #53667d;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.account-state.online,
.account-state.active {
  background: #e8f7f1;
  color: #087d56;
}

.account-state.disabled {
  background: #fff0ef;
  color: #bb433b;
}

.account-role {
  margin: 2px 4px 2px 0;
  background: #edf3ff;
  color: #2f67bd;
}

.account-empty,
.account-loading {
  padding: 44px !important;
  color: #7b8796;
  text-align: center;
}

.account-actions {
  display: flex;
  gap: 6px;
}

.account-actions button {
  border: 1px solid #d8e1ec;
  border-radius: 7px;
  padding: 6px 9px;
  background: #fff;
  color: #3c5f89;
  font-size: 9px;
  font-weight: 800;
}

.account-actions button.danger {
  border-color: #f0d4d1;
  color: #b64840;
}

.seat-row-actions {
  min-width: 210px;
  flex-wrap: wrap;
}

.batch-sequence-fields {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(110px, 0.75fr));
  gap: 10px;
}

.batch-sequence-fields[hidden],
.batch-sequence-preview[hidden],
.batch-manual-fields[hidden] {
  display: none !important;
}

.batch-display-prefix {
  grid-column: 1 / -1;
}

.batch-sequence-preview {
  display: grid;
  gap: 10px;
  border: 1px solid #b8d3f5;
  border-radius: 11px;
  padding: 15px 17px;
  background: linear-gradient(120deg, #f5f9ff, #edf5ff);
  color: #284f82;
}

.batch-sequence-preview > small {
  color: #71849c;
  font-size: 9px;
}

.batch-sequence-preview > b {
  font-size: 17px;
}

.batch-sequence-preview > b i {
  padding: 0 10px;
  color: #3e76bd;
  font-style: normal;
}

.batch-sequence-preview > span {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.batch-sequence-preview em {
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  color: #4d6787;
  font-size: 9px;
  font-style: normal;
}

.batch-sequence-preview.invalid {
  border-color: #efb9b5;
  background: #fff5f4;
  color: #b43c35;
}

.credentials-modal textarea {
  width: 100%;
  min-height: 300px;
  border: 1px solid #cdd9e8;
  border-radius: 10px;
  padding: 14px;
  background: #f8fbff;
  font:
    10px/1.7 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}

.seat-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.seat-detail-grid > div {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  padding: 13px 15px;
  background: #f9fbfe;
}

.seat-detail-grid dt {
  color: #7a899b;
  font-size: 9px;
}

.seat-detail-grid dd {
  margin: 0;
  color: #263c58;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.accounts-modal .fixed-permission {
  border: 1px solid #bfe4d4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #effaf5;
  color: #177757;
  font-size: 10px;
}

.accounts-modal textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.chat-assignment {
  display: flex;
  gap: 6px;
  align-items: center;
}

.chat-assignment select,
.chat-assignment button {
  height: 32px;
  border: 1px solid #d7e1ed;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #385575;
  font-size: 9px;
  font-weight: 700;
}

body.theme-dark .management-scope {
  border-color: #30435b;
  background: #1b2839;
  color: #9babc0;
}

body.theme-dark .management-scope b {
  color: #d7e4f5;
}

@media (max-width: 1000px) {
  .accounts-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .accounts-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .accounts-metrics {
    grid-template-columns: 1fr;
  }

  .accounts-toolbar {
    grid-template-columns: 1fr;
  }

  .accounts-live {
    justify-self: start;
  }

  .batch-sequence-fields,
  .seat-detail-grid {
    grid-template-columns: 1fr;
  }
}
