@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Layout and Sizing */
  --sidebar-width: 260px;
  --header-height: 70px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;

  /* Font Families */
  --font-title: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Default Dark Theme variables */
:root,
[data-theme="dark"] {
  --bg-primary: hsl(240, 16%, 8%);
  --bg-secondary: hsl(240, 15%, 11%);
  --bg-tertiary: hsl(240, 14%, 15%);
  --card-bg: hsla(240, 15%, 12%, 0.6);
  --card-border: hsla(0, 0%, 100%, 0.08);
  --card-border-hover: hsla(38, 92%, 58%, 0.2);

  --accent-gold: hsl(38, 92%, 58%);
  --accent-gold-glow: hsla(38, 92%, 58%, 0.12);
  --accent-gold-dark: hsl(38, 80%, 40%);
  --accent-crimson: hsl(348, 83%, 47%);
  --accent-crimson-glow: hsla(348, 83%, 47%, 0.25);
  --accent-teal: hsl(174, 75%, 43%);
  --accent-teal-glow: hsla(174, 75%, 43%, 0.25);

  --text-primary: hsl(210, 17%, 95%);
  --text-secondary: hsl(210, 12%, 75%);
  --text-muted: hsl(210, 8%, 55%);
  --text-gold: hsl(38, 92%, 65%);

  --sidebar-bg: hsla(240, 16%, 5%, 0.85);
  --header-bg: hsla(240, 16%, 8%, 0.6);
  --scrollbar-thumb: hsl(38, 50%, 30%);
  --scrollbar-track: hsl(240, 16%, 6%);

  --btn-primary-text: hsl(240, 16%, 5%);
  --btn-primary-hover: hsl(38, 92%, 65%);

  --gradient-overlay:
    radial-gradient(at 10% 20%, hsla(240, 30%, 15%, 0.4) 0px, transparent 50%),
    radial-gradient(at 90% 80%, hsla(348, 30%, 15%, 0.25) 0px, transparent 50%);

  /* Factions color variables (Dark) */
  --member-pc-bg: linear-gradient(135deg, hsla(210, 80%, 25%, 0.25) 0%, hsla(210, 80%, 12%, 0.15) 100%);
  --member-pc-border: hsla(210, 80%, 45%, 0.25);

  --member-ally-bg: linear-gradient(135deg, hsla(140, 70%, 25%, 0.25) 0%, hsla(140, 70%, 12%, 0.15) 100%);
  --member-ally-border: hsla(140, 70%, 45%, 0.25);

  --member-enemy-bg: linear-gradient(135deg, hsla(348, 80%, 25%, 0.25) 0%, hsla(348, 80%, 12%, 0.15) 100%);
  --member-enemy-border: hsla(348, 80%, 45%, 0.25);

  --member-neutral-bg: linear-gradient(135deg, hsla(210, 8%, 25%, 0.2) 0%, hsla(210, 8%, 12%, 0.12) 100%);
  --member-neutral-border: hsla(210, 8%, 45%, 0.2);

  /* Spotlight & Connection Badges */
  --badge-campaign-bg: hsla(38, 92%, 58%, 0.15);
  --badge-campaign-color: hsl(38, 92%, 65%);
  --badge-campaign-border: hsla(38, 92%, 58%, 0.3);

  --badge-pc-bg: hsla(210, 80%, 45%, 0.15);
  --badge-pc-color: hsl(210, 80%, 65%);
  --badge-pc-border: hsla(210, 80%, 45%, 0.3);

  --badge-npc-bg: hsla(280, 70%, 55%, 0.15);
  --badge-npc-color: hsl(280, 70%, 70%);
  --badge-npc-border: hsla(280, 70%, 55%, 0.3);

  --badge-faction-bg: hsla(140, 70%, 45%, 0.15);
  --badge-faction-color: hsl(140, 70%, 65%);
  --badge-faction-border: hsla(140, 70%, 45%, 0.3);

  --badge-lore-bg: hsla(348, 80%, 45%, 0.15);
  --badge-lore-color: hsl(348, 80%, 65%);
  --badge-lore-border: hsla(348, 80%, 45%, 0.3);

  --badge-session-bg: hsla(50, 85%, 45%, 0.15);
  --badge-session-color: hsl(50, 85%, 60%);
  --badge-session-border: hsla(50, 85%, 45%, 0.3);
}

