/* Global Design System */
:root {
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* HSL Color Palette - Premium Neon Glassmorphism */
  --bg-deep: hsl(230, 32%, 5%);
  --bg-sidebar: rgba(12, 14, 26, 0.5);
  --bg-glass: rgba(18, 22, 40, 0.55);
  --bg-glass-hover: rgba(28, 34, 62, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-neon-purple: rgba(147, 51, 234, 0.25);
  --border-neon-cyan: rgba(20, 184, 166, 0.25);
  
  --primary: hsl(262, 85%, 66%);
  --primary-hover: hsl(262, 90%, 72%);
  --primary-glow: rgba(147, 51, 234, 0.5);
  
  --accent-teal: hsl(172, 85%, 46%);
  --accent-blue: hsl(210, 90%, 58%);
  --accent-green: hsl(142, 75%, 46%);
  --accent-red: hsl(350, 85%, 58%);

  --text-primary: hsl(0, 0%, 96%);
  --text-secondary: hsl(230, 18%, 74%);
  --text-muted: hsl(230, 12%, 54%);

  --sidebar-width: 270px;
  --header-height: 75px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Basic Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Ambient Background Liquid Blobs */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  mix-blend-mode: screen;
  animation: float-blob 28s infinite alternate ease-in-out;
}

.blob-purple {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, hsl(262, 85%, 60%) 0%, transparent 80%);
  top: -10%;
  left: -10%;
  animation-duration: 24s;
}

.blob-cyan {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, hsl(172, 85%, 50%) 0%, transparent 80%);
  bottom: -15%;
  right: -5%;
  animation-duration: 30s;
  animation-delay: -6s;
}

.blob-blue {
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, hsl(210, 85%, 55%) 0%, transparent 80%);
  top: 35%;
  left: 45%;
  animation-duration: 38s;
  animation-delay: -12s;
}

@keyframes float-blob {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  33% {
    transform: translate(5vw, -7vw) scale(1.15) rotate(120deg);
  }
  66% {
    transform: translate(-6vw, 6vw) scale(0.9) rotate(240deg);
  }
  100% {
    transform: translate(0, 0) scale(1) rotate(360deg);
  }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* App Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  padding: 28px 18px;
  z-index: 10;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 0 8px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent-blue));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.brand-icon {
  font-size: 22px;
  color: #fff;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background-color: var(--bg-glass-hover);
  color: var(--text-primary);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.16) 0%, rgba(147, 51, 234, 0.04) 100%);
  color: var(--primary-hover);
  border-left: 3px solid var(--primary);
  padding-left: 13px;
  box-shadow: inset 4px 0 12px rgba(147, 51, 234, 0.08);
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-glass);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

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

.status-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.status-dot.offline {
  background-color: var(--accent-teal);
  box-shadow: 0 0 10px var(--accent-teal);
}

.status-text {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.topbar {
  height: var(--header-height);
  padding: 0 36px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(18px);
  z-index: 5;
}

.topbar h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
}

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

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Content Container Scrollable */
.content-scroll {
  flex: 1;
  padding: 36px;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
  z-index: 2;
}

/* Glassmorphism Cards */
.glass {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35);
  position: relative;
}

.glass::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent, rgba(255, 255, 255, 0.03));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(147, 51, 234, 0.15);
  transform: translateY(-2px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 12px var(--primary-glow);
}

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

.btn-outline:hover {
  background-color: var(--bg-glass-hover);
  border-color: var(--text-muted);
}

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

/* Tab Content Visibility */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

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

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

/* STATS GRID */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.purple { background-color: rgba(147, 51, 234, 0.15); color: var(--primary); }
.stat-icon.green { background-color: rgba(20, 184, 166, 0.15); color: var(--accent-teal); }
.stat-icon.blue { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

.stat-info h3 {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
}

/* DASHBOARD DETAILS GRID */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
}

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

.dashboard-panel {
  display: flex;
  flex-direction: column;
  height: 520px;
}

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

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}

