/* ===========================================================
   ASİSTAN EŞLEŞTİRME & YARDIMCI PERSONEL — DESIGN SYSTEM v2.1
   =========================================================== */

/* ========= 1. MERKEZİ DEĞİŞKENLER ========= */
:root {
  /* --- Renk Paleti --- */
  --ieo-primary: #0f172a;
  --ieo-accent: #0ea5e9;
  --ieo-accent-light: #38bdf8;
  --ieo-bg: #f1f5f9;
  --ieo-card-bg: #ffffff;
  
  /* --- Metin & Sınırlar --- */
  --ieo-text: #334155;
  --ieo-text-light: #64748b;
  --ieo-border: #e2e8f0;
  
  /* --- Durum Renkleri --- */
  --ieo-success: #10b981;
  --ieo-warning: #f59e0b;
  --ieo-danger: #ef4444;
  --ieo-purple: #8b5cf6;
  --ieo-indigo: #6366f1;
  --ieo-pink: #ec4899;
  --ieo-orange: #f97316;
  
  /* --- Ölçüler --- */
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
}

/* ========= 2. TEMEL YAPI ========= */
body {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  background-attachment: fixed;
  color: var(--ieo-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.page-container {
  padding: 1rem 0;
  position: relative;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--ieo-primary) 0%, var(--ieo-accent) 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 0 !important;
  padding-bottom: 2rem;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  position: relative;
  z-index: 0;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.page-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
}

/* ========= LOGIN CARD (Guest View) ========= */
.guest-login-wrapper {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem;
}

.login-card-wrapper {
  width: 100%;
  max-width: 580px;
  padding: 0 1rem;
}

@media (max-width: 576px) {
  .login-card-wrapper {
    padding: 0 0.25rem;
  }
  .login-card-header {
    padding: 1.75rem 1.25rem 1.5rem;
  }
  .login-card-body {
    padding: 1.5rem 1.25rem 2rem;
  }
}

.login-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ieo-border);
  width: 100%;
}

.login-card-header {
  background: linear-gradient(135deg, var(--ieo-primary) 0%, var(--ieo-accent) 100%);
  color: white;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.login-card-header h3 {
  font-size: 1.4rem;
  margin: 0;
}

.login-card-body {
  padding: 2rem 2rem 2.5rem;
  background: white;
}

.login-card-body h5 {
  color: #334155;
  font-weight: 600;
}

/* ========= 3. KARTLAR & KONTEYNERLER ========= */
.card {
  background: var(--ieo-card-bg);
  border: 1px solid var(--ieo-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card-header {
  background: var(--ieo-bg);
  border-bottom: 1px solid var(--ieo-border);
  padding: 1rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-body {
  padding: 1.5rem;
}

/* Hero Cards (Search & Form Header) */
.search-hero-card,
.form-header-card {
  background: #fff;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 0;
  margin-top: -30px; /* Header üzerine binme efekti */
}

/* Form Section Wrapper */
.form-section {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.form-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
}

.form-header-title {
  font-weight: 700;
  color: var(--ieo-primary);
  font-size: 1.125rem !important;
  letter-spacing: 0;
}

.form-header-title i {
  color: var(--ieo-accent);
}

.form-section-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  color: var(--ieo-text-light);
  font-weight: 400;
}

/* ========= 4. BUTONLAR & NAV ========= */
.btn-primary {
  background: var(--ieo-accent);
  border-color: var(--ieo-accent);
  font-weight: 500;
}

.btn-primary:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.btn-outline-primary {
  color: var(--ieo-accent);
  border-color: var(--ieo-accent);
}

.btn-outline-primary:hover {
  background: var(--ieo-accent);
  border-color: var(--ieo-accent);
}

.btn-submit-form {
  background: linear-gradient(135deg, var(--ieo-accent) 0%, var(--ieo-accent-light) 100%);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff !important;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
  transition: all 0.3s ease;
}

.btn-submit-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
  background: linear-gradient(135deg, var(--ieo-accent-light) 0%, var(--ieo-accent) 100%);
}

.nav-tabs .nav-link {
  color: #94a3b8 !important;
  border-bottom: 3px solid transparent !important;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
  color: var(--ieo-primary) !important;
  border-bottom: 3px solid var(--ieo-accent) !important;
  background-color: transparent !important;
  opacity: 1;
}

.nav-tabs .nav-link:hover {
  color: var(--ieo-text) !important;
  opacity: 1;
}

/* Pagination */
#pagination-container .pagination { gap: 0.35rem; }

#pagination-container .page-item .page-link {
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.35rem 0.85rem;
  font-weight: 600;
  background: #fff;
  transition: all 0.15s ease;
}

#pagination-container .page-item.active .page-link {
  background: var(--ieo-accent);
  border-color: var(--ieo-accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

#pagination-container .page-item:not(.active) .page-link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--ieo-accent);
}

#pagination-container .page-item.disabled .page-link { opacity: 0.5; }

/* ========= 5. FORM ELEMANLARI ========= */
.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  transition: all 0.2s ease;
  background: white;
}

