/* CSS SYSTEM SPECIFICATION FOR CYBERGUARD PORTAL */

/* ---------------------------------- */
/* 1. Reset & Global Variables        */
/* ---------------------------------- */
:root {
  /* Dark Theme Palette (Default) */
  --bg-main: #060913;
  --bg-sidebar: #0b0f19;
  --bg-card: rgba(16, 23, 42, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.9);
  --border-glow: rgba(0, 255, 204, 0.15);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 255, 204, 0.4);
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  --text-glow: 0 0 8px rgba(0, 255, 204, 0.4);

  /* Neon Accent Colors */
  --neon-cyan: #00ffcc;
  --neon-blue: #00ccff;
  --neon-rose: #ff3366;
  --neon-yellow: #ffd000;
  --neon-green: #10b981;
  --neon-purple: #a855f7;

  /* Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace, sans-serif;

  /* Standard Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s ease;
}

/* Light Theme overrides */
body.light-theme {
  --bg-main: #f1f5f9;
  --bg-sidebar: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: rgba(248, 250, 252, 1);
  --border-glow: rgba(0, 204, 153, 0.1);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 204, 153, 0.5);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dark: #64748b;
  --text-glow: none;

  --neon-cyan: #0d9488;
  --neon-blue: #2563eb;
  --neon-rose: #db2777;
  --neon-yellow: #d97706;
  --neon-green: #059669;
  --neon-purple: #7c3aed;
}

* {
  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;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ---------------------------------- */
/* 2. Cyber Visual Backgrounds        */
/* ---------------------------------- */
.cyber-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image: 
    linear-gradient(rgba(18, 24, 38, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 38, 0.3) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

body.light-theme .cyber-grid-bg {
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

/* Subtle Retro Scanlines */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  );
  background-size: 100% 4px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-cyan);
}

/* ---------------------------------- */
/* 3. Base Layout & Shell             */
/* ---------------------------------- */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  z-index: 10;
  flex-shrink: 0;
  transition: width var(--transition-normal), background-color var(--transition-normal);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  padding: 0.5rem;
}

.brand-icon {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #060913;
  box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

.brand-info h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-info span {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition-fast);
}

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

.nav-item.active {
  background: rgba(0, 255, 204, 0.05);
  color: var(--neon-cyan);
  border-color: rgba(0, 255, 204, 0.2);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.05);
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
}

.user-avatar-wrapper {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.mfa-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-sidebar);
}

.mfa-badge.status-on {
  background-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.mfa-badge.status-off {
  background-color: var(--neon-rose);
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  width: max-content;
}

.user-role-badge.guest { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.user-role-badge.member { background: rgba(0, 204, 255, 0.15); color: var(--neon-blue); }
.user-role-badge.expert { background: rgba(168, 85, 247, 0.15); color: var(--neon-purple); }
.user-role-badge.admin { background: rgba(255, 51, 102, 0.15); color: var(--neon-rose); }

/* Main Shell layout */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header Styling */
.main-header {
  height: 70px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  flex-shrink: 0;
  background-color: rgba(6, 9, 19, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Threat Ticker Animation */
.threat-ticker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  max-width: 50%;
  overflow: hidden;
}

.ticker-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neon-rose);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--neon-rose);
  animation: pulse-red 1.5s infinite;
}

.ticker-content {
  font-size: 0.8rem;
  white-space: nowrap;
  animation: ticker-slide 20s linear infinite;
  display: inline-block;
}

@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

@keyframes pulse-red {
  0% { opacity: 0.2; box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.4); }
  50% { opacity: 1; box-shadow: 0 0 0 6px rgba(255, 51, 102, 0); }
  100% { opacity: 0.2; }
}

/* Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn-wrapper {
  position: relative;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 255, 204, 0.05);
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background-color: var(--neon-rose);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-main);
}

/* Dropdown Notification panel */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}

