:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #172033;
  --muted: #687386;
  --line: #dde2e8;
  --line-strong: #cbd2dc;
  --primary: #285fba;
  --primary-dark: #1f4e99;
  --primary-soft: #edf3ff;
  --green: #18794e;
  --green-soft: #e9f7f0;
  --gold: #8a5a12;
  --gold-soft: #fff7e5;
  --red: #b42318;
  --red-soft: #fff0ee;
  --shadow: 0 10px 30px rgba(26, 36, 52, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

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

.lucide {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.login-view {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  background: #eef1f4;
}

.login-panel {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(26, 36, 52, 0.1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand > div {
  display: grid;
  gap: 2px;
}

.login-brand strong {
  font-size: 16px;
}

.login-brand > div > span {
  color: var(--muted);
  font-size: 12px;
}

.login-heading {
  margin: 30px 0 22px;
}

.login-heading h1 {
  margin-bottom: 7px;
  font-size: 24px;
}

.login-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  margin: -2px 0 14px;
  padding: 9px 11px;
  border: 1px solid #f1c2bd;
  border-radius: 5px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
}

.login-submit {
  width: 100%;
  margin-top: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 170px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 16px;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.member-menu {
  min-height: 40px;
  padding-left: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-left: 1px solid var(--line);
}

.member-menu > span {
  max-width: 120px;
  overflow: hidden;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.server-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98a2b3;
}

.server-state[data-status="online"]::before {
  background: #21a366;
}

.server-state[data-status="connecting"]::before {
  background: #d88b17;
}

.server-state[data-status="offline"]::before {
  background: #d92d20;
}

.button,
.icon-button,
.text-button,
.website-link,
.contact-chip {
  border: 0;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

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

.button.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: #344054;
}

.button.secondary:hover {
  border-color: #9ba7b8;
  background: var(--surface-soft);
}

.button.compact {
  min-height: 34px;
  padding: 0 11px;
  font-size: 13px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: #536075;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-button.danger {
  color: var(--red);
}

.text-button {
  padding: 7px 8px;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
}

.text-button:hover {
  color: var(--primary-dark);
}

.text-button.muted {
  color: var(--muted);
}

.text-button.muted:hover {
  color: #344054;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.2;
}

.page-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.summary-strip > div {
  min-height: 96px;
  padding: 20px 22px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.summary-strip > div + div {
  border-left: 1px solid var(--line);
}

.summary-strip span {
  color: var(--muted);
  font-size: 13px;
}

.summary-strip strong {
  font-size: 24px;
  line-height: 1;
}

.connection-note {
  margin-top: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #ead8ad;
  border-radius: 6px;
  background: var(--gold-soft);
}

.connection-note.connected {
  border-color: #b8dfcc;
  background: var(--green-soft);
}

.connection-note.error {
  border-color: #f1c2bd;
  background: var(--red-soft);
}

.note-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--gold);
}

.connected .note-icon {
  color: var(--green);
}

.error .note-icon {
  color: var(--red);
}

.connection-note strong {
  font-size: 14px;
}

.connection-note p {
  margin: 3px 0 0;
  color: #5e6675;
  font-size: 13px;
  line-height: 1.45;
}

.provider-section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.section-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.provider-list {
  display: grid;
  gap: 9px;
}

.provider-card {
  min-width: 0;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(190px, 1.15fr) 120px 178px auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.provider-card:hover {
  border-color: #c7cfda;
  box-shadow: 0 5px 18px rgba(27, 38, 55, 0.06);
}

.provider-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-symbol {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: #eef1f5;
  color: #49566a;
  font-weight: 800;
  font-size: 15px;
}

.provider-copy {
  min-width: 0;
}

.provider-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.provider-title h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #1a2435;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-copy p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #4b5870;
  font-size: 11px;
  vertical-align: 1px;
}

.status {
  min-height: 23px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status.warn {
  background: var(--gold-soft);
  color: var(--gold);
}

.status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.status.info {
  background: var(--primary-soft);
  color: var(--primary);
}

.provider-links {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.website-link {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
}

.website-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.website-link .lucide,
.contact-chip .lucide {
  width: 13px;
  height: 13px;
}

.contact-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.contact-chip {
  min-width: 0;
  max-width: 150px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  background: #f1f3f6;
  color: #475467;
  font-size: 11px;
}

.contact-chip strong {
  flex: 0 0 auto;
  font-size: 10px;
}

.contact-chip span:not(.lucide) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missing-contact {
  color: #98a2b3;
  font-size: 12px;
}

.provider-stat {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.provider-stat > span {
  color: var(--muted);
  font-size: 11px;
}

.provider-stat strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-stat small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-stat {
  align-content: center;
}

.recharge-actions {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recharge-actions .text-button {
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.recharge-actions .lucide {
  width: 13px;
  height: 13px;
}

.provider-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.provider-actions .icon-button {
  width: 34px;
  height: 34px;
}

.empty-state {
  min-height: 280px;
  padding: 40px 20px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}

.empty-state > .lucide {
  width: 34px;
  height: 34px;
  color: #8692a5;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state h3 {
  font-size: 17px;
}

.empty-state p {
  max-width: 380px;
  color: var(--muted);
  font-size: 13px;
}

.modal-layer[hidden] {
  display: none;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.5);
}

.modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal.modal-compact {
  width: min(500px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.modal-head span:not(.lucide) {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}

.modal-body {
  padding: 20px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

label > span,
.contact-editor-head strong {
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 95, 186, 0.12);
}

.credential-note {
  margin: 2px 0 18px;
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #cfd8e7;
  border-radius: 5px;
  background: #f5f8fc;
  color: #3f506a;
}

.credential-note strong {
  font-size: 13px;
}

.credential-note p {
  margin: 3px 0 0;
  color: #657289;
  font-size: 12px;
  line-height: 1.5;
}

.credential-note small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.credential-configure {
  margin: 6px 0 -4px -8px;
}

.credential-fields {
  align-items: start;
}

.credential-safety {
  margin: 0 0 16px;
  padding: 10px 11px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #b8dfcc;
  border-radius: 5px;
  background: var(--green-soft);
  color: var(--green);
}

.credential-safety p {
  margin: 0;
  color: #386b55;
  font-size: 12px;
  line-height: 1.5;
}

.advanced-settings {
  margin: 2px 0 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.advanced-settings summary {
  padding: 11px 12px;
  cursor: pointer;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.advanced-settings[open] summary {
  border-bottom: 1px solid var(--line);
}

.advanced-settings > .form-grid {
  padding: 13px 12px 0;
}

.danger-text {
  margin-right: auto;
  color: var(--red) !important;
}

.contact-editor-head {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contact-editor-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

#contactRows {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.contact-row {
  display: grid;
  grid-template-columns: 108px 1fr 1fr 36px;
  gap: 7px;
}

.contact-row input,
.contact-row select {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 13px;
}

.modal-actions {
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.recharge-current {
  margin-bottom: 18px;
  padding: 0 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.recharge-current span,
.recharge-history-head span {
  color: var(--muted);
  font-size: 12px;
}

.recharge-current strong,
.recharge-history-head strong {
  font-size: 23px;
}

.history-link {
  padding: 5px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.history-link .lucide {
  width: 15px;
  height: 15px;
}

.recharge-history-head {
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.recharge-history-head > div {
  display: grid;
  gap: 5px;
}

.recharge-list {
  display: grid;
}

.recharge-row {
  min-height: 66px;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.recharge-row-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.recharge-row-main > strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-row-main > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.recharge-row-main span,
.recharge-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recharge-row-main span {
  color: #344054;
  font-size: 13px;
}

.recharge-row-main small {
  color: var(--muted);
  font-size: 11px;
}

.recharge-row .icon-button {
  flex: 0 0 auto;
}

.recharge-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.recharge-empty .lucide {
  width: 28px;
  height: 28px;
}

.recharge-empty p {
  margin: 0;
  font-size: 13px;
}

.help-message {
  padding: 10px 8px 0;
  text-align: center;
}

.help-message > .lucide {
  width: 38px;
  height: 38px;
  color: var(--primary);
}

.help-message h3 {
  margin: 12px 0 7px;
  font-size: 18px;
}

.help-message > p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.help-steps {
  margin: 20px auto 0;
  display: grid;
  gap: 7px;
  text-align: left;
}

.help-steps > div {
  min-height: 44px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  font-size: 13px;
}

.help-steps b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: 360px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #1f2937;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
}

.toast.success {
  background: #146c48;
}

.toast.error {
  background: #9f271e;
}

@media (max-width: 1040px) {
  .provider-card {
    grid-template-columns: minmax(220px, 1.25fr) minmax(170px, 1fr) 105px 150px;
  }

  .provider-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .recharge-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .page-shell {
    width: min(100% - 28px, 680px);
  }

  .header-inner {
    min-height: 0;
    padding: 13px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .member-menu {
    grid-column: 1 / -1;
    padding: 8px 0 0;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .server-state {
    grid-column: 1 / -1;
    padding: 0;
  }

  .header-actions .button {
    width: 100%;
    min-width: 0;
    padding: 0 10px;
  }

  .page-shell {
    padding: 28px 0 48px;
  }

  h1 {
    font-size: 26px;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip > div {
    min-height: 84px;
    padding: 16px;
  }

  .summary-strip > div:nth-child(3) {
    border-left: 0;
  }

  .summary-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .summary-strip strong {
    font-size: 21px;
  }

  .connection-note {
    align-items: flex-start;
  }

  .provider-section {
    margin-top: 28px;
  }

  .section-head p {
    line-height: 1.5;
  }

  .provider-card {
    padding: 15px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 15px 12px;
  }

  .provider-main,
  .provider-links,
  .provider-actions {
    grid-column: 1 / -1;
  }

  .provider-links {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .contact-list {
    flex-wrap: wrap;
    overflow: visible;
  }

  .contact-chip {
    max-width: 100%;
  }

  .provider-actions {
    padding-top: 0;
    border-top: 0;
  }

  .provider-actions .button {
    flex: 1;
  }

  .form-grid.two,
  .form-grid.three {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .contact-row {
    grid-template-columns: 92px minmax(0, 1fr) 36px;
  }

  .contact-row [name="contactUrl"] {
    grid-column: 1 / -1;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .modal-head,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .recharge-row-main {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

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

  .login-panel {
    padding: 23px 20px;
  }

  .header-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .server-state {
    grid-column: auto;
  }

  .provider-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .provider-title h3,
  .provider-copy p {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
