/* =========================================================================
   Packet Tracer OSPF & WLC Companion App Stylesheet
   Design Aesthetic: Sleek Cosmic Dark & Cobalt accents (Glassmorphism inspired)
   ========================================================================= */

:root {
  /* Dark Theme Color Palette */
  --bg-primary: #0B0F19;
  --bg-secondary: #131A2C;
  --card-bg: rgba(20, 26, 43, 0.55);
  --card-border: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.08);
  
  --text-primary: #E2E8F0;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --cyan-accent: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.25);
  
  --success-color: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.25);
  
  --sidebar-width: 280px;
  --header-height: 80px;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.35);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  
  --backdrop-blur: blur(12px);
}

/* Light Theme overrides */
.light-mode {
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --card-bg: rgba(255, 255, 255, 0.8);
  --card-border: rgba(0, 0, 0, 0.05);
  --border-color: rgba(0, 0, 0, 0.08);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --accent-color: #2563eb;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --cyan-accent: #0ea5e9;
  --cyan-glow: rgba(14, 165, 233, 0.15);
  
  --success-color: #059669;
  --success-glow: rgba(5, 150, 105, 0.1);
  --warning-color: #d97706;
  --danger-color: #dc2626;
  
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Container */
.app-container {
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo-icon {
  font-size: 28px;
  color: var(--cyan-accent);
  filter: drop-shadow(0 0 6px var(--cyan-glow));
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-color), rgba(59, 130, 246, 0.6));
  box-shadow: 0 4px 12px var(--accent-glow);
}

.light-mode .nav-item.active {
  color: #fff;
}

