* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #e6ecff;
  background: radial-gradient(circle at top left, #1e3a8a 0%, #0b1225 45%, #080d1c 100%);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 36px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 34px);
}

.subtitle {
  margin: 0;
  color: #b7c3ea;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

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

.service-lock-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f59e0b;
  background: rgba(180, 83, 9, 0.22);
  color: #fde68a;
  font-weight: 700;
  text-align: center;
}

.card.card-admin-locked {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
}

button {
  padding: 11px 16px;
  border: 1px solid #3b82f6;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

.overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 14px 0 20px;
}

.overview-card {
  background: rgba(13, 24, 48, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(5px);
}

.label {
  margin: 0 0 8px;
  color: #9fb0db;
  font-size: 14px;
}

.value {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card h2 {
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.rental-panel {
  margin-top: 18px;
  width: 100%;
}

.hidden {
  display: none;
}

.rental-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  align-items: center;
}

.rental-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.rental-item {
  width: 100%;
  position: relative;
  display: block;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 14px 16px;
}

.rental-item.local-owned {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.45), 0 10px 22px rgba(2, 6, 23, 0.35);
}

.rental-item.local-owned.local-state-success {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(15, 23, 42, 0.85) 40%);
}

.rental-item.local-owned.local-state-error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(15, 23, 42, 0.85) 40%);
}

.rental-item.local-owned.local-state-warning,
.rental-item.local-owned.local-state-waiting {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.85) 40%);
}

.local-owned-tag {
  margin: 0 0 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 700;
}

.rental-item h3 {
  margin: 0;
}

.action-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
  justify-content: space-between;
}

.action-row button {
  min-width: 110px;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-row.compact {
  margin-top: 10px;
}

.service-action-row {
  margin-top: auto;
  padding-top: 10px;
}

.service-action-row button {
  width: 100%;
}

button.danger {
  border-color: #ef4444;
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
  display: flex;
  flex-direction: column;
}

.card.low-balance {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3), 0 12px 28px rgba(2, 6, 23, 0.35);
}

.balance {
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 700;
  margin: 4px 0 10px;
  letter-spacing: 0.4px;
}

.meta {
  margin: 0 0 6px;
  color: #b9c7eb;
  font-size: 14px;
}

.inline-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.inline-meta span {
  overflow-wrap: anywhere;
}

button.mini {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1.1;
}

.status {
  margin: 0;
  color: #a8b9e6;
  word-break: break-word;
  min-height: 0;
}

.status:empty {
  display: none;
}

.status.error {
  color: #fecaca;
}

.status.warning {
  color: #fde68a;
}

.sms-code {
  font-weight: 700;
  color: #fef3c7;
}

.rental-info .sms-code {
  grid-column: 1 / -1;
}

.rental-info .sms-code.inline-meta {
  gap: 10px;
}

.inline-status {
  margin: 0 0 0 auto;
  text-align: right;
  align-self: center;
  max-width: 45%;
}

.sms-code.has-code {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
}

.js-time-left {
  font-weight: 700;
  color: #fcd34d;
  text-shadow: 0 0 10px rgba(252, 211, 77, 0.35);
}

.badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.badge-success {
  background: rgba(22, 163, 74, 0.18);
  color: #86efac;
  border-color: rgba(22, 163, 74, 0.35);
}

.badge-error {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.35);
}

.badge-waiting {
  background: rgba(234, 179, 8, 0.18);
  color: #fde68a;
  border-color: rgba(234, 179, 8, 0.35);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

.low-balance-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.low-balance-modal.hidden {
  display: none !important;
}

.low-balance-content {
  position: relative;
  width: min(460px, 100%);
  background: #0f172a;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.5);
}

.low-balance-content h3 {
  margin: 0 0 10px;
  color: #fca5a5;
}

.low-balance-content p {
  margin: 0 0 16px;
}

.snooze-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  cursor: pointer;
}

.snooze-row input {
  width: 16px;
  height: 16px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.9);
}

.topup-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  width: min(320px, calc(100% - 32px));
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.55);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.45);
}

.topup-toast p {
  margin: 0;
}

.tools-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 16px;
}

.tools-modal.hidden {
  display: none !important;
}

.tools-modal-content {
  position: relative;
  width: min(520px, 100%);
  background: linear-gradient(170deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 16, 32, 0.98) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 18px;
  padding: 24px 22px 22px;
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.tools-modal-content h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: #e2e8f0;
}

.tools-modal-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: #94a3b8;
}

.tools-modal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.tools-modal-actions .tools-tile {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1;
  min-height: 0;
  width: 100%;
  margin: 0;
  padding: 14px 10px;
  border-radius: 16px;
  border-width: 2px;
  border-style: solid;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease, background 0.18s ease;
}

.tools-modal-actions .tools-tile:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.45);
}

.tools-modal-actions .tools-tile:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.45);
}

.tools-tile-label {
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: #f8fafc;
}

.tools-tile-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
  text-align: center;
  line-height: 1.25;
}

