/* ================================================================
   CTECH SERVICE PLATFORM — COLLECTIVES.CSS
   Kollektiv haqqında görünüşü (cl-*) — masaüstü modal + mobil
   Dark mode: yalnız bu faylın elementlərinə aid hissələr
   ================================================================ */

/* ═══════════════════════════════════════════════════════════════
   COLLECTIVES — Kollektiv haqqında (tam səhifə, yalnız veb)
   ═══════════════════════════════════════════════════════════════ */

#collectivesView{
  display:none;
  position:fixed; top:0; left:0; width:100%; height:100%;
  background:rgba(232,240,253,0.92);
  backdrop-filter:blur(2px);
  z-index:70;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
}
body.dark-mode #collectivesView{ background:rgba(9,16,28,0.88); }

/* Mobil və kiçik ekranlarda gizlət */
@media (max-width:900px) {
  #collectivesBtn { display:none !important; }
  #collectivesView { display:none !important; }
}

/* ── Collectives Modal (desktop) ── */
/* v4.62: rəngli gradient GERİ ALINDI — təmiz neytral fon (v4.60-dan əvvəlki hal). */
.cl-modal-box { position:relative; width:97vw; max-width:1500px; height:92vh; max-height:92vh; border-radius:22px; overflow:hidden; box-shadow:0 40px 90px rgba(18,35,59,.30); display:flex; flex-direction:column; background:#FFFFFF; }
body.dark-mode .cl-modal-box { background:#131E2C; }
.cl-modal-close { z-index:10; }
/* v4.62: məzmun lazım gəldikdə rahat scroll edir — pəncərə özü çox uzun deyil. */
.cl-modal-content { position:relative; z-index:2; overflow-y:auto; padding:14px 24px 12px; height:100%; scrollbar-width:thin; }
.cl-page-title { margin-bottom:8px; padding-bottom:8px; border-bottom:1px solid rgba(225,234,246,0.8); }
.cl-page-title-main { font-family:'Rajdhani',sans-serif; font-weight:700; font-size:20px; color:#12233B; letter-spacing:.3px; }
.cl-page-title-sub { font-size:11.5px; color:#5C7089; margin-top:1px; }
body.dark-mode .cl-page-title-main{ color:#E8EEF5; }
body.dark-mode .cl-page-title-sub{ color:#8CA0BC; }

/* Mobil — köhnə tam səhifə saxlanır */
@media(max-width:900px) {
  .cl-modal-box { width:100%; max-width:100%; max-height:100vh; border-radius:0; }
  .cl-modal-content { padding:20px 16px 40px; }
  .cl-modal-close { display:none; }
}
.cl-footer-note{ text-align:center; padding:20px 0 32px; font-size:12.5px; color:#8CA0BC; }

/* Direktor — xüsusi, mərkəzləşdirilmiş kart */
.cl-director-card{ display:flex; justify-content:center; margin-bottom:6px; }
.cl-director-row{
  display:flex; align-items:center; gap:10px;
  background:#FFFFFF; border:1px solid #E1EAF6; border-radius:12px;
  padding:7px 20px; box-shadow:0 10px 26px rgba(30,68,130,0.09);
  min-width:280px;
}
body.dark-mode .cl-director-row{ background:#16212E; border-color:#4A6182; }
.cl-director-avatar{
  width:36px; height:36px; border-radius:9px; flex-shrink:0;
  background:#E6F1FB; color:#2F6FED;
  display:flex; align-items:center; justify-content:center;
}
body.dark-mode .cl-director-avatar{ background:#1C2A3D; color:#8FB4EA; }
.cl-director-label{ font-size:11.5px; font-weight:700; color:#2F6FED; }
.cl-director-name{ font-size:15px; font-weight:800; color:#12233B; margin-top:1px; }
body.dark-mode .cl-director-name{ color:#E8EEF5; }


/* 4 sütunlu grid (masaüstü üçün sabit) */
.cl-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
}
@media (max-width:1150px){
  .cl-grid{ grid-template-columns:repeat(2, 1fr); }
}

/* İşçi kartı */
/* v4.60: kartlar ağ qalır, üzərində yumşaq rəngli fon — banner yoxdur. */
.cl-card {
  background:#FFFFFF;
  border:1px solid #E1EAF6;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(30,68,130,0.07);
  transition:transform .18s ease, box-shadow .18s ease;
}
.cl-card:hover {
  transform:translateY(-3px);
  box-shadow:0 14px 30px rgba(30,68,130,0.13);
}

body.dark-mode .cl-card {
  background:#16212E;
  border-color:#4A6182;
}

.cl-header {
  display:flex;
  align-items:center;
  gap:7px;
  padding:6px 10px;
  border-bottom:3px solid #2F6FED;
  background:#F8FAFD;
}

body.dark-mode .cl-header {
  background:#1C2A3D;
}

.cl-icon {
  width:26px;
  height:26px;
  border-radius:7px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.cl-icon svg{ width:14px; height:14px; }

.cl-title {
  flex:1;
  font-weight:700;
  font-size:12.5px;
  color:#12233B;
  letter-spacing:0.3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

body.dark-mode .cl-title {
  color:#E8EEF5;
}

.cl-badge {
  padding:1px 9px;
  border-radius:20px;
  font-size:10px;
  font-weight:700;
  color:#1B4A8A;
  background:#E6F1FB;
  white-space:nowrap;
}

body.dark-mode .cl-badge {
  background:#1C2A3D;
  color:#8FB4EA;
}

.cl-list {
  padding:4px 10px 8px;
}

.cl-row {
  display:flex;
  align-items:center;
  gap:8px;
  padding:2px 0;
  border-bottom:1px solid #F0F5FC;
}

.cl-row:last-child {
  border-bottom:none;
}

body.dark-mode .cl-row {
  border-bottom-color:#1C2A3D;
}

.cl-avatar {
  width:20px;
  height:20px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:9.5px;
  font-weight:700;
  flex-shrink:0;
}

/* v4.62: ad ÜSTDƏ, vəzifə onun ALTINDA — səliqəli yığın (JS eyni inline style qoyur) */
.cl-info {
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:0;
  min-width:0;
}

.cl-name {
  font-size:12.5px;
  font-weight:600;
  color:#12233B;
  line-height:1.25;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}

body.dark-mode .cl-name {
  color:#E8EEF5;
}

.cl-title-text {
  font-size:10.5px;
  color:#5C7089;
  line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}

body.dark-mode .cl-title-text {
  color:#8CA0BC;
}

/* Admin panel Collectives siyahısı */
#admCollectivesList .adm-reorder-row .adm-reorder-num {
  width:24px;
  height:24px;
  border-radius:7px;
  background:#EEF3FC;
  color:#8CA0BC;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  flex-shrink:0;
}

body.dark-mode #admCollectivesList .adm-reorder-row .adm-reorder-num {
  background:#1C2A3D;
  color:#8FA0B8;
}

/* v4.52: alçaq pəncərələr (məs. 1366x640 laptop) üçün əlavə yığcamlaşdırma */
@media (max-height:640px){
  .cl-modal-content{ padding:8px 16px 6px; }
  .cl-page-title{ margin-bottom:4px; padding-bottom:4px; }
  .cl-page-title-main{ font-size:16px; }
  .cl-page-title-sub{ font-size:10px; }
  .cl-director-card{ margin-bottom:3px; }
  .cl-director-row{ padding:4px 14px; }
  .cl-director-avatar{ width:30px; height:30px; }
  .cl-director-name{ font-size:13px; }
  .cl-grid{ gap:8px; }
  .cl-row{ padding:1px 0; }
  .cl-header{ padding:4px 8px; }
  .cl-list{ padding:2px 8px 4px; }
  .cl-icon{ width:22px; height:22px; }
  .cl-badge{ font-size:9.5px; padding:0 7px; }
  .cl-avatar{ width:18px; height:18px; }
}
