/* CSS Variables & Design Tokens */
:root {
  --bg-dark: #0f172a;
  --bg-sidebar: #1e293b;
  --bg-card: #1e293b;
  --bg-input: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #10b981;
  --border: #334155;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

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

.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: 320px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  flex-shrink: 0;
}

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-text h2 span {
  color: #818cf8;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Project Selector Panel */
.project-selector-wrapper {
  background: rgba(15, 23, 42, 0.6);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.project-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-list-header label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-new-project-icon {
  background: var(--primary);
  color: #ffffff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-new-project-icon:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.sort-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.8);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.btn-sort {
  font-size: 10px;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sort.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.4);
}

.project-visual-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 232px; /* Fits exactly 5 items (38px height + 6px gap) */
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar for Project List */
.project-visual-list::-webkit-scrollbar {
  width: 5px;
}

.project-visual-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
}

.project-visual-list::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}

.project-visual-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.project-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
  font-size: 13px;
}

.project-list-item:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.project-list-item.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.project-status-dot {
  font-size: 12px;
  flex-shrink: 0;
}

.project-item-name {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}

.btn-new-project {
  width: 100%;
  padding: 10px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-new-project:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}


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

.nav-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

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

.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #ffffff;
}

.nav-item.disabled {
  opacity: 0.35;
  cursor: not-allowed !important;
  pointer-events: none;
  filter: grayscale(1);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.nav-item.active .step-num {
  background: var(--primary);
  color: #ffffff;
}

.nav-label strong {
  display: block;
  font-size: 13px;
}

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

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

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #34d399;
  margin-bottom: 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #34d399;
  box-shadow: 0 0 8px #34d399;
}

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

/* Main Content Styling */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
}

.top-bar {
  padding: 24px 32px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 4px;
}

.page-title p {
  font-size: 13px;
  color: var(--text-muted);
}

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

.btn-secondary {
  padding: 10px 18px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #475569;
}

.content-body {
  padding: 32px;
  flex-grow: 1;
}

/* Tab Sections */
.tab-section {
  display: none;
}

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

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

.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #818cf8;
  letter-spacing: 1px;
  background: rgba(99, 102, 241, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 6px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 14px;
}

/* JD Cards Grid */
.jd-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

.jd-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

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

.company-tag {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.jd-card-header h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.exp-badge {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.filter-box {
  margin-bottom: 20px;
}

.filter-box label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background-color: #334155;
  color: #cbd5e1;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.query-box {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.query-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-copy {
  background: #334155;
  color: #ffffff;
  border: none;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-copy:hover {
  background: var(--primary);
}

.query-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  color: #38bdf8;
  line-height: 1.5;
  word-break: break-all;
  display: block;
}

.btn-saramin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background-color: var(--primary);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-saramin:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Stage 2 Per-Position Row Layout (25% : 25% : 50%) */
.pos-rows-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pos-row-item {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  align-items: stretch;
}

/* Col 1: Position Button (25%) */
.pos-col-btn {
  flex: 0 0 25%;
  max-width: 25%;
  display: flex;
}

.pos-btn-box {
  width: 100%;
  padding: 16px;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  transition: all 0.2s ease;
}

.pos-btn-box:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.pos-btn-box.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.2);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.pos-btn-company {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 4px;
}

.pos-btn-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
}

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

/* Col 2: PDF Dropzone (25%) */
.pos-col-dropzone {
  flex: 0 0 25%;
  max-width: 25%;
  display: flex;
}

.pos-drop-box {
  width: 100%;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25 ease;
}

.pos-drop-box.disabled {
  opacity: 0.35;
  border: 1px dashed #334155;
  background: rgba(15, 23, 42, 0.3);
}

.pos-drop-box.disabled:hover {
  opacity: 0.7;
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.pos-drop-box.active {
  opacity: 1;
  border: 2px dashed var(--primary);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.pos-drop-box.active:hover, .pos-drop-box.active.drag-over {
  background: rgba(99, 102, 241, 0.2) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4) !important;
}

.pos-drop-icon {
  font-size: 22px;
  margin-bottom: 4px;
}

.pos-drop-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.pos-drop-box.disabled .pos-drop-text {
  color: var(--text-muted);
}

/* Col 3: Uploaded Candidate File List (50%) */
.pos-col-candidates {
  flex: 0 0 calc(50% - 32px);
  max-width: calc(50% - 32px);
  display: flex;
}

.pos-cand-box {
  width: 100%;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  max-height: 140px;
}

.empty-cand-msg {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.cand-mini-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  width: 100%;
}

.cand-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}


/* Stage 3 Metrics & Tables */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.metric-card.highlight {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(30, 41, 59, 1));
}

.metric-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
  margin-bottom: 4px;
}

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

.table-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.table-container::-webkit-scrollbar {
  height: 12px;
  display: block;
}

.table-container::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 6px;
  border: 3px solid #0f172a;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #4f46e5;
}

.table-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  width: 100%;
  box-sizing: border-box;
}

.btn-excel {
  background-color: #10b981;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-excel:hover {
  background-color: #059669;
}

.eval-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
  box-sizing: border-box;
}