.form-control:focus, .form-select:focus {
  border-color: var(--ieo-accent);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
  background: white;
}

.form-control:hover:not(:focus):not(:disabled),
.form-select:hover:not(:focus):not(:disabled) {
  border-color: #cbd5e1;
}

.form-control[readonly], .form-control:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: var(--ieo-text-light);
  cursor: not-allowed;
}

.form-label {
  font-weight: 500;
  color: var(--ieo-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Checkbox Modernization */
.form-check {
  padding: 0.5rem 0.5rem 0.5rem 0 !important;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
  margin-left: 0 !important;
}

.form-check:hover { background: #f8fafc; }

.form-check-input {
  margin-left: 0 !important;
  float: none;
}

.form-check-input:checked {
  background-color: var(--ieo-accent);
  border-color: var(--ieo-accent);
}

.form-check-label {
  color: var(--ieo-text);
  font-weight: 500;
  cursor: pointer;
  margin-left: 0.5rem;
}

/* Filter Section Inputs */
.pill-select, .pill-input {
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  background: #fff;
  font-weight: 600;
  color: #475569;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
}

.pill-select { min-width: 180px; }
.pill-input { min-width: 220px; transition: all 0.15s ease; }

.pill-select:focus,
.pill-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  outline: none;
}

.sort-btn-group {
  background: #f8fafc;
  padding: 4px;
  border-radius: var(--radius-md);
  display: inline-flex;
  border: 1px solid #e2e8f0;
}

.sort-btn-group .btn {
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  color: #64748b;
}

.sort-btn-group .btn.active {
  background: #fff;
  color: var(--ieo-accent);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

/* ========= 6. İLAN & LİSTELEME ========= */
.item-card { transition: transform 0.2s, box-shadow 0.2s; }
.item-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }

.modern-job-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modern-job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: var(--ieo-accent);
}

.job-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.icon-box-pharmacy  { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-box-candidate { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }

.job-meta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: #f1f5f9;
  color: #64748b;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.job-meta-badge i { margin-right: 0.4rem; }

.card-action-area {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid #f1f5f9;
}

.job-description-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.6em;
}

.job-title-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========= 7. PROFİL DETAY & MODAL ========= */
.modal-avatar {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #eef2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.modal-avatar i { font-size: 1.6rem; color: var(--ieo-primary); }

.profile-detail-section {
  padding: 0.85rem 0;
  margin-bottom: 0;
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}

.profile-detail-section:last-child { border-bottom: none; }
.profile-detail-section:hover { background: transparent; }

.profile-detail-section.section-highlighted {
  background: #f8fafc;
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid #e2e8f0;
}

.profile-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
}

.profile-section-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.profile-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.profile-info-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.profile-info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.profile-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ieo-primary);
}

.profile-badge-container { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  gap: 0.35rem;
}

.profile-text-content {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #475569;
  white-space: pre-line;
}

.profile-skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
}

