/* IT Grows Design System — core tokens and components */

/* Color tokens */
:root {
  --primary-50: #f0f4f8;
  --primary-100: #d9e2ec;
  --primary-200: #bcccdc;
  --primary-300: #9fb3c8;
  --primary-400: #829ab1;
  --primary-500: #627d98;
  --primary-600: #486581;
  --primary-700: #334d6e;
  --primary-800: #2d3748;
  --primary-900: #1a202c;

  --custom-dark-blue: #23447D;
  --custom-bright-blue: #4F7CAC;

  --success-50: #f0fdf4;
  --success-200: #bbf7d0;
  --success-500: #22c55e;
  --success-700: #15803d;

  --warning-50: #fffbeb;
  --warning-200: #fde68a;
  --warning-500: #f59e0b;
  --warning-700: #b45309;

  --danger-50: #fef2f2;
  --danger-200: #fecaca;
  --danger-500: #ef4444;
  --danger-700: #b91c1c;

  --info-50: #eff6ff;
  --info-200: #bfdbfe;
  --info-500: #3b82f6;
  --info-700: #1d4ed8;

  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #111827;

  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-large: 0 10px 40px -10px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Base */
html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--neutral-800);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-weight: 700; letter-spacing: -0.025em; color: var(--neutral-50); }
h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.025em; color: var(--neutral-900); }
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.01em; }

/* Layout helpers matching current templates */
.container {
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
}

/* New layout with sidebar */
.layout-container {
  display: flex;
  min-height: 100vh;
  background: var(--neutral-50);
}

.sidebar {
  width: 200px;
  background: linear-gradient(135deg, var(--custom-dark-blue) 0%, var(--custom-bright-blue) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-medium);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.5);
}