.panel-header h3 i {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
}

.scroll-y {
  overflow-y: auto;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 12px;
}

.empty-state i {
  font-size: 40px;
}

/* Recent Journals List */
.journal-item-card {
  padding: 14px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.02);
}

.journal-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.journal-item-time {
  font-weight: 500;
}

.journal-item-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.journal-item-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  background-color: var(--bg-glass-hover);
  color: var(--text-secondary);
}

.tag.met { background-color: rgba(20, 184, 166, 0.15); color: var(--accent-teal); }
.tag.skill-tag { background-color: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }

/* KPI Progress Bars */
.kpi-progress-item {
  margin-bottom: 16px;
}

.kpi-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.kpi-progress-title {
  font-weight: 500;
}

.kpi-progress-percent {
  color: var(--accent-teal);
  font-weight: 600;
}

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

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-teal));
  width: 0%;
  transition: width 1s ease-in-out;
}

/* VOICE JOURNAL PAGE */
.journal-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

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

.recorder-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 0 20px 0;
}

.recorder-section h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 8px;
}

.recorder-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 24px;
}

.audio-visualizer-container {
  width: 100%;
  height: 180px;
  background: rgba(10, 12, 22, 0.45);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(147, 51, 234, 0.15);
}

#visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.timer {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  background-color: rgba(10, 12, 22, 0.75);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  color: var(--accent-teal);
  letter-spacing: 0.5px;
  border: 1px solid rgba(20, 184, 166, 0.2);
}

.recorder-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.btn-record-large {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red), hsl(350, 95%, 45%));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.45);
  transition: var(--transition-smooth);
  position: relative;
}

.btn-record-large::after {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.btn-record-large:hover::after {
  transform: scale(1.1);
  border-color: rgba(239, 68, 68, 0.6);
}

.btn-record-large.recording {
  background: linear-gradient(135deg, #fff, hsl(0, 0%, 80%));
  color: var(--bg-deep);
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.7);
  animation: pulseRecording 1.6s infinite;
}

.btn-record-large.recording::after {
  border-color: rgba(255, 255, 255, 0.4);
  animation: pulseOuter 1.6s infinite;
}

@keyframes pulseOuter {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

@keyframes pulseRecording {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.recorder-status {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}

.divider:not(:empty)::before { margin-right: .55em; }
.divider:not(:empty)::after { margin-left: .55em; }

.text-input-section textarea {
  width: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.text-input-section textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.text-input-actions {
  display: flex;
  justify-content: flex-end;
}

.journal-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

.entry-status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
}

.entry-status-card h4 {
  font-family: var(--font-display);
  margin-bottom: 8px;
}

.entry-status-card p {
  font-size: 12px;
  color: var(--text-secondary);
}

.latest-result-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.placeholder-text {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

.latest-result-body h4 {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 14px 0 6px 0;
}

.result-transcription {
  font-size: 13.5px;
  color: var(--text-secondary);
  background-color: rgba(0,0,0,0.15);
  padding: 10px;
  border-radius: var(--radius-sm);
  max-height: 100px;
  overflow-y: auto;
}

.kpi-checklist {
  list-style: none;
}

.kpi-check-item {
  display: flex;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 8px;
  padding: 6px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.01);
}

.kpi-check-item.met i { color: var(--accent-teal); }
.kpi-check-item.unmet i { color: var(--text-muted); }

.kpi-check-item-details {
  display: flex;
  flex-direction: column;
}

.kpi-check-name {
  font-weight: 600;
  color: var(--text-primary);
}

.kpi-check-reason {
  color: var(--text-secondary);
}

.result-skill-tag {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
}

.result-summary-sentence {
  font-size: 13px;
  line-height: 1.4;
}

/* KPI MANAGER PAGE */
.kpi-dashboard-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group input, .form-group textarea, .form-group select {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.kpi-form button {
  width: 100%;
}

.kpi-grid-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kpi-item-detail-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.kpi-item-detail-card.inactive {
  opacity: 0.5;
}

.kpi-item-text-info h4 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 4px;
}

.kpi-item-text-info p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.kpi-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background-color: var(--bg-glass-hover);
  text-transform: uppercase;
}

.kpi-badge.daily { color: var(--accent-blue); background-color: rgba(59, 130, 246, 0.1); }
.kpi-badge.weekly { color: var(--primary-hover); background-color: rgba(147, 51, 234, 0.1); }

.btn-delete-kpi {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.btn-delete-kpi:hover {
  color: var(--accent-red);
}

/* WEEKLY REPORT PAGE */
.report-wrapper {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .report-wrapper {
    grid-template-columns: 1fr;
  }
}

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

.week-picker-btn {
  padding: 12px;
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  text-align: left;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.week-picker-btn:hover, .week-picker-btn.active {
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.12) 0%, transparent 100%);
  border-color: var(--primary);
}

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

.report-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-section {
  margin-bottom: 28px;
}

.report-section h4 {
  font-family: var(--font-display);
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-bullets {
  list-style: none;
  padding-left: 8px;
}

.report-bullets li {
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.report-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-teal);
}

/* SKILLS PAGE */
.skills-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  height: 600px;
}

@media (max-width: 1024px) {
  .skills-wrapper {
    grid-template-columns: 1fr;
    height: auto;
  }
  .skills-chat-card {
    height: 450px !important;
  }
}

.skills-catalog {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.search-input-wrapper i {
  color: var(--text-muted);
}

.search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
}

.search-input-wrapper input:focus {
  outline: none;
}

.skills-list-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.skills-list-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-bottom: 16px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.skill-ledger-card {
  position: relative;
  padding: 20px;
  background-color: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-ledger-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.02));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.skill-ledger-card:hover {
  border-color: rgba(147, 51, 234, 0.45);
  background-color: var(--bg-glass-hover);
  box-shadow: 0 10px 30px rgba(147, 51, 234, 0.2);
  transform: translateY(-3px);
}

