.jin-visitor-admin-button {
  position: fixed;
  left: 18px;
  top: 136px;
  z-index: 10010;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.jin-visitor-admin-button:hover { border-color: #7c3aed; color: #6d28d9; }
.jin-visitor-admin-button[hidden] { display: none !important; }

.jin-visitor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
}

.jin-visitor-modal {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.jin-visitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid #e5eaf1;
  background: #f8fafc;
}

.jin-visitor-head h2 { margin: 0; font-size: 20px; line-height: 1.3; letter-spacing: 0; }
.jin-visitor-head p { margin: 3px 0 0; color: #64748b; font-size: 13px; letter-spacing: 0; }
.jin-visitor-close,
.jin-visitor-refresh {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
}

.jin-visitor-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid #e5eaf1;
  background: #ffffff;
}

.jin-visitor-stats > div { padding: 14px 18px; border-right: 1px solid #e5eaf1; }
.jin-visitor-stats > div:last-child { border-right: 0; }
.jin-visitor-stats span { display: block; color: #64748b; font-size: 12px; font-weight: 700; }
.jin-visitor-stats strong { display: block; margin-top: 3px; color: #172033; font-size: 25px; line-height: 1.2; }

.jin-visitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #e5eaf1;
  color: #64748b;
  font-size: 12px;
}

.jin-visitor-message { padding: 12px 16px; border-bottom: 1px solid #e5eaf1; background: #f8fafc; color: #475569; font-size: 13px; }
.jin-visitor-message.is-error { background: #fff1f2; color: #be123c; }
.jin-visitor-table-wrap { max-height: min(540px, calc(100vh - 285px)); overflow: auto; }
.jin-visitor-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.jin-visitor-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #64748b; text-align: left; font-size: 12px; }
.jin-visitor-table th,
.jin-visitor-table td { padding: 11px 14px; border-bottom: 1px solid #edf1f5; white-space: nowrap; }
.jin-visitor-table tbody tr:hover { background: #fafafa; }
.jin-visitor-status { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #94a3b8; }
.jin-visitor-status.is-online { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.jin-visitor-empty { height: 130px; color: #64748b; text-align: center; }

@media (max-width: 700px) {
  .jin-visitor-admin-button { left: 10px; top: 122px; }
  .jin-visitor-backdrop { padding: 8px; }
  .jin-visitor-modal { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .jin-visitor-head { padding: 14px; }
  .jin-visitor-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jin-visitor-stats > div:nth-child(2) { border-right: 0; }
  .jin-visitor-stats > div:nth-child(-n+2) { border-bottom: 1px solid #e5eaf1; }
  .jin-visitor-table-wrap { max-height: calc(100vh - 350px); }
  .jin-visitor-table th,
  .jin-visitor-table td { padding: 10px 12px; }
}