.profile-skill-item {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.profile-skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.profile-skill-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ieo-text);
}

.profile-skill-level {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.profile-skill-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.profile-skill-progress {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.profile-internship-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.profile-internship-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.profile-internship-card.pharmacy::before { background: var(--ieo-success); }
.profile-internship-card.hospital::before { background: var(--ieo-danger); }
.profile-internship-card.company::before  { background: var(--ieo-accent); }

/* Modal Content Scroll */
#detail-desc-content {
  padding-right: 0.5rem;
}

#detail-desc-content::-webkit-scrollbar { width: 8px; }
#detail-desc-content::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
#detail-desc-content::-webkit-scrollbar-thumb { background: var(--ieo-accent); border-radius: 10px; }
#detail-desc-content::-webkit-scrollbar-thumb:hover { background: var(--ieo-accent-light); }

/* Renk Helper'ları */
.text-purple { color: var(--ieo-purple) !important; }
.text-pink   { color: var(--ieo-pink) !important; }
.bg-purple   { background-color: var(--ieo-purple) !important; }
.bg-pink     { background-color: var(--ieo-pink) !important; }

/* ========= 8. YÜKLEME & ANİMASYON ========= */
.fade-target {
  position: relative;
  transition: opacity 260ms ease;
}

.fade-target.loading { opacity: 0.65; }
.fade-target.updating { opacity: 0.4; }

.loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.9));
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
  z-index: 5;
}

.fade-target.loading .loading-overlay { opacity: 1; pointer-events: auto; }

.loading-spinner { text-align: center; padding: 3rem; }
.empty-state { text-align: center; padding: 3rem; color: #94a3b8; }
.empty-state i { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }

/* ========= 9. IKONLAR & FORM AŞAMALARI ========= */
.form-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--ieo-accent) 0%, var(--ieo-accent-light) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.form-section-icon.purple  { background: linear-gradient(135deg, var(--ieo-purple) 0%, var(--ieo-indigo) 100%); box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.form-section-icon.success { background: linear-gradient(135deg, var(--ieo-success) 0%, #34d399 100%); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.form-section-icon.orange  { background: linear-gradient(135deg, var(--ieo-orange) 0%, #fb923c 100%); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }
.form-section-icon.pink    { background: linear-gradient(135deg, var(--ieo-pink) 0%, #f472b6 100%); box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3); }

.view-section { display: none; }
.view-section.active { display: block; }
.guest-step { display: none; }
.guest-step.active { display: block; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

/* ========= 10. RESPONSIVE ========= */
@media (max-width: 768px) {
  .top-actions {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .form-section {
    padding: 1.25rem;
    padding-bottom: 0.75rem;
  }
  
  .form-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .form-header-card > div {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .form-header-title {
    font-size: 1.125rem !important;
  }
  
  #btn-back-to-dashboard {
    width: 100%;
  }

  .profile-info-grid,
  .profile-skill-grid {
    grid-template-columns: 1fr;
  }
}

/* ========= APPLICATIONS (Başvurular) ========= */
.application-item {
  transition: background-color 0.2s ease;
}

.application-item:hover {
  background-color: #f8fafc;
}

.application-item .rounded-circle {
  border: 3px solid var(--ieo-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#app-count-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  vertical-align: middle;
}

#view-applications {
  display: none;
}

#view-applications.active {
  display: block;
}

.application-item .btn-group {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.application-item .dropdown-menu {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--ieo-border);
  border-radius: var(--radius-md);
}

.application-item .dropdown-item {
  padding: 0.5rem 1rem;
  transition: background-color 0.2s ease;
}

.application-item .dropdown-item:hover {
  background-color: #f1f5f9;
}

@media (max-width: 768px) {
  .application-item .col-auto:last-child {
    width: 100%;
  }
  
  .application-item .col-auto:last-child > div {
    width: 100%;
  }
  
  .application-item .d-flex.flex-column {
    flex-direction: column !important;
  }
  
  .application-item .btn {
    width: 100%;
  }
}