.tools-tile--twofa {
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(155deg, rgba(37, 99, 235, 0.42), rgba(15, 23, 42, 0.92));
}

.tools-tile--twofa:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, 0.75);
  background: linear-gradient(155deg, rgba(59, 130, 246, 0.55), rgba(15, 23, 42, 0.95));
}

.tools-tile--ip {
  border-color: rgba(34, 197, 94, 0.45);
  background: linear-gradient(155deg, rgba(22, 163, 74, 0.35), rgba(15, 23, 42, 0.92));
}

.tools-tile--ip:hover:not(:disabled) {
  border-color: rgba(134, 239, 172, 0.65);
  background: linear-gradient(155deg, rgba(34, 197, 94, 0.48), rgba(15, 23, 42, 0.95));
}

.tools-tile--mail {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(155deg, rgba(147, 51, 234, 0.38), rgba(15, 23, 42, 0.92));
}

.tools-tile--mail:hover:not(:disabled) {
  border-color: rgba(216, 180, 254, 0.65);
  background: linear-gradient(155deg, rgba(168, 85, 247, 0.52), rgba(15, 23, 42, 0.95));
}

@media (max-width: 420px) {
  .tools-modal-content {
    padding: 20px 14px 18px;
  }

  .tools-modal-actions {
    gap: 10px;
  }

  .tools-modal-actions .tools-tile {
    padding: 10px 6px;
    border-radius: 14px;
  }

  .tools-tile-label {
    font-size: 1.05rem;
  }

  .tools-tile-hint {
    font-size: 10px;
  }
}

.twofa-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  padding: 16px;
}

.ip-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10003;
  padding: 16px;
}

.ip-modal.hidden {
  display: none !important;
}

.ip-modal-content {
  position: relative;
  width: min(720px, 100%);
  max-height: min(84vh, 760px);
  overflow: auto;
  background: linear-gradient(170deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 16, 32, 0.98) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.ip-modal-content h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 800;
  color: #e2e8f0;
}

.ip-modal-sub {
  margin: 0 0 14px;
  font-size: 14px;
  color: #94a3b8;
}

.ip-modal-status {
  margin: 0 0 12px;
  color: #bfdbfe;
  min-height: 1.3em;
  font-size: 14px;
}

.ip-modal-status.error {
  color: #fecaca;
}

.ip-info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.ip-info-item {
  border: 1px solid rgba(100, 116, 139, 0.3);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 10px;
  padding: 10px 12px;
}

.ip-info-item--top {
  border-color: rgba(59, 130, 246, 0.52);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.2), rgba(15, 23, 42, 0.85));
}

.ip-info-key {
  margin: 0 0 4px;
  color: #93c5fd;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.ip-info-value {
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
  word-break: break-word;
  line-height: 1.4;
}

.ip-info-item--top .ip-info-value {
  font-size: 16px;
  font-weight: 700;
}

.mailforspam-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10004;
  padding: 16px;
}

.mailforspam-modal.hidden {
  display: none !important;
}

.mailforspam-modal-content {
  position: relative;
  width: min(960px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 16, 32, 0.98) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.mailforspam-modal-content h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: #e2e8f0;
}

.mailforspam-modal-content label {
  display: block;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

.mailforspam-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-bottom: 10px;
}

.mailforspam-actions input {
  flex: 1;
  min-width: 200px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  font-size: 14px;
}

.mailforspam-actions input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.mailforspam-status {
  margin: 0 0 12px;
  min-height: 1.3em;
  font-size: 13px;
  color: #93c5fd;
}

.mailforspam-status.error {
  color: #fecaca;
}

.mailforspam-panels {
  margin-top: 4px;
}

.mailforspam-grid {
  --mailforspam-row-height: clamp(280px, 38vh, 440px);
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(240px, 1.25fr);
  grid-template-rows: var(--mailforspam-row-height);
  gap: 14px;
  align-items: stretch;
  width: 100%;
}

.mailforspam-col-label {
  flex-shrink: 0;
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #7dd3fc;
}

.mailforspam-list-wrap,
.mailforspam-detail-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.mailforspam-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  padding: 8px;
}

.mailforspam-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(100, 116, 139, 0.25);
  background: rgba(30, 41, 59, 0.45);
  color: #e2e8f0;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.mailforspam-item:last-child {
  margin-bottom: 0;
}

.mailforspam-item:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(30, 64, 175, 0.2);
}

