body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0; margin: 0;
  background-color: #121212; color: #e0e0e0;
}

.highlight {
    background-color: #007bff !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
    font-weight: bold;
    animation: none;
}
/* --- Login Overlay Styles --- */
#loginSection {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: #121212;
  background-image: radial-gradient(circle at 50% 50%, #1e1e1e 0%, #121212 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-card {
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  width: 100%;
  max-width: 360px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #007bff;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(0, 123, 255, 0.4);
}

.login-title {
  color: #fff;
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 600;
}

.login-subtitle {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 30px;
}

.login-input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #252526;
  border: 1px solid #3e3e42;
  border-radius: 8px;
  color: #fff;
  box-sizing: border-box;
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
  background: #2d2d30;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.login-btn:active {
  transform: translateY(1px);
}

.login-btn:disabled {
  background: #3e3e42;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#loginError {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 15px;
  min-height: 20px;
}

/* --- Dashboard Styles --- */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
h2 { margin: 0; font-size: 24px; color: #fff; display: flex; align-items: center; gap: 10px; }
.panel-content { background: #1e1e1e; border-radius: 8px; padding: 20px; border: 1px solid #333; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }

/* Stats Cards */
.stats-container { display: flex; gap: 20px; margin-bottom: 20px; }
.stat-card { flex: 1; background: #252526; padding: 20px; border-radius: 8px; border: 1px solid #333; text-align: center; }
.stat-card h3 { margin: 0 0 10px 0; font-size: 13px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .number { font-size: 28px; font-weight: bold; color: #007bff; }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid #333; margin-bottom: 20px; }
.tab { padding: 12px 20px; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 500; color: #aaa; transition: all 0.2s; font-size: 14px; }
.tab:hover { color: #fff; }
.tab.active { border-bottom-color: #007bff; color: #007bff; background: rgba(0,123,255,0.05); }

/* Tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th { border-bottom: 2px solid #444; padding: 12px; text-align: left; background-color: #252526; color: #ccc; font-weight: 600; }
td { border-bottom: 1px solid #2d2d30; padding: 10px 12px; color: #ddd; }
tr:hover td { background-color: #2a2a2d; }
td.clickable-cell { cursor: pointer; transition: color 0.2s; }
td.clickable-cell:hover { color: #fff; text-decoration: underline; }

.badge-new { background-color: #28a745; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-right: 6px; font-weight: bold; }
.badge-old { background-color: #6c757d; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-right: 6px; font-weight: bold; }

/* Buttons */
.btn { padding: 8px 16px; border-radius: 6px; border: none; font-weight: 500; cursor: pointer; font-size: 13px; transition: background 0.2s; }
.btn-primary { background: #007bff; color: white; }
.btn-primary:hover { background: #0069d9; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }
.btn-secondary { background: #444; color: white; }
.btn-secondary:hover { background: #555; }

/* Inputs & Toolbar */
input[type="text"], input[type="date"] {
  background: #2d2d30; border: 1px solid #444; color: white; padding: 8px 12px; border-radius: 6px; outline: none;
}
input:focus { border-color: #007bff; }

.toolbar { display: flex; gap: 10px; margin-bottom: 15px; flex-wrap: wrap; align-items: center; }
.search-box { flex: 1; min-width: 200px; max-width: 300px; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; margin-top: 20px; gap: 8px; }
.page-btn, .page-num { background-color: #2d2d30; color: #fff; border: 1px solid #444; padding: 6px 12px; border-radius: 4px; cursor: pointer; min-width: 32px; }
.page-btn:disabled, .page-num:disabled { opacity: 0.5; cursor: default; }
.page-num:hover:not(.active) { background-color: #444; }
.page-num.active { background-color: #007bff; border-color: #007bff; font-weight: bold; }

/* Toast & Loader */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; }
.toast { background: #333; color: #fff; border-left: 4px solid #007bff; padding: 15px 20px; margin-bottom: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); border-radius: 4px; display: flex; justify-content: space-between; align-items: center; min-width: 300px; animation: slideIn 0.3s ease; }
.toast-visitor-new { border-left-color: #007bff; }
.toast-visitor-old { border-left-color: #ff9800; }
.toast-verification { border-left-color: #9c27b0; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

#loader {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #121212; z-index: 20000;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
}
.spinner {
  border: 4px solid #2d2d30; border-top: 4px solid #007bff;
  border-radius: 50%; width: 40px; height: 40px;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

@keyframes glowAnimation {
  0% { background-color: #007bff; color: #fff; }
  100% { background-color: inherit; color: #ddd; }
}

/* Row checkbox */
.row-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: #007bff; }
th .row-checkbox, th input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #007bff; }
tr.selected-row td { background-color: rgba(0, 123, 255, 0.1) !important; }

/* Helpers */
.hidden { display: none !important; }

/* Settings panel */
.settings-card {
  background: #252526;
  border-radius: 8px;
  padding: 24px;
  max-width: 560px;
}
.settings-card h3 { margin: 0 0 12px 0; font-size: 18px; color: #fff; }
.settings-desc { color: #aaa; font-size: 13px; line-height: 1.5; margin-bottom: 20px; }
.settings-label { display: block; color: #ccc; font-size: 13px; margin-bottom: 8px; }
.settings-input {
  width: 100%;
  max-width: 400px;
  padding: 10px 14px;
  background: #1e1e1e;
  border: 1px solid #3e3e42;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 16px;
}
.settings-input:focus { outline: none; border-color: #007bff; }
.settings-message { margin-left: 12px; font-size: 13px; color: #28a745; }
.settings-message.error { color: #dc3545; }
