:root {
  --purple-a: #6f79e8;
  --purple-b: #7355b4;
  --login-text: #17192f;
  --muted: #9aa0ad;
  --line: #e1e2e6;
  --panel-line: #dddddd;
  --green: #3d8144;
  --red: #bd4c4c;
  --blue: #347fc0;
  --table-text: #34363b;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--table-text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  padding: 32px 56px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--purple-a), var(--purple-b));
}

.login-card {
  width: min(480px, 100%);
  min-height: auto;
  border: 0;
  border-radius: 22px;
  padding: 30px 36px 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #6f7ee8, #7653b2);
  color: #fff;
}

.login-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 3;
}

.login-card h1 {
  margin: 18px 0 22px;
  color: var(--login-text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
}

.login-field {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: #5a5d66;
  font-size: 15px;
  font-weight: 800;
}

.login-field input {
  width: 100%;
  height: 44px;
  border: 2px solid #e2e4eb;
  border-radius: 9px;
  padding: 0 14px;
  outline: none;
  color: #080911;
  font-size: 16px;
  font-weight: 700;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.login-field input::placeholder {
  color: #b7bac3;
}

.login-field input:focus {
  border-color: #7280f1;
  box-shadow: 0 0 0 6px rgba(114, 128, 241, 0.14);
}

.login-button {
  width: 100%;
  height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #98a5f3, #a988d2);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: none;
}

.login-button:disabled {
  opacity: 0.78;
  cursor: wait;
}

.form-error {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
}

.login-foot {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.phone-page {
  min-height: 100vh;
  padding: 0;
  background: #f2f3f8;
}

.platform-topbar {
  min-height: 60px;
  padding: 0 10px 0 8px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: #4b5fc0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(46, 60, 132, 0.26);
}

.brand-block,
.topbar-meta,
.topbar-meta span,
.topbar-actions,
.topbar-button,
.dashboard-tabs button,
.workspace-section h2,
.table-title h2,
.primary-action {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 8px;
  font-size: 17px;
  font-weight: 900;
}

.brand-block svg {
  width: 21px;
  height: 21px;
  stroke-width: 3;
}

.topbar-meta {
  min-width: 0;
  justify-content: center;
  gap: 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.topbar-meta span {
  min-width: 0;
  gap: 5px;
  white-space: nowrap;
}

.topbar-meta svg,
.topbar-button svg,
.dashboard-tabs svg,
.workspace-section h2 svg,
.table-title h2 svg,
.primary-action svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.topbar-meta b {
  color: #ffe785;
  font-weight: 900;
}

.token-inline code {
  max-width: 190px;
  display: inline-block;
  color: #fff;
  font-family: Menlo, Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 8px;
}

.topbar-button {
  height: 32px;
  gap: 6px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 140px);
  gap: 10px;
  padding: 16px 0 10px;
  border-bottom: 1px solid #e3e5ee;
}

.stat-card {
  height: 68px;
  margin-left: 0;
  border: 1px solid #e8eaf1;
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 8px rgba(32, 39, 63, 0.07);
}

.stat-card:first-child {
  margin-left: 0;
}

.stat-card span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #8b9099;
  font-size: 12px;
  font-weight: 900;
}

.stat-card svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.stat-card strong {
  margin-top: -6px;
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
}

.stat-card.red strong {
  color: #cf4b51;
}

.stat-card.green strong {
  color: #4f9c50;
}

.stat-card.purple strong,
.stat-card.indigo strong {
  color: #5b57b8;
}

.stat-card.blue strong {
  color: #2e87bd;
}

.stat-card.teal strong {
  color: #168875;
}

.dashboard-tabs {
  height: 42px;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
  gap: 18px;
  border-bottom: 1px solid #dee1ea;
  background: #fff;
}

.dashboard-tabs button {
  gap: 5px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3a7fa9;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-tabs button.active {
  border-bottom-color: #347fc0;
  color: #225f8e;
}

.tab-pane {
  width: 100%;
}

.workspace-section {
  margin-top: 10px;
  border-top: 1px solid #e3e5ed;
  border-bottom: 1px solid #e3e5ed;
  background: #fff;
}

.workspace-section h2,
.table-title {
  height: 42px;
  margin: 0;
  padding: 0 16px;
  border-bottom: 1px solid #e3e5ed;
  color: #30333a;
}

.workspace-section h2,
.table-title h2 {
  gap: 6px;
  font-size: 15px;
  font-weight: 900;
}

.get-phone-form {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #343941;
  font-size: 14px;
  font-weight: 900;
}

.get-phone-form input,
.get-phone-form select {
  width: 76px;
  height: 34px;
  border: 1px solid #d7dae4;
  border-radius: 3px;
  padding: 0 8px;
  text-align: center;
  color: #252932;
  background: #fff;
  outline: none;
}

.get-phone-form select {
  width: 96px;
  text-align: left;
}

.primary-action {
  height: 34px;
  gap: 6px;
  border: 0;
  border-radius: 4px;
  padding: 0 14px;
  background: #347fc0;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.primary-action:disabled {
  opacity: 0.75;
  cursor: wait;
}

.auto-action {
  height: 34px;
  gap: 6px;
  border: 1px solid #d7dae4;
  border-radius: 4px;
  padding: 0 14px;
  background: #ffffff;
  color: #343941;
  font-size: 13px;
  font-weight: 900;
}

.auto-action.active {
  border-color: #f0a936;
  background: #f0a936;
  color: #fff;
}

.sound-toggle {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #565c66;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.sound-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border: 1px solid #cfd3df;
  border-radius: 999px;
  background: #eef1f6;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(25, 30, 40, 0.22);
  transition: transform 0.18s ease;
}

.sound-toggle input:checked + .toggle-track {
  border-color: #347fc0;
  background: #347fc0;
}

.sound-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.sound-toggle input:focus-visible + .toggle-track {
  outline: 2px solid rgba(52, 127, 192, 0.35);
  outline-offset: 2px;
}

.auto-get-status {
  min-height: 18px;
  color: #8b9099;
  font-size: 12px;
  font-weight: 800;
}

.auto-get-status.active {
  color: #6f747d;
}

.records-panel {
  margin-top: 12px;
  border-top: 1px solid #e3e5ed;
  border-bottom: 1px solid #e3e5ed;
  background: #fff;
  overflow: hidden;
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
}

.table-title h2 {
  margin: 0;
}

.table-title span {
  color: #7d828b;
  font-size: 13px;
  font-weight: 900;
}

.api-doc-panel {
  margin-top: 10px;
  border-bottom: 1px solid #ececf1;
  background: #fff;
}

.api-doc-head {
  min-height: 48px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.api-doc-head h3 {
  margin: 0;
  color: #2f3338;
  font-size: 16px;
  font-weight: 900;
}

.api-doc-head span {
  color: #747982;
  font-size: 13px;
  font-weight: 800;
}

.api-doc-body {
  padding: 16px 18px 18px;
  color: #30343a;
  font-size: 14px;
  line-height: 1.55;
}

.api-summary {
  margin: 0 0 10px;
  display: grid;
  gap: 6px;
}

.api-summary div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-summary dt {
  min-width: 72px;
  color: #22262c;
  font-weight: 900;
}

.api-summary dd {
  min-width: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.api-doc-panel code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff3f7;
  color: #c94f7e;
  font-family: Menlo, Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.api-section {
  margin-top: 12px;
}

.api-section h4 {
  margin: 0 0 8px;
  color: #202329;
  font-size: 14px;
  font-weight: 900;
}

.api-param-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 8px;
}

.api-param-table th,
.api-param-table td {
  height: 36px;
  padding: 0 9px;
  border: 1px solid #e3e3e6;
  text-align: left;
  color: #30343a;
  font-size: 13px;
  font-weight: 650;
}

.api-param-table th {
  background: #fff;
  color: #262a30;
  font-weight: 900;
}

.api-param-table th:first-child,
.api-param-table td:first-child {
  width: 22%;
}

.api-param-table th:last-child,
.api-param-table td:last-child {
  width: 82px;
}

.api-example-line {
  min-width: 0;
  margin: 5px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #565c64;
  font-size: 13px;
  font-weight: 750;
}

.api-example-line code {
  max-width: min(900px, 100%);
  white-space: nowrap;
  overflow-x: auto;
}

.api-example-title {
  margin: 4px 0 6px;
  color: #6c7178;
  font-size: 13px;
  font-weight: 750;
}

.api-doc-panel pre {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #f7f8fa;
  color: #37404a;
  font-family: Menlo, Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

.api-token-line {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eceef4;
  color: #30343a;
  font-size: 14px;
  font-weight: 900;
}

.copy-button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid #d2d8e1;
  border-radius: 5px;
  background: #fff;
  color: #2e3540;
  font-size: 12px;
  font-weight: 900;
}

.icon-copy {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-color: transparent;
  background: transparent;
  color: #fff;
}

.icon-copy svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.records-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.records-table,
.billing-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.records-table th,
.records-table td,
.billing-table th,
.billing-table td {
  border-bottom: 1px solid var(--panel-line);
  text-align: left;
  color: var(--table-text);
}

.records-table th,
.billing-table th {
  height: 36px;
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.records-table td,
.billing-table td {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 650;
}

.records-table th:nth-child(1),
.records-table td:nth-child(1),
.billing-table th:nth-child(1),
.billing-table td:nth-child(1) {
  width: 54px;
  padding-left: 12px;
}

.records-table th:nth-child(2),
.records-table td:nth-child(2) {
  width: 88px;
}

.records-table th:nth-child(3),
.records-table td:nth-child(3) {
  width: 170px;
}

.records-table th:nth-child(4),
.records-table td:nth-child(4) {
  width: 150px;
}

.records-table th:nth-child(5),
.records-table td:nth-child(5) {
  width: 220px;
}

.records-table th:nth-child(6),
.records-table td:nth-child(6) {
  width: 220px;
}

.records-table th:nth-child(7),
.records-table td:nth-child(7) {
  width: 170px;
}

.records-table th:nth-child(8),
.records-table td:nth-child(8) {
  width: 172px;
}

.phone-cell {
  color: #303137;
  font-weight: 900 !important;
}

.code-cell {
  color: var(--green) !important;
  font-weight: 700 !important;
}

.timeout-text {
  color: var(--red) !important;
  font-weight: 800 !important;
}

.record-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-weight: 800;
}

.record-status svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: #fff;
  stroke-width: 3;
}

.record-status.success {
  color: var(--green);
}

.record-status.timeout {
  color: var(--red);
}

.record-status.wrong {
  color: #b06917;
}

.record-status.old {
  color: #a26c24;
}

.record-status.dead {
  color: #8f3aa5;
}

.record-status.pending {
  color: #7d838c;
}

.record-actions {
  display: inline-flex;
  gap: 4px;
}

.record-actions button {
  width: 26px;
  height: 24px;
  border: 1px solid #d8dde5;
  border-radius: 4px;
  background: #fff;
  color: #2e3540;
  font-size: 12px;
  font-weight: 900;
}

.record-actions .report-success {
  border-color: #bddfc1;
  color: #317a38;
}

.record-actions .report-wrong,
.record-actions .report-old {
  border-color: #f2d39d;
  color: #a66710;
}

.record-actions .report-dead {
  border-color: #dec4ec;
  color: #7f2c99;
}

.record-actions .report-expired {
  border-color: #f0bec1;
  color: #b74249;
}

.record-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.billing-type {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 22px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
}

.billing-type.cost {
  background: #fff2f3;
  color: #c94d54;
}

.billing-type.refund {
  background: #eff9f1;
  color: #408a45;
}

.cost-text {
  color: #c94d54 !important;
  font-weight: 900 !important;
}

.refund-text {
  color: #408a45 !important;
  font-weight: 900 !important;
}

.empty-cell {
  height: 140px !important;
  text-align: center !important;
  color: #9ca0a8 !important;
}

.records-note {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  color: #a7a9af;
  font-size: 12px;
  font-weight: 800;
}

.records-note svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}

.pager {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0 12px 16px;
}

.pager button,
.pager-ellipsis {
  min-width: 32px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8dbe0;
  border-left: 0;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.pager button:first-child {
  border-left: 1px solid #d8dbe0;
  border-radius: 6px 0 0 6px;
}

.pager button:last-child {
  border-radius: 0 6px 6px 0;
}

.pager button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pager button:disabled {
  color: #a7a9af;
  cursor: not-allowed;
}

.pager-ellipsis {
  color: #777b84;
}

.admin-shell {
  min-height: 100vh;
  background: #f4f6f8;
}

.admin-login {
  min-height: 100vh;
  padding: 32px 56px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4f7fd8, #2d566b);
}

.admin-login-card {
  min-height: auto;
}

.admin-icon {
  background: linear-gradient(135deg, #347fc0, #20475a);
}

.admin-page {
  min-height: 100vh;
  padding: 14px;
}

.admin-topbar {
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid #e0e4ea;
  border-radius: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-topbar p,
.admin-topbar h1 {
  margin: 0;
}

.admin-topbar p {
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.admin-topbar h1 {
  margin-top: 3px;
  color: #252830;
  font-size: 20px;
  font-weight: 900;
}

.admin-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-actions a,
.admin-actions button,
.create-form button,
.quota-tools button,
.mini-button {
  height: 30px;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  background: #fff;
  color: #2e3540;
  font-weight: 800;
  text-decoration: none;
}

.admin-actions a,
.admin-actions button {
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.admin-stats article,
.admin-panel {
  border: 1px solid #e0e4ea;
  border-radius: 6px;
  background: #fff;
}

.admin-stats article {
  padding: 12px;
}

.admin-stats span {
  display: block;
  color: #76808c;
  font-size: 13px;
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 6px;
  color: #1f2630;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.admin-panel {
  margin-bottom: 12px;
  overflow: hidden;
}

.admin-panel-head {
  min-height: 46px;
  padding: 0 14px;
  border-bottom: 1px solid #e4e8ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-panel-head h2 {
  margin: 0;
  color: #252830;
  font-size: 17px;
  font-weight: 900;
}

.admin-panel-head span {
  color: #7b838e;
  font-size: 13px;
  font-weight: 800;
}

.panel-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 130px 90px;
  gap: 10px;
  padding: 12px 14px;
  align-items: end;
}

.card-form {
  grid-template-columns: 150px 150px 110px;
}

.pool-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}

.pool-stats article {
  min-height: 62px;
  padding: 10px;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  background: #f8fafc;
}

.pool-stats span {
  display: block;
  color: #707984;
  font-size: 12px;
  font-weight: 900;
}

.pool-stats strong {
  display: block;
  margin-top: 7px;
  color: #1f2630;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.channel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px 0;
}

.uploader-channel-stats {
  padding: 0 0 12px;
}

.channel-stats article {
  min-height: 82px;
  padding: 10px;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  background: #fff;
}

.channel-stats span {
  display: block;
  color: #4b5561;
  font-size: 13px;
  font-weight: 900;
}

.channel-stats strong {
  display: block;
  margin-top: 6px;
  color: #1f2630;
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

.channel-stats small {
  display: block;
  margin-top: 6px;
  color: #687280;
  font-size: 12px;
  font-weight: 850;
}

.channel-mini {
  min-width: 170px;
  display: grid;
  gap: 3px;
  color: #596272;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.uploader-status-filters {
  padding: 10px 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.uploader-status-filters button {
  min-width: 58px;
  height: 30px;
  border: 1px solid #d6dde8;
  border-radius: 5px;
  background: #fff;
  color: #4d5663;
  font-size: 13px;
  font-weight: 900;
}

.uploader-status-filters button.active {
  border-color: #347fc0;
  background: #eaf4ff;
  color: #17679f;
}

.pool-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
  gap: 12px;
  padding: 12px 14px;
}

.pool-form {
  display: grid;
  gap: 10px;
}

.pool-form label {
  display: grid;
  gap: 6px;
  color: #656d78;
  font-size: 12px;
  font-weight: 900;
}

.pool-form input,
.pool-form textarea,
.pool-form select {
  width: 100%;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  padding: 8px;
  outline: none;
  color: #252830;
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  resize: vertical;
}

.pool-form input,
.pool-form select {
  height: 30px;
}

.pool-form input:focus,
.pool-form textarea:focus,
.pool-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 127, 192, 0.12);
}

.pool-form button {
  width: fit-content;
  height: 30px;
  border: 1px solid var(--blue);
  border-radius: 5px;
  padding: 0 14px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.sms-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.sms-form label:first-child {
  grid-column: 1 / -1;
}

.admin-api-box {
  margin: 0 14px 12px;
  padding: 10px;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-api-box p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4b5561;
  font-size: 12px;
  font-weight: 850;
}

.admin-api-box p + p {
  margin-top: 7px;
}

.admin-api-box code {
  max-width: min(760px, 76vw);
  padding: 4px 6px;
  border: 1px solid #e1e5eb;
  border-radius: 5px;
  background: #fff;
  color: #1f2630;
  overflow: auto;
  white-space: nowrap;
}

.admin-doc-body {
  padding: 12px 14px 14px;
}

.admin-api-summary {
  margin-bottom: 12px;
}

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

.admin-doc-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e7ee;
  border-radius: 6px;
  background: #fbfcfe;
}

.admin-doc-card h3 {
  margin: 0 0 8px;
  color: #252830;
  font-size: 14px;
  font-weight: 900;
}

.admin-doc-card code,
.admin-api-summary code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #fff3f7;
  color: #c94f7e;
  font-family: Menlo, Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-doc-table {
  margin-bottom: 8px;
}

.admin-doc-table td:first-child {
  width: 68px;
  color: #262a30;
  font-weight: 900;
}

.admin-doc-table td:last-child {
  width: auto;
}

.admin-doc-card pre {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dfe1e6;
  border-radius: 4px;
  background: #fff;
  color: #37404a;
  font-family: Menlo, Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.pool-table {
  min-width: 960px;
}

.pool-status {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 22px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
}

.pool-status.available {
  background: #eff9f1;
  color: #408a45;
}

.pool-status.taken {
  background: #eef5ff;
  color: #347fc0;
}

.pool-status.completed {
  background: #f4f0ff;
  color: #6f58bf;
}

.pool-status.success {
  background: #eff9f1;
  color: #408a45;
}

.pool-status.duplicate {
  background: #fff2e6;
  color: #b06917;
}

.pool-status.expired {
  background: #fff2f3;
  color: #c94d54;
}

.pool-status.wrong {
  background: #fff7e8;
  color: #a66710;
}

.pool-status.old {
  background: #fff7e8;
  color: #a66710;
}

.pool-status.dead {
  background: #f8efff;
  color: #7f2c99;
}

.create-form label {
  display: grid;
  gap: 6px;
  color: #656d78;
  font-size: 12px;
  font-weight: 900;
}

.create-form input,
.quota-tools input {
  width: 100%;
  height: 30px;
  border: 1px solid #d8dde5;
  border-radius: 5px;
  padding: 0 8px;
  outline: none;
  color: #252830;
  font-weight: 750;
}

.create-form input:focus,
.quota-tools input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 127, 192, 0.12);
}

.create-form button {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

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

.admin-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e4e8ee;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: #69727e;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-table td {
  color: #252830;
  font-size: 13px;
  font-weight: 700;
}

.admin-table code {
  display: block;
  max-width: 260px;
  padding: 6px 8px;
  border: 1px solid #e1e5eb;
  border-radius: 6px;
  background: #f7f9fb;
  overflow: auto;
  white-space: nowrap;
}

.cards-table {
  min-width: 980px;
}

.access-table {
  min-width: 900px;
}

.cards-table code {
  max-width: 340px;
}

.card-status {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  height: 22px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 900;
}

.card-status.unused {
  background: #eff9f1;
  color: #408a45;
}

.card-status.used {
  background: #f3f4f7;
  color: #787f8a;
}

.quota-strong {
  color: var(--green) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.quota-tools {
  display: grid;
  grid-template-columns: 76px 48px 48px;
  gap: 6px;
}

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

.quota-tools button,
.mini-button {
  padding: 0 8px;
}

.mini-button.danger {
  border-color: #efb8b8;
  color: #b4232a;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100vw - 44px);
  padding: 10px 12px;
  border-radius: 6px;
  background: #20222a;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s, opacity 0.2s;
  font-size: 13px;
  font-weight: 800;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  .login-view {
    padding: 22px;
  }

  .login-card {
    width: min(460px, 100%);
    min-height: auto;
    padding: 28px 30px 22px;
  }

  .platform-topbar {
    min-height: auto;
    padding: 10px 12px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .topbar-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    padding: 12px;
  }

  .stat-card {
    width: auto;
  }

  .dashboard-tabs {
    overflow-x: auto;
  }

  .dashboard-tabs button {
    white-space: nowrap;
  }

  .pool-stats,
  .channel-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pool-grid,
  .sms-form,
  .admin-doc-grid {
    grid-template-columns: 1fr;
  }

  .admin-api-box p {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .login-view {
    padding: 18px;
  }

  .login-card {
    border-radius: 16px;
    min-height: auto;
    padding: 24px 18px 20px;
  }

  .login-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .login-icon svg {
    width: 24px;
    height: 24px;
  }

  .login-card h1 {
    margin: 16px 0 18px;
    font-size: 22px;
  }

  .login-field {
    gap: 7px;
    margin-bottom: 14px;
    font-size: 15px;
  }

  .login-field input {
    height: 44px;
    border-width: 2px;
    border-radius: 13px;
    padding: 0 22px;
    font-size: 16px;
  }

  .login-button {
    height: 46px;
    font-size: 18px;
  }

  .login-foot {
    font-size: 14px;
  }

  .brand-block {
    font-size: 16px;
  }

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

  .channel-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    height: 62px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .dashboard-tabs {
    height: 40px;
    padding: 0 12px;
    gap: 14px;
  }

  .workspace-section h2,
  .table-title {
    padding: 0 12px;
  }

  .get-phone-form {
    height: auto;
    min-height: 58px;
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .table-title {
    min-height: 42px;
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .api-doc-head {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 12px;
  }

  .api-doc-body {
    padding-left: 12px;
    padding-right: 12px;
  }

  .api-summary div {
    align-items: flex-start;
  }

  .api-summary dt {
    min-width: 68px;
  }

  .records-note {
    padding: 0 12px;
    font-size: 12px;
  }

  .pager {
    padding-left: 12px;
  }
}
