:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.3);
  --bg-color: #0a0f1a;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(59, 130, 246, 0.15);
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  background-image: url('img/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 10, 20, 0.65);
  z-index: 0;
}

/* Page Wrapper */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.hidden {
  display: none !important;
}

/* ========== LOGIN ========== */
.login-card {
  width: 100%;
  max-width: 420px;
}

.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
  box-shadow: 0 0 30px var(--primary-glow);
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  text-align: center;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ========== GLASS CARD ========== */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ========== APP CONTAINER ========== */
.app-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.topbar-brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
  min-width: auto;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.25);
  transform: none;
  box-shadow: none;
}

/* ========== TABS ========== */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.35rem;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  min-width: auto;
}

.tab svg {
  width: 18px;
  height: 18px;
}

.tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  transform: none;
  box-shadow: none;
}

.tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.tab.active:hover {
  background: var(--primary-hover);
}

/* ========== TAB CONTENT ========== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ========== CARD HEADER ========== */
.card-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 0.75rem;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.email-icon {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.shield-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ========== FORM ========== */
.input-group {
  display: flex;
  gap: 0.5rem;
}

input {
  flex: 1;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

input::placeholder {
  color: #475569;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Password Toggle & Remember Me */
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  padding-right: 3rem;
  width: 100%;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  min-width: auto;
  width: auto;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  box-shadow: none;
}

.toggle-password:hover {
  background: transparent;
  color: var(--text-main);
  box-shadow: none;
  transform: translateY(-50%);
}

.toggle-password svg {
  width: 20px;
  height: 20px;
}

.remember-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
  justify-content: flex-start;
}

.remember-wrapper input {
  flex: 0 0 auto;
  width: auto;
  cursor: pointer;
  accent-color: var(--primary);
  margin: 0;
}

.remember-wrapper label {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

button:active {
  transform: translateY(0);
}

/* ========== LOADER ========== */
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== RESULTS ========== */
.results-container {
  margin-top: 1.5rem;
  text-align: left;
  animation: fadeIn 0.4s ease;
}

/* Visual Summary Grid & Layout Due Colonne */
.diagnose-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.diagnose-left {
  flex: 1;
}

.diagnose-right {
  width: 250px;
  position: sticky;
  top: 1rem;
}

.score-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.checks-grid-right {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.check-pill {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.check-pill span:first-child {
  font-size: 0.95rem;
}

.check-pill.pass { color: var(--success); border-color: rgba(16, 185, 129, 0.2); background: rgba(16, 185, 129, 0.05); }
.check-pill.warning { color: var(--warning); border-color: rgba(245, 158, 11, 0.2); background: rgba(245, 158, 11, 0.05); }
.check-pill.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.05); }

/* Main Status */
.main-status {
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.main-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.main-status.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Summary Bar */
.summary-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.summary-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}

/* Result Card */
.result-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.ip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.blacklist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.blacklist-item:last-child {
  border-bottom: none;
}

.bl-name {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status {
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status.clean {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.status.listed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

/* ========== DIAGNOSTICA ========== */
.score-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
}

.score-ring svg {
  transform: rotate(-90deg);
}

.score-ring .score-text {
  position: absolute;
  font-size: 1.5rem;
  font-weight: 700;
}

.diag-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.diag-title {
  font-size: 1rem;
  font-weight: 600;
}

.diag-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.diag-badge.pass {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.diag-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.diag-badge.missing, .diag-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.diag-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.diag-record {
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  color: #64748b;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  border-radius: 6px;
  word-break: break-all;
  overflow-x: auto;
}

/* Error */
.error-message {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.15);
  font-size: 0.9rem;
  text-align: center;
}

/* ========== TEXTAREA ========== */
textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  outline: none;
  transition: all 0.25s ease;
  resize: vertical;
  min-height: 120px;
}

textarea::placeholder {
  color: #475569;
  font-family: 'Inter', sans-serif;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.header-icon {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

/* Hop table */
.hop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.hop-table th {
  text-align: left;
  padding: 0.5rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.hop-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  word-break: break-all;
}

.delay-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.delay-badge.fast {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.delay-badge.slow {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.delay-badge.very-slow {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 800px) {
  .diagnose-layout {
    flex-direction: column-reverse;
  }
  .diagnose-right {
    width: 100%;
    position: static;
    margin-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  .input-group {
    flex-direction: column;
  }
  button {
    padding: 0.85rem;
  }
  .summary-bar {
    grid-template-columns: 1fr;
  }
  .card-header h2 {
    font-size: 1.2rem;
  }
  .tabs {
    flex-direction: column;
  }
  .topbar-brand {
    display: none;
  }
}

/* ========== MODAL ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.hidden {
  display: none !important;
}

.modal-content {
  background: var(--bg-color);
  background: rgba(10, 15, 26, 0.98);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 15px rgba(59, 130, 246, 0.15);
  animation: modalIn 0.3s ease;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.95);
  border-radius: 12px 12px 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: transparent !important;
  color: #fbbf24 !important;
  border: none !important;
  font-size: 2rem !important;
  cursor: pointer;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  transition: all 0.2s;
  box-shadow: none !important;
}

.modal-close:hover {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
  transform: scale(1.1) !important;
}

.modal-body {
  padding: 1.5rem;
  line-height: 1.6;
}

.modal-body h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 1.1rem;
}

.modal-body p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-body ul, .modal-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-main);
  font-size: 0.95rem;
}

.modal-body li {
  margin-bottom: 0.5rem;
}

.modal-body code {
  background: rgba(0,0,0,0.4);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: inherit;
  color: #fbbf24;
}

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

.btn-guide {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  min-width: auto;
  margin-left: 0.5rem;
  font-weight: 500;
}

.btn-guide.info {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.2);
}

.btn-guide.info:hover {
  background: rgba(59, 130, 246, 0.2);
}

.btn-guide:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: none;
  box-shadow: none;
}


.main-status.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status.unknown {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.result-note {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  color: var(--text-muted);
  background: rgba(245, 158, 11, 0.06);
  font-size: 0.85rem;
}

.source-detail {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}
/* ========== MAILGUARD VISUAL SYSTEM ========== */
:root {
  --primary: #4bd8ff;
  --primary-hover: #8be8ff;
  --primary-glow: rgba(75, 216, 255, 0.18);
  --bg-color: #07111f;
  --text-main: #edf7ff;
  --text-muted: #8ea7bb;
  --card-bg: #0d1a2a;
  --card-border: rgba(118, 183, 215, 0.18);
  --border: rgba(118, 183, 215, 0.14);
  --success: #53e0af;
  --warning: #ffc857;
  --danger: #ff6b7a;
}

body {
  background: var(--bg-color);
  background-image: none;
}

body::before {
  background: #07111f;
  opacity: 0.96;
}

.page-wrapper {
  align-items: flex-start;
  padding: 2.25rem 1.25rem;
}

#loginSection {
  align-items: center;
}

.glass-card,
.topbar,
.score-card,
.result-card,
.diag-card {
  background: var(--card-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: var(--card-border);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.login-card {
  max-width: 440px;
  padding: 2.5rem;
}

.logo-area {
  margin-bottom: 1rem;
}

.logo {
  width: 88px;
  height: 88px;
  padding: 0.65rem;
  border-radius: 22px;
  object-fit: contain;
  background: #0b2034;
  border: 1px solid rgba(75, 216, 255, 0.35);
  box-shadow: 0 16px 34px rgba(75, 216, 255, 0.12);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-lockup-centered {
  align-items: center;
  margin-bottom: 1.5rem;
}

.brand-name {
  color: var(--text-main);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-by {
  margin-top: 0.28rem;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.login-card h1 {
  text-wrap: balance;
}

.topbar {
  min-height: 64px;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
}

.topbar-left {
  gap: 0.7rem;
}

.topbar-logo {
  width: 38px;
  height: 38px;
  padding: 0.28rem;
  border-radius: 11px;
  object-fit: contain;
  background: #0b2034;
  border: 1px solid rgba(75, 216, 255, 0.3);
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  margin-right: 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(83, 224, 175, 0.1);
}

.app-container {
  max-width: 1180px;
  padding: 0.5rem 0 2.5rem;
}

.hero-panel {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  margin: 1.25rem 0;
  padding: 2rem;
  border: 1px solid rgba(75, 216, 255, 0.2);
  border-radius: 18px;
  background: #0b1d30;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-panel h1 {
  max-width: 720px;
  margin-bottom: 0.7rem;
  color: var(--text-main);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  text-wrap: balance;
}

.hero-panel p {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-meta {
  min-width: 190px;
  align-self: center;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 1px solid var(--border);
}

.hero-meta-value {
  color: var(--text-main);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-meta-value span {
  color: var(--primary);
}

.hero-meta-label {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.hero-meta-rule {
  width: 100%;
  height: 1px;
  margin: 1.1rem 0;
  background: var(--border);
}

.tabs {
  gap: 0.45rem;
  padding: 0.45rem;
  margin-bottom: 1rem;
  background: #0a1727;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.tab {
  min-height: 44px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.tab:hover {
  color: var(--text-main);
  background: rgba(75, 216, 255, 0.07);
}

.tab.active {
  color: #061522;
  background: var(--primary);
  box-shadow: none;
}

.tab svg {
  width: 17px;
  height: 17px;
}

.card-header h2,
.diag-title {
  text-wrap: balance;
}

.subtitle,
.diag-message,
.result-note {
  text-wrap: pretty;
}

.input-group input,
.search-form textarea,
input[type="text"],
input[type="password"] {
  background: #081523;
  border-color: rgba(118, 183, 215, 0.22);
  color: var(--text-main);
}

.input-group input:focus,
.search-form textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(75, 216, 255, 0.12);
}

button,
input,
textarea {
  font-family: inherit;
}

button[type="submit"],
#loginBtn {
  background: var(--primary);
  color: #061522;
  box-shadow: none;
}

button[type="submit"]:hover,
#loginBtn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-guide.info {
  color: var(--primary);
  border-color: rgba(75, 216, 255, 0.28);
  background: rgba(75, 216, 255, 0.06);
}

.main-status,
.summary-bar,
.result-note {
  border-radius: 12px;
}

.summary-bar {
  background: #0a1727;
}

@media (max-width: 820px) {
  .hero-panel {
    flex-direction: column;
    gap: 1.4rem;
    padding: 1.35rem;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem 0.8rem;
    min-width: 0;
    padding: 1rem 0 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .hero-meta-rule {
    width: 1px;
    height: 38px;
    margin: 0;
  }

  .hero-meta-value {
    font-size: 1.4rem;
  }

  .hero-meta-label {
    margin-top: 0;
  }

  .topbar-status {
    display: none;
  }
}

@media (max-width: 620px) {
  .page-wrapper {
    padding: 1rem 0.7rem;
  }

  .app-container {
    padding-top: 0;
  }

  .glass-card,
  .login-card {
    padding: 1.25rem;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tab {
    justify-content: center;
    padding: 0.65rem 0.35rem;
    font-size: 0.72rem;
  }
}
/* Mailguard diagnostics extensions */
.diagnose-options {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(220px, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.7rem;
}
.diagnose-options label { color: var(--text-main); font-size: 0.82rem; font-weight: 700; }
.diagnose-options input { min-width: 0; }
.diagnose-options span { color: var(--text-muted); font-size: 0.76rem; }
.report-actions, .history-toolbar { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 0 0 1rem; }
.btn-secondary {
  border: 1px solid rgba(118, 183, 215, 0.24);
  border-radius: 9px;
  background: #0a1727;
  color: var(--text-main);
  padding: 0.58rem 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.history-list { display: grid; gap: 0.65rem; }
.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0a1727;
}
.history-type { color: var(--primary); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.history-date { color: var(--text-muted); font-size: 0.76rem; margin-top: 0.18rem; }
.history-side { display: flex; align-items: center; gap: 0.65rem; }
.history-score { color: var(--text-main); font-variant-numeric: tabular-nums; font-weight: 800; }
.empty-state { color: var(--text-muted); border: 1px dashed var(--border); border-radius: 12px; padding: 1.1rem; text-align: center; }
.dns-audit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 0; margin-bottom: 0; }
.print-report { max-width: 960px; margin: 2rem auto; padding: 1.5rem; color: #102033; background: #fff; }
.print-report pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.82rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
@media (max-width: 760px) {
  .diagnose-options { grid-template-columns: 1fr; }
  .history-item { align-items: flex-start; flex-direction: column; }
  .dns-audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  body { background: #fff !important; }
  .print-report { margin: 0; }
}
/* WHOIS / IP intelligence */
.intel-note { margin: 0.75rem 0 0; color: var(--text-muted); font-size: 0.8rem; text-wrap: pretty; }
.intel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.intel-fact, .intel-records > div { display: grid; gap: 0.22rem; padding: 0.68rem 0; border-top: 1px solid var(--border); }
.intel-fact span, .intel-records span { color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; }
.intel-fact strong, .intel-records strong { color: var(--text-main); font-size: 0.88rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.intel-records { display: grid; gap: 0.1rem; }
.intel-icon { color: var(--primary); background: rgba(75, 216, 255, 0.08); border-color: rgba(75, 216, 255, 0.2); }
@media (max-width: 760px) { .intel-grid { grid-template-columns: 1fr; } }.install-app { padding: 0.45rem 0.7rem; font-size: 0.76rem; }
@media (max-width: 620px) { .install-app { display: none; } }.web-icon { color: var(--primary); background: rgba(75, 216, 255, 0.08); border-color: rgba(75, 216, 255, 0.2); }
/* LAN scanner */
.lan-icon { background: rgba(64, 214, 170, 0.12); color: var(--primary); border: 1px solid rgba(64, 214, 170, 0.28); }
.lan-status { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1rem; margin: 1.25rem 0; border: 1px solid var(--border); background: rgba(255,255,255,0.025); border-radius: 12px; }
.lan-status strong, .lan-status span { display: block; }
.lan-status strong { color: var(--text); font-size: 0.9rem; }
.lan-status div span { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 0 3px rgba(255, 99, 120, 0.1); }
.status-dot.online { background: var(--primary); box-shadow: 0 0 0 3px rgba(64, 214, 170, 0.1); }
.lan-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.lan-actions > button { flex: 1 1 220px; }
.lan-options { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; color: var(--muted); font-size: 0.82rem; }
.lan-options select { color: var(--text); background: var(--surface-strong); border: 1px solid var(--border); border-radius: 8px; padding: 0.55rem 0.7rem; }
.lan-note { margin-top: 1rem; padding: 0.9rem 1rem; border-left: 3px solid var(--primary); background: rgba(64, 214, 170, 0.06); color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.lan-note strong { color: var(--text); }
.lan-install-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.025); }
.lan-install-card strong, .lan-install-card span { display: block; }
.lan-install-card strong { color: var(--text); font-size: 0.9rem; }
.lan-install-card span { color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.lan-summary { display: flex; flex-wrap: wrap; gap: 0.8rem 1.25rem; align-items: baseline; margin: 1.25rem 0 0.9rem; }
.lan-summary strong { color: var(--primary); font-size: 1.05rem; }
.lan-summary span, .lan-summary small { color: var(--muted); font-size: 0.78rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.lan-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.78rem; }
.lan-table th, .lan-table td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.lan-table th { color: var(--muted); background: rgba(255,255,255,0.035); font-weight: 600; }
.lan-table td { color: var(--text); }
.lan-table tr:last-child td { border-bottom: 0; }
@media (max-width: 620px) {
  .lan-install-card { align-items: stretch; flex-direction: column; }
  .lan-install-card .btn-secondary { width: 100%; text-align: center; }
  .lan-options { align-items: stretch; flex-direction: column; }
  .lan-options select { width: 100%; }
}.lan-options select { color: #e6f1f5; background-color: #0d1b2a; color-scheme: dark; }
.lan-options select option { color: #e6f1f5; background-color: #0d1b2a; }
.lan-options select option:checked { color: #ffffff; background-color: #1769c2; }
/* API key management */
.api-icon { background: rgba(118, 183, 215, 0.12); color: var(--info, #76b7d7); border: 1px solid rgba(118, 183, 215, 0.28); }
.api-key-form { display: grid; gap: 1rem; }
.api-key-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.api-key-fields label { display: grid; gap: 0.4rem; color: var(--text); font-size: 0.8rem; font-weight: 600; }
.api-key-fields label span { color: var(--muted); font-weight: 400; }
.api-key-fields input { min-width: 0; }
.api-key-note { margin-top: 0.8rem; padding: 0.8rem 1rem; color: var(--muted); background: rgba(118, 183, 215, 0.06); border-left: 3px solid var(--info, #76b7d7); font-size: 0.8rem; line-height: 1.5; }
.api-key-result { margin-top: 1rem; padding: 1rem; color: var(--text); border: 1px solid rgba(64, 214, 170, 0.35); background: rgba(64, 214, 170, 0.08); border-radius: 10px; }
.api-key-result strong, .api-key-result span, .api-key-result code { display: block; }
.api-key-result span { color: var(--muted); margin-top: 0.25rem; font-size: 0.8rem; }
.api-key-result code { margin: 0.75rem 0; padding: 0.7rem; overflow-wrap: anywhere; color: var(--primary); background: rgba(0,0,0,0.22); border-radius: 7px; font: 0.82rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.api-key-list-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.api-key-list-header h3 { margin: 0; color: var(--text); font-size: 0.95rem; }
.api-key-list { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.api-key-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,0.025); }
.api-key-item strong, .api-key-item span { display: block; }
.api-key-item strong { color: var(--text); font-size: 0.86rem; }
.api-key-item > div:first-child span { color: var(--muted); margin-top: 0.25rem; font-size: 0.76rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.api-key-item-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 620px) {
  .api-key-fields { grid-template-columns: 1fr; }
  .api-key-list-header, .api-key-item { align-items: stretch; flex-direction: column; }
  .api-key-item-actions { justify-content: flex-start; }
}