/* 
 * Career Operations (Career-Ops) Portal CSS System
 * High-fidelity, premium obsidian glassmorphism design system
 */

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

:root {
  /* HSL Tailored Dark Theme Variables */
  --bg-color: hsl(224, 71%, 4%);
  --sidebar-color: hsl(224, 60%, 2%);
  --card-bg: rgba(17, 24, 39, 0.45);
  --card-hover: rgba(31, 41, 55, 0.6);
  --border-color: rgba(243, 244, 246, 0.06);
  --border-hover: rgba(16, 185, 129, 0.25); /* Glowing emerald */
  
  /* Emerald theme matching Hermetic AI platform standard */
  --accent-color: hsl(142, 70%, 45%); 
  --accent-glow: hsla(142, 70%, 45%, 0.2);
  --accent-dark: hsl(142, 60%, 20%);
  
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 65%);
  --text-muted: hsl(215, 15%, 45%);
  
  /* Status indicators */
  --color-a: hsl(142, 70%, 45%);   /* Grade A */
  --color-b: hsl(200, 80%, 50%);   /* Grade B */
  --color-c: hsl(45, 90%, 50%);    /* Grade C */
  --color-d: hsl(15, 85%, 50%);    /* Grade D */
  --color-f: hsl(0, 85%, 55%);     /* Grade F */
  
  --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 20px -2px hsla(142, 70%, 45%, 0.15);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Base Layout */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  position: relative;
}

/* Background Gradients */
.bg-glow-1 {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: hsla(142, 70%, 45%, 0.05);
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow-2 {
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  background: hsla(220, 70%, 50%, 0.04);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

/* Sidebar Styling */
.sidebar {
  width: 240px;
  background-color: var(--sidebar-color);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  position: fixed;
  z-index: 10;
}

.logo-section {
  margin-bottom: 32px;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-accent {
  color: var(--accent-color);
  -webkit-text-fill-color: var(--accent-color);
}

.logo-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-color);
  margin-top: 4px;
  font-weight: 600;
}

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

.nav-item {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

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

.nav-item.active {
  background-color: var(--accent-dark);
  color: var(--text-primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

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

.operator-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.operator-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.operator-role {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

/* Main Content Section */
.main-content {
  margin-left: 240px;
  flex-grow: 1;
  padding: 36px 40px;
  position: relative;
  z-index: 1;
  max-width: calc(100vw - 240px);
}

/* Header Dashboard Row */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header-title h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

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

.btn {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

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

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
  border: 1px solid var(--accent-color);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: hsl(142, 70%, 50%);
  border-color: hsl(142, 70%, 50%);
  box-shadow: 0 0 25px 0 hsla(142, 70%, 45%, 0.35);
}

/* View Container Switches */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

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

/* Glassmorphism Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--card-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

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

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: 8px;
  color: var(--text-primary);
}

.stat-trend {
  font-size: 0.7rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up { color: var(--color-a); }
.trend-down { color: var(--color-f); }

/* Main Section Card Grid */
.layout-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
}

.panel-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Kanban / Inbox List Layout */
.job-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.job-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.job-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.job-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 70%;
}

.job-role {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.job-company {
  font-size: 0.85rem;
  color: var(--accent-color);
  font-weight: 500;
}

.job-tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.65rem;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-secondary);
}

.job-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.grade-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.grade-a { background: rgba(16, 185, 129, 0.15); border: 1px solid var(--color-a); color: var(--color-a); }
.grade-b { background: rgba(59, 130, 246, 0.15); border: 1px solid var(--color-b); color: var(--color-b); }
.grade-c { background: rgba(245, 158, 11, 0.15); border: 1px solid var(--color-c); color: var(--color-c); }
.grade-d { background: rgba(249, 115, 22, 0.15); border: 1px solid var(--color-d); color: var(--color-d); }
.grade-f { background: rgba(239, 68, 68, 0.15); border: 1px solid var(--color-f); color: var(--color-f); }

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

/* Detail Panel / side view */
.details-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.details-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.detail-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.detail-company {
  font-size: 0.9rem;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-role {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 4px;
}

.detail-grade-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Accordion blocks for scoring analysis */
.analysis-blocks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.01);
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.accordion-content {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.1);
  display: none;
}

.accordion-item.active .accordion-content {
  display: block;
}

.accordion-item.active .accordion-trigger {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

/* Modal Window for Ingestion Entry */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-container {
  background: var(--sidebar-color);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 500px;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px -2px hsla(142, 70%, 45%, 0.1);
}

.form-help {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}