.dropdown-panel.show {
  display: flex;
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-header h4 {
  font-size: 0.9rem;
}

.notification-list {
  list-style: none;
  max-height: 250px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notification-item.unread {
  background: rgba(0, 255, 204, 0.02);
  border-left: 2px solid var(--neon-cyan);
}

.notification-item .time {
  font-size: 0.7rem;
  color: var(--text-dark);
}

/* Theme Toggle icons */
body.dark-theme .sun-icon { display: none; }
body.dark-theme .moon-icon { display: block; }
body.light-theme .sun-icon { display: block; }
body.light-theme .moon-icon { display: none; }

/* ---------------------------------- */
/* 4. Common Components & UI Elements */
/* ---------------------------------- */
.view-viewport {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
}

/* Tab Views toggle */
.tab-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

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

/* Card Design System */
.glass {
  background-color: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.card {
  padding: 1.5rem;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 15px var(--border-glow);
}

/* Cyber card with special header */
.card-header-cyber {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 0.75rem;
}

.card-title-cyber {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

/* Button UI */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border: none;
  color: #060913;
  box-shadow: 0 4px 15px rgba(0, 255, 204, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(0, 255, 204, 0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(0, 255, 204, 0.02);
}

.btn-danger {
  background: var(--neon-rose);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 51, 102, 0.2);
}

.btn-danger:hover {
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
}

.btn-text:hover {
  color: var(--neon-cyan);
}

/* Forms input structure */
.cyber-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.input-wrapper textarea {
  padding-left: 1rem;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.15);
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--text-dark);
  pointer-events: none;
}

.input-wrapper input:focus + .input-icon {
  color: var(--neon-cyan);
}

.form-help-text {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.error-text {
  color: var(--neon-rose);
  font-size: 0.75rem;
}

/* Alert Boxes */
.alert-box {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.alert-box.info {
  background: rgba(0, 204, 255, 0.08);
  border: 1px solid rgba(0, 204, 255, 0.2);
  color: var(--neon-blue);
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(4, 6, 12, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 500px;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlide 0.3s ease;
  overflow: hidden;
}

@keyframes modalSlide {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--neon-rose);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-tab-headers {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.modal-tab-btn {
  flex-grow: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.modal-tab-btn:hover {
  color: var(--text-main);
}

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

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

/* ---------------------------------- */
/* 5. Specific Modules & Components   */
/* ---------------------------------- */

/* 5.1 Dashboard View Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1-fr);
  gap: 1.5rem;
}

.dashboard-hero {
  grid-column: span 12;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(16, 23, 42, 0.8), rgba(6, 9, 19, 0.8));
  border: 1px solid var(--border-color);
}

.hero-text h1 {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-text h1 span {
  color: var(--neon-cyan);
}

.hero-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stat-cards-container {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.cyan { background: rgba(0, 255, 204, 0.08); color: var(--neon-cyan); border: 1px solid rgba(0, 255, 204, 0.15); }
.stat-icon.blue { background: rgba(0, 204, 255, 0.08); color: var(--neon-blue); border: 1px solid rgba(0, 204, 255, 0.15); }
.stat-icon.rose { background: rgba(255, 51, 102, 0.08); color: var(--neon-rose); border: 1px solid rgba(255, 51, 102, 0.15); }
.stat-icon.yellow { background: rgba(255, 208, 0, 0.08); color: var(--neon-yellow); border: 1px solid rgba(255, 208, 0, 0.15); }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Simulated Map */
.threat-map-card {
  grid-column: span 8;
}

.threat-map-container {
  width: 100%;
  height: 250px;
  position: relative;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

/* Radar & Activity Cards */
.security-advisory-card {
  grid-column: span 4;
}

.advisory-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

.advisory-item {
  border-left: 2px solid var(--neon-blue);
  padding-left: 0.75rem;
  font-size: 0.85rem;
}

.advisory-item.high { border-color: var(--neon-rose); }
.advisory-item.medium { border-color: var(--neon-yellow); }

.advisory-item h5 {
  font-family: var(--font-mono);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.advisory-item p {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* 5.2 Learning Hub Layout */
.learning-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 1.5rem;
}

.learning-main-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-filter-bar {
  display: flex;
  gap: 1rem;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.glossary-card {
  transition: transform var(--transition-fast);
}

.glossary-card h4 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.glossary-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.checklist-card {
  height: max-content;
}

.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.checklist-item:hover {
  background: rgba(255,255,255,0.03);
}

.checklist-item.checked {
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.02);
}

.checklist-item input {
  cursor: pointer;
}

.checklist-item span {
  font-size: 0.85rem;
}

.checklist-item.checked span {
  text-decoration: line-through;
  color: var(--text-dark);
}

/* 5.3 Threat Tracker View */
.threats-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cve-table-wrapper {
  overflow-x: auto;
}

.cyber-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.cyber-table th {
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
}

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

.severity-pill {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.severity-pill.critical { background: rgba(255, 51, 102, 0.15); color: var(--neon-rose); border: 1px solid rgba(255, 51, 102, 0.25); }
.severity-pill.high { background: rgba(259, 109, 0, 0.15); color: var(--neon-yellow); border: 1px solid rgba(259, 109, 0, 0.25); }
.severity-pill.medium { background: rgba(0, 204, 255, 0.15); color: var(--neon-blue); border: 1px solid rgba(0, 204, 255, 0.25); }

/* 5.4 Cyber Utilities Tools Layout */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Password Checker elements */
.password-meter-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  margin-top: 0.5rem;
  overflow: hidden;
}

.password-meter-fill {
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.password-tips {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.password-tips li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-tips li.valid { color: var(--neon-green); }
.password-tips li.invalid { color: var(--text-dark); }

/* Risk Assessment elements */
.quiz-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.progress-bar-container {
  flex-grow: 1;
  height: 4px;
  background: rgba(255,255,255,0.05);
  margin: 0 1rem;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--neon-cyan);
  width: 0;
  transition: width 0.3s ease;
}

.quiz-question-box h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.quiz-answers-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-option {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.01);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.answer-option:hover {
  background: rgba(255,255,255,0.03);
  border-color: var(--neon-cyan);
}

.answer-option.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 255, 204, 0.05);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.05);
}

.quiz-result-view {
  text-align: center;
  padding: 1rem;
}

.radar-chart-container {
  width: 220px;
  height: 220px;
  margin: 1.5rem auto;
}

.score-text {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 0.25rem;
}

.score-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* 5.5 Community Forum View Layout */
.forum-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 1.5rem;
}

.forum-main-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.thread-item {
  cursor: pointer;
}

.thread-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.thread-author {
  font-size: 0.75rem;
  font-weight: 600;
}

.thread-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: var(--text-dark);
}

.thread-time {
  font-size: 0.7rem;
  color: var(--text-dark);
}

.thread-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--neon-cyan);
  transition: color var(--transition-fast);
}

.thread-item:hover .thread-title {
  color: var(--neon-blue);
}

.thread-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.thread-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-dark);
}

.thread-stat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Specific Thread Detail View */
.thread-detail-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.comment-item {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
}

.comment-item.expert-highlight {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.02);
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
}

