/* =====================================================================
 * PERSONEL YÖNETİMİ MODÜLÜ STİLLERİ (assets/personel.css)
 * Mevcut Santix Tasarım Diliyle %100 Uyumlu Tam Ekran Katman
 * ===================================================================== */

.pr-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #f3f5f7;
  color: #171b20;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pr-screen.hidden {
  display: none !important;
}

#prPersonelModal,
#prListeYonetimModal,
#prTransferModal,
#prArsivOnayModal,
#prArsivModal,
#prImportModal,
#prExportModal {
  z-index: 70;
}

/* MODAL İÇİ FORM, SATIR VE BUTON DÜZENİ (app.css width:100% ve margin çakışmalarını önler) */
#prPersonelModal .row2,
#prListeYonetimModal .row2,
#prImportModal .row2 {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

#prPersonelModal .row3,
#prListeYonetimModal .row3,
#prImportModal .row3 {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

#prPersonelModal .row2 > .field,
#prListeYonetimModal .row2 > .field,
#prImportModal .row2 > .field,
#prPersonelModal .row3 > .field,
#prListeYonetimModal .row3 > .field,
#prImportModal .row3 > .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

#prPersonelModal .btn-primary,
#prListeYonetimModal .btn-primary,
#prTransferModal .btn-primary,
#prArsivOnayModal .btn-primary,
#prArsivModal .btn-primary,
#prImportModal .btn-primary,
#prExportModal .btn-primary {
  width: auto;
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#prPersonelModal .btn-ghost,
#prListeYonetimModal .btn-ghost,
#prTransferModal .btn-ghost,
#prArsivOnayModal .btn-ghost,
#prArsivModal .btn-ghost,
#prImportModal .btn-ghost,
#prExportModal .btn-ghost {
  width: auto;
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#prPersonelModal .btn-ghost:hover,
#prListeYonetimModal .btn-ghost:hover,
#prTransferModal .btn-ghost:hover,
#prArsivOnayModal .btn-ghost:hover,
#prArsivModal .btn-ghost:hover,
#prImportModal .btn-ghost:hover,
#prExportModal .btn-ghost:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.pr-tip-form-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.pr-tip-form-row > .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}

.pr-tip-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pr-tip-form-actions .btn-ghost,
.pr-tip-form-actions .btn-primary {
  height: 43px;
  box-sizing: border-box;
}

@media (max-width: 680px) {
  #prPersonelModal .row2,
  #prListeYonetimModal .row2,
  #prImportModal .row2,
  #prPersonelModal .row3,
  #prListeYonetimModal .row3,
  #prImportModal .row3,
  .pr-tip-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .pr-tip-form-actions {
    justify-content: flex-end;
  }
}

/* ÜST BAŞLIK (HEADER) */
.pr-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 8px 16px;
  background: #20262e;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.pr-head .brand {
  color: #fff;
  text-decoration: none;
}

.pr-head .brand small {
  display: block;
  color: #a9b2bc;
  font-size: 11px;
  font-weight: 500;
}

.pr-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pr-head .btn-ghost {
  color: #eef2f5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  min-height: 36px;
  padding: 0 11px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pr-head .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.pr-home-icon {
  display: none;
}

/* İSTATİSTİK PİLLERİ */
.pr-stats-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.pr-stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pr-stat-pill small {
  color: #94a3b8;
  font-size: 11px;
}

.pr-primary-btn {
  background: #d97706;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.pr-primary-btn:hover {
  background: #b45309;
}

/* ANA İKİ SÜTUNLU YERLEŞİM */
.pr-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* SOL KENAR ÇUBUĞU: ANA LİSTELER */
.pr-sidebar {
  width: 245px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pr-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.5px;
}

.pr-mini-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.pr-mini-btn:hover {
  background: #e2e8f0;
}

.pr-list-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pr-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 11px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s;
}

.pr-list-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.pr-list-item.on {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
}

.pr-list-item.pasif {
  opacity: 0.6;
}

.pr-list-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pr-list-item-count {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.pr-list-item.on .pr-list-item-count {
  background: #dbeafe;
  color: #1e40af;
}

.pr-list-sep {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 4px;
}

/* SAĞ ANA İÇERİK ALANI */
.pr-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px;
  overflow-y: auto;
}

/* ALT LİSTE ÇİPLERİ BARI */
.pr-sublist-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.pr-sublist-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pr-sub-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s;
}

.pr-sub-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.pr-sub-chip.on {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.pr-sub-chip small {
  opacity: 0.78;
  font-size: 11px;
}

.pr-sublist-add-btn {
  background: #f0fdf4;
  border: 1px dashed #22c55e;
  color: #15803d;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.pr-sublist-add-btn:hover {
  background: #dcfce7;
}

/* ARAÇ ÇUBUĞU (TOOLBAR) */
.pr-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.pr-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pr-current-scope {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.pr-scope-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.pr-transfer-bulk-btn {
  background: #0284c7;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pr-transfer-bulk-btn:hover {
  background: #0369a1;
}

.pr-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pr-select {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
}

.pr-select:focus {
  border-color: #d97706;
  background: #fff;
}

.pr-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pr-search-input {
  width: 270px;
  padding: 7px 28px 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
}

.pr-search-input::-webkit-search-cancel-button,
.pr-search-input::-webkit-search-decoration,
.pr-search-input::-webkit-search-results-button,
.pr-search-input::-webkit-search-results-decoration,
.pr-search-input::-ms-clear {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
}

.pr-search-input:focus {
  border-color: #d97706;
  background: #fff;
}

.pr-search-clear {
  position: absolute;
  right: 5px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 5px;
}

/* PERSONEL TABLOSU */
.pr-table-wrap {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  flex: 1;
}

/* YÜKLENİYOR ÇUBUĞU, DURUM PİLİ VE TABLO YÜKLEME KATMANI */
.pr-top-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 80;
  overflow: hidden;
  background: rgba(217, 119, 6, 0.2);
}

.pr-top-loader.hidden {
  display: none !important;
}

.pr-top-loader-bar {
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #10b981);
  animation: prTopLoadAnim 1.05s infinite ease-in-out;
}

@keyframes prTopLoadAnim {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(260%); }
}