/* Light Theme variables */
[data-theme="light"] {
  --bg-primary: hsl(220, 20%, 97%);
  --bg-secondary: hsl(220, 15%, 92%);
  --bg-tertiary: hsl(220, 12%, 87%);
  --card-bg: hsla(220, 15%, 95%, 0.7);
  --card-border: hsla(220, 20%, 10%, 0.08);
  --card-border-hover: hsla(218, 80%, 25%, 0.2);

  --accent-gold: hsl(218, 80%, 25%);
  --accent-gold-glow: hsla(218, 80%, 25%, 0.12);
  --accent-gold-dark: hsl(218, 80%, 15%);
  --accent-crimson: hsl(348, 80%, 45%);
  --accent-crimson-glow: hsla(348, 80%, 45%, 0.15);
  --accent-teal: hsl(174, 75%, 35%);
  --accent-teal-glow: hsla(174, 75%, 35%, 0.15);

  --text-primary: hsl(220, 24%, 12%);
  --text-secondary: hsl(220, 14%, 28%);
  --text-muted: hsl(220, 10%, 48%);
  --text-gold: hsl(218, 80%, 25%);

  --sidebar-bg: hsla(220, 15%, 90%, 0.85);
  --header-bg: hsla(220, 20%, 97%, 0.6);
  --scrollbar-thumb: hsl(218, 20%, 65%);
  --scrollbar-track: hsl(220, 20%, 92%);

  --btn-primary-text: hsl(0, 0%, 100%);
  --btn-primary-hover: hsl(218, 80%, 35%);

  --gradient-overlay:
    radial-gradient(at 10% 20%, hsla(218, 80%, 90%, 0.12) 0px, transparent 60%),
    radial-gradient(at 90% 80%, hsla(220, 20%, 95%, 0.15) 0px, transparent 60%);

  /* Factions color variables (Light) */
  --member-pc-bg: linear-gradient(135deg, hsla(210, 80%, 92%, 0.8) 0%, hsla(210, 80%, 97%, 0.6) 100%);
  --member-pc-border: hsla(210, 80%, 75%, 0.4);

  --member-ally-bg: linear-gradient(135deg, hsla(140, 70%, 92%, 0.8) 0%, hsla(140, 70%, 97%, 0.6) 100%);
  --member-ally-border: hsla(140, 70%, 75%, 0.4);

  --member-enemy-bg: linear-gradient(135deg, hsla(348, 80%, 92%, 0.8) 0%, hsla(348, 80%, 97%, 0.6) 100%);
  --member-enemy-border: hsla(348, 80%, 75%, 0.4);

  --member-neutral-bg: linear-gradient(135deg, hsla(210, 8%, 92%, 0.7) 0%, hsla(210, 8%, 97%, 0.5) 100%);
  --member-neutral-border: hsla(210, 8%, 75%, 0.3);

  /* Spotlight & Connection Badges */
  --badge-campaign-bg: hsla(218, 80%, 25%, 0.08);
  --badge-campaign-color: hsl(218, 80%, 25%);
  --badge-campaign-border: hsla(218, 80%, 25%, 0.2);

  --badge-pc-bg: hsla(210, 80%, 45%, 0.08);
  --badge-pc-color: hsl(210, 80%, 35%);
  --badge-pc-border: hsla(210, 80%, 45%, 0.2);

  --badge-npc-bg: hsla(280, 70%, 45%, 0.08);
  --badge-npc-color: hsl(280, 70%, 35%);
  --badge-npc-border: hsla(280, 70%, 45%, 0.2);

  --badge-faction-bg: hsla(140, 70%, 35%, 0.08);
  --badge-faction-color: hsl(140, 70%, 30%);
  --badge-faction-border: hsla(140, 70%, 35%, 0.2);

  --badge-lore-bg: hsla(348, 80%, 45%, 0.08);
  --badge-lore-color: hsl(348, 80%, 35%);
  --badge-lore-border: hsla(348, 80%, 45%, 0.2);

  --badge-session-bg: hsla(40, 85%, 35%, 0.08);
  --badge-session-color: hsl(40, 85%, 30%);
  --badge-session-border: hsla(40, 85%, 35%, 0.2);
}

/* Crimson Theme variables */
[data-theme="crimson"] {
  --bg-primary: hsl(348, 45%, 10%);
  --bg-secondary: hsl(348, 40%, 13%);
  --bg-tertiary: hsl(348, 35%, 17%);
  --card-bg: hsla(348, 40%, 14%, 0.6);
  --card-border: hsla(0, 0%, 100%, 0.08);
  --card-border-hover: hsla(0, 0%, 100%, 0.2);

  --accent-gold: hsl(0, 0%, 100%);
  --accent-gold-glow: hsla(0, 0%, 100%, 0.12);
  --accent-gold-dark: hsl(0, 0%, 90%);
  --accent-crimson: hsl(348, 83%, 47%);
  --accent-crimson-glow: hsla(348, 83%, 47%, 0.25);
  --accent-teal: hsl(174, 75%, 43%);
  --accent-teal-glow: hsla(174, 75%, 43%, 0.25);

  --text-primary: hsl(0, 0%, 100%);
  --text-secondary: hsl(348, 15%, 80%);
  --text-muted: hsl(348, 12%, 60%);
  --text-gold: hsl(0, 0%, 95%);

  --sidebar-bg: hsla(348, 40%, 8%, 0.85);
  --header-bg: hsla(348, 45%, 10%, 0.6);
  --scrollbar-thumb: hsl(348, 40%, 25%);
  --scrollbar-track: hsl(348, 45%, 8%);

  --btn-primary-text: hsl(348, 45%, 10%);
  --btn-primary-hover: hsl(0, 0%, 90%);

  --gradient-overlay:
    radial-gradient(at 10% 20%, hsla(348, 40%, 20%, 0.4) 0px, transparent 50%),
    radial-gradient(at 90% 80%, hsla(0, 0%, 100%, 0.04) 0px, transparent 50%);

  /* Factions color variables (Crimson) */
  --member-pc-bg: linear-gradient(135deg, hsla(210, 80%, 20%, 0.3) 0%, hsla(210, 80%, 10%, 0.2) 100%);
  --member-pc-border: hsla(210, 80%, 40%, 0.3);

  --member-ally-bg: linear-gradient(135deg, hsla(140, 70%, 20%, 0.3) 0%, hsla(140, 70%, 10%, 0.2) 100%);
  --member-ally-border: hsla(140, 70%, 40%, 0.3);

  --member-enemy-bg: linear-gradient(135deg, hsla(348, 80%, 20%, 0.3) 0%, hsla(348, 80%, 10%, 0.2) 100%);
  --member-enemy-border: hsla(348, 80%, 40%, 0.3);

  --member-neutral-bg: linear-gradient(135deg, hsla(210, 8%, 20%, 0.25) 0%, hsla(210, 8%, 10%, 0.15) 100%);
  --member-neutral-border: hsla(210, 8%, 40%, 0.2);

  /* Spotlight & Connection Badges */
  --badge-campaign-bg: hsla(348, 80%, 45%, 0.15);
  --badge-campaign-color: hsl(348, 80%, 75%);
  --badge-campaign-border: hsla(348, 80%, 45%, 0.3);

  --badge-pc-bg: hsla(210, 80%, 45%, 0.15);
  --badge-pc-color: hsl(210, 80%, 70%);
  --badge-pc-border: hsla(210, 80%, 45%, 0.3);

  --badge-npc-bg: hsla(280, 70%, 55%, 0.15);
  --badge-npc-color: hsl(280, 70%, 70%);
  --badge-npc-border: hsla(280, 70%, 55%, 0.3);

  --badge-faction-bg: hsla(140, 70%, 45%, 0.15);
  --badge-faction-color: hsl(140, 70%, 70%);
  --badge-faction-border: hsla(140, 70%, 45%, 0.3);

  --badge-lore-bg: hsla(348, 80%, 45%, 0.15);
  --badge-lore-color: hsl(348, 80%, 75%);
  --badge-lore-border: hsla(348, 80%, 45%, 0.3);

  --badge-session-bg: hsla(50, 85%, 45%, 0.15);
  --badge-session-color: hsl(50, 85%, 70%);
  --badge-session-border: hsla(50, 85%, 45%, 0.3);
}