.comment-time {
  font-size: 0.7rem;
  color: var(--text-dark);
}

.comment-body {
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Sidebar Forum Widget */
.forum-stats-widget {
  height: max-content;
}

/* Simulated Auth OTP modal elements */
.mock-qr-code {
  width: 150px;
  height: 150px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 8px;
  margin: 1rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.qr-pattern {
  width: 130px;
  height: 130px;
  background-image: 
    radial-gradient(#000 25%, transparent 25%),
    radial-gradient(#000 25%, transparent 25%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  opacity: 0.85;
}

.qr-shield-icon {
  position: absolute;
  width: 32px;
  height: 32px;
  color: var(--neon-cyan);
  background-color: var(--bg-sidebar);
  border-radius: 50%;
  padding: 4px;
}

.mfa-key-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.mfa-key-info label {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.mfa-key-info code {
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--neon-cyan);
  border: 1px dashed var(--border-color);
}

.mfa-active-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.success-glowing-icon {
  width: 48px;
  height: 48px;
  color: var(--neon-green);
  animation: float-glowing 2s infinite ease-in-out;
}

@keyframes float-glowing {
  0% { transform: translateY(0); filter: drop-shadow(0 0 4px var(--neon-green)); }
  50% { transform: translateY(-6px); filter: drop-shadow(0 0 12px var(--neon-green)); }
  100% { transform: translateY(0); filter: drop-shadow(0 0 4px var(--neon-green)); }
}

.mfa-active-art h4 {
  font-family: var(--font-mono);
  color: var(--neon-green);
  letter-spacing: 2px;
}

/* RBAC Role Grid */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.role-card {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255,255,255,0.01);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.role-card:hover {
  border-color: var(--neon-cyan);
  background: rgba(255,255,255,0.02);
}

.role-card.selected {
  border-color: var(--neon-cyan);
  background: rgba(0, 255, 204, 0.03);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.05);
}

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

.role-select-icon {
  width: 16px;
  height: 16px;
  color: var(--neon-cyan);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.role-card.selected .role-select-icon {
  opacity: 1;
}

.role-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---------------------------------- */
/* 6. Utility Helper Classes          */
/* ---------------------------------- */
.hidden { display: none !important; }
.text-cyan { color: var(--neon-cyan) !important; }
.text-blue { color: var(--neon-blue) !important; }
.text-rose { color: var(--neon-rose) !important; }
.text-yellow { color: var(--neon-yellow) !important; }
.text-green { color: var(--neon-green) !important; }
.text-purple { color: var(--neon-purple) !important; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .dashboard-grid {
    display: flex;
    flex-direction: column;
  }
  .learning-layout {
    display: flex;
    flex-direction: column;
  }
  .forum-layout {
    display: flex;
    flex-direction: column;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }
  .sidebar-brand {
    margin-bottom: 1rem;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .nav-item {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }
  .sidebar-footer {
    display: none; /* hidden on mobile for cleaner view */
  }
  .main-header {
    padding: 0 1rem;
  }
  .threat-ticker-wrapper {
    max-width: 60%;
  }
}
