@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-strong: #f1f5f9;
  --panel-dark: #0f172a;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  
  --accent: #cc2129;
  --accent-dark: #a8171f;
  --accent-soft: #fff1f2;
  
  --success: #10b981; /* Emerald Green */
  --success-soft: #ecfdf5;
  --danger: #ef4444; /* Rose Red */
  --danger-soft: #fef2f2;
  
  /* DISC Profile Colors */
  --disc-d: #ef4444;
  --disc-d-soft: #fef2f2;
  --disc-i: #f59e0b;
  --disc-i-soft: #fffbeb;
  --disc-s: #10b981;
  --disc-s-soft: #ecfdf5;
  --disc-c: #475569;
  --disc-c-soft: #f1f5f9;

  /* Premium Shadow System */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --radius: 16px;
}

* {
  box-sizing: border-box;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hidden {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Candidate UI
   ========================================================================== */

.candidate-body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.03), transparent 30%),
              var(--bg);
}

.candidate-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  padding: 0 clamp(20px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.candidate-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.125rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.candidate-logo {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(204, 33, 41, 0.25);
}

.candidate-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 40px clamp(20px, 5vw, 64px) 72px;
}

.candidate-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  animation: fadeInUp 0.6s ease;
}

.candidate-toolbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.candidate-toolbar p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.6;
}

/* ==========================================================================
   Vacancy Cards
   ========================================================================== */

.vacancy-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  align-items: stretch;
  animation: fadeInUp 0.8s ease;
}

.vacancy-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}

.vacancy-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vacancy-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium);
  border-color: rgba(204, 33, 41, 0.2);
}

.vacancy-card:hover::before {
  opacity: 1;
}

.vacancy-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.vacancy-card .summary {
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1 1 auto;
}

.vacancy-card .meta {
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vacancy-card .primary-button {
  width: 100%;
  margin-top: 8px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.admin-link,
.ghost-button,
.primary-button,
.close-button,
.sidebar-link {
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 20px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.925rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(204, 33, 41, 0.16);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(204, 33, 41, 0.26);
  filter: brightness(1.05);
}

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

.ghost-button,
.admin-link {
  background: var(--panel);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.ghost-button:hover,
.admin-link:hover {
  background: var(--panel-strong);
  color: var(--ink);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.ghost-button.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
  background: var(--danger-soft);
}

.ghost-button.danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.ghost-button.small {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.825rem;
  border-radius: 8px;
}

/* ==========================================================================
   Badges and Chips
   ========================================================================== */

.badge,
.mini-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mini-chip {
  background: var(--panel-strong);
  color: var(--muted);
  border: 1px solid var(--line);
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.75rem;
}

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

.modal {
  width: min(1000px, calc(100vw - 32px));
  border: none;
  padding: 0;
  background: transparent;
  border-radius: 20px;
  overflow: visible;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal[open] {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-body {
  position: relative;
  padding: 40px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: var(--shadow-premium);
}

.wide .modal-body {
  max-height: min(90vh, 880px);
  overflow-y: auto;
}

.modal.wide {
  width: min(1100px, calc(100vw - 32px));
}

.close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  color: var(--muted);
  background: var(--panel-strong);
  border: none;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: var(--danger-soft);
  color: var(--danger);
  transform: rotate(90deg);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.form-grid,
.question-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-bottom: 24px;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(204, 33, 41, 0.1);
}

/* ==========================================================================
   Application Flow & Success Step
   ========================================================================== */

.application-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--panel-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.step-pill.active {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: rgba(204, 33, 41, 0.25);
  box-shadow: var(--shadow-sm);
}

.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}

/* Success Section styling */
.success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0;
  animation: scaleIn 0.5s ease;
}

.success-icon-wrapper {
  width: 80px;
  height: 80px;
  background: var(--success-soft);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--success);
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
  animation: pulseSuccess 2s infinite;
}

.success-icon {
  width: 40px;
  height: 40px;
}

.success-container h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
}

.success-container p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 32px;
}

/* ==========================================================================
   DISC Explainer Layouts
   ========================================================================== */

.disc-card {
  width: 100%;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 28px;
  text-align: left;
  border: 1px solid;
  animation: fadeInUp 0.5s ease;
}

.disc-card-d {
  background: var(--disc-d-soft);
  border-color: rgba(239, 68, 68, 0.15);
}
.disc-card-i {
  background: var(--disc-i-soft);
  border-color: rgba(245, 158, 11, 0.15);
}
.disc-card-s {
  background: var(--disc-s-soft);
  border-color: rgba(16, 185, 129, 0.15);
}
.disc-card-c {
  background: var(--disc-c-soft);
  border-color: rgba(59, 130, 246, 0.15);
}

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