.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-left-color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-text {
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.main-content {
  flex: 1;
  margin-left: 200px;
  padding: 24px 32px;
  background: var(--neutral-50);
  min-height: 100vh;
}

.header {
  background: linear-gradient(135deg, var(--custom-dark-blue) 0%, var(--custom-bright-blue) 100%);
  color: #ffffff;
  padding: 20px;
  border-radius: 6px 6px 0 0;
}

.nav { display: flex; gap: 20px; margin-top: 10px; }
.nav a { color: #e5e7eb; text-decoration: none; padding: 12px 20px; border-radius: 4px; transition: all 0.3s ease; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,0.2); color: #ffffff; }

.content { padding: 24px; background: #ffffff; border-radius: 0 0 6px 6px; }

/* Main content styles for new layout */
.main-content .content {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.main-content .filters,
.main-content .section,
.main-content .vacancy-card,
.main-content .message-card,
.main-content .candidate-card {
  background: #ffffff;
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}

/* Collapsible filters */
.filters-header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: 16px;
  padding: 16px 24px;
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.filters-content {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
  padding: 20px 24px;
  display: none;
  transition: all 0.3s ease;
}

.filters-content.expanded {
  display: block;
}

.filters-toggle {
  background: var(--custom-bright-blue);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filters-toggle:hover {
  background: var(--custom-dark-blue);
}

.filters-toggle.expanded {
  background: var(--custom-dark-blue);
}

/* Page header styles */
.page-header {
  background: #ffffff;
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--neutral-200);
}

.page-header h1 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.page-header p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 0.95rem;
}

/* Cards and sections */
.stat-card, .section, .vacancy-card, .message {
  background: #ffffff;
  border-radius: 5px;
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-soft);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 20px; }
.stat-number { font-size: 1.6rem; font-weight: 700; color: var(--custom-dark-blue); }
.stat-label { color: var(--neutral-500); }

/* Buttons */
.btn { padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease; box-shadow: var(--shadow-soft); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-medium); }

.btn-primary {
  background: linear-gradient(135deg, var(--custom-dark-blue) 0%, var(--custom-bright-blue) 100%);
  color: #ffffff;
}

.btn-secondary {
  background: var(--neutral-50);
  color: var(--neutral-800);
  border: 1px solid var(--neutral-200);
}

.btn-success { background: #16a34a; color: #ffffff; }
.btn-warning { background: #ca8a04; color: #ffffff; }
.btn-danger { background: #dc2626; color: #ffffff; }
.btn-info { background: var(--info-500); color: #ffffff; }
.btn-info:hover { background: var(--info-700); }

/* Forms */
.search-form, .filters, .search { display: flex; gap: 16px; flex-wrap: wrap; }
.search-form { margin: 12px 0 20px; }
.filters { margin-bottom: 20px; }
.search-input, .form-input, .form-select, .filter-select {
  padding: 12px 16px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-height: 260px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
  padding: 12px;
  display: none;
  z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; border-radius: 4px; }
.dropdown-item:hover { background: var(--neutral-50); }
.form-label, .filter-label { color: var(--neutral-600); font-weight: 600; }
.form-textarea { width: 100%; padding: 12px; border: 1px solid var(--neutral-200); border-radius: 5px; resize: vertical; }

/* Badges */
.vacancy-status { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.status-badge, .type-badge {
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.type-badge { background: var(--neutral-100); color: var(--neutral-800); border: 1px solid var(--neutral-200); }

.status-new { background: #3b82f6; color: #ffffff; }
.status-selected { background: #10b981; color: #ffffff; }
.status-candidate_sent { background: #8b5cf6; color: #ffffff; }
.status-rejected_by_us { background: #ef4444; color: #ffffff; }
.status-rejected_by_client { background: #f59e0b; color: #ffffff; }
.status-closed { background: #6b7280; color: #ffffff; }

/* Страница детального просмотра вакансии */
.vacancy-detail-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.vacancy-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.vacancy-detail-title h2 {
  margin: 0 0 8px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--neutral-900);
}

.vacancy-detail-company {
  font-size: 1.1rem;
  color: var(--custom-bright-blue);
  font-weight: 500;
}

.vacancy-detail-status {
  flex-shrink: 0;
}

.vacancy-detail-body {
  padding: 24px;
}

.vacancy-detail-description {
  margin-bottom: 32px;
}

.vacancy-detail-description h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.vacancy-body-full {
  line-height: 1.7;
  color: var(--neutral-700);
  font-size: 1rem;
  white-space: pre-wrap;
  background: var(--neutral-50);
  padding: 20px;
  border-radius: 5px;
  border: 1px solid var(--neutral-200);
}

.vacancy-detail-meta h3 {
  margin: 0 0 16px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--neutral-900);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
}

.meta-label {
  font-weight: 600;
  color: var(--neutral-700);
  font-size: 0.9rem;
}

.meta-value {
  color: var(--neutral-600);
  font-size: 0.95rem;
}

.vacancy-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-top: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--neutral-300);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: var(--neutral-50);
    cursor: pointer;
    transition: border-color 0.2s;
    margin-top: 16px;
}

.upload-area:hover {
    border-color: var(--custom-bright-blue);
}

.upload-area.dragover {
    border-color: var(--custom-bright-blue);
    background: var(--neutral-100);
}

.upload-text {
    color: var(--neutral-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 12px;
    color: var(--neutral-500);
}

.resume-content {
    font-size: 14px;
    color: var(--neutral-700);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Resume content should not be truncated */
.resume-content-main .vacancy-body {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    text-overflow: unset;
    -webkit-box-orient: unset;
}

/* Resume layout */
.resume-container {
    display: grid;
    grid-template-columns: 250px 1fr 200px;
    gap: 20px;
    margin-bottom: 24px;
    align-items: start;
}

.resume-sidebar-left {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 16px;
}

.resume-sidebar-right {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: 16px;
}

.resume-content-main {
    min-width: 0; /* Prevents grid overflow */
}

.resume-info h4,
.resume-actions h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.resume-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resume-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resume-meta .meta-label {
    font-size: 0.8rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.resume-meta .meta-value {
    font-size: 0.9rem;
    color: var(--neutral-800);
    word-break: break-word;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

/* Match results styles */
.match-score {
    background: var(--custom-bright-blue);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 70px;
    text-align: center;
    border: none;
    display: inline-block;
}

.match-score.high {
    background: var(--success-500, #22c55e);
    color: #ffffff;
}

.match-score.medium {
    background: var(--warning-500, #f59e0b);
    color: #ffffff;
}

.match-score.low {
    background: var(--danger-500, #ef4444);
    color: #ffffff;
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background: var(--danger-50);
    color: var(--danger-700);
    border: 1px solid var(--danger-200);
}

.alert-success {
    background: var(--success-50);
    color: var(--success-700);
    border: 1px solid var(--success-200);
}

/* Meta item styles */
.meta-item-full {
    grid-column: 1 / -1;
}

.form-textarea-large {
    min-height: 150px;
}

/* Modals */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); }
.modal-content { background: #ffffff; margin: 5% auto; padding: 0; border-radius: 5px; width: 90%; max-width: 600px; min-width: 500px; box-shadow: var(--shadow-large); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--neutral-200); background: var(--neutral-50); border-radius: 5px 5px 0 0; }
.modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--neutral-900); }
.close { color: #9ca3af; font-size: 28px; font-weight: 700; cursor: pointer; }
.close:hover { color: #111827; }
.modal-body { padding: 24px; }
.modal-footer { padding: 24px; border-top: 1px solid var(--neutral-200); background: var(--neutral-50); border-radius: 0 0 5px 5px; display: flex; justify-content: flex-end; gap: 12px; }

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

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--neutral-700);
  font-size: 0.9rem;
}

.form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--custom-bright-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
  line-height: 1.5;
}

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.pagination a, .pagination .current {
  padding: 10px 16px; border: 1px solid var(--neutral-200); border-radius: 4px; text-decoration: none; color: var(--neutral-700);
}
.pagination a:hover, .pagination .current { background: linear-gradient(135deg, var(--custom-dark-blue), var(--custom-bright-blue)); color: #ffffff; border-color: transparent; }

/* Utility - Redesigned cards for new layout */
.vacancy-card { 
  padding: 0; 
  position: relative; 
  margin-bottom: 20px; 
  display: flex;
  align-items: stretch;
  min-height: 140px;
}

.vacancy-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

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

.vacancy-title { 
  font-size: 1.3rem; 
  font-weight: 700; 
  color: var(--neutral-900); 
  margin: 0 0 8px 0; 
  line-height: 1.3;
}

.vacancy-company { 
  color: var(--custom-dark-blue); 
  font-weight: 600; 
  margin: 0; 
  font-size: 1rem;
}

.vacancy-status {
  font-size: 0.9rem;
  color: var(--neutral-700);
  background: var(--neutral-100);
  padding: 4px 12px;
  border-radius: 4px;
  white-space: nowrap;
}

.vacancy-status.active {
  background: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-200);
}

.vacancy-status.inactive {
  background: var(--danger-50);
  color: var(--danger-700);
  border: 1px solid var(--danger-200);
}

.vacancy-body { 
  color: var(--neutral-700); 
  line-height: 1.6; 
  margin-bottom: 16px; 
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.95rem;
}

.vacancy-salary {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #059669;
  font-weight: 600;
}

.salary-usd {
  color: var(--neutral-600);
  font-weight: 500;
  margin-left: 8px;
}

.vacancy-meta { 
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap; 
  font-size: 0.85rem; 
  color: var(--neutral-600); 
  margin-bottom: 16px;
  align-items: center;
}

.vacancy-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.vacancy-candidates {
  width: 200px;
  background: var(--neutral-50);
  border-left: 1px solid var(--neutral-200);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.vacancy-candidates-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neutral-700);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vacancy-candidates-list {
  font-size: 0.85rem;
  color: var(--neutral-600);
  min-height: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matches-mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--neutral-700);
  padding: 4px 0;
}

.matches-mini-score {
  font-weight: 700;
  color: var(--custom-dark-blue);
}

.vacancy-type-btn {
  background: var(--custom-bright-blue);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.vacancy-type-btn:hover {
  background: var(--custom-dark-blue);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.vacancy-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
  margin-top: auto;
}

.vacancy-actions .btn {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.bulk-actions { background: var(--neutral-50); border: 1px solid var(--neutral-200); border-radius: 5px; padding: 20px 24px; margin: 16px 0 24px; display: block; box-shadow: var(--shadow-soft); position: sticky; top: 12px; z-index: 10; }
.bulk-actions.show { display: block; }
.bulk-actions-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 16px; }
.bulk-actions-count { font-weight: 700; color: var(--custom-dark-blue); }

/* Message list */
.message { padding: 20px; margin-bottom: 16px; }
.meta { color: var(--neutral-500); font-size: 12px; margin-bottom: 8px; }
.text { color: var(--neutral-900); white-space: pre-wrap; }

/* Design System Components - Modern Cards */
.card-modern {
  background: #ffffff;
  border-radius: 5px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  border: 1px solid var(--neutral-200);
}

.card-modern:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
}

/* Design System Components - Form Styles */
.form-container {
  background: linear-gradient(135deg, var(--custom-dark-blue) 0%, var(--custom-bright-blue) 100%);
  padding: 28px;
  border-radius: 7px;
  color: #ffffff;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: #ffffff;
  color: var(--neutral-900);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--custom-bright-blue);
  box-shadow: 0 0 0 3px rgba(79, 124, 172, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--neutral-600);
  font-size: 14px;
}

/* Design System Components - Buttons */
.btn-link {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Design System Components - Filters Section */
.filters {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 7px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}

.filter-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-600);
}

/* Design System Components - Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border: 2px solid var(--neutral-200);
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  color: var(--neutral-700);
  min-width: 160px;
  transition: all 0.3s ease;
}

.dropdown-toggle:hover {
  border-color: var(--neutral-300);
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 10px;
  color: var(--neutral-500);
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.dropdown.open .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  max-height: 300px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  box-shadow: var(--shadow-medium);
  padding: 12px;
  display: none;
  z-index: 50;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background: var(--neutral-50);
}

.dropdown-item input[type="checkbox"] {
  margin-right: 8px;
}

/* Design System Components - Status Badges */
.status-badge, .type-badge {
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.type-badge {
  background: var(--neutral-100);
  color: var(--neutral-800);
  border: 1px solid var(--neutral-200);
}

/* Design System Components - Message Cards */
.message-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  padding: 0;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  display: flex;
  align-items: stretch;
  min-height: 120px;
}

.message-card:hover {
  box-shadow: var(--shadow-medium);
}

.message-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.message-header {
  margin-bottom: 16px;
}

.message-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.message-meta {
  font-size: 14px;
  color: var(--neutral-500);
  margin-bottom: 16px;
}

.message-body {
  color: var(--neutral-700);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
  margin-top: auto;
}

.message-actions .btn {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Design System Components - Candidate Cards */
.candidate-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  padding: 0;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  display: flex;
  align-items: stretch;
  min-height: 140px;
}

.candidate-card:hover {
  box-shadow: var(--shadow-medium);
}

.candidate-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

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

.candidate-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0;
  line-height: 1.3;
}

.candidate-grade {
  background: linear-gradient(135deg, var(--custom-dark-blue), var(--custom-bright-blue));
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.candidate-info {
  margin-bottom: 16px;
  flex: 1;
}

.candidate-field {
  display: flex;
  margin-bottom: 8px;
  font-size: 14px;
}

.candidate-field-label {
  font-weight: 600;
  color: var(--neutral-600);
  min-width: 100px;
}

.candidate-field-value {
  color: var(--neutral-700);
}

.candidate-actions {
  width: 180px;
  padding: 24px;
  background: var(--neutral-50);
  border-left: 1px solid var(--neutral-200);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  align-items: stretch;
}

.candidate-actions .btn {
  margin: 0;
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.85rem;
}

/* Channel cards */
.channel-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  padding: 0;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  display: flex;
  align-items: stretch;
  min-height: 100px;
}

.channel-card:hover {
  box-shadow: var(--shadow-medium);
}

.channel-content {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.channel-header {
  margin-bottom: 16px;
}

.channel-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 8px;
  line-height: 1.3;
}

.channel-meta {
  color: var(--neutral-600);
  font-size: 0.9rem;
  line-height: 1.5;
}

.channel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--neutral-100);
  margin-top: auto;
}

.channel-actions .btn {
  margin: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Message cards */
.message-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 8px;
  line-height: 1.3;
}

.message-meta {
  color: var(--neutral-600);
  font-size: 0.9rem;
  line-height: 1.5;
}

.message-body {
  flex: 1;
  color: var(--neutral-700);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Type cards */
.type-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 5px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.type-card:hover {
  box-shadow: var(--shadow-medium);
}

.type-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.type-header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--neutral-100);
}

.type-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neutral-900);
  min-width: 200px;
}

.type-display {
  font-size: 1rem;
  color: var(--neutral-600);
  font-style: italic;
}

.type-keywords {
  width: 100%;
}

.type-keywords textarea {
  resize: vertical;
  min-height: 60px;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Design System Components - Grid Layouts */
.candidates-grid {
  display: block;
}

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

.candidates-filters {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

/* Design System Components - Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--neutral-500);
}

.empty-state h3 {
  margin: 0 0 12px 0;
  color: var(--neutral-700);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Design System Components - Auth Pages */
.auth-container {
  max-width: 480px;
  margin: 60px auto;
  background: #ffffff;
  border-radius: 7px;
  box-shadow: var(--shadow-large);
  padding: 36px;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin: 0 0 20px 0;
  text-align: center;
}

.auth-description {
  color: var(--neutral-600);
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.5;
}

.auth-field {
  margin-bottom: 24px;
}

.auth-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 24px;
  font-size: 14px;
}

.auth-link {
  color: var(--custom-dark-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.auth-link:hover {
  color: var(--custom-bright-blue);
}

/* Design System Components - Small Buttons */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary {
  background: transparent;
  color: var(--custom-dark-blue);
  border: 2px solid var(--custom-dark-blue);
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--custom-dark-blue);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn-view {
  background: var(--neutral-50);
  color: var(--neutral-700);
  border-color: var(--neutral-200);
}

.btn-view:hover {
  background: var(--neutral-100);
  transform: translateY(-1px);
}

.btn-edit {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
}

.btn-edit:hover {
  background: #fde68a;
  transform: translateY(-1px);
}

.btn-delete {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-delete:hover {
  background: #fecaca;
  transform: translateY(-1px);
}

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

.application-card {
  background: #ffffff;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.application-card:hover {
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

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

.application-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: var(--neutral-900);
}

.application-meta {
  display: flex;
  gap: 16px;
  color: var(--neutral-600);
  font-size: 0.875rem;
}

.application-status {
  flex-shrink: 0;
}

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

/* Status badge colors */
.status-draft { background: #f3f4f6; color: #4b5563; }
.status-submitted { background: #dbeafe; color: #1e40af; }
.status-manager-review { background: #fef3c7; color: #92400e; }
.status-sent-to-client { background: #ddd6fe; color: #5b21b6; }
.status-client-review { background: #e0e7ff; color: #3730a3; }
.status-interview-scheduled { background: #ccfbf1; color: #115e59; }
.status-interview-passed { background: #d1fae5; color: #065f46; }
.status-offer-extended { background: #d9f99d; color: #3f6212; }
.status-accepted { background: #86efac; color: #14532d; }
.status-rejected-by-manager { background: #fee2e2; color: #991b1b; }
.status-rejected-by-client { background: #fee2e2; color: #991b1b; }
.status-rejected-by-candidate { background: #fee2e2; color: #991b1b; }
.status-withdrawn { background: #f3f4f6; color: #6b7280; }
.status-expired { background: #fecaca; color: #7f1d1d; }

.application-body {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.application-main {
  flex: 1;
}

.application-history {
  flex: 0 0 300px;
  border-left: 1px solid var(--neutral-200);
  padding-left: 20px;
}

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

.history-header h4 {
  margin: 0;
  color: var(--neutral-700);
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-600);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}

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

.history-preview {
  max-height: 200px;
  overflow-y: auto;
}

.history-preview-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.history-preview-item:last-child {
  border-bottom: none;
}

.history-preview-status {
  font-weight: 500;
  color: var(--neutral-700);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.history-preview-date {
  font-size: 0.625rem;
  color: var(--neutral-500);
  margin-bottom: 2px;
}

.history-preview-comment {
  font-size: 0.625rem;
  color: var(--neutral-600);
  font-style: italic;
  background-color: var(--neutral-50);
  padding: 4px 6px;
  border-radius: 3px;
  margin-top: 2px;
}

.history-preview-empty,
.history-preview-error {
  text-align: center;
  color: var(--neutral-500);
  font-size: 0.75rem;
  font-style: italic;
  padding: 20px 0;
}

.history-loading {
  text-align: center;
  color: var(--neutral-600);
  font-size: 0.75rem;
  padding: 20px 0;
}

.application-details {
  display: grid;
  gap: 12px;
}

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

.detail-label {
  font-weight: 600;
  color: var(--neutral-700);
  font-size: 0.875rem;
}

.detail-value {
  color: var(--neutral-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

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

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-large);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--neutral-900);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--neutral-500);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--neutral-700);
}

.modal-body {
  padding: 20px;
}

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

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--neutral-700);
  font-size: 0.875rem;
}

.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--neutral-700);
  background: #ffffff;
  transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--custom-bright-blue);
  box-shadow: 0 0 0 3px rgba(79, 124, 172, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Alert styles */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  border: 1px solid;
  font-size: 0.875rem;
}

.alert-info {
  background-color: #e0f2fe;
  border-color: #81d4fa;
  color: #01579b;
}

.alert-success {
  background-color: #e8f5e8;
  border-color: #a5d6a7;
  color: #2e7d32;
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #ffcc02;
  color: #ef6c00;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #ef9a9a;
  color: #c62828;
}

/* History styles */
.history-container {
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.history-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.history-status {
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.history-date {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.history-comment {
  font-size: 0.875rem;
  color: #4b5563;
  font-style: italic;
  background-color: #f9fafb;
  padding: 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.history-empty {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
  .application-header {
    flex-direction: column;
    gap: 12px;
  }
  
  .application-meta {
    flex-direction: column;
    gap: 4px;
  }
  
  .application-body {
    flex-direction: column;
    gap: 16px;
  }
  
  .application-history {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--neutral-200);
    padding-left: 0;
    padding-top: 16px;
  }
  
  .application-actions {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-footer {
    flex-direction: column;
  }
}