html {
  font-size: 16px;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  background-image: var(--gradient-overlay);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbars */
.scroller,
main,
.modal-body,
.sidebar-nav,
.tab-content {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {

  .scroller::-webkit-scrollbar,
  main::-webkit-scrollbar,
  .modal-body::-webkit-scrollbar,
  .sidebar-nav::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  .scroller::-webkit-scrollbar-thumb,
  main::-webkit-scrollbar-thumb,
  .modal-body::-webkit-scrollbar-thumb,
  .sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--border-radius-sm);
  }

  .scroller::-webkit-scrollbar-track,
  main::-webkit-scrollbar-track,
  .modal-body::-webkit-scrollbar-track,
  .sidebar-nav::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
}

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

/* Sidebar Styling */
aside {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo h1 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold-glow);
}

.sidebar-campaign-selector {
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
}

.sidebar-campaign-selector label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.campaign-select-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.campaign-select-btn:hover {
  border-color: var(--accent-gold);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
}

.sidebar-nav li a svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-nav li a:hover {
  color: var(--text-primary);
  background: hsla(240, 10%, 20%, 0.35);
  transform: translateX(4px);
}

.sidebar-nav li.active a {
  color: var(--accent-gold);
  background: var(--accent-gold-glow);
  border-left-color: var(--accent-gold);
  font-weight: 600;
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--card-border);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Main Area Container */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header */
header {
  height: var(--header-height);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.current-view-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.active-campaign-badge {
  background: hsla(38, 92%, 58%, 0.12);
  border: 1px solid var(--accent-gold-dark);
  color: var(--accent-gold);
  padding: 6px 14px;
  border-radius: var(--border-radius-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.active-campaign-badge::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
    box-shadow: 0 0 12px var(--accent-gold);
  }

  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

/* Main Content Area */
main {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.tab-content {
  display: none;
  animation: fade-in var(--transition-normal);
}

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

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Generic Layout Utilities */
.view-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.view-description {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 700px;
  line-height: 1.5;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.glass-panel:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px rgba(38, 92, 58, 0.05);
}

/* Buttons Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 14px var(--accent-gold-glow);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-gold-glow);
}

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

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--card-border-hover);
  border-color: var(--accent-gold);
}

.btn-danger {
  background: hsla(348, 83%, 47%, 0.15);
  border: 1px solid hsla(348, 83%, 47%, 0.4);
  color: hsl(348, 100%, 70%);
}

.btn-danger:hover {
  background: var(--accent-crimson);
  color: white;
  border-color: var(--accent-crimson);
  box-shadow: 0 4px 14px var(--accent-crimson-glow);
  transform: translateY(-2px);
}

.btn-danger:active {
  transform: translateY(0);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

#mobileSidebarToggle {
  display: none;
}

/* Dashboard View styling */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 600px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-top: 8px;
  font-family: var(--font-title);
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.quick-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-action-btn:hover {
  border-color: var(--accent-gold);
  background: hsla(38, 92%, 58%, 0.05);
  transform: translateX(6px);
}

.quick-action-icon {
  background: hsla(38, 92%, 58%, 0.12);
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

.quick-action-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.quick-action-details h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.quick-action-details p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Campaign Grid View styling */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.campaign-card {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.campaign-card-banner {
  height: 120px;
  margin: -24px -24px 20px -24px;
  background-size: cover;
  background-position: center;
  position: relative;
  border-bottom: 1px solid var(--card-border);
}

.campaign-card-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, var(--bg-secondary) 100%);
}

.campaign-system-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--card-border);
  color: var(--text-gold);
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

[data-theme="light"] .campaign-system-tag {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.08);
}

.campaign-card-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.campaign-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.campaign-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.campaign-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.campaign-card.active-campaign {
  border-color: var(--accent-gold);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-gold-glow);
}

/* Timeline/Session View styling */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2px;
  background: var(--card-border);
}

.timeline-node {
  position: relative;
  margin-bottom: 40px;
  padding-left: 50px;
}