.skill-card-view-mode {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.skill-card-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.skill-ledger-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.skill-ledger-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 0;
  border-top: none;
  padding-top: 0;
  margin-bottom: 12px;
  flex-grow: 1;
}

.skill-card-project {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}

.skill-card-project strong {
  color: var(--text-primary);
}

.skill-card-updated {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
}

.skill-card-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.btn-edit-skill {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-smooth);
  padding: 4px;
}

.btn-edit-skill:hover {
  color: var(--primary-hover);
}

.skill-card-edit-mode {
  width: 100%;
}

.edit-field-group {
  margin-bottom: 10px;
  gap: 4px;
}

.edit-field-group label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.edit-field-group input, .edit-field-group textarea {
  padding: 6px 8px;
  font-size: 12px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 100%;
}

.edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* Skills Chat Bot */
.skills-chat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(147, 51, 234, 0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.agent-info h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
}

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

.chat-body {
  flex: 1;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
}

.chat-message.agent {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-message.user {
  background-color: var(--primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-message .hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-glass);
  padding-top: 16px;
  margin-top: 12px;
}

.chat-input-field {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13.5px;
}

.chat-input-wrapper input {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
}

.chat-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-chat-send {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--primary);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.btn-chat-send:hover {
  background-color: var(--primary-hover);
}

/* SETTINGS & CHAT IMPORTER STYLES */
.importer-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.importer-card button {
  float: right;
}

.import-results {
  margin-top: 60px;
  background-color: rgba(20, 184, 166, 0.05);
  border: 1px solid rgba(20, 184, 166, 0.15);
  padding: 16px;
  border-radius: var(--radius-md);
}

.import-results h4 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--accent-teal);
  margin-bottom: 10px;
}

.import-results ul {
  list-style: none;
  padding-left: 0;
}

