.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 260px;
}
.label {
  font-size: 12px;
  color: rgba(233, 236, 245, 0.65);
}
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}
.input:focus {
  border-color: rgba(122, 162, 255, 0.5);
}
.hint {
  font-size: 12px;
  color: rgba(233, 236, 245, 0.55);
}
.hint.align-input {
  text-align: left;
  width: 100%;
}

textarea.input {
  resize: none;
  margin: 0 0 10px 0;
}

#deviceBody .device-id-field {
  margin-top: 20px;
  margin-bottom: 10px;
}

/* Other device modals: keep the same top spacing as the add-device popup,
   so the close (×) button never overlaps the first line. */
#deviceBody > :first-child:not(.device-id-field) {
  margin-top: 20px;
}

.hint2 {
  font-size: 14px;
  color: rgba(233, 236, 245, 0.55);
}
.msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 26, 51, 0.42);
  color: rgba(233, 236, 245, 0.88);
}
.msg.err {
  border-color: rgba(255, 179, 179, 0.25);
  background: rgba(255, 179, 179, 0.08);
}
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 26, 51, 0.34);
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  vertical-align: top;
}
.table.devices-table th,
.table.devices-table td {
  vertical-align: middle;
}
.table.devices-table .btn {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.table.devices-table {
  table-layout: auto;
}
.table.devices-table th,
.table.devices-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.table.devices-table th:nth-child(1),
.table.devices-table td:nth-child(1) {
  word-break: break-all;
}
.table.devices-table th:nth-child(3),
.table.devices-table td:nth-child(3) {
  width: 160px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.table.devices-table th:nth-child(2),
.table.devices-table td:nth-child(2) {
  overflow-wrap: normal;
  word-break: normal;
}
.table.devices-table td:nth-child(2) .plat {
  max-width: 100%;
  min-width: 0;
}
.table.devices-table td:nth-child(2) .plat span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table.devices-table th:nth-child(4),
.table.devices-table td:nth-child(4) {
  width: 220px;
  overflow-wrap: normal;
  word-break: normal;
}
.devices-last-login {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.devices-last-cell {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  min-width: 0;
}
.devices-last-cell .btn {
  margin-left: auto;
}
@media (min-width: 900px) {
  .devices-last-cell {
    gap: 120px;
  }
}

@media (max-width: 720px) {
  .table.devices-table th,
  .table.devices-table td {
    padding: 9px 10px;
  }
  .table.devices-table th:nth-child(3),
  .table.devices-table td:nth-child(3) {
    width: 150px;
  }
  .table.devices-table th:nth-child(4),
  .table.devices-table td:nth-child(4) {
    width: 190px;
  }
}
@media (max-width: 520px) {
  .table.devices-table th:nth-child(2),
  .table.devices-table td:nth-child(2) {
    display: none;
  }
}
.table th {
  font-size: 12px;
  color: rgba(233, 236, 245, 0.65);
  letter-spacing: 0.2px;
  text-transform: uppercase;
}
.table tr:last-child td {
  border-bottom: none;
}
.mono {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.btn.no-lift:hover {
  transform: none;
}
.btn {
  cursor: pointer;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn:disabled:hover {
  transform: none;
}
.input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.modal-text {
  white-space: pre-line;
}
.modal-actions {
  flex-wrap: wrap;
}
#authedEmailLine {
  overflow-wrap: anywhere;
}
#authedEmailLine {
  -webkit-touch-callout: none;
}
#authedEmailLine a,
#authedEmailLine a[x-apple-data-detectors] {
  text-decoration: none !important;
  color: inherit !important;
  pointer-events: none;
}
.plat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(233, 236, 245, 0.92);
}
.plat-ico {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  opacity: 0.95;
}
.plat-ico svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: currentColor;
}

.prelines {
  white-space: pre-line;
}

.devices-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

tr.pending td:not(:last-child) {
  opacity: 0.6;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(233, 236, 245, 0.35);
  border-top-color: rgba(233, 236, 245, 0.85);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.access-block {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(18, 26, 51, 0.34);
  margin-top: 10px;
  padding: 12px 14px;
}

.access-inactive-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.access-submsg {
  flex: 1 0 100%;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(233, 236, 245, 0.72);
}
.access-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 26, 51, 0.26);
  color: rgba(233, 236, 245, 0.92);
  font-size: 13px;
  line-height: 1.2;
}
.access-banner-text {
  color: rgba(233, 236, 245, 0.92);
}
.access-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 26, 51, 0.34);
  color: rgba(233, 236, 245, 0.92);
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

.access-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.access-line:first-child {
  border-top: none;
  padding-top: 2px;
}
.access-line:last-child {
  padding-bottom: 2px;
}