.timeline-dot {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 4px solid var(--accent-gold);
  box-shadow: 0 0 8px var(--accent-gold);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-node:hover .timeline-dot {
  transform: scale(1.2);
  box-shadow: 0 0 15px var(--accent-gold);
  transition: transform var(--transition-fast);
}

.timeline-node.planned-session .timeline-dot {
  border-color: #e5c158;
  box-shadow: 0 0 6px #e5c158;
  background: repeating-linear-gradient(45deg,
      transparent,
      transparent 2px,
      #e5c158 2px,
      #e5c158 4px);
}

.timeline-node.planned-session .timeline-panel {
  border-style: dashed;
  border-color: rgba(229, 193, 88, 0.4);
  background: rgba(229, 193, 88, 0.02);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-panel {
  padding: 20px;
}

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

.timeline-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-number {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.timeline-summary {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.timeline-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

.timeline-meta-item h4 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-meta-item h4 svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.timeline-meta-item p {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* NPCs Grid View styling */
.search-filter-row {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.filter-select {
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
}

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

.npc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.npc-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.npc-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.npc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.npc-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.5rem;
  font-family: var(--font-title);
  color: var(--accent-gold);
}

.language-selector-wrapper {
  width: 100%;
}


.npc-title-area {
  flex: 1;
}

.npc-name {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.npc-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.npc-badge {
  padding: 2px 8px;
  border-radius: var(--border-radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-ally {
  background: hsla(174, 75%, 43%, 0.12);
  color: var(--accent-teal);
  border: 1px solid hsla(174, 75%, 43%, 0.3);
}

.badge-enemy {
  background: hsla(348, 83%, 47%, 0.12);
  color: var(--accent-crimson);
  border: 1px solid hsla(348, 83%, 47%, 0.3);
}

.badge-neutral {
  background: hsla(210, 8%, 55%, 0.12);
  color: var(--text-secondary);
  border: 1px solid hsla(210, 8%, 55%, 0.3);
}

.npc-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.npc-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--card-border);
  padding-top: 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
}

.npc-info-item {
  display: flex;
  justify-content: space-between;
}

.npc-info-label {
  color: var(--text-muted);
}

.npc-info-val {
  color: var(--text-primary);
  font-weight: 500;
}

.npc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Lore View styling */
.lore-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

@media (max-width: 800px) {
  .lore-layout {
    grid-template-columns: 1fr;
  }
}

.lore-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lore-categories {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lore-categories li button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lore-categories li button:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.lore-categories li.active button {
  background: hsla(38, 92%, 58%, 0.08);
  color: var(--accent-gold);
  font-weight: 600;
}

.lore-categories li button .cat-count {
  font-size: 0.75rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 10px;
}

.lore-categories li {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.lore-categories li button {
  flex-grow: 1;
}

.category-actions {
  display: none;
  gap: 4px;
  align-items: center;
}

.lore-categories li:hover .category-actions {
  display: flex !important;
}

.category-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast), transform var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.15);
}

.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.lore-card {
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.lore-card:hover {
  transform: translateY(-4px);
}

.lore-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lore-card-cat {
  font-size: 0.7rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.lore-card-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lore-card-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modals Styling */
dialog {
  margin: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  color: var(--text-primary);
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.25s ease-out, transform 0.25s ease-out, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: scale(1);
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0.95);
  }
}

dialog::backdrop {
  background-color: rgba(6, 6, 12, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease-out, overlay 0.25s allow-discrete, display 0.25s allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
  }
}

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

.modal-title {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-close-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Forms Styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Dice Roller Widget */
.dice-widget-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.dice-widget-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--accent-gold);
  color: var(--accent-gold);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.dice-widget-btn:hover {
  transform: rotate(30deg) scale(1.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 25px var(--accent-gold-glow);
}

.dice-widget-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.dice-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 340px;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-gold-dark);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: slide-up var(--transition-normal);
}

.dice-panel.active {
  display: flex;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dice-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.dice-panel-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--accent-gold);
}

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

.dice-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.dice-btn:hover {
  border-color: var(--accent-gold);
  background: hsla(38, 92%, 58%, 0.08);
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.dice-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

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

.roll-config .form-group {
  margin-bottom: 0;
  flex: 1;
}

.roll-result-display {
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.roll-result-number {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-gold);
  text-shadow: 0 0 15px var(--accent-gold-glow);
  animation: roll-bounce 0.4s ease-out;
}

@keyframes roll-bounce {
  0% {
    transform: scale(0.3) rotate(-180deg);
    opacity: 0;
  }

  70% {
    transform: scale(1.1) rotate(15deg);
  }

  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

.roll-result-details {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.roll-history {
  max-height: 120px;
  overflow-y: auto;
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item {
  display: flex;
  justify-content: space-between;
}

.history-item-calc {
  color: var(--text-secondary);
}

.history-item-result {
  color: var(--accent-gold);
  font-weight: 600;
}

/* Empty State Styling */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  max-width: 500px;
  margin: 40px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: hsla(240, 10%, 20%, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.empty-state-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
}

.empty-state-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  html {
    font-size: 14.5px;
  }

  aside {
    transform: translateX(-100%);
  }

  aside.mobile-active {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  header {
    padding: 0 20px;
  }

  main {
    padding: 20px;
  }

  #mobileSidebarToggle {
    display: inline-flex;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13.5px;
  }

  main {
    padding: 16px;
  }
}

/* Factions Grid & Cards */
.factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.faction-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.faction-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.faction-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.faction-members-section {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: auto;
}

.faction-members-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  font-weight: 600;
}

.faction-members-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faction-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faction-member-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faction-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.9rem;
  font-family: var(--font-title);
  color: var(--accent-gold);
  flex-shrink: 0;
}

.faction-member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.faction-member-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.faction-member-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.faction-member-role-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Faction member gradients */
.member-pc {
  background: var(--member-pc-bg);
  border-color: var(--member-pc-border);
}

.member-pc:hover {
  border-color: hsla(210, 80%, 45%, 0.5);
}

.member-ally {
  background: var(--member-ally-bg);
  border-color: var(--member-ally-border);
}

.member-ally:hover {
  border-color: hsla(140, 70%, 45%, 0.5);
}

.member-enemy {
  background: var(--member-enemy-bg);
  border-color: var(--member-enemy-border);
}

.member-enemy:hover {
  border-color: hsla(348, 80%, 45%, 0.5);
}

.member-neutral {
  background: var(--member-neutral-bg);
  border-color: var(--member-neutral-border);
}

.member-neutral:hover {
  border-color: hsla(210, 8%, 45%, 0.4);
}

/* Lightbox Museum Styling */
#lightboxModal[open] {
  display: flex !important;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

.lore-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.lore-gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--card-border);
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.lore-gallery-item:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--accent-gold);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lore-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Drag and Drop Campaigns */
.campaign-card[draggable="true"] {
  cursor: pointer;
  user-select: none;
}

.campaign-card[draggable="true"]:active {
  cursor: grabbing;
}

.campaign-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent-gold);
  transform: scale(0.98);
  box-shadow: none;
}

.campaign-card.drag-over {
  border: 2px dashed var(--accent-gold);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px var(--accent-gold-glow);
}

/* Sidebar Logo Layout with Copyright */
.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-copyright {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin: 0;
  font-weight: 400;
}

/* Sidebar About Link */
.sidebar-about-link {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.sidebar-about-link:hover {
  color: var(--text-primary);
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

/* ==========================================================================
   Spotlight Search Modal & Items
   ========================================================================== */

dialog.spotlight-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  margin: 10vh auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  overflow: hidden;
  outline: none;
  animation: spotlight-slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

dialog.spotlight-dialog::backdrop {
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

dialog.spotlight-dialog[open] {
  display: flex;
}

@keyframes spotlight-slide-down {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.spotlight-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  gap: 12px;
}

.spotlight-search-icon {
  width: 22px;
  height: 22px;
  fill: var(--text-muted);
  flex-shrink: 0;
}

#spotlightInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
  padding: 4px 0;
}

#spotlightInput::placeholder {
  color: var(--text-muted);
}

.spotlight-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.spotlight-close-btn:hover {
  color: var(--text-primary);
}

.spotlight-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  max-height: 50vh;
}

.spotlight-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 20px 4px 20px;
}