.pr-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.pr-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.pr-sync-pill.is-loading {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fde68a;
}

.pr-sync-pill.is-loading .pr-sync-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  animation: prPulseDot 0.9s infinite alternate;
}

.pr-sync-pill.is-error {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}

.pr-sync-pill.is-error .pr-sync-dot {
  background: #ef4444;
}

@keyframes prPulseDot {
  from { opacity: 0.4; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.18); }
}

.pr-table-loading {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  justify-content: center;
  padding: 12px;
  pointer-events: none;
}

.pr-table-loading.hidden {
  display: none !important;
}

.pr-loading-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}

.pr-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: prSpin 0.7s linear infinite;
}

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

.pr-refresh-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pr-refresh-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* SÜRÜKLE VE BIRAK (DRAG & DROP) STİLLERİ */
.pr-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 5px;
  cursor: grab;
  font-size: 13px;
  line-height: 1;
  margin-right: 5px;
  user-select: none;
  touch-action: none;
  vertical-align: middle;
  transition: all 0.12s;
}

.pr-drag-handle:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.pr-drag-handle:active {
  cursor: grabbing;
}

.pr-list-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: grab;
  font-size: 12px;
  padding: 0 3px;
  margin-right: 3px;
  user-select: none;
  touch-action: none;
}

.pr-list-drag-handle:hover {
  color: #0f172a;
}

.pr-sub-chip .pr-list-drag-handle {
  color: inherit;
  opacity: 0.65;
  margin-right: 2px;
}

.pr-dragging {
  opacity: 0.45 !important;
  background: #eff6ff !important;
  outline: 2px dashed #3b82f6 !important;
}

.pr-drop-before {
  box-shadow: inset 0 3px 0 0 #2563eb !important;
}

.pr-drop-after {
  box-shadow: inset 0 -3px 0 0 #2563eb !important;
}

.pr-sub-chip.pr-drop-before {
  box-shadow: -3px 0 0 0 #2563eb !important;
}

.pr-sub-chip.pr-drop-after {
  box-shadow: 3px 0 0 0 #2563eb !important;
}

.pr-drop-target-active {
  background: #dbeafe !important;
  border-color: #2563eb !important;
  color: #1e3a8a !important;
  transform: scale(1.02);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25) !important;
}

.pr-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #0f172a;
  color: #fff;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pr-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 20px;
  color: #475569;
}

.pr-empty-box b {
  font-size: 14px;
  color: #0f172a;
}

.pr-empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.pr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.pr-table thead tr {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.pr-table th {
  padding: 10px 11px;
  font-weight: 700;
  color: #475569;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.pr-table td {
  padding: 9px 11px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.pr-table tbody tr:hover {
  background: #f8fafc;
}

.pr-table tbody tr.pr-row-exited {
  background: #fafafa;
  color: #64748b;
}

.pr-table tbody tr.pr-row-ihtar {
  background: #fffbeb;
}

/* ROZETLER (BADGES) */
.pr-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.pr-badge-list {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.pr-badge-sublist {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.pr-badge-type {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.pr-badge-aktif {
  background: #dcfce7;
  color: #166534;
}

.pr-badge-ihtar {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.pr-badge-cikis {
  background: #fee2e2;
  color: #991b1b;
}

/* SATIR İŞLEM BUTONLARI */
.pr-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
}

.pr-act-btn {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  white-space: nowrap;
}

.pr-act-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pr-act-btn.transfer {
  color: #0369a1;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.pr-act-btn.transfer:hover {
  background: #e0f2fe;
}

.pr-act-btn.danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.pr-act-btn.danger:hover {
  background: #fee2e2;
}

/* YÖNETİM MODALI LİSTE KARTLARI */
.pr-manage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pr-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.pr-manage-row.pasif {
  opacity: 0.65;
  background: #f8fafc;
}

.pr-manage-info b {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
}

.pr-manage-info small {
  color: #64748b;
  font-size: 12px;
}

.pr-manage-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* MOBİL UYUMLULUK */
@media (max-width: 960px) {
  .pr-stats-pills {
    display: none;
  }
  .pr-layout {
    flex-direction: column;
    overflow-y: auto;
  }
  .pr-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    max-height: 155px;
  }
  .pr-list-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .pr-list-item {
    width: auto;
    white-space: nowrap;
  }
  .pr-main {
    overflow-y: visible;
    padding: 10px;
  }
  .pr-search-input {
    width: 100%;
  }
}