.mailforspam-item--active {
  border-color: rgba(59, 130, 246, 0.65);
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.28), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.mailforspam-item-subject {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.mailforspam-item-meta {
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.35;
}

.mailforspam-empty {
  margin: 0;
  padding: 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.mailforspam-detail {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  padding: 12px 14px;
  font-size: 14px;
  color: #e2e8f0;
}

.mailforspam-detail-placeholder,
.mailforspam-detail-loading {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.mailforspam-detail-error {
  margin: 0;
  color: #fecaca;
  font-size: 14px;
}

.mailforspam-detail-header {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.3);
}

.mailforspam-detail-field {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.mailforspam-detail-field:last-child {
  margin-bottom: 0;
}

.mailforspam-body-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}

.mailforspam-body-iframe {
  display: block;
  width: 100%;
  min-height: 200px;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 720px) {
  .mailforspam-grid {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 32vh) minmax(200px, 36vh);
    --mailforspam-row-height: auto;
  }
}

.twofa-modal.hidden {
  display: none !important;
}

.twofa-modal-content {
  position: relative;
  width: min(460px, 100%);
  background: linear-gradient(170deg, rgba(15, 23, 42, 0.98) 0%, rgba(10, 16, 32, 0.98) 100%);
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.twofa-modal-content h3 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

.twofa-modal-content label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

.twofa-modal-content input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  font-size: 14px;
}

.twofa-modal-content input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.twofa-result {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 10px;
  background: rgba(30, 64, 175, 0.12);
  font-size: 14px;
  color: #bfdbfe;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.twofa-result:empty {
  display: none;
}

.twofa-result.code-ready {
  justify-content: center;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.12em;
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(30, 64, 175, 0.16));
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.45);
  cursor: pointer;
  user-select: none;
}

.twofa-result.code-ready:active {
  transform: scale(0.995);
}

.twofa-result.code-ready.copied {
  border-color: rgba(74, 222, 128, 0.8);
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.28);
}

.twofa-result.error {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.2);
}

.twofa-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

#twofaSecretInput {
  flex: 1 1 auto;
  min-width: 0;
}

#twofaSubmitBtn {
  flex: 0 0 auto;
  min-width: 96px;
}

@media (max-width: 520px) {
  .twofa-modal-content {
    padding: 18px 14px 16px;
    border-radius: 14px;
  }

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

  #twofaSecretInput,
  #twofaSubmitBtn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .ip-modal-content {
    border-radius: 14px;
    padding: 18px 14px 16px;
  }

  .ip-info-list {
    grid-template-columns: 1fr;
  }
}

#topupToastText {
  color: #dbeafe;
  font-weight: 700;
  margin-bottom: 6px;
}

#topupToastTimer {
  color: #93c5fd;
  font-size: 13px;
}

body.has-notify-banner {
  padding-top: 48px;
}

.dashboard-notify-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  z-index: 9990;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(59, 130, 246, 0.45);
  padding: 8px 0;
}

.dashboard-notify-banner.hidden {
  display: none !important;
}

.notify-marquee-viewport {
  overflow: hidden;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 1.5rem;
}

.notify-marquee-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  min-height: 1.5rem;
  animation: notify-marquee-scroll 45s linear infinite;
  will-change: transform;
}

.notify-marquee-track .marquee-seg {
  flex-shrink: 0;
  padding: 0 3rem;
  white-space: nowrap;
  font-weight: 700;
  color: #bfdbfe;
  font-size: 15px;
}

@keyframes notify-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.notify-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.notify-dialog-overlay.hidden {
  display: none !important;
}

.notify-dialog-panel {
  position: relative;
  width: min(440px, 100%);
  background: linear-gradient(155deg, rgba(30, 41, 59, 0.92) 0%, #0f172a 52%, #0a1020 100%);
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 16px;
  padding: 26px 24px 22px;
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.notify-dialog-panel .modal-close {
  top: 16px;
  right: 16px;
  z-index: 2;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1.35rem;
  font-weight: 600;
}

.notify-dialog-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.notify-dialog-heading {
  margin: 0;
  padding: 6px 48px 6px 14px;
  border-left: 3px solid #60a5fa;
  border-radius: 0 4px 4px 0;
  font-size: clamp(1.05rem, 2.6vw, 1.2rem);
  font-weight: 800;
  color: #f0f9ff;
  letter-spacing: -0.03em;
  line-height: 1.35;
}

.notify-dialog-stack .notify-dialog-heading {
  margin-bottom: 0;
}

#cbNotifyDialogHeading.notify-dialog-heading {
  display: block;
  visibility: visible;
  opacity: 1;
  color: #e0f2fe;
  min-height: 1.4em;
}

.notify-dialog-body {
  margin: 0;
  padding: 0 2px 2px;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-height: min(42vh, 300px);
  overflow-y: auto;
}

.notify-dialog-body::-webkit-scrollbar {
  width: 6px;
}

.notify-dialog-body::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, 0.75);
  border-radius: 6px;
}

.notify-dialog-body::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.85);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .rental-info {
    grid-template-columns: 1fr;
    gap: 6px 10px;
  }

  .action-row {
    flex-wrap: wrap;
  }

  .inline-status {
    margin-left: 0;
    text-align: left;
    max-width: 100%;
    width: 100%;
  }

  .notify-dialog-panel {
    padding: 22px 18px 18px;
    border-radius: 14px;
  }

  .notify-dialog-panel .modal-close {
    top: 12px;
    right: 12px;
    min-width: 38px;
    min-height: 38px;
  }

  .notify-dialog-heading {
    padding-right: 44px;
  }

  .notify-dialog-body {
    max-height: min(50vh, 260px);
  }
}