.spotlight-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  cursor: pointer;
  gap: 16px;
  transition: background var(--transition-fast);
}

.spotlight-item:hover,
.spotlight-item.active {
  background: var(--bg-tertiary);
}

.spotlight-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.spotlight-item-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.spotlight-item.active .spotlight-item-name {
  color: var(--accent-gold);
}

.spotlight-item-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

/* Category Badges for Spotlight */
.spotlight-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.spotlight-badge-campaign {
  background: var(--badge-campaign-bg);
  color: var(--badge-campaign-color);
  border: 1px solid var(--badge-campaign-border);
}

.spotlight-badge-pc {
  background: var(--badge-pc-bg);
  color: var(--badge-pc-color);
  border: 1px solid var(--badge-pc-border);
}

.spotlight-badge-npc {
  background: var(--badge-npc-bg);
  color: var(--badge-npc-color);
  border: 1px solid var(--badge-npc-border);
}

.spotlight-badge-faction {
  background: var(--badge-faction-bg);
  color: var(--badge-faction-color);
  border: 1px solid var(--badge-faction-border);
}

.spotlight-badge-lore {
  background: var(--badge-lore-bg);
  color: var(--badge-lore-color);
  border: 1px solid var(--badge-lore-border);
}

.spotlight-badge-session {
  background: var(--badge-session-bg);
  color: var(--badge-session-color);
  border: 1px solid var(--badge-session-border);
}

.spotlight-badge-artifact {
  background: rgba(229, 193, 88, 0.15);
  color: #e5c158;
  border: 1px solid rgba(229, 193, 88, 0.25);
}

.spotlight-badge-location {
  background: rgba(197, 160, 89, 0.15);
  color: #c5a059;
  border: 1px solid rgba(197, 160, 89, 0.25);
}


.spotlight-no-results {
  padding: 24px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.spotlight-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--card-border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spotlight-shortcuts {
  display: flex;
  gap: 16px;
}

.spotlight-shortcuts kbd {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: inherit;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.spotlight-watermark {
  font-weight: 500;
}

/* ==========================================================================
   Connections Tab & Graph Canvas Layout
   ========================================================================== */

#connectionsTab {
  height: 100%;
}

.graph-container-wrapper {
  transition: border-color var(--transition-fast);
}

/* Backlink badges inside modals */
.modal-connections-wrapper {
  margin-top: 24px;
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
}

.modal-connections-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: block;
}

.modal-connections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.backlink-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.backlink-badge:hover {
  border-color: var(--accent-gold);
  background: var(--accent-gold-glow);
  transform: translateY(-1px);
}