.eval-table th {
  background-color: #0f172a;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.eval-table td {
  padding: 16px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  word-wrap: break-word;
  white-space: normal;
}

/* Vertical Evaluation Report Section Styles */
.eval-report-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.eval-section {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.eval-section.strengths {
  border-left: 4px solid #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.eval-section.gaps {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.eval-section-title {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.eval-section.strengths .eval-section-title {
  color: #10b981;
}

.eval-section.gaps .eval-section-title {
  color: #f59e0b;
}

.eval-section-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-main);
  word-break: break-word;
}


.score-badge {
  position: relative;
  background: #0f172a;
  border-radius: 20px;
  height: 24px;
  width: 80px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.score-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #6366f1, #10b981);
  border-radius: 20px;
  z-index: 1;
}

.score-badge span {
  position: relative;
  z-index: 2;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.badge-strong {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.badge-recommend {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.badge-review {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 540px;
  max-width: 90%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

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

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input[type="text"], .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.file-upload-box {
  background: #0f172a;
  border: 1px dashed var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

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

.btn-primary {
  padding: 10px 18px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.btn-primary:disabled,
button:disabled {
  background-color: #334155 !important;
  color: #64748b !important;
  border-color: #475569 !important;
  cursor: not-allowed !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
  box-shadow: none !important;
}


/* Danger / Delete Project Styling */
.btn-danger {
  padding: 10px 16px;
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background-color: #ef4444;
  color: #ffffff;
}

.modal-danger {
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.danger-header {
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
}

.danger-header h3 {
  color: #f87171;
}

.warning-text {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.danger-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 12px;
  color: #fca5a5;
}

.danger-box ul {
  margin-top: 8px;
  margin-left: 18px;
  line-height: 1.6;
}

.btn-danger-confirm {
  padding: 10px 18px;
  background-color: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger-confirm:hover {
  background-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Stage 1 JD Input Panel */
.jd-input-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.panel-title {
  margin-bottom: 16px;
}

.panel-title h3 {
  font-size: 16px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: #ffffff;
}

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

.jd-input-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  margin-bottom: 20px;
}

.jd-file-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: #0f172a;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.jd-file-dropzone:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.drop-icon-sm {
  font-size: 28px;
  margin-bottom: 8px;
}

.jd-file-dropzone strong {
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 4px;
}

.jd-file-dropzone span {
  font-size: 11px;
  color: var(--text-muted);
}

.jd-text-area-box textarea {
  width: 100%;
  height: 100%;
  min-height: 110px;
  background-color: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 13px;
  outline: none;
  resize: vertical;
}

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

.btn-large {
  padding: 12px 24px;
  font-size: 14px;
}

.results-divider {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.results-divider h3 {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.empty-state-box {
  background-color: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.empty-state-box h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #ffffff;
}

.empty-state-box p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Project Status Pill Badge Styling */
.title-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.status-not-started {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-step1 {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.status-step2 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-step3 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Drag & Drop Hover Animation */
.jd-file-dropzone.drag-over, .drop-zone.drag-over, .file-upload-box.drag-over {
  border-color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: scale(1.01);
}

/* Individual Resume Delete Button */
.btn-delete-file {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-break: keep-all;
  min-width: 48px;
}


.btn-delete-file:hover {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Position Filter / Target Selector Bar (Vertical Registered Order) */
.position-selector-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.pos-pill-btn {
  background: #1e293b;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.pos-pill-btn:hover {
  background: #334155;
  color: #ffffff;
  border-color: #475569;
}

.pos-pill-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.pos-pill-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-pill-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
}

.pos-pill-btn.active .pos-pill-num {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.pos-pill-title {
  font-size: 13px;
  font-weight: 600;
}

.pos-pill-count {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  font-weight: 500;
}

.pos-pill-btn.active .pos-pill-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.pos-subfolder-tag {
  display: inline-block;
  font-size: 11px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: 4px;
  margin-top: 8px;
  font-family: monospace;
}

/* AI Analysis Status Badge */
.ai-source-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-source-tag.ai-success {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ai-source-tag.ai-local {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.ai-inline-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-right: 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.ai-inline-badge.ai-success {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ai-inline-badge.ai-local {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Empty Project State Styles */
.no-project-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  width: 100%;
}

.no-project-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 520px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.no-project-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.no-project-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Login Overlay Modal & User Profile Badge
   ============================================================ */
.login-overlay-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.login-card {
  background: var(--bg-card, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin: 0 auto 12px auto;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.login-brand h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
}

.login-brand h2 span {
  color: #38bdf8;
}

.login-brand p {
  font-size: 12px;
  color: #94a3b8;
  margin: 4px 0 0 0;
  letter-spacing: 0.5px;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.login-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 6px 0;
}

.login-header p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.login-form label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.login-form input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(15, 23, 42, 0.8);
}

.login-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: center;
}

.btn-login-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  margin-top: 8px;
}

.btn-login-submit:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

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

.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

/* User Profile Badge in Top Bar */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  margin-right: 10px;
}

.user-profile-badge .user-icon {
  font-size: 14px;
}

.user-profile-badge .username-text {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.btn-logout {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}