/* Progress bar inside sidebar */
.progress-section {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.progress-bar-container {
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--cyan-accent));
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.milestones {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.milestone {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.milestone.completed {
  color: var(--success-color);
}

.sidebar-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-footer .btn {
  flex-grow: 1;
}

/* Main Content area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

/* Header Styling */
.app-header {
  height: auto;
  min-height: var(--header-height);
  padding: 16px 32px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.header-title h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.header-title p {
  font-size: 12px;
  color: var(--text-secondary);
}

.student-info-form {
  max-width: 400px;
  flex-grow: 1;
}

.input-group-row {
  display: flex;
  gap: 12px;
}

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

.input-field label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.input-field input, .input-cell {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

.input-field input:focus, .input-cell:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
  background-color: rgba(255, 255, 255, 0.08);
}

.light-mode input {
  background-color: #fff;
  color: #0F172A;
}

/* Tab Content */
.tab-content-wrapper {
  padding: 32px;
  flex-grow: 1;
  overflow-y: auto;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

/* Cards (Glassmorphism layout) */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h3 i {
  color: var(--cyan-accent);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.card-header-row h3 {
  margin-bottom: 0;
}

.card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.card p.subtitle {
  font-size: 13px;
  margin-bottom: 20px;
}

/* Alert Boxes */
.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.alert i {
  font-size: 16px;
  margin-top: 2px;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.light-mode .alert-info {
  background-color: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.15);
  color: #1e3a8a;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fde047;
}

.light-mode .alert-warning {
  background-color: rgba(217, 119, 6, 0.05);
  border-color: rgba(217, 119, 6, 0.15);
  color: #78350f;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.20);
  color: #fca5a5;
}

/* Topology Interactive SVG styling */
.topology-svg-container {
  width: 100%;
  overflow-x: auto;
  background-color: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.topology-svg {
  width: 100%;
  min-width: 950px;
  height: auto;
  display: block;
}

/* SVG Nodes & Links */
.node-group {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.node-group:hover {
  transform: scale(1.05);
}

.node-bg {
  fill: var(--bg-secondary);
  stroke: var(--card-border);
  stroke-width: 2px;
  transition: var(--transition);
}

.node-icon {
  position: absolute;
  color: var(--text-secondary);
  pointer-events: none;
}

.node-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  fill: var(--text-primary);
  text-anchor: middle;
  pointer-events: none;
}

.node-label-small {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 500;
  fill: var(--text-secondary);
  text-anchor: middle;
  pointer-events: none;
}

.node-subtext {
  font-family: var(--font-family);
  font-size: 9px;
  fill: var(--text-muted);
  text-anchor: middle;
  pointer-events: none;
}

.node-ip-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-muted);
  text-anchor: middle;
  pointer-events: none;
}

.vlan-badge {
  font-family: var(--font-heading);
  font-size: 8px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}

/* Highlight roles on SVG nodes */
.router .node-bg { stroke: var(--accent-color); fill: rgba(59, 130, 246, 0.1); }
.switch .node-bg { stroke: var(--cyan-accent); fill: rgba(0, 242, 254, 0.08); }
.server .node-bg { stroke: var(--success-color); fill: rgba(16, 185, 129, 0.08); }

.router:hover .node-bg { stroke-width: 3px; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.switch:hover .node-bg { stroke-width: 3px; filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.server:hover .node-bg { stroke-width: 3px; filter: drop-shadow(0 0 6px var(--success-glow)); }

/* Subnet links styling */
.link-cable {
  stroke-linecap: round;
  transition: var(--transition);
}

.wan-link {
  animation: dash 30s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.wireless-link {
  stroke: var(--cyan-accent);
  opacity: 0.6;
}

.link-label-group rect {
  fill: var(--bg-secondary);
  stroke: var(--border-color);
  stroke-width: 1px;
}

.link-text {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--text-secondary);
  text-anchor: middle;
  alignment-baseline: middle;
}

/* Subnet Planner Calculator Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.grid-table th {
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-heading);
}

.grid-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.subnet-meta {
  display: flex;
  flex-direction: column;
}

.subnet-meta strong {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--text-primary);
}

.subnet-meta span {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cidr-badge {
  background-color: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.cidr-badge.wan {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.input-cell {
  background-color: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  width: 130px;
  outline: none;
  transition: var(--transition);
}

.input-cell:focus {
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.02);
}

.input-cell.small {
  width: 70px;
  text-align: center;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-inputs span {
  color: var(--text-muted);
  font-size: 11px;
}

.status-cell {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
}

.status-cell .fa-circle-check { color: var(--success-color); }
.status-cell .fa-circle-xmark { color: var(--danger-color); }

/* Row validation classes */
.grid-row-correct {
  background-color: rgba(16, 185, 129, 0.03);
}
.grid-row-incorrect {
  background-color: rgba(239, 68, 68, 0.03);
}

.grid-row-correct .input-cell {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--success-color);
}

.grid-row-incorrect .input-cell {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--danger-color);
}

/* Help guide panel */
.help-box {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
}

.help-box h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-box ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-box li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Router IP Custom Card List */
.router-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.device-ip-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
}

.device-ip-header {
  padding: 14px 18px;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.device-ip-header h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-ip-header h4 i {
  color: var(--accent-color);
}

.device-ip-header span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
}

.device-ip-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.router-ip-input {
  background-color: rgba(0, 0, 0, 0.15);
  font-family: var(--font-mono);
  font-size: 12px;
}

.range-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.range-hint.valid { color: var(--success-color); }
.range-hint.invalid { color: var(--danger-color); }

/* CLI Generator Pane Split layout */
.cli-split-layout {
  display: flex;
  gap: 24px;
  min-height: 520px;
  height: calc(100vh - 280px);
}

.device-nav {
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  flex-shrink: 0;
  overflow-y: auto;
  background-color: rgba(255, 255, 255, 0.01);
}

.device-nav h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-left: 8px;
}

.device-tab-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 10px 14px;
  text-align: left;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.device-tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.device-tab-btn.active {
  background-color: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--accent-color);
  font-weight: 600;
}

.cli-display {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.terminal-window {
  flex-grow: 1;
  background-color: #05070F;
  border: 1px solid #1e293b;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.terminal-header {
  height: 40px;
  background-color: #0B0F19;
  border-bottom: 1px solid #1e293b;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls .control {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.window-controls .close { background-color: #ef4444; }
.window-controls .minimize { background-color: #eab308; }
.window-controls .maximize { background-color: #22c55e; }

.terminal-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.terminal-body {
  padding: 16px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cli-code-block {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #38bdf8;
  white-space: pre-wrap;
  user-select: text;
}

.cli-explanation-card {
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  flex-shrink: 0;
}

.cli-explanation-card h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cli-explanation-card h5 i {
  color: var(--cyan-accent);
}

#cli-explanation-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cli-explanation-list {
  padding-left: 18px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* WLC and DHCP Server subtabs */
.tabs-subnav {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  padding-bottom: 2px;
}

.sub-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-tab-btn:hover {
  color: var(--text-primary);
}

.sub-tab-btn.active {
  color: var(--cyan-accent);
  border-bottom-color: var(--cyan-accent);
}

.sub-tab-pane {
  display: none;
  animation: fadeIn 0.25s ease;
}

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

.sub-tab-pane h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  margin-top: 24px;
}

.sub-tab-pane h4:first-of-type {
  margin-top: 0;
}

.sub-tab-pane p {
  font-size: 13px;
  margin-bottom: 12px;
}

/* Config and Pools design */
.config-table-preview {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.badge-static {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-live {
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.pools-grid, .wlan-deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.pool-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.005);
}

.pool-card h5 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  color: var(--text-primary);
}

.pool-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pool-card li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.pool-card code {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.url-bar-preview {
  background-color: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.url-bar-preview .protocol { color: var(--text-muted); }
.url-bar-preview .url { color: var(--cyan-accent); font-weight: 500; }

.simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
}

.simple-table th {
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  text-align: left;
}

.simple-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
}

/* Guided Checklist design */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checklist-phase {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.005);
}

.phase-header {
  padding: 16px 20px;
  background-color: rgba(255, 255, 255, 0.015);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.phase-header:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.phase-header h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
}

.phase-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-pending {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-progress {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-completed {
  background-color: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success-color);
  box-shadow: 0 0 6px var(--success-glow);
}

.phase-content {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: block;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.task-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent-color);
}

.task-list label {
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.task-list input[type="checkbox"]:checked + label {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Button Classes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), rgba(59, 130, 246, 0.7));
  color: #fff;
  box-shadow: 0 4px 10px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px var(--accent-glow);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.btn-danger {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.btn-danger:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 6px;
}

/* Utilities */
.border-top { border-top: 1px solid var(--border-color); }
.pt-2 { padding-top: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-warning { color: var(--warning-color); }

/* Responsive adjustments */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    height: auto;
  }
  
  .cli-split-layout {
    flex-direction: column;
    height: auto;
  }
  
  .device-nav {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .app-header {
    padding: 16px 20px;
  }
  
  .tab-content-wrapper {
    padding: 20px;
  }
}

/* =========================================================================
   Print Layout Styles
   Overrides the browser styles during printing.
   Outputs a professional white/grayscale layout.
   ========================================================================= */
@media print {
  body {
    background-color: #fff !important;
    color: #000 !important;
    font-size: 11pt !important;
    font-family: Arial, sans-serif !important;
  }
  
  .app-container, .main-content, .tab-content-wrapper {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .sidebar, .app-header, .nav-menu, .progress-section, .sidebar-footer, 
  .tab-content-wrapper > section, #reset-btn, #theme-toggle, 
  #export-report-btn, #copy-cli-btn, .topology-svg-container,
  .alert, .help-box, #subnets-locked-warning, .tabs-subnav {
    display: none !important;
  }
  
  #print-report-template {
    display: block !important;
    width: 100% !important;
    padding: 20px !important;
  }
  
  .print-header {
    border-bottom: 3px solid #000;
    padding-bottom: 15px;
    margin-bottom: 25px;
  }
  
  .print-header h2 {
    font-size: 22pt;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
  }
  
  .student-meta-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12pt;
  }
  
  .print-header p {
    margin: 3px 0;
  }
  
  h3 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    margin-bottom: 12px;
    font-size: 14pt;
    font-weight: bold;
    color: #000;
  }
  
  /* Print Tables */
  .print-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 20px !important;
    font-size: 10pt !important;
  }
  
  .print-table th, .print-table td {
    border: 1px solid #000 !important;
    padding: 6px 10px !important;
    text-align: left !important;
  }
  
  .print-table th {
    background-color: #f2f2f2 !important;
    font-weight: bold !important;
  }
  
  /* Print Checklist */
  .print-checklist {
    list-style: none !important;
    padding: 0 !important;
  }
  
  .print-checklist-phase {
    margin-bottom: 16px !important;
    page-break-inside: avoid !important;
  }
  
  .print-checklist-phase h4 {
    font-size: 11pt !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    background-color: #f2f2f2 !important;
    padding: 4px 8px !important;
    border: 1px solid #000 !important;
  }
  
  .print-task-item {
    font-size: 9pt !important;
    margin-bottom: 6px !important;
    padding-left: 20px !important;
    position: relative !important;
  }
  
  .print-task-item::before {
    content: "[ ]" !important;
    position: absolute !important;
    left: 0 !important;
    font-family: monospace !important;
  }
  
  .print-task-item.checked::before {
    content: "[x]" !important;
    font-weight: bold !important;
  }
  
  .print-task-item.checked {
    color: #555 !important;
  }
}