.backlink-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* Legend Toggle Interactive Elements */
.graph-legend-item {
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.graph-legend-item:hover {
  transform: translateX(3px);
}

.graph-legend-item.disabled {
  opacity: 0.45;
  text-decoration: line-through;
}

.graph-legend-item.disabled .legend-dot {
  transform: scale(0.65);
  opacity: 0.4;
}

/* Detail Lightbox Modal (Ficha do Item) */
.detail-dialog {
  max-width: 800px;
  width: 90%;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.detail-layout-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

.detail-header-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .detail-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.detail-avatar-container {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 2px solid var(--card-border);
  background: var(--bg-tertiary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.detail-avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-fields-grid {
  flex-grow: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--card-border);
}

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

.detail-field-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.detail-field-value a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.detail-field-value a:hover {
  text-decoration: underline;
  color: #ffdf7a;
}

.detail-long-text {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  line-height: 1.6;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.detail-dialog .secret {
  background: rgba(220, 53, 69, 0.05);
  border: 1.5px dashed var(--accent-crimson);
  border-radius: var(--border-radius-md);
  padding: 16px;
}

.detail-dialog .secret .detail-field-label {
  color: var(--accent-crimson);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.detail-dialog .secret .detail-field-value {
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--text-primary);
}

.secret .secret-toggle-btn {
  background: none;
  border: none;
  color: var(--accent-crimson);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s, background-color 0.2s;
  border-radius: var(--border-radius-sm);
}

.secret .secret-toggle-btn:hover {
  opacity: 0.9;
  background-color: rgba(220, 53, 69, 0.1);
  transform: scale(1.05);
}

.secret .secret-toggle-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.npc-card .secret .secret-toggle-btn svg {
  width: 16px;
  height: 16px;
}

.secret .secret-notes-content {
  filter: blur(6px);
  transition: filter 0.3s ease;
  user-select: none;
}

.secret .secret-notes-content.revealed {
  filter: none;
  user-select: text;
}

.detail-dialog::backdrop {
  background-color: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Drag and Drop Geral (Campaigns, NPCs, PCs, Factions, Lore, Sessions) */
[draggable="true"] {
  cursor: pointer;
  user-select: none;
}

[draggable="true"]:active {
  cursor: grabbing;
}

[draggable="true"].dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent-gold) !important;
  transform: scale(0.98);
  box-shadow: none;
  cursor: grabbing !important;
}

[draggable="true"].drag-over {
  border: 2px dashed var(--accent-gold) !important;
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px var(--accent-gold-glow);
}

/* Authentication Screen & Card Styles */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  background-color: rgba(6, 6, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
  animation: fade-in var(--transition-normal);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.auth-logo-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 15px var(--accent-gold-glow);
  animation: float-logo 4s ease-in-out infinite;
}

@keyframes float-logo {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.auth-logo h1 {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 10px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: calc(var(--border-radius-sm) - 2px);
  transition: all var(--transition-fast);
}

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

.auth-tab-btn.active {
  background: var(--accent-gold);
  color: var(--btn-primary-text);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.auth-error-msg {
  background: hsla(348, 83%, 47%, 0.1);
  border: 1px solid var(--accent-crimson);
  color: hsl(348, 100%, 75%);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  line-height: 1.4;
  animation: shake-error 0.4s ease-in-out;
}

@keyframes shake-error {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

.sidebar-logout-btn:hover {
  color: var(--accent-crimson) !important;
}

.auth-forgot-link:hover {
  color: var(--accent-gold) !important;
  text-decoration: underline !important;
}

/* Admin Panel Styles */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-stats-grid .stat-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  text-align: left;
  padding: 20px;
}

.admin-stats-grid .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-stats-grid .stat-info {
  display: flex;
  flex-direction: column;
}

.admin-stats-grid .stat-value {
  margin-top: 2px;
  font-size: 1.6rem;
}

.admin-table-container {
  overflow-x: auto;
  padding: 0;
  border-radius: var(--border-radius-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  text-align: left;
}

.admin-table th {
  padding: 16px 24px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--card-border);
  background: hsla(240, 15%, 8%, 0.4);
}

.admin-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.95rem;
  white-space: nowrap;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  transition: background-color var(--transition-fast) ease;
}

.admin-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-badge.badge-role-admin {
  background: hsla(38, 92%, 58%, 0.12);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-dark);
}

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

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* User Quota Bar and Toast Notification Styles */
.toast-notification {
  position: fixed;
  inset: auto 24px 24px auto;
  margin: 0;
  padding: 16px 24px;
  background: rgba(20, 20, 25, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(230, 169, 109, 0.1);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  pointer-events: none;
}

.toast-notification.toast-error {
  border-left: 4px solid var(--accent-crimson);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(232, 76, 60, 0.15);
}

.toast-notification.toast-success {
  border-left: 4px solid #2ecc71;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(46, 204, 113, 0.15);
}

.toast-notification.toast-info {
  border-left: 4px solid var(--accent-gold);
}

[data-theme="light"] .toast-notification {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 15px rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .toast-notification.toast-error {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 15px rgba(232, 76, 60, 0.05);
}

[data-theme="light"] .toast-notification.toast-success {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 0 15px rgba(46, 204, 113, 0.05);
}

.toast-notification.toast-out {
  animation: toast-out 0.4s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

.sidebar-quota-wrapper {
  margin-top: auto;
  width: 100%;
}

.quota-bar-bg {
  position: relative;
}

.quota-bar-bg div {
  border-radius: 3px;
}

/* ==========================================================================
   LANDING PAGE STYLES
   ========================================================================== */

/* Main Landing Container */
.landing-screen {
  width: 100%;
  min-height: 100vh;
  background-color: hsl(240, 16%, 6%);
  background-image:
    radial-gradient(at 0% 0%, hsla(38, 92%, 58%, 0.07) 0px, transparent 50%),
    radial-gradient(at 100% 100%, hsla(348, 83%, 47%, 0.04) 0px, transparent 50%),
    var(--gradient-overlay);
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.landing-screen section {
  scroll-margin-top: 80px;
}

/* Landing Navbar */
.landing-navbar {
  height: 80px;
  width: 100%;
  border-bottom: 1px solid var(--card-border);
  background: hsla(240, 16%, 6%, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.landing-nav-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.landing-logo-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold-glow);
}

.landing-logo-text {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.landing-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.landing-nav-links a:hover {
  color: var(--accent-gold);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.landing-lang-select {
  width: auto;
  padding: 6px 24px 6px 12px;
  font-size: 0.85rem;
  height: 36px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

/* Landing Content Wrapper */
.landing-content-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 80px auto 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}

/* Section Shared Headers */
.landing-section-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.landing-section-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 50%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 800px;
  line-height: 1.2;
}

.landing-section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.6;
}

/* Hero Section */
.landing-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 60px;
  padding: 100px 0;
  min-height: calc(100vh - 80px);
}

.landing-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.landing-badge-promo {
  background: hsla(38, 92%, 58%, 0.1);
  border: 1.5px solid var(--accent-gold-dark);
  color: var(--accent-gold);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.landing-hero-subtitle {
  font-family: var(--font-title);
  font-size: 3.2rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.landing-hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--border-radius-sm);
}

/* Hero Mockup Styling */
.landing-hero-mockup {
  perspective: 1000px;
}

.mockup-frame {
  width: 100%;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--card-border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform var(--transition-slow);
}

.mockup-frame:hover {
  transform: rotateY(-2deg) rotateX(1deg);
}

.mockup-header-row {
  height: 28px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-bottom: 1px solid var(--card-border);
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mockup-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

/* Problem Section */
.landing-problem {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

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

.problem-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  padding: 32px 24px;
  height: 100%;
  border-color: rgba(255, 255, 255, 0.03);
}

.problem-card-icon {
  font-size: 2rem;
  background: hsla(240, 16%, 15%, 0.4);
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 500;
}

/* Solution Section */
.landing-solution {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
}

.feature-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: hsla(38, 92%, 58%, 0.1);
  border: 1px solid var(--accent-gold-dark);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-card-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.feature-card h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Visual Diagram Section */
.landing-visual {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

.landing-visual-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px;
  width: 100%;
  overflow-x: auto;
  gap: 16px;
  background: rgba(12, 12, 16, 0.4);
  border-color: rgba(255, 255, 255, 0.05);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

.landing-visual-diagram::-webkit-scrollbar {
  height: 6px;
}

.landing-visual-diagram::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--border-radius-sm);
}

.landing-visual-diagram::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.diagram-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 19px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--card-border);
  min-width: 144px;
  flex: 1 1 auto;
  text-align: center;
  position: relative;
  background: var(--bg-tertiary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

.diagram-step:hover {
  transform: translateY(-4px);
  border-color: var(--accent-gold);
}

.diagram-step-tag {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.diagram-step-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Diagram node individual styles mapping */
.npc-node .diagram-step-tag {
  color: var(--badge-npc-color);
}

.npc-node {
  border-left: 3px solid var(--badge-npc-color);
}

.faction-node .diagram-step-tag {
  color: var(--badge-faction-color);
}

.faction-node {
  border-left: 3px solid var(--badge-faction-color);
}

.location-node .diagram-step-tag {
  color: hsl(174, 75%, 65%);
}

.location-node {
  border-left: 3px solid hsl(174, 75%, 43%);
}

.event-node .diagram-step-tag {
  color: var(--badge-session-color);
}

.event-node {
  border-left: 3px solid var(--badge-session-color);
}

.item-node .diagram-step-tag {
  color: hsl(38, 92%, 65%);
}

.item-node {
  border-left: 3px solid var(--accent-gold);
}

.diagram-arrow {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diagram-arrow svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* Screenshot showcase */
.landing-screenshots {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

.screenshots-showcase {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.screenshots-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px;
  border-radius: var(--border-radius-sm);
  width: max-content;
  margin: 0 auto;
}

.screenshot-tab-btn {
  background: none;
  border: none;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: calc(var(--border-radius-sm) - 2px);
  transition: all var(--transition-fast);
}

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

.screenshot-tab-btn.active {
  background: var(--accent-gold);
  color: var(--btn-primary-text);
  box-shadow: 0 2px 8px var(--accent-gold-glow);
}

.screenshots-display {
  width: 100%;
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--card-border);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  background: var(--bg-secondary);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  transition: opacity 0.3s ease;
}

/* Differences Section */
.landing-diff {
  padding: 100px 0;
  border-top: 1px solid var(--card-border);
}

.diff-list-wrapper {
  padding: 48px;
  background: rgba(12, 12, 16, 0.4);
  border-color: rgba(255, 255, 255, 0.05);
}

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

.diff-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.diff-check {
  width: 24px;
  height: 24px;
  background: hsla(140, 70%, 45%, 0.15);
  border: 1px solid hsla(140, 70%, 45%, 0.3);
  color: hsl(140, 70%, 65%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.diff-text {
  font-size: 1.05rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* CTA Final Section */
.landing-cta {
  padding: 100px 0 140px 0;
  border-top: 1px solid var(--card-border);
}

.landing-cta-box {
  width: 100%;
  padding: 80px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: radial-gradient(circle at center, hsla(38, 92%, 58%, 0.07) 0%, transparent 80%), var(--card-bg);
}

.landing-cta-box h2 {
  font-family: var(--font-title);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--text-primary) 50%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 650px;
  line-height: 1.25;
}

.landing-cta-box p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 500px;
}

/* Landing Footer */
.landing-footer {
  border-top: 1px solid var(--card-border);
  padding: 40px 0 60px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.landing-footer-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
}

.landing-footer-brand span {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.landing-footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsiveness Media Queries */
@media (max-width: 1024px) {
  .landing-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 0;
    gap: 48px;
    min-height: auto;
  }

  .landing-hero-content {
    align-items: center;
  }

  .landing-hero-subtitle {
    font-size: 2.8rem;
  }

  .landing-problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
  }

  .landing-visual-diagram {
    padding: 24px;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .landing-navbar {
    height: 70px;
  }

  .landing-nav-links {
    display: none;
    /* Hide nav links on mobile to prevent overflow */
  }

  .landing-content-wrapper {
    margin-top: 70px;
  }

  .landing-screen section {
    scroll-margin-top: 70px;
  }

  .landing-section-title {
    font-size: 1.8rem;
  }

  .landing-hero-subtitle {
    font-size: 2.2rem;
  }

  .landing-problem-grid {
    grid-template-columns: 1fr;
  }

  .landing-visual-diagram {
    flex-direction: column;
    padding: 24px;
    gap: 12px;
  }

  .diagram-arrow {
    transform: rotate(90deg);
    margin: 4px 0;
  }

  .diff-grid {
    grid-template-columns: 1fr;
  }

  .landing-footer {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

/* ==========================================================================
   Campaign Dashboard Reform Styles
   ========================================================================== */

.dashboard-layout-container {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 30px;
  align-items: start;
}

@media (max-width: 1100px) {
  .dashboard-layout-container {
    grid-template-columns: 1fr;
  }
}

.dashboard-main-column,
.dashboard-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.dashboard-row-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.widget-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  padding: 24px;
}

.widget-title {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-gold);
  filter: drop-shadow(0 0 4px var(--accent-gold-glow));
}

/* Campaign State Widget */
.state-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 600px) {
  .state-grid {
    grid-template-columns: 1fr;
  }
}

.state-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.state-item.clickable {
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-fast);
}

.state-item.clickable:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(229, 193, 88, 0.1);
  transform: translateY(-1px);
}


.state-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.state-value-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.highlight-gold {
  color: var(--accent-gold);
  text-shadow: 0 0 8px var(--accent-gold-glow);
}

/* List Item Rows (Recent Records, Relevant, Attention) */
.records-list,
.attention-list,
.relevance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.list-item-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--card-border-hover);
}

.item-icon-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-icon-wrapper svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.npc-icon-bg {
  background: rgba(255, 165, 0, 0.12);
  color: #ffa500;
}

.pc-icon-bg {
  background: rgba(255, 231, 154, 0.12);
  color: #ffe79a;
}

.faction-icon-bg {
  background: rgba(184, 134, 11, 0.12);
  color: #b8860b;
}

.session-icon-bg {
  background: rgba(255, 248, 219, 0.12);
  color: #fff8db;
}

.lore-icon-bg {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}

.artifact-icon-bg {
  background: rgba(229, 193, 88, 0.12);
  color: #e5c158;
}

.location-icon-bg {
  background: rgba(197, 160, 89, 0.12);
  color: #c5a059;
}

.item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.item-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  width: fit-content;
  text-transform: uppercase;
}

.badge-npc {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.25);
}

.badge-pc {
  background: rgba(255, 231, 154, 0.15);
  color: #ffe79a;
  border: 1px solid rgba(255, 231, 154, 0.25);
}

.badge-faction {
  background: rgba(184, 134, 11, 0.15);
  color: #e0a96d;
  border: 1px solid rgba(184, 134, 11, 0.25);
}

.badge-session {
  background: rgba(255, 248, 219, 0.15);
  color: #fff8db;
  border: 1px solid rgba(255, 248, 219, 0.25);
}

.badge-lore {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.badge-artifact {
  background: rgba(229, 193, 88, 0.15);
  color: #e5c158;
  border: 1px solid rgba(229, 193, 88, 0.25);
}

.badge-location {
  background: rgba(197, 160, 89, 0.15);
  color: #c5a059;
  border: 1px solid rgba(197, 160, 89, 0.25);
}

.edit-action-btn {
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.edit-action-btn:hover {
  opacity: 1;
}

/* Activity Feed Widget */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.activity-log-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.88rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
}

.activity-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  flex-shrink: 0;
}

.create-indicator {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.update-indicator {
  background: rgba(74, 144, 226, 0.15);
  color: #4a90e2;
}

.delete-indicator {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.activity-content-row {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.activity-text {
  color: var(--text-secondary);
}

.activity-text strong {
  color: var(--accent-gold);
}

.activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Connections distribution widget */
.total-connections-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: rgba(38, 92, 58, 0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
}

.total-count-value {
  font-size: 2.2rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--accent-gold);
  text-shadow: 0 0 10px var(--accent-gold-glow);
}

.total-count-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.distribution-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.distribution-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin: 12px 0 4px 0;
  letter-spacing: 0.5px;
}

.distribution-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.distribution-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.dist-label {
  color: var(--text-secondary);
}

.dist-count {
  font-weight: bold;
  color: var(--text-primary);
}

.distribution-bar-bg {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.distribution-bar {
  height: 100%;
  background: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold-glow);
  border-radius: 2px;
}

/* Lore Coverage Widget */
.coverage-circular-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
}

.coverage-gauge {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--card-border);
}

.gauge-value {
  font-size: 1.8rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 4px;
}

.gauge-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coverage-stats-row {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
}

.coverage-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.stat-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  left: -14px;
}