.import-results li {
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.api-key-input-wrapper {
  display: flex;
  gap: 8px;
}

.api-key-input-wrapper input {
  flex: 1;
}

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

/* ====================================================
   PHASE 2 - NEW CAPABILITIES & PREMIUM STYLES
   ==================================================== */

/* KPI Consistency Matrix Grid */
.kpi-matrix-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0;
}

.kpi-matrix-header-row {
  display: flex;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.kpi-matrix-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.kpi-matrix-title-header {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-right: 16px;
}

.kpi-matrix-kpi-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 16px;
  cursor: help;
}

.kpi-matrix-kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.kpi-matrix-kpi-freq {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-matrix-circles-header,
.kpi-matrix-circles-row {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}

.kpi-matrix-date-col {
  width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.kpi-matrix-date-day {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-matrix-date-week {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.kpi-circle-wrapper {
  width: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kpi-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

.kpi-circle.circle-met {
  background-color: rgba(20, 184, 166, 0.15);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  box-shadow: 0 0 6px rgba(20, 184, 166, 0.1);
}

.kpi-circle.circle-met:hover {
  background-color: rgba(20, 184, 166, 0.25);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.3);
}

.kpi-circle.circle-unmet {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.kpi-circle.circle-unmet:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.kpi-circle.circle-empty {
  background-color: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.15);
  cursor: default;
}

/* Glassmorphic tooltip anchored right (prevents horizontal clipping on layout borders) */
.kpi-circle[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  right: -10px;
  width: 220px;
  padding: 10px 12px;
  background: rgba(19, 21, 32, 0.95);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(4px);
  z-index: 99;
}

.kpi-circle[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: 120%;
  right: 7px;
  transform: translateY(4px);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(19, 21, 32, 0.95) transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
}

.kpi-circle[data-tooltip]:hover::after,
.kpi-circle[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Skills View Tab Switcher */
.skills-view-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 4px;
}

.view-toggles {
  display: flex;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.toggle-btn {
  border: none;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm) !important;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.toggle-btn.active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Team capability matrix rendering elements */
.team-matrix-card {
  display: flex;
  flex-direction: column;
}

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

.team-matrix-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-matrix-content-area {
  padding-right: 4px;
}

.matrix-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.01);
}

.matrix-table th {
  background-color: rgba(30, 34, 50, 0.6);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-glass);
  white-space: nowrap;
}

.matrix-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.matrix-table tr:last-child td {
  border-bottom: none;
}

.matrix-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.matrix-note {
  background-color: rgba(147, 51, 234, 0.05);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.matrix-note p {
  margin: 0;
}

.matrix-note strong {
  color: var(--text-primary);
}

.matrix-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 20px;
}

.matrix-list li {
  font-size: 13.5px;
  line-height: 1.6;
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.matrix-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--primary-hover);
  font-size: 16px;
}

.matrix-list li a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.matrix-list li a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

#team-matrix-container h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px 0;
  color: var(--text-primary);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

#team-matrix-container h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 10px 0;
  color: var(--accent-teal);
}

#team-matrix-container h4 {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  color: var(--text-primary);
}

#team-matrix-container p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Audio Player styling in cards */
.journal-item-audio-wrapper {
  margin: 12px 0;
  padding: 6px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.journal-item-audio-player {
  width: 100%;
  height: 32px;
  outline: none;
}

/* Login Overlay Styling */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(18, 22, 40, 0.95), rgba(10, 12, 22, 0.98));
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  padding: 40px;
  border-radius: var(--radius-lg);
  background: rgba(18, 22, 40, 0.65);
  border: 1px solid var(--border-glass);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-box .brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-glass-hover);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-box .brand-logo i {
  font-size: 28px;
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(147, 51, 234, 0.6));
}

.login-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 32px;
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.4);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 51, 234, 0.55);
}

.login-error {
  margin-top: 20px;
  padding: 10px 14px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  color: hsl(0, 85%, 65%);
  font-size: 12px;
  width: 100%;
}
