/* ===== Avenir Next Pro Webfont Setup ===== */

/* Regular */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-regular-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-regular-webfont.eot') format('embedded-opentype');
  font-weight: 400;
  font-style: normal;
}

/* Bold */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-bold-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-bold-webfont.eot') format('embedded-opentype');
  font-weight: 700;
  font-style: normal;
}

/* Bold Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-boldcn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-boldcn-webfont.eot') format('embedded-opentype');
  font-weight: 700;
  font-stretch: condensed;
  font-style: normal;
}

/* Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-cn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-cn-webfont.eot') format('embedded-opentype');
  font-weight: 400;
  font-stretch: condensed;
  font-style: normal;
}

/* Demi */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-demi-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-demi-webfont.eot') format('embedded-opentype');
  font-weight: 600;
  font-style: normal;
}

/* Demi Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-demicn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-demicn-webfont.eot') format('embedded-opentype');
  font-weight: 600;
  font-stretch: condensed;
  font-style: normal;
}

/* Heavy Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-heavycn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-heavycn-webfont.eot') format('embedded-opentype');
  font-weight: 800;
  font-stretch: condensed;
  font-style: normal;
}

/* Italic */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-it-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-it-webfont.eot') format('embedded-opentype');
  font-weight: 400;
  font-style: italic;
}

/* Medium */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-medium-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-medium-webfont.eot') format('embedded-opentype');
  font-weight: 500;
  font-style: normal;
}

/* Medium Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-mediumcn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-mediumcn-webfont.eot') format('embedded-opentype');
  font-weight: 500;
  font-stretch: condensed;
  font-style: normal;
}

/* Ultra Condensed */
@font-face {
  font-family: 'AvenirNextPro';
  src: url('/AvenirNextFont/avenirnextltpro-ulitcn-webfont.woff') format('woff'),
       url('/AvenirNextFont/avenirnextltpro-ulitcn-webfont.eot') format('embedded-opentype');
  font-weight: 900;
  font-stretch: ultra-condensed;
  font-style: normal;
}

/* ===== Usage ===== */
body {
  font-family: 'AvenirNextPro', Arial, sans-serif;
}

