* {
  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: 1400px;
  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: flex;
  flex-wrap: nowrap;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.55) rgba(15, 23, 42, 0.55);
}

.cards > .card {
  flex: 0 0 min(320px, calc(100vw - 56px));
}

.cards::-webkit-scrollbar {
  height: 10px;
}

.cards::-webkit-scrollbar-track {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
}

.cards::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.78), rgba(59, 130, 246, 0.68));
  border: 1px solid rgba(147, 197, 253, 0.4);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.cards::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9), rgba(96, 165, 250, 0.85));
}

.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);
}

.rental-info .js-grizzly-cancel-lock {
  margin: 0;
  font-weight: 700;
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 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));
}

.smsbower-provider-row {
  margin: 12px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smsbower-provider-row label {
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.smsbower-provider-row select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.75);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background:
    radial-gradient(circle at 20% 20%, rgba(30, 64, 175, 0.2), transparent 44%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.18), transparent 42%),
    rgba(2, 6, 23, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.access-gate.hidden {
  display: none;
}

.access-gate-content {
  width: min(620px, 100%);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 24px;
  background: linear-gradient(170deg, rgba(15, 23, 42, 0.98), rgba(9, 14, 28, 0.98));
  box-shadow:
    0 24px 70px rgba(2, 6, 23, 0.58),
    0 0 0 1px rgba(59, 130, 246, 0.08) inset;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.access-gate-tag {
  margin: 0;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-gate-content h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  text-align: center;
}

.access-gate-desc {
  margin: 0;
  color: #cbd5e1;
  font-size: 1.05rem;
  text-align: center;
}

.access-gate-key-hint {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.access-gate-key-hint span {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.7);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
}

.access-gate-label {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 700;
}

.access-gate-content input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  padding: 15px 16px;
  font-size: 18px;
}

.access-gate-content input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.access-gate-submit {
  height: 52px;
  border-radius: 14px;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(120deg, #2563eb, #4f46e5);
  color: #eff6ff;
  border: 1px solid rgba(99, 102, 241, 0.8);
}

.access-gate-submit:hover:not(:disabled) {
  filter: brightness(1.08);
}

.access-gate-help-link {
  margin-top: -4px;
  align-self: center;
  font-size: 0.95rem;
  color: #93c5fd;
  text-decoration: none;
}

.access-gate-help-link:hover {
  text-decoration: underline;
  color: #bfdbfe;
}

.access-gate-status {
  min-height: 0;
  margin: 0;
  color: #fca5a5;
  font-size: 1rem;
  font-weight: 600;
}

.access-gate-status:empty {
  display: none;
}

.service-overlay-block {
  position: relative;
  overflow: hidden;
  --ov-bg-a: 0.78; /* layer opacity */
  --ov-border-a: 0.9;
  --ov-glow-a: 0.45;
  --ov-text-a: 0.95;
}

/* Khi đã có overlay thì ẩn viền/halo gốc để tránh nhìn thành 2 lớp viền chồng nhau */
.service-overlay-block.card,
.service-overlay-block.rental-panel-card {
  border-color: transparent !important;
  box-shadow: none !important;
}

.service-overlay-block::after {
  content: attr(data-overlay-message);
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  background: rgba(2, 6, 23, var(--ov-bg-a));
  border: 1px dashed rgba(248, 113, 113, var(--ov-border-a));
  border-radius: inherit;
  color: rgba(252, 165, 165, var(--ov-text-a));
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  z-index: 5;
  backdrop-filter: blur(2px);
}

.service-overlay-block[data-overlay-type="admin"]::after {
  --ov-bg-a: 0.86;
  --ov-border-a: 0.95;
  --ov-glow-a: 0.55;
  --ov-text-a: 1;
  background: linear-gradient(135deg, rgba(127, 29, 29, var(--ov-bg-a)), rgba(69, 10, 10, calc(var(--ov-bg-a) - 0.04)));
  border: 1px solid rgba(248, 113, 113, var(--ov-border-a));
  color: rgba(254, 226, 226, var(--ov-text-a));
  font-size: 20px;
  line-height: 1.25;
  text-shadow:
    0 0 8px rgba(248, 113, 113, 0.65),
    0 0 18px rgba(239, 68, 68, var(--ov-glow-a));
  align-items: flex-end;
  justify-content: center;
  padding: 14px 14px 44px;
  box-shadow:
    inset 0 0 0 1px rgba(254, 202, 202, 0.25),
    0 0 12px rgba(248, 113, 113, 0.38),
    0 0 30px rgba(239, 68, 68, var(--ov-glow-a));
}

.service-overlay-block[data-overlay-type="admin"]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 190px;
  background: url("/lock-symbol-for-interface.svg") center / contain no-repeat;
  filter:
    drop-shadow(0 0 8px rgba(248, 113, 113, 0.65))
    drop-shadow(0 0 22px rgba(220, 38, 38, 0.6))
    drop-shadow(0 8px 14px rgba(127, 29, 29, 0.45));
  z-index: 6;
}

.service-overlay-block[data-overlay-type="no-access"]::after {
  content: attr(data-overlay-message);
  --ov-bg-a: 0.82;
  --ov-border-a: 0.9;
  --ov-glow-a: 0.52;
  --ov-text-a: 1;
  background: linear-gradient(135deg, rgba(180, 83, 9, var(--ov-bg-a)), rgba(120, 53, 15, calc(var(--ov-bg-a) - 0.04)));
  border: 1px solid rgba(251, 146, 60, var(--ov-border-a));
  color: rgba(255, 237, 213, var(--ov-text-a));
  font-size: 20px;
  line-height: 1.25;
  text-shadow:
    0 0 8px rgba(251, 146, 60, 0.6),
    0 0 18px rgba(249, 115, 22, var(--ov-glow-a));
  align-items: flex-end;
  justify-content: center;
  padding: 14px 14px 44px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 237, 213, 0.2),
    0 0 10px rgba(251, 146, 60, 0.3),
    0 0 24px rgba(249, 115, 22, var(--ov-glow-a));
}