.access-k {
  color: rgba(233, 236, 245, 0.65);
  font-size: 13px;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
}
.access-v {
  color: rgba(233, 236, 245, 0.92);
  font-size: 13px;
  font-weight: normal;
  overflow-wrap: anywhere;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.access-v-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.access-line-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  flex: 0 0 auto;
}

#paymentMethodRow {
  flex-wrap: nowrap;
  align-items: center;
}
#paymentMethodRow .access-v {
  /* Делаем value "по содержимому", чтобы кнопка была сразу справа от текста,
     но всё ещё позволяем ужиматься на мобилке без горизонтального скролла. */
  flex: 0 1 auto;
  /* Не даём переносить строку посимвольно (overflow-wrap:anywhere в .access-v). */
  overflow-wrap: normal;
  word-break: normal;
}
#paymentMethodRow #paymentMethodValue {
  min-width: 0;
  flex: 0 1 auto;
}
#paymentMethodRow #changeCardBtn {
  flex: 0 0 auto;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}

.access-actions .btn {
  flex: 0 0 auto;
}

#paymentMethodRow .btn {
  padding: 8px 12px;
  border-radius: 12px;
}

.opt-plus1 {
  color: var(--text);
  font-weight: 800;
}

.btn.sm {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.icon-img {
  width: 16px;
  height: 16px;
  display: block;
  opacity: 0.9;
}

.pay-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.pay-card > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pay-card-ico {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.95;
  transform: none;
}
.pay-card-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.btn.yellow {
  border-color: rgba(244, 211, 94, 0.55);
  background: linear-gradient(
    135deg,
    rgba(244, 211, 94, 0.92),
    rgba(244, 211, 94, 0.78)
  );
  color: #0b1020;
}
.btn.yellow:hover {
  border-color: rgba(244, 211, 94, 0.75);
  background: linear-gradient(
    135deg,
    rgba(244, 211, 94, 0.98),
    rgba(244, 211, 94, 0.84)
  );
}
.btn.yellow-soft {
  border-color: rgba(244, 211, 94, 0.28);
  background: transparent;
  color: rgba(233, 236, 245, 0.92);
}
.btn.yellow-soft:hover {
  border-color: rgba(244, 211, 94, 0.36);
  background: rgba(244, 211, 94, 0.12);
}

.access-modal {
  position: relative;
  text-align: left;
}
.access-modal .modal-title {
  padding-left: 56px;
  padding-right: 56px;
  text-align: center;
}

.access-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(233, 236, 245, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.access-close-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.access-close-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.access-close-btn > span {
  font-size: 28px;
  line-height: 1;
  transform: translateY(-1px);
}

/* Center titles visually (ignore close button) while reserving space for it. */
.modal .access-close-btn + .modal-title {
  padding-left: 56px;
  padding-right: 56px;
  text-align: center;
}
.access-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.access-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(18, 26, 51, 0.34);
  padding: 14px;
}
.access-price {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(233, 236, 245, 0.94);
}
.access-desc {
  margin-top: 6px;
  color: rgba(233, 236, 245, 0.72);
  font-size: 13px;
}
.access-card .btn {
  margin-top: 12px;
  width: 100%;
}

.access-addon {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(18, 26, 51, 0.34);
  padding: 14px 48px 14px 14px;
  cursor: pointer;
  user-select: none;
}
.access-addon:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(18, 26, 51, 0.42);
}
.access-addon.selected {
  border-color: rgba(244, 211, 94, 0.55);
  box-shadow: 0 0 0 3px rgba(244, 211, 94, 0.16);
}
.access-addon-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(233, 236, 245, 0.92);
}

.access-addon-desc {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(233, 236, 245, 0.72);
  line-height: 1.45;
}
.access-addon-price {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(233, 236, 245, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.access-addon-price .strike {
  text-decoration: line-through;
  opacity: 0.55;
  margin-right: 6px;
}
.access-addon-price .addon-new {
  font-weight: 800;
}
.access-addon-toggle {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}
.access-check {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: transparent;
}
.access-check.on {
  background: rgba(244, 211, 94, 0.92);
}

.access-grid .btn.yellow {
  width: 100%;
}
@media (max-width: 520px) {
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row .btn {
    width: 100%;
    flex: 0 0 auto !important;
  }
  .form-row .input {
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 680px) {
  .account-lead {
    display: none;
  }
}

@media (max-width: 520px) {
  .access-line {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .access-k {
    white-space: normal;
  }
  .access-line-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  /* Исключение: в строке "Оплата" кнопка редактирования должна быть в той же строке справа от номера карты. */
  #paymentMethodRow {
    flex-wrap: nowrap;
    align-items: center;
  }
  .access-chip {
    white-space: normal;
  }
}
