* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --nav-bg: #121722;
  --nav-border: #232b3b;
  --border: #e2e8f0;
  --text: #111827;
  --muted: #64748b;
  --amber: #f5a623;
  --amber-hover: #e59412;
  --amber-soft: #fef3c7;
  --amber-text: #111827;
  --emerald: #059669;
  --emerald-bright: #34d399;
  --emerald-bg: #ecfdf5;
  --primary: #0f4c5c;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --radius: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* ================= TOP NAVBAR (MARKAHTECH DARK HEADER) ================= */
.topbar {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: 0 28px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.35);
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  background: var(--amber);
  color: #111827;
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.3);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-stat-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.btn-signout {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-signout:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ================= LOGIN SCREEN ================= */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.login-card h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.login-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ================= CONTAINER & HERO BANNER ================= */
.container {
  max-width: 1260px;
  margin: 24px auto;
  padding: 0 20px 40px;
}

.hero-banner {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(125deg, #0b1938 0%, #0e3b4c 52%, #0d6e5b 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  border-radius: 16px;
  padding: 28px 32px;
  color: #ffffff;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 8px 24px rgba(11, 25, 56, 0.12);
}

.hero-left {
  max-width: 600px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 155px;
}

.hero-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.hero-stat-val.online {
  color: var(--emerald-bright);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.online-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald-bright);
  display: inline-block;
  box-shadow: 0 0 8px var(--emerald-bright);
}

.hero-stat-lbl {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 4px;
}

/* ================= CARDS & SEARCH BAR ================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.search-main-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .search-main-row {
    grid-template-columns: 1fr;
  }
}

.search-big-input {
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
}

.search-big-input:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.18);
}

.btn-amber-cta {
  height: 48px;
  background: var(--amber);
  border: 1px solid var(--amber);
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-amber-cta:hover {
  background: var(--amber-hover);
}

.btn-amber-cta:disabled {
  background: #fbd38d;
  border-color: #fbd38d;
  color: #78350f;
  cursor: not-allowed;
}

.search-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.search-footer-bar {
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.pill-action-btn {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-action-btn:hover {
  background: #f1f5f9;
}

.count-chip {
  background: #e2e8f0;
  color: var(--text);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ================= LIVE PROGRESS CARD (STRIPED BAR) ================= */
.searching-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.searching-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.searching-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.searching-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}

.searching-label {
  font-size: 12px;
  color: var(--muted);
}

.searching-keyword {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
}

.stage-labels-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stage-lbl-left { text-align: left; color: var(--text); }
.stage-lbl-center { text-align: center; color: var(--muted); }
.stage-lbl-right { text-align: right; color: var(--muted); }
.stage-active { color: var(--text) !important; }

.striped-track {
  width: 100%;
  height: 14px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}

@keyframes moveStripes {
  0% { background-position: 0 0; }
  100% { background-position: 28px 0; }
}

.striped-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--amber);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.35) 10px,
    transparent 10px,
    transparent 20px
  );
  background-size: 28px 28px;
  animation: moveStripes 1s linear infinite;
  transition: width 0.5s ease;
}

.searching-subline {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ================= GENERAL FORM CONTROLS & BUTTONS ================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-size: 13px;
  background: #ffffff;
  color: var(--text);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--amber);
}

.btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover { background: #f8fafc; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--amber);
  color: #111827;
  border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-hover); }

.btn-success {
  background: var(--emerald);
  color: #ffffff;
  border-color: var(--emerald);
}

.btn-danger {
  background: #ffffff;
  color: var(--danger);
  border-color: #fecaca;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

/* ================= BADGES & REPORT CARDS ================= */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-idle { background: #ecfdf5; color: #059669; }
.badge-busy { background: #fef3c7; color: #b45309; }
.badge-viewer { background: #e0f2fe; color: #0369a1; }
.badge-danger { background: #fef2f2; color: #dc2626; }

.verdict-banner {
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.kpi-box .kpi-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.kpi-box .kpi-val { font-size: 21px; font-weight: 800; margin-top: 4px; color: var(--text); }
.kpi-box .kpi-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.seo-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 9px;
  margin-bottom: 8px;
  font-size: 13px;
}

.pill-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.pill {
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { background: #f8fafc; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.profile-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.viewer-frame-box {
  border: 2px solid var(--nav-bg);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 20px;
}

.viewer-toolbar {
  background: var(--nav-bg);
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.viewer-iframe { width: 100%; height: 680px; border: none; display: block; }

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}


/* ================= AUTH TABS & MODALS ================= */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.auth-tab-btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.4px;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.otp-row {
  display: grid;
  grid-template-columns: 1fr 132px;
  gap: 8px;
  align-items: end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.modal-close {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
}

.clickable-pill {
  cursor: pointer;
  transition: background 0.15s ease;
}
.clickable-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}


/* ================= COMPACT MATRIX STREAM & CROPPED CAPTCHA BOX ================= */
.matrix-captcha-viewport {
  position: relative;
  width: 100%;
  height: 230px;
  margin-top: 14px;
  border-radius: 12px;
  background: #080d14;
  border: 1px solid #1e293b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 16px rgba(0, 0, 0, 0.65);
  transition: height 0.3s ease, border-color 0.3s ease;
}

.matrix-captcha-viewport.captcha-mode {
  height: 310px;
  background: #0f172a;
  border-color: var(--amber);
}

#matrixRainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  transition: opacity 0.45s ease;
}

#matrixRainCanvas.faded-out {
  opacity: 0.08;
  pointer-events: none;
}

.matrix-hud-pill {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #34d399;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.captcha-crop-overlay {
  position: relative;
  z-index: 5;
  background: #ffffff;
  border: 2px solid var(--amber);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  max-width: 440px;
  width: 94%;
  text-align: center;
  animation: fadeInScale 0.3s ease forwards;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.captcha-crop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.captcha-crop-stage {
  position: relative;
  display: inline-block;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
  max-height: 225px;
}

.captcha-crop-stage img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  user-select: none;
  -webkit-user-drag: none;
}

.captcha-demo-widget {
  padding: 18px 20px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.captcha-demo-widget:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.captcha-demo-checkbox {
  width: 26px;
  height: 26px;
  border: 2px solid #64748b;
  border-radius: 5px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #059669;
  font-weight: 900;
}


/* ================= ON-SCREEN BACK NAVIGATION BAR ================= */
.back-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-back-nav {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #111827;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.btn-back-nav:hover {
  background: #f8fafc;
  border-color: var(--amber);
}