.disc-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: white;
  font-weight: 800;
  font-size: 1.25rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.disc-icon-badge-d { background: var(--disc-d); }
.disc-icon-badge-i { background: var(--disc-i); }
.disc-icon-badge-s { background: var(--disc-s); }
.disc-icon-badge-c { background: var(--disc-c); }

.disc-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
}

.disc-card-title span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
}

.disc-card-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #334155;
  margin: 0 0 20px;
}

.disc-chart-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}

.disc-bar-container {
  display: grid;
  gap: 10px;
}

.disc-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.disc-bar-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}

.disc-bar-track {
  height: 10px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.disc-bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.disc-bar-fill-d { background: var(--disc-d); }
.disc-bar-fill-i { background: var(--disc-i); }
.disc-bar-fill-s { background: var(--disc-s); }
.disc-bar-fill-c { background: var(--disc-c); }

.disc-bar-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
  text-align: right;
}

/* Pipeline DISC Badges */
.disc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.775rem;
  font-weight: 700;
}

.disc-badge.disc-d { background: var(--disc-d-soft); color: var(--disc-d); }
.disc-badge.disc-i { background: var(--disc-i-soft); color: var(--disc-i); }
.disc-badge.disc-s { background: var(--disc-s-soft); color: var(--disc-s); }
.disc-badge.disc-c { background: var(--disc-c-soft); color: var(--disc-c); }

/* ==========================================================================
   Admin UI - Sidebar Shell
   ========================================================================== */

.admin-body {
  min-height: 100vh;
  background: var(--bg);
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  background: #0f172a;
  color: #f8fafc;
  display: grid;
  grid-template-rows: 72px 1fr auto;
  border-right: 1px solid #1e293b;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid #1e293b;
}

/* Sidebar title header style replaces the logo */
.sidebar-header h2 {
  color: white;
  margin: 0;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 32px 16px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
  border-radius: 10px;
  min-height: 46px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  justify-content: flex-start;
  width: 100%;
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(204, 33, 41, 0.15) 0%, rgba(204, 33, 41, 0.05) 100%);
  border-left: 3px solid var(--accent);
  color: #fee2e2;
}

.sidebar-link:hover {
  background: #1e293b;
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-link svg,
.sidebar-exit svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid #1e293b;
}

.sidebar-exit {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.sidebar-exit:hover {
  color: #ffffff;
  background: #1e293b;
}

/* ==========================================================================
   Admin UI - Main Layout
   ========================================================================== */

.admin-main {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.admin-topbar {
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.system-status span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.workspace-section {
  display: none;
  min-height: 0;
  padding: 32px;
  overflow-y: auto;
}

.workspace-section.active {
  display: grid;
  animation: fadeIn 0.4s ease;
}

#candidatesSection.active {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}

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

.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
}

.filter-bar select {
  min-width: 220px;
}

.module-grid {
  display: grid;
  width: 100%;
  gap: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tests-grid {
  align-items: start;
  grid-template-columns: 380px minmax(0, 1fr);
}

/* ==========================================================================
   Admin Cards
   ========================================================================== */

.admin-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 24px;
}

.feature-card {
  padding: 0;
}

.admin-form,
.question-builder {
  padding: 32px;
  display: grid;
  gap: 24px;
}

.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.split-heading h3,
.question-builder-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.admin-vacancy-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding: 4px;
}

.vacancy-admin-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.vacancy-admin-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.vacancy-admin-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.vacancy-admin-top h3 {
  margin: 4px 0 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.vacancy-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted);
}

.vacancy-admin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.925rem;
  line-height: 1.5;
}

.mini-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.question-builder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.questions-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question-options-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
}

.option-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.question-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 8px;
}

.option-row input {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.875rem;
}

