/* 1) Lider paneli: sidebar içerikten bağımsız ve güvenli yerleşim */
  body.admin-mode{
    --admin-sidebar-w:252px;
    --admin-sidebar-gap:24px;
  }
  body.admin-mode .admin-sidebar{
    position:fixed!important;
    left:14px!important;
    top:14px!important;
    bottom:14px!important;
    width:var(--admin-sidebar-w)!important;
    height:auto!important;
    margin:0!important;
    transform:none!important;
    z-index:80!important;
    overflow:hidden auto!important;
  }
  body.admin-mode .wrap{
    box-sizing:border-box!important;
    width:calc(100% - var(--admin-sidebar-w) - var(--admin-sidebar-gap) - 28px)!important;
    max-width:none!important;
    margin:0 14px 0 calc(var(--admin-sidebar-w) + var(--admin-sidebar-gap) + 14px)!important;
    padding:20px 0 70px!important;
  }
  body.admin-mode .topbar{
    width:auto!important;
    margin-left:calc(var(--admin-sidebar-w) + var(--admin-sidebar-gap) + 14px)!important;
    padding-left:0!important;
  }
  body.admin-mode .dash-hero{
    overflow:hidden!important;
    text-align:left!important;
  }
  body.admin-mode .dash-hero h2,
  body.admin-mode .dash-hero p{
    max-width:820px!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Orta ekran: sabit kompakt sidebar, içerik üzerine binmez */
  @media(max-width:1100px) and (min-width:701px){
    body.admin-mode{--admin-sidebar-w:78px;--admin-sidebar-gap:18px}
    body.admin-mode .admin-sidebar{padding:16px 9px!important}
    body.admin-mode .admin-side-brand>div:last-child,
    body.admin-mode .admin-side-nav button span:last-child{display:none!important}
    body.admin-mode .admin-side-nav button{justify-content:center!important}
  }
  @media(max-width:700px){
    body.admin-mode .admin-sidebar{
      left:8px!important;right:8px!important;bottom:8px!important;top:auto!important;
      width:auto!important;height:68px!important;padding:8px 10px!important;
      overflow:visible!important;
    }
    body.admin-mode .wrap{
      width:auto!important;max-width:none!important;margin:0!important;
      padding:14px 12px 96px!important;
    }
    body.admin-mode .topbar{margin-left:0!important}
  }

  /* 2) Faz C: profil ve CRM */
  body.admin-mode .profile-edit,
  body.admin-mode .notes-box,
  body.admin-mode .task-manager,
  body.admin-mode .personal-message-box,
  body.admin-mode .partner-profile-card,
  body.admin-mode .detail-panel{
    padding:22px!important;
    border-radius:18px!important;
    background:linear-gradient(180deg,rgba(18,34,58,.98),rgba(11,24,42,.98))!important;
  }
  body.admin-mode .profile2-highlight,
  body.admin-mode .crm-followup-grid,
  body.admin-mode .mentor-summary{
    gap:14px!important;
  }
  body.admin-mode .profile2-item,
  body.admin-mode .crm-followup-card,
  body.admin-mode .mentor-stat,
  body.admin-mode .identity-item,
  body.admin-mode .detail-stat{
    min-height:92px;
    padding:16px!important;
    background:linear-gradient(145deg,rgba(20,39,65,.92),rgba(13,27,47,.95))!important;
    border:1px solid rgba(148,170,201,.16)!important;
    border-radius:14px!important;
  }
  body.admin-mode .profile2-item:hover,
  body.admin-mode .mentor-stat:hover,
  body.admin-mode .identity-item:hover{
    border-color:rgba(38,209,189,.34)!important;
    transform:translateY(-1px);
  }
  body.admin-mode .profile2-item span,
  body.admin-mode .mentor-stat span,
  body.admin-mode .identity-item span{
    color:#91a5bf!important;
    font-size:11px!important;
    text-transform:uppercase;
    letter-spacing:.065em;
  }
  body.admin-mode .profile2-item b,
  body.admin-mode .mentor-stat b,
  body.admin-mode .identity-item b{
    color:#f3f7ff!important;
  }

  /* CRM alanlarını tek bir profesyonel form sistemine bağla */
  body.admin-mode .profile-edit h3,
  body.admin-mode .task-manager h3,
  body.admin-mode .notes-box h3,
  body.admin-mode .personal-message-box h3{
    font-size:18px!important;
    margin-bottom:16px!important;
  }
  body.admin-mode .crm-followup-grid>div,
  body.admin-mode .field{
    min-width:0;
  }
  body.admin-mode textarea{resize:vertical;line-height:1.55}
  body.admin-mode select option{background:#0b1728;color:#eef5ff}

  /* Mentor paneli */
  body.admin-mode .mentor-access-note{
    padding:15px 17px!important;
    border-radius:14px!important;
    background:linear-gradient(135deg,rgba(138,92,255,.13),rgba(38,209,189,.055))!important;
    border:1px solid rgba(138,92,255,.30)!important;
    color:#d8d0eb!important;
  }
  body.admin-mode .mentor-chip{
    background:rgba(138,92,255,.14)!important;
    border-color:rgba(178,144,255,.30)!important;
    color:#ded2ff!important;
  }

  /* Eğitim merkezi ve içerik kartları */
  body.admin-mode .main-section-card,
  body.admin-mode .subsection-card{
    border-radius:17px!important;
  }
  body.admin-mode .main-section-head{
    padding:18px 20px!important;
    min-height:76px!important;
  }
  body.admin-mode .subsection-head{
    min-height:62px!important;
    padding:14px 16px!important;
  }
  body.admin-mode .module-tree-row{
    min-height:54px;
    padding:12px 14px!important;
  }
  body.admin-mode .module-tree-row:hover{
    background:linear-gradient(90deg,rgba(38,209,189,.055),rgba(138,92,255,.025))!important;
  }

  /* Tablolar: okunaklı, sabit ve premium */
  body.admin-mode table{
    width:100%;border-collapse:separate!important;border-spacing:0;
    overflow:hidden;border-radius:14px;
  }
  body.admin-mode thead th{
    height:44px;padding:11px 13px!important;
    background:#0d1c31!important;
    position:sticky;top:0;z-index:2;
  }
  body.admin-mode tbody td{padding:13px!important}
  body.admin-mode tbody tr:nth-child(even) td{background:rgba(255,255,255,.012)}
  body.admin-mode tbody tr:hover td{background:rgba(38,209,189,.035)!important}
  body.admin-mode .table-avatar{box-shadow:0 0 0 2px rgba(38,209,189,.13)}

  /* Modal ve detay görünümü */
  body.admin-mode .modal,
  body.partner-mode .modal{
    border:1px solid rgba(151,174,205,.22)!important;
    background:linear-gradient(180deg,#132641,#0c1a2e)!important;
  }
  .modal-close{
    background:rgba(255,255,255,.045)!important;
    color:#eaf2ff!important;
    border:1px solid var(--v5-line)!important;
  }

  /* 3) Checklist: açık zemin + açık yazı çatışmasını tamamen temizle */
  body.partner-mode .section-checklist{
    background:linear-gradient(180deg,#12253f,#0d1c31)!important;
    border-color:rgba(148,170,201,.18)!important;
  }
  body.partner-mode .checklist-title,
  body.partner-mode .checklist-row b{
    color:#f0f5ff!important;
  }
  body.partner-mode .checklist-row{
    border-bottom-color:rgba(148,170,201,.18)!important;
  }
  body.partner-mode .checklist-row:hover{
    background:rgba(255,255,255,.018)!important;
  }
  body.partner-mode .checklist-row .muted,
  body.partner-mode .checklist-row small{
    color:#9fb1c8!important;
  }
  body.partner-mode .checklist-next{
    margin-top:14px!important;
    padding:13px 15px!important;
    border-radius:12px!important;
    background:linear-gradient(135deg,rgba(38,209,189,.09),rgba(138,92,255,.065))!important;
    border:1px solid rgba(38,209,189,.20)!important;
    color:#c8d8eb!important;
    font-weight:700!important;
  }
  body.partner-mode .section-checklist.complete .checklist-next{
    background:rgba(48,213,139,.10)!important;
    border-color:rgba(48,213,139,.28)!important;
    color:#c9f8e2!important;
  }
  body.partner-mode .checklist-badge{
    background:rgba(255,255,255,.055)!important;
    border:1px solid rgba(148,170,201,.18)!important;
    color:#c3d0df!important;
  }
  body.partner-mode .checklist-icon{
    background:#e9f0f3!important;
    color:#657783!important;
  }
  body.partner-mode .checklist-row.done .checklist-icon{
    background:linear-gradient(135deg,#19a99d,#26d1bd)!important;
    color:#041614!important;
  }
  body.partner-mode .task-check{
    accent-color:#20b6a8!important;
  }

  /* Faz C responsive */
  @media(max-width:900px){
    body.admin-mode .profile2-highlight,
    body.admin-mode .mentor-summary{grid-template-columns:repeat(2,1fr)!important}
    body.admin-mode .crm-followup-grid{grid-template-columns:1fr!important}
  }
  @media(max-width:560px){
    body.admin-mode .profile2-highlight,
    body.admin-mode .mentor-summary{grid-template-columns:1fr!important}
    body.admin-mode .profile-edit,
    body.admin-mode .notes-box,
    body.admin-mode .task-manager,
    body.admin-mode .personal-message-box{padding:17px!important}
  }

  /* =========================================================
     V6.4 FAZ D — SON CİLA, MENTOR ATAMA VE DASHBOARD DENGESİ
     ========================================================= */

  /* Kariyer + lider mesajı artık yatay ve dengeli */
  body.partner-mode .partner-dashboard-grid{
    display:grid!important;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;
    gap:18px!important;
    align-items:stretch!important;
  }
  body.partner-mode .career-card,
  body.partner-mode .leader-message-card.v53{
    min-width:0!important;
    min-height:230px!important;
    height:auto!important;
  }
  body.partner-mode .career-card{
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    padding:26px!important;
  }
  body.partner-mode .career-card h3{
    font-size:20px!important;
    margin-bottom:18px!important;
  }
  body.partner-mode .career-path{
    gap:12px!important;
    margin:4px 0 22px!important;
  }
  body.partner-mode .career-node{
    padding:9px 14px!important;
  }
  body.partner-mode .leader-message-card.v53{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 116px!important;
    align-items:center!important;
    gap:24px!important;
    padding:27px!important;
  }
  body.partner-mode .leader-message-card.v53 h3{
    font-size:20px!important;
    margin-bottom:8px!important;
  }
  body.partner-mode .leader-message-quote{
    font-size:20px!important;
    line-height:1.48!important;
    max-width:720px!important;
  }
  body.partner-mode .leader-message-portrait{
    width:112px!important;
    height:148px!important;
    border-radius:20px!important;
    overflow:hidden!important;
    justify-self:end!important;
  }
  body.partner-mode .leader-message-author{
    margin-top:18px!important;
  }

  /* Mentor atama merkezi */
  .mentor-assign-panel{
    margin-bottom:16px!important;
    padding:22px!important;
    border-radius:22px!important;
    background:
      radial-gradient(circle at 95% 0%,rgba(138,92,255,.14),transparent 35%),
      linear-gradient(145deg,rgba(20,38,63,.96),rgba(11,25,43,.98))!important;
    border:1px solid rgba(216,194,143,.22)!important;
    box-shadow:0 16px 42px rgba(0,0,0,.22)!important;
  }
  .mentor-assign-head{
    display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px;
  }
  .mentor-assign-head h3{margin:0 0 5px!important}
  .mentor-assign-head p{margin:0!important;color:var(--wt-muted)!important;font-size:12px}
  .mentor-assign-grid{
    display:grid;grid-template-columns:minmax(220px,1.15fr) minmax(220px,1fr) auto;
    gap:12px;align-items:end;
  }
  .mentor-assign-grid .btn{min-width:155px}
  .mentor-empty{
    padding:22px!important;border-radius:16px!important;
    background:rgba(255,255,255,.025)!important;
    border:1px dashed rgba(143,169,200,.23)!important;
    color:var(--wt-muted)!important;text-align:center!important;
  }

  /* Faz D: tablo ve yatay taşma kontrolü */
  .table-shell{
    width:100%;overflow-x:auto;border-radius:16px;
    scrollbar-width:thin;scrollbar-color:rgba(79,213,199,.35) rgba(255,255,255,.04);
  }
  .table-shell table{min-width:920px}
  .table-shell::-webkit-scrollbar{height:8px}
  .table-shell::-webkit-scrollbar-track{background:rgba(255,255,255,.04);border-radius:99px}
  .table-shell::-webkit-scrollbar-thumb{background:rgba(79,213,199,.34);border-radius:99px}
  body.admin-mode .card[style*="overflow-x:auto"]{overflow:hidden!important}
  body.admin-mode table{width:100%!important}

  /* Son kontrast temizliği */
  .empty-mini,.mentor-access-note,.checklist-remaining,.section-checklist-footer{
    color:#b9c8da!important;
  }
  .empty-mini{
    background:rgba(255,255,255,.025)!important;
    border:1px dashed rgba(143,169,200,.25)!important;
  }
  .status-chip,.mentor-chip,.code-chip{font-weight:800!important}
  select option{background:#0c1a2c!important;color:#f3f7ff!important}
  input::placeholder,textarea::placeholder{color:#667b94!important}

  /* Mikro hareketler */
  @keyframes wtFadeUp{
    from{opacity:0;transform:translateY(8px)}
    to{opacity:1;transform:translateY(0)}
  }
  .modal{animation:wtFadeUp .24s var(--wt-ease)}
  .notification-row,.mentor-stat,.profile2-item{
    animation:wtFadeUp .28s var(--wt-ease) both;
  }
  .bar i{transition:width .55s var(--wt-ease)!important}
  .status-chip,.mentor-chip{transition:transform .2s ease,filter .2s ease}
  .status-chip:hover,.mentor-chip:hover{transform:translateY(-1px);filter:brightness(1.06)}

  @media(max-width:980px){
    body.partner-mode .partner-dashboard-grid{
      grid-template-columns:1fr!important;
    }
    body.partner-mode .career-card,
    body.partner-mode .leader-message-card.v53{
      min-height:auto!important;
    }
    .mentor-assign-grid{
      grid-template-columns:1fr 1fr;
    }
    .mentor-assign-grid .btn{
      grid-column:1/-1;width:100%;
    }
  }
  @media(max-width:650px){
    body.partner-mode .leader-message-card.v53{
      grid-template-columns:1fr!important;
    }
    body.partner-mode .leader-message-portrait{display:none!important}
    .mentor-assign-grid{grid-template-columns:1fr}
    .mentor-assign-grid .btn{grid-column:auto}
    .mentor-assign-head{flex-direction:column}
  }

  @media(prefers-reduced-motion:reduce){
    .modal,.notification-row,.mentor-stat,.profile2-item{animation:none!important}
    .bar i{transition:none!important}
  }