.dot-complete {
  background: var(--accent-teal);
  box-shadow: 0 0 6px var(--accent-teal-glow);
}

.dot-pending {
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
}

.coverage-stat-value {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-primary);
}

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

/* Master Attention Widget */
.attention-item-row {
  border-left: 3px solid var(--accent-crimson);
}

.attention-details {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.attention-icon-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.12);
  color: var(--accent-crimson);
  font-weight: bold;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 53, 69, 0.2);
  flex-shrink: 0;
}

.attention-text {
  font-size: 0.82rem;
}

.all-clean-state {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

.all-clean-icon {
  font-size: 2rem;
  color: var(--accent-teal);
  margin-bottom: 8px;
  text-shadow: 0 0 10px var(--accent-teal-glow);
}

.all-clean-text {
  font-size: 0.85rem;
}

/* Relevance Widget */
.relevance-rank {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-muted);
  min-width: 26px;
}

.relevance-score {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.relevance-item-row:hover .relevance-rank {
  color: var(--accent-gold);
}

/* Narrative Summary Widget */
.narrative-session-header {
  border-bottom: 1px dashed var(--card-border);
  padding-bottom: 10px;
}

.session-meta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.session-highlight-title {
  font-size: 1.05rem;
  color: var(--accent-gold);
  margin: 0;
}

.session-date-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.narrative-summary-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.narrative-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.narrative-section-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0 0 0;
}