.empty-state {
  padding: 32px;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.empty-state.compact {
  padding: 16px;
}

/* ==========================================================================
   Trello/Kanban Board & Candidates
   ========================================================================== */

.pipeline-board {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(5, minmax(280px, 1fr));
  overflow-x: auto;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 12px;
}

.pipeline-column {
  background: #f1f5f9;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 16px;
  max-height: calc(100vh - 270px);
  min-height: calc(100vh - 270px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pipeline-column.drag-over {
  border-color: var(--accent);
  background: #e2e8f0;
}

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

.pipeline-column-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-column-header span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.pipeline-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 2px;
}

.candidate-card {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.candidate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(204, 33, 41, 0.16);
}

.candidate-card.eliminated-card {
  border-color: rgba(204, 33, 41, 0.32);
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}

.candidate-card.eliminated-card .candidate-card-top strong {
  color: var(--accent-dark);
}

.candidate-ai-preview {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--ink);
}

.candidate-ai-preview strong {
  color: var(--accent-dark);
  font-size: 0.82rem;
}

.candidate-ai-preview span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.candidate-card.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.candidate-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.candidate-card strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.candidate-card span {
  font-size: 0.85rem;
  color: var(--muted);
}

.candidate-card small {
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

.candidate-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.candidate-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.candidate-card-actions .ghost-button {
  justify-content: center;
  flex: 1 1 130px;
}

.drop-hint {
  padding: 24px 16px;
  text-align: center;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.825rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.5);
  margin-top: auto;
  margin-bottom: auto;
}

/* Stats Cards */
.stats-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.stats-card span {
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-card strong {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent-dark);
}

/* Candidate Details Modal styling */
.candidate-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.candidate-detail-header h2 {
  margin: 4px 0 0 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.resume-ai-panel {
  display: grid;
  gap: 16px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.resume-ai-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resume-ai-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.resume-ai-grid strong {
  color: var(--ink);
}

.resume-ai-grid p,
.resume-ai-panel > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
}

.detail-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.detail-card h3 {
  margin: 0 0 14px 0;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.detail-card p {
  margin: 8px 0;
  font-size: 0.925rem;
  line-height: 1.5;
}

.candidate-answers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   DISC Question Radios
   ========================================================================== */

fieldset {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

legend {
  padding: 0 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

fieldset label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: var(--bg);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.925rem;
  transition: all 0.2s ease;
}

fieldset label:hover {
  background: var(--panel-strong);
  border-color: var(--line-strong);
  transform: translateX(2px);
}

fieldset input[type="radio"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ==========================================================================
   Animations (Keyframes)
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseSuccess {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media (max-width: 1200px) {
  .admin-shell {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }

  .sidebar-header {
    display: none;
  }

  .sidebar-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 16px;
  }

  .sidebar-footer {
    display: none;
  }

  .admin-main {
    height: auto;
    min-height: 100vh;
  }

  .module-grid,
  .detail-grid,
  .resume-ai-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-column {
    max-height: none;
  }
}

@media (max-width: 900px) {
  .form-grid,
  .question-grid,
  .section-header,
  .candidate-toolbar {
    grid-template-columns: 1fr;
  }

  .candidate-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-board {
    grid-template-columns: 1fr;
  }

  .pipeline-column {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .candidate-topbar {
    height: auto;
    padding-top: 16px;
    padding-bottom: 16px;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 24px;
  }
  
  .disc-bar-row {
    grid-template-columns: 100px 1fr 35px;
  }
}

/* ==========================================================================
   Admin Specific UI Adjustments
   ========================================================================== */

/* Comfortable layout dimensions for form elements in Admin */
.admin-main select,
.admin-main input {
  min-height: 42px !important;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
}

.admin-main textarea {
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  min-height: 80px; /* Reset textarea squeezing */
}

/* Primary and standard buttons inside Admin Forms */
.admin-form .primary-button,
.admin-form .ghost-button {
  min-height: 42px !important;
  padding: 10px 20px !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
}

/* Compact and sleek buttons inside Vacancy Cards and Candidate Cards */
.vacancy-admin-card .form-actions .ghost-button,
.candidate-card-actions .ghost-button,
.candidate-card-actions .rejection-email-button,
.candidate-card-top .details-button {
  min-height: 34px !important;
  padding: 6px 12px !important;
  font-size: 0.825rem !important;
  border-radius: 6px !important;
}

.admin-main label {
  gap: 6px;
}

.admin-main .form-actions {
  padding-top: 12px;
  margin-top: 12px;
}

.sidebar-nav .sidebar-link {
  min-height: 42px !important;
  padding: 10px 14px !important;
  font-size: 0.9rem !important;
}

/* Custom Scrollbar for Kanban columns */
.pipeline-cards::-webkit-scrollbar {
  width: 6px;
}

.pipeline-cards::-webkit-scrollbar-track {
  background: transparent;
}

.pipeline-cards::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.pipeline-cards::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* Helper classes for responsive visibility */
.mobile-only {
  display: none !important;
}

.ghost-button.icon-button {
  width: 38px;
  height: 38px;
  min-height: 38px !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
}

