/* ============================================
   RECRUITPRO - Global Stylesheet
   Professional Recruitment Platform
   Color Scheme: Dark Navy + White + Gray
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  /* Primary Colors */
  --navy-900: #0A1628;
  --navy-800: #0F2140;
  --navy-700: #152D50;
  --navy-600: #1B3A64;
  --navy-500: #1E4D8C;

  /* Accent */
  --accent: #2D7FF9;
  --accent-hover: #1A6BE6;
  --accent-light: rgba(45, 127, 249, 0.1);

  /* Success / Warning / Danger */
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.1);

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Typography */
  --font-heading: 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 80px;
  --card-radius: 12px;
  --btn-radius: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 8px 30px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 16px 50px rgba(10, 22, 40, 0.16);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 3rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

p {
  color: var(--gray-600);
  line-height: 1.7;
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* ---- Layout ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-padding) 0;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}

.btn-dark:hover {
  background: var(--navy-700);
  border-color: var(--navy-700);
  transform: translateY(-1px);
}

.btn-white {
  background: var(--white);
  color: var(--navy-800);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.0625rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--card-radius);
  border: 1px solid var(--gray-200);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-elevated {
  box-shadow: var(--shadow-sm);
  border: none;
}

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

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

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

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--btn-radius);
  background: var(--white);
  color: var(--gray-800);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input-error {
  border-color: var(--danger);
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 4px;
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--btn-radius);
  background: var(--white);
  color: var(--gray-800);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 24px;
  height: 72px;
  transition: var(--transition);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
}

.navbar-logo span {
  color: var(--accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-600);
}

.navbar-links a:hover {
  color: var(--navy-800);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ---- Tables ---- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--gray-200);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--gray-50);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--gray-200);
}

.table td {
  padding: 14px 16px;
  font-size: 0.9375rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
}

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

.table tr:hover td {
  background: var(--gray-50);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

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

.modal-header h3 {
  font-size: 1.125rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--gray-500);
  background: var(--gray-100);
  transition: var(--transition);
  font-size: 1.25rem;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

.modal-body {
  padding: 24px;
}

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

/* ---- Alerts ---- */
.alert {
  padding: 14px 18px;
  border-radius: var(--btn-radius);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--success-light);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
  background: var(--danger-light);
  color: #991B1B;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: var(--warning-light);
  color: #92400E;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ---- Loading ---- */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

/* ---- Chips/Tags ---- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  gap: 6px;
}

.chip-blue {
  background: var(--accent-light);
  color: var(--accent);
}

.chip-green {
  background: var(--success-light);
  color: var(--success);
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--gray-500);
  max-width: 400px;
  margin: 0 auto 20px;
}

/* ---- Footer ---- */
.footer {
  background: var(--navy-900);
  color: var(--gray-400);
  padding: 60px 0 30px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer a {
  color: var(--gray-400);
  font-size: 0.9375rem;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
  padding-top: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ---- Sidebar (Candidate/Recruiter Dashboard) ---- */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}

.sidebar {
  width: 260px;
  background: var(--navy-900);
  position: fixed;
  top: 72px;
  bottom: 0;
  left: 0;
  padding: 24px 0;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--gray-400);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.sidebar-link.active {
  color: var(--white);
  background: rgba(45, 127, 249, 0.15);
  border-right: 3px solid var(--accent);
}

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

.sidebar-section {
  padding: 8px 24px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-top: 16px;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  background: var(--gray-50);
  min-height: calc(100vh - 72px);
}

/* ---- Page Header ---- */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 1.75rem;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.page-header p {
  color: var(--gray-500);
}

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 24px;
  border: 1px solid var(--gray-200);
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .section { padding: 48px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
  .btn-lg { padding: 14px 28px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .container { padding: 0 16px; }
}