/* === GLOBAL STYLES === */
body {
  font-family: 'AvenirNextPro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #e6e7e8;
  color: #302e2f;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === HEADER === */
.main-header {
  background-color: #302e2f;
  color: white;
  padding: 16px 40px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-placeholder {
  width: 120px;
  height: 48px;
  background-color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ccc;
  border-radius: 6px;
}

.logo-img {
  height: 48px;
  width: auto;
}

/* === MAIN CONTENT === */
main {
  display: flex;
  justify-content: center;
  padding: 50px 20px;
}

.content-box {
  background-color: #fff;
  padding: 40px 50px;            /* a little more padding */
  border-radius: 16px;
  max-width: 1500px;             /* 🔹 was 960px — widen it */
  width: 95%;                    /* stay responsive */
  margin: 2rem auto;             /* center on the page */
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === MODE SWITCH === */
.mode-switch {
  margin-bottom: 20px;
  font-weight: bold;
}

.mode-switch label {
  margin-right: 20px;
}

/* === INPUTS === */
#single-input input,
#batch-input input {
  width: 75%;
  padding: 12px;
  margin-right: 12px;
  margin-top: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.upload-btn {
  padding: 12px 20px;
  margin-top: 12px;
}

/* === BUTTONS === */
.validate-btn,
.export-btn,
.upload-btn {
  background-color: #f78f22;
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.validate-btn:hover,
.export-btn:hover,
.upload-btn:hover {
  background-color: #006f5f;
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.button-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
}

.how-it-works {
  margin-left: 20px;
  font-style: italic;
  text-decoration: none;
  color: #900049;
  font-weight: bold;
}

.export-btn {
  margin-top: 30px;
}

/* === RESULTS === */
.results-box {
  margin-top: 40px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
}

table, th, td {
  border: 1px solid #ccc;
}

th {
  background-color: #f9f9f9;
  font-weight: bold;
}

th, td {
  padding: 10px;
  text-align: left;
  color: #302e2f;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  padding: 30px 35px;
  border-radius: 14px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  position: relative;
  color: #302e2f;
}

.close-btn {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #900049;
  cursor: pointer;
}

/* === COLORS === */
.success {
  color: #006f5f;
}
.warning {
  color: #e56d66;
}
.error {
  color: #900049;
}
.hidden {
  display: none;
}

/* === PROGRESS BAR === */
#progress-container {
  margin: 20px 0;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#progress-text {
  font-weight: bold;
  margin-bottom: 5px;
}

#progress-bar-wrapper {
  background-color: #e6e7e8;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

#progress-bar {
  height: 10px;
  width: 0%;
  background-color: #f78f22;
  transition: width 0.2s ease-in-out;
}

input.valid {
  border: 2px solid #4caf50;
}
input.invalid {
  border: 2px solid #e53935;
}

.export-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* === INFO === */

.info-box {
  background-color: #fff7e6;
  border-left: 6px solid #f78f22;
  padding: 16px 20px;
  border-radius: 10px;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 14.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.info-box h2 {
  margin-top: 0;
  font-size: 18px;
  color: #302e2f;
}

.info-box ul {
  padding-left: 20px;
  margin: 10px 0;
}

.info-box li {
  margin-bottom: 6px;
  line-height: 1.4;
}

/* === ANIMATION === */
/* Common pulse keyframe */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 12px 6px rgba(0,0,0,0.1); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Valid - Green */
.pulse-valid {
  animation: pulse 1.8s ease-out infinite;
  box-shadow: 0 0 8px 2px #4caf50;
}

/* Risky - Orange */
.pulse-risky {
  animation: pulse 1.8s ease-out infinite;
  box-shadow: 0 0 8px 2px #ffa726;
}

/* Invalid - Red */
.pulse-invalid {
  animation: pulse 1.8s ease-out infinite;
  box-shadow: 0 0 6px 2px #e53935;
}

/* Spam Trap - Magenta */
.pulse-spam {
  animation: pulse 1.8s ease-out infinite;
  box-shadow: 0 0 8px 2px #900049;
}

/* Overlay background */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); /* dim effect */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* above everything */
}

/* Hide when not active */
.hidden {
  display: none !important;
}

/* Drawer overlay */
.drawer {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 18px; z-index: 3000;
}
.drawer.hidden { display: none !important; }

.drawer-card {
  width: min(100%, 920px);
  background: #fff7ea;              /* matches your info box vibe */
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  border-left: 8px solid #f78f22;
  padding: 18px 22px 22px;
  color: #302e2f;
  animation: fadeInUp .22s ease;
}
@keyframes fadeInUp {
  from { transform: translateY(8px); opacity: .8; }
  to   { transform: translateY(0);   opacity: 1;  }
}

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.drawer-head h3 { margin: 0; }
.drawer-close {
  background: #fff; border: 1px solid #ddd; border-radius: 10px;
  width: 34px; height: 34px; cursor: pointer; font-size: 20px; line-height: 32px;
}
.drawer-close:hover { background: #f1f1f5; }

.details-summary {
  display: grid; gap: 10px 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px;
  margin: 6px 0 14px 0;
}
.summary-item { display: grid; gap: 4px; font-size: 14px; }
.summary-item .label { font-weight: 700; opacity: .75; }
.badge {
  display:inline-block; padding: 4px 10px; border-radius: 999px; font-weight:700; font-size:12px;
}
.badge.success { background:#e8f5e9; color:#2e7d32; }
.badge.error   { background:#ffebee; color:#c62828; }
.badge.warn    { background:#fff8e1; color:#ef6c00; }
.badge.neutral { background:#eceff1; color:#455a64; }

.details-sections { display: grid; gap: 12px; }
.details-sections section {
  background:#fff; border:1px solid #eee; border-radius:12px; padding:10px 12px;
}
.details-sections h4 { margin:0 0 6px 0; }

.details-code {
  background:#fafafa; border:1px dashed #ddd; border-radius:8px;
  padding:10px; white-space:pre-wrap; word-break:break-word; font-size:12px;
}
.raw-details { margin-top:6px; }

/* Banner styling */
.banner {
  background: linear-gradient(135deg, #3b82f6, #2563eb); /* nice blue gradient */
  padding: 20px 0;
  text-align: center;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.banner .banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.banner .logo {
  height: 50px;
  width: auto;
}

/* Login container */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px); /* full height minus banner */
  background: #f9fafb;
  padding: 20px;
}

/* Login box */
.login-box {
  max-width: 400px;
  width: 100%;
  padding: 30px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  text-align: center;
}

.login-box h2 {
  margin-bottom: 10px;
}

.login-box .subtitle {
  margin-bottom: 20px;
  color: #6b7280;
  font-size: 0.95rem;
}

/* Form controls */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}

.form-group input:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.3);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: #f78f22;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

/* Messages */
.message {
  margin-top: 15px;
  font-weight: 500;
}

/* Signup link */
.signup-link {
  margin-top: 15px;
  font-size: 0.9rem;
}
.signup-link a {
  color: #3b82f6;
  text-decoration: none;
}
.signup-link a:hover {
  text-decoration: underline;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-weight: bold;
  color: #007bff;
}

.nav-links a:hover {
  text-decoration: underline;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-buttons {
  margin-left: auto;
  display: flex;
  gap: 14px;
}

/* Base button style */
.btn {
  display: inline-block;
  padding: 10px 20px;  /* slightly bigger */
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s ease;
}

/* Secondary buttons (Home, Settings) */
.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}
.btn-secondary:hover {
  background-color: #545b62;
}

/* Primary = Login */
.btn-primary {
  background-color: #f78f22;
  color: #fff;
  font-size: 1rem;
}
.btn-primary:hover {
  background-color: #cc6a00;
}

/* Danger = Logout */
.btn-danger {
  background-color: #dc3545;
  color: #fff;
  font-size: 1rem;
}
.btn-danger:hover {
  background-color: #a71d2a;
}

.forgot-link {
  text-align: right;
  margin: -8px 0 12px;
}

.forgot-link a {
  font-size: 0.9rem;
  color: #007bff;
  text-decoration: none;
}

.forgot-link a:hover {
  text-decoration: underline;
}

/* Wider content ONLY on the homepage */
body.index-page .content-box {
  max-width: 1000px;   /* adjust as needed (800px, 900px, 1000px) */
  padding: 30px 40px;  /* add breathing room */
}

/* === SETTINGS PAGE LAYOUT === */
.settings-layout {
  display: flex;
  align-items: flex-start;
  padding: 40px;
  gap: 30px;
  background: #f9fafb;
}

/* Sidebar */
.settings-sidebar {
  flex: 0 0 220px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.settings-sidebar h2 {
  font-size: 1rem;
  margin-bottom: 15px;
  color: #302e2f;
}

.settings-sidebar a {
  display: block;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 6px;
  color: #302e2f;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.settings-sidebar a.active,
.settings-sidebar a:hover {
  background: #f78f22;
  color: #fff;
}

/* Content area */
.settings-content {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 30px 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.settings-content h2 {
  margin-top: 0;
  color: #302e2f;
}

.subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 20px;
}

.settings-section {
  margin-bottom: 50px;
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

.settings-section.hidden {
  display: none;
  opacity: 0;
}

/* Inputs inside settings */
.settings-content .form-group input,
.settings-content .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
}

.settings-content .form-group input:focus,
.settings-content .form-group select:focus {
  border-color: #f78f22;
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 143, 34, 0.25);
}

/* Buttons inside settings */
.settings-content .btn-primary {
  background: #f78f22;
  color: #fff;
  font-weight: bold;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-content .btn-primary:hover {
  background: #006f5f;
}

.settings-content .btn-danger {
  background: #dc3545;
  color: #fff;
  font-weight: bold;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-content .btn-danger:hover {
  background: #a71d2a;
}

/* Message */
#settingsMessage {
  margin-top: 15px;
  font-weight: 500;
}

/* Payment sub-tabs */
.payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.payment-tab {
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9fafb;
  cursor: pointer;
  font-weight: 500;
}

.payment-tab.active {
  background: #f78f22;
  color: #fff;
  border-color: #f78f22;
}

.payment-method.hidden {
  display: none;
}

body.dark-mode {
  background: #1f2937;
  color: #f3f4f6;
}

body.dark-mode .content-box {
  background: #374151;
  color: #f9fafb;
}

body.dark-mode .btn-secondary {
  background: #4b5563;
}

.profile-pic-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ccc;
  object-fit: cover;
}

/* Force everything to Avenir */
* {
  font-family: 'AvenirNextPro', Arial, sans-serif !important;
}

/* Divider between normal login and social logins */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
}
.divider:not(:empty)::before {
  margin-right: 10px;
}
.divider:not(:empty)::after {
  margin-left: 10px;
}
.divider span {
  font-size: 0.9rem;
  color: #777;
}

/* Social login buttons */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
}

.google-btn, .microsoft-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}

.google-btn {
  background: #fff;
  color: #555;
  border: 1px solid #ddd;
}
.google-btn:hover {
  background: #f7f7f7;
}
.google-btn img {
  width: 18px;
  height: 18px;
}

.microsoft-btn {
  background: #2F2F2F;
  color: white;
}
.microsoft-btn:hover {
  background: #1b1b1b;
}
.microsoft-btn img {
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 2px;
  padding: 2px;
}

td {
  text-align: center;
  font-size: 1.1rem;
}

td:has(> .valid-icon) {
  color: #22c55e;
}

td:has(> .invalid-icon) {
  color: #ef4444;
}

td:contains("TRUE") { color: #22c55e; font-weight: 600; }
td:contains("FALSE") { color: #ef4444; font-weight: 600; }

td {
  text-align: center;
}

td:contains("true") {
  color: #2e7d32; /* green */
  font-weight: 600;
}
td:contains("false") {
  color: #c62828; /* red */
  font-weight: 600;
}

/* ==================== EMAIL DETAILS POPUP (FINAL VERSION) ==================== */
#detailsPopup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#detailsPopup.show {
  opacity: 1;
  pointer-events: auto;
}

#detailsPopup .popup-card {
  position: relative;
  background: #fff7ea; /* matches your info box aesthetic */
  color: #302e2f;
  width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  transform: translateY(30px) scale(0.96);
  transition: all 0.3s ease;
  opacity: 0;
  border-left: 8px solid #f78f22;
}
#detailsPopup.show .popup-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close Button */
#detailsPopup .close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6rem;
  font-weight: bold;
  color: #900049;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
}
#detailsPopup .close-btn:hover {
  color: #f78f22;
  transform: rotate(90deg);
}

