/* =========================================================
   WELLTEAM OS V3.0.7 — AKILLI TAKİP / MARKA ORTAKLARI

   Bu katman yalnızca Marka Ortakları ekranına uygulanır. Genel dashboard,
   mentorluk, liderler ve eğitim mimarisi responsive kurallarını değiştirmez.
   ========================================================= */

body.admin-mode .smart-follow-screen,
body.admin-mode .smart-follow-screen *{
  box-sizing:border-box;
}

body.admin-mode .smart-follow-screen{
  width:100%;
  min-width:0;
  max-width:100%;
}

body.admin-mode .smart-follow-screen .card{
  min-width:0;
  max-width:100%;
}

body.admin-mode .smart-follow-add .row{
  align-items:end;
  min-width:0;
}

body.admin-mode .smart-follow-add .row>div,
body.admin-mode .smart-follow-filters .crm-toolbar>*{
  min-width:0!important;
}

body.admin-mode .smart-follow-add input,
body.admin-mode .smart-follow-add select,
body.admin-mode .smart-follow-filters input,
body.admin-mode .smart-follow-filters select{
  width:100%;
  min-width:0;
}

body.admin-mode .smart-follow-filters .crm-summary{
  min-width:0;
}

body.admin-mode .smart-follow-filters .crm-summary>div{
  min-width:0;
}

body.admin-mode .smart-follow-table-card{
  padding:0!important;
  overflow:hidden!important;
}

body.admin-mode .smart-follow-table-shell{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  -webkit-overflow-scrolling:touch;
}

body.admin-mode .smart-follow-table{
  width:100%!important;
  min-width:980px!important;
  table-layout:auto;
  border-radius:0!important;
}

body.admin-mode .smart-follow-table th,
body.admin-mode .smart-follow-table td{
  vertical-align:middle;
}

body.admin-mode .smart-follow-table .table-person{
  width:auto;
  min-width:170px;
  max-width:240px;
}

body.admin-mode .smart-follow-table .table-person .partner-link{
  display:block;
  min-width:0;
  max-width:180px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.admin-mode .smart-follow-table .mentor-chip,
body.admin-mode .smart-follow-table .code-chip,
body.admin-mode .smart-follow-table .crm-status{
  max-width:100%;
}

body.admin-mode .smart-follow-actions{
  justify-content:flex-end;
  flex-wrap:nowrap!important;
  gap:7px;
}

body.admin-mode .smart-follow-actions .btn{
  flex:0 0 auto!important;
}

/* Compact desktop: filtreleri iki dengeli satıra böl. */
@media (min-width:981px) and (max-width:1279px){
  body.admin-mode .smart-follow-filters .crm-toolbar{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  body.admin-mode .smart-follow-filters .crm-search{
    grid-column:1/-1!important;
  }

  body.admin-mode .smart-follow-table{
    min-width:940px!important;
  }
}

/* Tablet: form ve filtreler iki sütun, tablo kontrollü yatay kaydırma. */
@media (min-width:701px) and (max-width:980px){
  body.admin-mode .smart-follow-add .row{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px!important;
  }

  body.admin-mode .smart-follow-add .row>div{
    width:auto!important;
    min-width:0!important;
  }

  body.admin-mode .smart-follow-add .row>div:last-child:has(.btn){
    grid-column:1/-1;
  }

  body.admin-mode .smart-follow-add .row>div:last-child:has(.btn) .btn{
    width:100%;
    justify-content:center;
  }

  body.admin-mode .smart-follow-filters .crm-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.admin-mode .smart-follow-filters .crm-search{
    grid-column:1/-1!important;
  }

  body.admin-mode .smart-follow-table{
    min-width:900px!important;
  }
}

/* Telefon: tablo satırları erişilebilir kartlara dönüşür. */
@media (max-width:700px){
  body.admin-mode .smart-follow-screen{
    padding-bottom:4px;
  }

  body.admin-mode .smart-follow-add,
  body.admin-mode .smart-follow-filters{
    padding:16px!important;
    border-radius:17px!important;
  }

  body.admin-mode .smart-follow-add .row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  body.admin-mode .smart-follow-add .row>div{
    width:100%!important;
    min-width:0!important;
  }

  body.admin-mode .smart-follow-add .row .btn{
    width:100%;
    min-height:48px;
    justify-content:center;
  }

  body.admin-mode .smart-follow-filters .crm-summary{
    display:grid!important;
    grid-template-columns:1fr;
    align-items:start!important;
    gap:12px!important;
  }

  body.admin-mode .smart-follow-filters .crm-summary .btn{
    width:100%;
    justify-content:center;
  }

  body.admin-mode .smart-follow-filters .crm-toolbar{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  body.admin-mode .smart-follow-filters .crm-search{
    grid-column:auto!important;
  }

  body.admin-mode .smart-follow-table-card{
    padding:0!important;
    overflow:visible!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }

  body.admin-mode .smart-follow-table-shell{
    overflow:visible!important;
  }

  body.admin-mode .smart-follow-table,
  body.admin-mode .smart-follow-table tbody,
  body.admin-mode .smart-follow-table tr,
  body.admin-mode .smart-follow-table td{
    display:block;
    width:100%!important;
    min-width:0!important;
  }

  body.admin-mode .smart-follow-table thead{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }

  body.admin-mode .smart-follow-table tbody{
    display:grid;
    gap:12px;
  }

  body.admin-mode .smart-follow-table tr{
    padding:14px;
    border:1px solid var(--v5-line,rgba(143,172,208,.16));
    border-radius:17px;
    background:linear-gradient(180deg,rgba(18,33,56,.98),rgba(12,25,44,.97));
    box-shadow:0 12px 30px rgba(0,0,0,.14);
    overflow:hidden;
  }

  body.admin-mode .smart-follow-table td{
    display:grid!important;
    grid-template-columns:minmax(88px,34%) minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-height:48px;
    padding:9px 0!important;
    border:0!important;
    border-bottom:1px solid var(--v5-line,rgba(143,172,208,.16))!important;
    background:transparent!important;
    color:var(--v5-text,#f4f7fb);
    overflow-wrap:anywhere;
  }

  body.admin-mode .smart-follow-table td:last-child{
    border-bottom:0!important;
    padding-bottom:0!important;
  }

  body.admin-mode .smart-follow-table td::before{
    content:attr(data-label);
    color:var(--v5-muted,#91a4bd);
    font-size:10px;
    font-weight:800;
    letter-spacing:.07em;
    line-height:1.3;
    text-transform:uppercase;
  }

  body.admin-mode .smart-follow-table .table-person{
    width:100%;
    min-width:0;
    max-width:100%;
    gap:10px;
  }

  body.admin-mode .smart-follow-table .table-person .partner-link{
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
    text-align:left;
  }

  body.admin-mode .smart-follow-table .mentor-chip,
  body.admin-mode .smart-follow-table .code-chip,
  body.admin-mode .smart-follow-table .crm-status{
    justify-self:start;
    white-space:normal;
    overflow-wrap:anywhere;
  }

  body.admin-mode .smart-follow-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100%;
    gap:8px!important;
  }

  body.admin-mode .smart-follow-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:46px;
    justify-content:center;
  }
}

@media (max-width:420px){
  body.admin-mode .smart-follow-table td{
    grid-template-columns:82px minmax(0,1fr);
  }
}

@media (pointer:coarse){
  body.admin-mode .smart-follow-screen .btn,
  body.admin-mode .smart-follow-screen input,
  body.admin-mode .smart-follow-screen select{
    min-height:44px;
  }
}