.service-overlay-block[data-overlay-type="no-access"]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 190px;
  background: url("/lock-symbol-for-interface.svg") center / contain no-repeat;
  filter:
    drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))
    drop-shadow(0 0 20px rgba(249, 115, 22, 0.58))
    drop-shadow(0 8px 14px rgba(120, 53, 15, 0.45));
  z-index: 6;
}

@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:
    radial-gradient(circle at center, rgba(220, 38, 38, 0.2) 0%, rgba(2, 6, 23, 0.9) 62%),
    rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  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));
}

.popup-gif-intro {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.popup-gif-intro.hidden {
  display: none !important;
}

.popup-gif-intro img {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

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

.notify-dialog-panel {
  position: relative;
  width: min(1180px, 100%);
  background:
    radial-gradient(circle at 16% 0%, rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0) 45%),
    linear-gradient(155deg, rgba(18, 26, 42, 0.96) 0%, #0b1120 50%, #050913 100%);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 22px;
  padding: 34px 32px 30px;
  box-shadow:
    0 26px 64px rgba(2, 6, 23, 0.72),
    0 0 0 1px rgba(248, 113, 113, 0.14) inset,
    0 0 42px rgba(127, 29, 29, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: notify-dialog-pop-in 220ms ease-out;
  overflow: hidden;
  min-height: 500px;
}

.notify-dialog-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(248, 113, 113, 0.35), rgba(248, 113, 113, 0) 40%),
    linear-gradient(300deg, rgba(56, 189, 248, 0.16), rgba(56, 189, 248, 0) 55%);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  padding: 1px;
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.notify-dialog-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 22%, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0) 42%),
    repeating-linear-gradient(
      -35deg,
      rgba(148, 163, 184, 0.05) 0 9px,
      rgba(148, 163, 184, 0) 9px 18px
    );
  opacity: 0.55;
}

.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.28rem;
  font-weight: 600;
  border-color: rgba(248, 113, 113, 0.38);
  background: rgba(15, 23, 42, 0.76);
  color: #f1f5f9;
}

.notify-dialog-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  text-align: center;
  position: relative;
  z-index: 1;
}

.notify-dialog-heading {
  margin: 0 auto;
  width: calc(100% - 62px);
  padding: 10px 16px;
  border-left: 3px solid #fda4af;
  border-right: 3px solid #fda4af;
  border-radius: 12px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #fee2e2;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.46), rgba(30, 41, 59, 0.2)),
    radial-gradient(circle at 50% 0%, rgba(248, 113, 113, 0.22), rgba(248, 113, 113, 0) 65%);
  box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.28);
}

.notify-dialog-heading::before,
.notify-dialog-heading::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.9);
  transform: translateY(-50%);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.65);
}

.notify-dialog-heading::before {
  left: 8px;
}

.notify-dialog-heading::after {
  right: 8px;
}

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

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

.notify-dialog-body {
  margin: 0;
  padding: 6px 10px 8px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  text-shadow: 0 0 10px rgba(2, 6, 23, 0.45);
}

@keyframes notify-dialog-pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.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);
  }
}

