/* ==========================================================================
   FT-DNA Style System | Custom Vanilla CSS with Modern Glassmorphism
   ========================================================================== */

/* Color Tokens & Theme Variables */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Premium HSL Color Palette */
  --bg-main: hsl(222, 25%, 6%);
  --glass-blur: 14px;
  --glass-opacity: 0.6;
  --bg-surface: hsla(222, 25%, 11%, var(--glass-opacity));
  --bg-surface-solid: hsl(222, 25%, 11%);
  --border-color: hsla(220, 20%, 25%, 0.4);
  --border-focus: hsla(200, 100%, 50%, 0.8);
  
  --primary: hsl(210, 100%, 55%);
  --primary-glow: hsla(210, 100%, 55%, 0.25);
  
  --cyan: hsl(185, 100%, 48%);
  --cyan-glow: hsla(185, 100%, 48%, 0.25);

  --green: hsl(142, 70%, 45%);
  --green-glow: hsla(142, 70%, 45%, 0.25);

  --orange: hsl(35, 90%, 50%);
  --orange-glow: hsla(35, 90%, 50%, 0.25);

  --red: hsl(354, 85%, 52%);
  --red-glow: hsla(354, 85%, 52%, 0.25);

  --text-main: hsl(210, 20%, 95%);
  --text-muted: hsl(215, 15%, 65%);
  
  --sidebar-width: 260px;
  --header-height: 80px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --neon-shadow-blue: 0 0 15px 0 rgba(59, 130, 246, 0.3);
  --neon-shadow-cyan: 0 0 15px 0 rgba(6, 182, 212, 0.3);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  /* Deep Radial Space Gradient */
  background-image: 
    radial-gradient(at 10% 10%, hsla(215, 100%, 20%, 0.15) 0px, transparent 50%),
    radial-gradient(at 90% 95%, hsla(180, 100%, 20%, 0.12) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Glassmorphism Preset */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
}

/* Layout System */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border-left: none;
  border-top: none;
  border-bottom: none;
  z-index: 10;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

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

.brand-icon {
  color: var(--cyan);
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px var(--cyan));
}

.brand h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--text-main), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-top: -2px;
}

.sidebar-nav {
  padding: 20px 12px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link i {
  width: 18px;
  height: 18px;
}

.nav-link:hover {
  color: var(--text-main);
  background: hsla(220, 20%, 25%, 0.3);
}

.nav-link.active {
  color: var(--text-main);
  background: hsla(210, 100%, 55%, 0.15);
  border-left: 3px solid var(--primary);
  box-shadow: inset 5px 0 10px hsla(210, 100%, 55%, 0.05);
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-main);
}

.user-badge i {
  color: var(--green);
  width: 16px;
  height: 16px;
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--red);
  background: hsla(354, 85%, 52%, 0.15);
}

/* Content Area */
.content-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.top-header {
  height: var(--header-height);
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.header-title h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.header-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: hsla(142, 70%, 45%, 0.1);
  border: 1px solid hsla(142, 70%, 45%, 0.2);
  border-radius: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green { background-color: var(--green); }
.status-dot.red { background-color: var(--red); }

.status-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
}

.tab-content {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
}

/* Tab panes switching */
.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

/* Cards & Layout Containers */
.card {
  padding: 24px;
}

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

.card-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h3 i {
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.max-w-500 { max-width: 500px; }
.grow-2 { grid-column: span 2; }
.grow-3 { flex-grow: 3; }
.flex-row { display: flex; gap: 16px; align-items: flex-end; width: 100%; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; }
.width-full { width: 100%; }
.height-fit { height: fit-content; }
.height-250 { height: 250px !important; }
.height-400 { height: 400px !important; }
.py-20 { padding-top: 20px; padding-bottom: 20px; }
.border-dashed { border-style: dashed !important; border-width: 1.5px !important; }
.border-bottom-dashed { border-bottom: 1px dashed var(--border-color); }
.pb-10 { padding-bottom: 10px; }
.gap-10 { gap: 10px !important; }
.gap-20 { gap: 20px !important; }
.fs-small { font-size: 0.8rem; }
.word-break { word-wrap: break-word; white-space: pre-wrap; }

/* Status KPI Cards on Dashboard */
.status-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  transition: var(--transition);
}

.status-card:hover {
  transform: translateY(-2px);
}

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

.status-header h3 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-header i {
  width: 20px;
  height: 20px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 10px 0;
}