.narrative-badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.narrative-secret-box {
  border: 1.5px dashed rgba(220, 53, 69, 0.3);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  background: rgba(220, 53, 69, 0.01);
}

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

.secret-title {
  color: var(--accent-crimson);
  font-size: 0.8rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
}

.secret-title svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.secret-notes-content {
  margin-top: 6px;
  margin-bottom: 0;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.narrative-loot-box {
  background: hsla(240, 10%, 5%, 0.3);
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px dashed var(--card-border);
}

.loot-title {
  color: var(--accent-gold);
  font-size: 0.8rem;
  text-transform: uppercase;
  display: block;
}

.loot-desc {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: 4px;
  margin-bottom: 0;
}

/* Campaign Progress Widget */
.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .progress-stats-grid {
    grid-template-columns: 1fr;
  }
}

.progress-stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition-fast);
}

.progress-stat-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--card-border-hover);
}

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

.stat-emoji {
  font-size: 1.2rem;
}

.stat-count-num {
  font-size: 1.4rem;
  font-family: var(--font-title);
  font-weight: bold;
  color: var(--text-primary);
}

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

.card-type-connection .stat-count-num {
  color: var(--accent-gold);
  text-shadow: 0 0 6px var(--accent-gold-glow);
}

/* Quick Actions Widget Buttons */
.quick-actions-grid-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-action-btn-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.quick-action-btn-mini:hover {
  border-color: var(--accent-gold);
  background: hsla(38, 92%, 58%, 0.04);
  transform: translateY(-2px);
}

.qa-mini-icon {
  font-size: 1rem;
}

.empty-list-message {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Coverage Detail Modal Styles */
.coverage-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.coverage-detail-item {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--card-border);
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.coverage-detail-item:hover {
  border-color: rgba(229, 193, 88, 0.4);
  background: rgba(229, 193, 88, 0.02);
  transform: translateX(4px);
}

.missing-reasons-list {
  margin: 8px 0 0 20px;
  padding: 0;
  font-size: 0.8rem;
  color: var(--accent-gold);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.missing-reasons-list li {
  list-style-type: disc;
}