/* Title */
#detailsPopup h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.4rem;
}

/* Grid layout for details */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.detail-item {
  background: #fff;
  border: 1px solid #eee;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.detail-item span {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.detail-item strong {
  font-weight: 700;
  font-size: 1rem;
}

/* Risk Score Bar */
.risk-bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 5px;
  margin-top: 4px;
  overflow: hidden;
}
#riskFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4caf50, #f78f22, #ff5353);
  transition: width 0.6s ease;
}
#riskText {
  position: absolute;
  right: 6px;
  top: -18px;
  font-size: 0.75rem;
  color: #555;
}

/* JSON Display */
.json-block {
  background: #0f1015;
  color: #9cf3ff;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  overflow-x: auto;
  margin-top: 1.5rem;
}

/* Animation smoothness */
#detailsPopup.show .popup-card {
  animation: popupEnter 0.3s ease-out;
}
@keyframes popupEnter {
  from { transform: translateY(40px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.hidden { display: none !important; }
.header-user { margin-right: .5rem; opacity: .9; }







/* Layout */
.header-content { display:flex; align-items:center; justify-content:space-between; }
.header-left { display:flex; align-items:center; gap:.6rem; }
.logo-img { width:100px; height:90px; }

/* Right side buttons row */
.header-buttons { display:flex; align-items:center; gap:.6rem; }

/* “Hi, username” pill to match your button style */
.header-user{
  display:flex; align-items:center; gap:.5rem;
  padding:.35rem .7rem;
  background:#f3f4f6; /* same light pill as before */
  border-radius:999px;
  font-weight:600; color:#111; line-height:1;
  border:1px solid #e5e7eb;
}
.header-user img{ /* avatar if JS injects it */
  width:22px; height:22px; border-radius:50%;
  object-fit:cover; background:#ddd;
}

/* Logout button pill */
#logoutBtn{
  padding:.4rem .8rem;
  border-radius:999px;
}

/* Dark mode tweaks (since you toggle .dark-mode) */
.dark-mode .header-user{
  background:#2b2f35; border-color:#3a3f46; color:#f8f8f8;
}
.dark-mode #logoutBtn{ filter: brightness(0.95); }

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


/* ==== Charts (final balanced) ==== */
#summary-stats { 
  margin-top: 1.5rem; 
}

.chart-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
}

.chart-box {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-radius: 20px;
  width: 160px;
  padding: 16px 12px 20px;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 200px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.chart-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(249,115,22,0.12); /* subtle orange hue */
}

.chart-title {
  font: 600 15px system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1f2937;
  margin-bottom: 12px;
}

.chart-box canvas {
  width: 120px !important;
  height: 120px !important;
  display: block;
  margin-top: 4px;        /* slight optical centering */
  transform: translateZ(0);
}

/* Responsive tweaks */
@media (max-width: 900px) {
  .chart-row { gap: 20px; }
  .chart-box { width: 140px; }
}
@media (max-width: 600px) {
  .chart-box { width: 100%; max-width: 260px; }
  .chart-box canvas { width: 150px !important; height: 150px !important; }
}

/* boolean pill styles */
td.bool { font-weight: 600; }
td.bool.valid   { color: #16a34a; }  /* green */
td.bool.invalid { color: #dc2626; }  /* red */

/* spam yes/no */
td.bool.yes  { color: #b91c1c; font-weight: 700; } /* highlight "Yes" */
td.bool.no   { color: #475569; }

.logout-btn {
  background-color: #e11d48;  /* reddish */
}

.logout-btn:hover {
  background-color: #be123c;
}