.metric-value.fs-large {
  font-size: 1.3rem;
  word-break: break-all;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Progress bars styling */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: hsla(220, 20%, 25%, 0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  width: 0;
  transition: width 0.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.bg-blue { background-color: var(--primary); }
.bg-cyan { background-color: var(--cyan); }
.bg-green { background-color: var(--green); }
.bg-orange { background-color: var(--orange); }
.bg-red { background-color: var(--red); }

/* Glow Utilities */
.glow-blue:hover { box-shadow: var(--glass-shadow), var(--neon-shadow-blue); border-color: var(--primary); }
.glow-cyan:hover { box-shadow: var(--glass-shadow), var(--neon-shadow-cyan); border-color: var(--cyan); }
.glow-green:hover { box-shadow: var(--glass-shadow), 0 0 15px 0 rgba(34, 197, 94, 0.25); border-color: var(--green); }
.glow-orange:hover { box-shadow: var(--glass-shadow), 0 0 15px 0 rgba(249, 115, 22, 0.25); border-color: var(--orange); }

.text-blue { color: var(--primary); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }

/* Table styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  background: hsla(220, 20%, 20%, 0.2);
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: hsla(220, 20%, 25%, 0.15);
}

/* Controls / Form Elements */
.tool-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.tool-controls-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-field label i {
  width: 14px;
  height: 14px;
}

input, select, textarea {
  background: hsla(222, 25%, 6%, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
  min-width: 120px;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px 0 rgba(6, 182, 212, 0.25);
  background: hsla(222, 25%, 5%, 0.8);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-primary i {
  width: 18px;
  height: 18px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--neon-shadow-cyan);
  filter: brightness(1.1);
}

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

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  width: 16px;
  height: 16px;
}

.btn-icon:hover {
  color: var(--text-main);
  background: hsla(220, 20%, 25%, 0.3);
}

/* Terminal Console View */
.terminal {
  background: hsl(222, 35%, 4%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: 320px;
  padding: 20px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: hsl(120, 100%, 75%);
  box-shadow: inset 0 0 15px 0 rgba(0, 0, 0, 0.8);
}

.terminal-line {
  margin-bottom: 4px;
  word-break: break-all;
  white-space: pre-wrap;
}

.terminal-line.text-muted { color: var(--text-muted); }
.terminal-line.text-error { color: var(--red); }
.terminal-line.text-cyan { color: var(--cyan); }
.terminal-line.text-green { color: var(--green); }
.terminal-line.text-orange { color: var(--orange); }

/* Hop traceroute graphic visual */
.trace-flow {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 320px;
  overflow-y: auto;
  padding: 10px;
}

.trace-hop {
  display: flex;
  align-items: center;
  gap: 14px;
  background: hsla(220, 20%, 20%, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  animation: slideRight 0.35s ease-out forwards;
}

.hop-num {
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.hop-details {
  flex-grow: 1;
}

.hop-ip {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.hop-host {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hop-rtt {
  font-family: var(--font-mono);
  background: hsla(185, 100%, 48%, 0.15);
  color: var(--cyan);
  border: 1px solid hsla(185, 100%, 48%, 0.25);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Modals System (Login Panel) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(15px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.login-card {
  width: 420px;
  padding: 40px;
  transform: scale(0.95);
  animation: modalIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  color: var(--cyan);
  margin-bottom: 12px;
}

.login-logo h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-error {
  background: hsla(354, 85%, 52%, 0.1);
  border: 1px solid hsla(354, 85%, 52%, 0.2);
  color: var(--red);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-error i {
  width: 16px;
  height: 16px;
}

.form-message {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.form-message.success {
  background: hsla(142, 70%, 45%, 0.1);
  border: 1px solid hsla(142, 70%, 45%, 0.2);
  color: var(--green);
}

.form-message.error {
  background: hsla(354, 85%, 52%, 0.1);
  border: 1px solid hsla(354, 85%, 52%, 0.2);
  color: var(--red);
}

/* DNS Badges & Cards */
.security-badge {
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.security-badge.excellent {
  background: hsla(142, 70%, 45%, 0.15);
  border: 1px solid hsla(142, 70%, 45%, 0.3);
  color: var(--green);
}

.security-badge.good {
  background: hsla(185, 100%, 48%, 0.15);
  border: 1px solid hsla(185, 100%, 48%, 0.3);
  color: var(--cyan);
}

.security-badge.warning {
  background: hsla(35, 90%, 50%, 0.15);
  border: 1px solid hsla(35, 90%, 50%, 0.3);
  color: var(--orange);
}

.security-badge.danger {
  background: hsla(354, 85%, 52%, 0.15);
  border: 1px solid hsla(354, 85%, 52%, 0.3);
  color: var(--red);
}

.txt-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 6px;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  word-break: break-all;
  white-space: pre-wrap;
  text-align: left;
}

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

.dns-record-card {
  background: hsla(220, 20%, 18%, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
}

.dns-record-card h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.records-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.record-row {
  word-break: break-all;
  border-bottom: 1px dashed hsla(220, 20%, 30%, 0.3);
  padding-bottom: 4px;
}

.record-row:last-child {
  border-bottom: none;
}

/* SSL Scoring & Grades */
.ssl-grade {
  font-size: 4.5rem;
  font-weight: 800;
  text-align: center;
  margin: 10px 0;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
  color: var(--cyan);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.green { background: hsla(142, 70%, 45%, 0.15); color: var(--green); border: 1px solid hsla(142, 70%, 45%, 0.3); }
.badge.red { background: hsla(354, 85%, 52%, 0.15); color: var(--red); border: 1px solid hsla(354, 85%, 52%, 0.3); }

.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.countdown-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 4px;
}

.ssl-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.ssl-meta-grid div strong {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ssl-meta-grid div p {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.warning-box {
  background: hsla(354, 85%, 52%, 0.1);
  border: 1px solid hsla(354, 85%, 52%, 0.25);
  border-radius: 8px;
  padding: 16px;
}

.warning-box h4 {
  color: var(--red);
  font-size: 0.9rem;
}

.warning-box ul {
  list-style-type: square;
  padding-left: 20px;
  margin-top: 8px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* GeoIP Map Canvas */
.map-box {
  height: 280px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  z-index: 1;
}

.geo-details-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 8px;
  font-size: 0.9rem;
}

.geo-item span {
  color: var(--text-muted);
}

.whois-box {
  background: hsl(222, 35%, 3%);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 8px;
  height: 250px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  white-space: pre;
  color: var(--text-muted);
}

/* Subnet Result Grid */
.subnet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.subnet-item {
  display: flex;
  justify-content: space-between;
  background: hsla(220, 20%, 18%, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 18px;
}

.subnet-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.subnet-item strong {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.security-info-box {
  border-left: 3px solid var(--orange);
  background: hsla(35, 90%, 50%, 0.08);
  padding: 16px;
  border-radius: 0 8px 8px 0;
}

.security-info-box p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.security-info-box ul {
  padding-left: 20px;
  margin-top: 10px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* New IPAM Subnets List & Cards */
.ipam-subnets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  width: 100%;
}

.ipam-subnet-card {
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.ipam-subnet-card:hover {
  transform: translateY(-2px);
}

.ipam-subnet-card.blue { border-left: 4px solid var(--primary); }
.ipam-subnet-card.cyan { border-left: 4px solid var(--cyan); }
.ipam-subnet-card.green { border-left: 4px solid var(--green); }
.ipam-subnet-card.orange { border-left: 4px solid var(--orange); }
.ipam-subnet-card.red { border-left: 4px solid var(--red); }

.ipam-subnet-card.active-card {
  background: hsla(210, 100%, 55%, 0.08) !important;
  border-color: var(--primary) !important;
  box-shadow: var(--glass-shadow), 0 0 12px rgba(59, 130, 246, 0.2);
}

.ipam-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.ipam-card-header h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.ipam-card-header span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: hsla(220, 20%, 25%, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
}

.ipam-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 32px;
}

.ipam-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* WireGuard QR Code Glow Frame */
.qr-glow-frame {
  background: white;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
  border: 2px solid var(--cyan);
  display: inline-flex;
}

#wg-qr-canvas {
  width: 180px;
  height: 180px;
  display: block;
}

/* New: DNS Propagation Checker matrix styles */
.dns-prop-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.dns-prop-card {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: hsla(220, 20%, 15%, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.dns-prop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dns-prop-card-header strong {
  font-size: 0.95rem;
}

.dns-prop-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dns-prop-records-list {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  min-height: 48px;
  word-break: break-all;
}

/* New: BGP AS Path pathway visualizer styling */
.bgp-as-paths-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.bgp-as-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  background: hsla(220, 20%, 15%, 0.3);
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 8px;
  position: relative;
}

.bgp-as-hop {
  display: flex;
  align-items: center;
  background: hsla(210, 100%, 55%, 0.1);
  border: 1px solid hsla(210, 100%, 55%, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.bgp-as-hop:hover {
  background: hsla(210, 100%, 55%, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.bgp-as-hop.origin-hop {
  background: hsla(142, 70%, 45%, 0.15);
  border-color: hsla(142, 70%, 45%, 0.4);
  color: var(--green);
}

.bgp-as-hop.origin-hop:hover {
  background: hsla(142, 70%, 45%, 0.25);
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}

.as-connector {
  color: var(--text-muted);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
}

/* Helper Classes */
.hidden { display: none !important; }
.word-break { word-break: break-all; }
.text-center { text-align: center; }
.font-warning { color: var(--orange); }

/* Animation Keyframes */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes slideRight {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.pulse {
  animation: blink 2s infinite;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.progress-pulse {
  background: linear-gradient(90deg, var(--cyan) 0%, hsl(180, 100%, 70%) 50%, var(--cyan) 100%);
  background-size: 200% 100%;
  animation: wave 1.5s infinite linear;
}

@keyframes wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: hsla(220, 20%, 25%, 0.6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsla(220, 20%, 35%, 0.8);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .grid-4, .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border-color);
  }
  .sidebar-header {
    padding: 16px;
  }
  .sidebar-nav {
    padding: 10px;
  }
  .sidebar-nav ul {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .nav-link {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .tab-content {
    padding: 20px;
  }
  .top-header {
    padding: 0 20px;
  }
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .ssl-meta-grid, .subnet-grid, .subnet-item {
    grid-template-columns: 1fr;
  }
}
