/* BEHIN V7: Tek tip, okunabilir, tum panel sayfalarinda ortak ust alan.
 * Yalniz panel basligini/ozetini/filtrelerini etkiler; tablolara ve veri motoruna dokunmaz.
 * Onceki 7.5/8.5 px sikistirma kurallarini bu kapsamda gecersiz kilar.
 */
body .content .behin-unified-page-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  gap: 12px;
  height: auto;
  padding: 14px 16px !important;
  margin: 0 0 12px;
  overflow: visible;
  border: 1px solid #c6dcf0;
  border-left: 4px solid #0b84d9;
  border-radius: 14px;
  background: linear-gradient(115deg,#ffffff 0%,#f7fbff 100%);
  box-shadow: 0 2px 11px rgba(17,55,85,.06);
}
body .content .behin-unified-page-head .behin-unified-page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  min-width: 0;
}
body .content .behin-unified-page-head .page-head-copy {
  flex: 1 1 200px;
  min-width: 0;
  align-self: center;
}
body .content .behin-unified-page-head .page-context {
  display: block;
  font-size: 10px;
  line-height: 1.25;
  margin: 0 0 3px;
  letter-spacing: .035em;
}
body .content .behin-unified-page-head .page-title,
body.compact-backoffice-ui .content .behin-unified-page-head .page-title {
  font-size: clamp(18px,1.4vw,23px) !important;
  line-height: 1.2;
  font-weight: 850;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
body .content .behin-unified-page-head .page-description {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
}
body .content .behin-unified-page-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
body .content .behin-unified-page-actions .working-period-field {
  display: grid;
  gap: 4px;
  min-width: 175px;
  flex: 0 0 auto;
  margin: 0;
}
body .content .behin-unified-page-actions .working-period-field > span {
  display: block;
  font-size: 12px !important;
  font-weight: 800;
  color: #285070;
  margin: 0;
  line-height: 1.2;
}
body .content .behin-unified-page-actions .working-period-field select,
body.compact-backoffice-ui .content .behin-unified-page-actions .working-period-field select {
  width: 185px;
  min-width: 0;
  max-width: 100%;
  height: 40px !important;
  min-height: 40px !important;
  padding: 7px 10px !important;
  color: #102f4c;
  background: #fff;
  border: 1px solid #b9cede;
  border-radius: 8px;
  font-size: 13px !important;
  font-weight: 750;
  cursor: pointer;
}
body .content .behin-unified-page-actions .btn,
body.compact-backoffice-ui .content .behin-unified-page-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px !important;
  height: auto !important;
  min-width: 98px;
  padding: 9px 13px !important;
  border-radius: 8px;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}
/* Ustteki ay kontrolu tek kaynak: masaustunde alt panel secicisi, mobilde topbar secicisi. */
@media(min-width:821px) {
  body:has(.behin-unified-page-head) .topbar .working-period-nav-picker {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%);
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
  }
}
body .content .behin-unified-page-head > .page-head-extra,
body .content .behin-unified-page-head .global-page-head-extra,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-head-extra {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) !important;
  width: 100%;
  min-width: 0;
  max-width: none;
  gap: 10px !important;
  align-items: stretch;
  overflow: visible;
}
body .content .behin-unified-page-head .global-page-summary.summary-grid,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary.summary-grid,
body.compact-backoffice-ui .content .behin-unified-page-head.page-head--tools-wide .global-page-summary.summary-grid {
  display: grid !important;
  grid-auto-flow: row !important;
  grid-template-columns: repeat(auto-fit,minmax(min(175px,100%),1fr)) !important;
  grid-auto-columns: auto !important;
  overflow: visible !important;
  gap: 9px !important;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0 !important;
}
body .content .behin-unified-page-head .global-page-summary .summary-card,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary .summary-card {
  flex: initial !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 80px !important;
  padding: 12px 13px !important;
  border: 1px solid #d8e4ee;
  border-top: 3px solid #278de0;
  border-radius: 10px;
  box-shadow: none;
  background: #fff;
}
body .content .behin-unified-page-head .global-page-summary .summary-card:nth-child(5n+2) { border-top-color: #029f9b; }
body .content .behin-unified-page-head .global-page-summary .summary-card:nth-child(5n+3) { border-top-color: #20a253; }
body .content .behin-unified-page-head .global-page-summary .summary-card:nth-child(5n+4) { border-top-color: #e6a400; }
body .content .behin-unified-page-head .global-page-summary .summary-card:nth-child(5n+5) { border-top-color: #b845b4; }
body .content .behin-unified-page-head .global-page-summary .summary-card span,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary .summary-card span {
  display: block;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  font-size: 12px !important;
  line-height: 1.3;
  font-weight: 750;
  color: #34516b;
}
body .content .behin-unified-page-head .global-page-summary .summary-card strong,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary .summary-card strong {
  display: block;
  font-size: clamp(16px,1.25vw,20px) !important;
  line-height: 1.3;
  font-weight: 850;
  white-space: normal !important;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 0;
  letter-spacing: -.015em;
}
body .content .behin-unified-page-head .global-page-summary .summary-card small {
  display: block;
  margin-top: 3px;
  font-size: 11px !important;
  line-height: 1.3;
  white-space: normal !important;
}
body .content .behin-unified-page-head .global-page-filter-card,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card {
  display: grid !important;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: auto !important;
  padding: 12px 14px !important;
  gap: 10px !important;
  border: 1px solid #d9e5ef;
  border-radius: 10px;
  background: #f8fbff;
}
body .content .behin-unified-page-head .global-page-tools-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0 0 8px !important;
}
body .content .behin-unified-page-head .global-page-tools-title h2 {
  display: block;
  font-size: 14px !important;
  line-height: 1.3;
  margin: 0 !important;
}
body .content .behin-unified-page-head .global-page-tools-title > div:first-child,
body .content .behin-unified-page-head .global-page-tools-title > div:first-child:only-child {
  display: flex;
}
body .content .behin-unified-page-head .global-page-filter-card .filter-form,
body .content .behin-unified-page-head .global-page-filter-card .page-toolbar,
body .content .behin-unified-page-head .global-page-filter-card form[class*="filter"],
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card .filter-form {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 9px 12px !important;
  align-items: end;
  min-width: 0;
}
body .content .behin-unified-page-head .global-page-filter-card label,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card label {
  flex: 1 1 180px;
  min-width: min(170px,100%);
  max-width: 100%;
  display: grid;
  gap: 4px;
}
body .content .behin-unified-page-head .global-page-filter-card label > span,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card label > span {
  display: block;
  margin: 0 0 2px;
  font-size: 12px !important;
  line-height: 1.25;
  font-weight: 750;
}
body .content .behin-unified-page-head .global-page-filter-card input,
body .content .behin-unified-page-head .global-page-filter-card select,
body .content .behin-unified-page-head .global-page-filter-card .btn,
body .content .behin-unified-page-head .global-page-filter-card button,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card input,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card select,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card .btn,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card button {
  min-height: 38px !important;
  height: auto !important;
  padding: 8px 11px !important;
  font-size: 12px !important;
  line-height: 1.25;
  border-radius: 8px;
}
body .content .behin-unified-page-head .global-page-filter-card .button-row,
body .content .behin-unified-page-head .global-page-filter-card .compact-actions,
body .content .behin-unified-page-head .global-page-filter-card .form-actions-wide {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap !important;
  gap: 8px !important;
  width: auto;
  min-width: 0;
}
body .content .behin-unified-page-head .global-page-filter-card .btn,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-filter-card .btn {
  flex: 0 1 auto;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}
/* S01 ve diger eski ozellestirilmis sayfalarin filtreleri de satira sigmadiginda kirilsin. */
body .content .behin-unified-page-head .milk-head-tools {display:grid;gap:10px;min-width:0}
body .content .behin-unified-page-head .milk-head-filter {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr));gap:10px}
body .content .behin-unified-page-head .milk-head-shortcuts,
body .content .behin-unified-page-head .milk-head-actions {display:flex;gap:8px;flex-wrap:wrap}
body .content .behin-unified-page-head .milk-head-metric {min-width:0;padding:8px 12px}
body .content .behin-unified-page-head .milk-head-metric strong {font-size:15px;overflow-wrap:anywhere}
/* Sayfa ustunde bir adet Ay secici; eski form alaninin gizlenmesi hidden period_id degerine dokunmaz. */
body .content .behin-unified-page-head .global-page-filter-card .working-period-field {display:none !important}
@media(max-width:820px) {
  body .content .behin-unified-page-head {padding:12px !important;gap:10px}
  body .content .behin-unified-page-head .behin-unified-page-intro {align-items:stretch}
  body .content .behin-unified-page-actions {justify-content:flex-start;width:100%;gap:8px}
  body .content .behin-unified-page-actions .working-period-field {display:none !important}
  body .content .behin-unified-page-actions .btn {flex:1 1 120px}
  body .content .behin-unified-page-head .global-page-summary.summary-grid {
    grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)) !important;
  }
  body .content .behin-unified-page-head .global-page-summary .summary-card {min-height:76px !important}
  body .content .behin-unified-page-head .global-page-filter-card {padding:10px !important}
  body .content .behin-unified-page-head .global-page-filter-card label {flex:1 1 150px}
}
@media(max-width:460px) {
  body .content .behin-unified-page-head .global-page-summary.summary-grid {grid-template-columns:1fr !important}
  body .content .behin-unified-page-head .behin-unified-page-intro {gap:9px}
  body .content .behin-unified-page-head .global-page-filter-card label {flex-basis:100%}
  body .content .behin-unified-page-head .global-page-filter-card .btn {flex:1 1 100%}
}
/* Uretici PWA'da eski sabit alt gezinti ve ust bar korunur. */
body.producer-app-mode .behin-unified-page-head {display:none !important}

/* Ozellestirilmis eski S01 gibi formlarda gorunen ikinci ay seciciyi kaldir. */
@media(min-width:821px) {
  body .content .behin-unified-page-head > .page-head-extra .working-period-field {display:none !important}
}

/* V7: Ortak basligin altindaki genel filtre alani kaldirildi.
   Kayit islemleri icin zorunlu alanlar sadece ilgili sayfanin acilabilir
   "Sayfaya Ozel Islemler" bolumunde erisilebilir kalir. */
body .content .behin-page-specific-actions {
  display:block;
  margin:0 0 12px;
  border:1px solid #d4e2ee;
  border-radius:10px;
  background:#fff;
  overflow:visible;
}
body .content .behin-page-specific-actions > summary {
  cursor:pointer;
  padding:10px 14px;
  color:#285070;
  font-size:13px;
  font-weight:750;
  line-height:1.3;
  list-style-position:inside;
}
body .content .behin-page-specific-actions[open] > summary {
  border-bottom:1px solid #d4e2ee;
}
body .content .behin-page-specific-actions > .global-page-filter-card {
  margin:0;
  padding:12px;
  border:0;
  box-shadow:none;
  min-width:0;
  max-width:100%;
}
body .content .payment-list-finance-actions {
  margin:0 0 12px;
  padding:10px 12px;
  border:1px solid #d4e2ee;
  border-radius:10px;
  background:#fff;
}
body .content .payment-list-finance-actions .button-row {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
body .content .payment-list-finance-actions .btn {
  font-size:12px;
  line-height:1.3;
  padding:8px 11px;
  white-space:normal;
}
@media(max-width:650px) {
  body .content .payment-list-finance-actions .btn {flex:1 1 165px;}
}


/* V7 safe UI pass: F06-like compact standard. Scope: shared header, no data changes. */
body .content .behin-unified-page-head,
body.compact-backoffice-ui .content .behin-unified-page-head,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head.page-head--server-composed {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) !important;
  row-gap:10px !important;
  padding:12px 14px !important;
  min-width:0;
  height:auto !important;
}
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .page-head-copy,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .behin-unified-page-intro {
  min-width:0 !important;
  width:auto !important;
}
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .page-context {
  display:block !important;
  font-size:10px !important;
}
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .page-title {
  font-size:22px !important;
  line-height:1.2 !important;
  white-space:normal !important;
}
body .content .behin-unified-page-head .global-page-summary.summary-grid,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .producer-head-summary.global-page-summary.summary-grid,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary.summary-grid {
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr)) !important;
  max-width:1150px !important;
  width:100% !important;
  gap:8px !important;
  align-items:stretch !important;
  overflow:visible !important;
}
body .content .behin-unified-page-head .global-page-summary .summary-card,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .producer-head-summary .summary-card,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary .summary-card {
  min-width:0 !important;
  min-height:70px !important;
  padding:9px 11px !important;
  border-top-width:3px;
}
body .content .behin-unified-page-head .global-page-summary .summary-card strong,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .producer-head-summary .summary-card strong,
body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary .summary-card strong {
  font-size:clamp(16px,1.28vw,19px) !important;
  line-height:1.25 !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}
body .content .behin-unified-page-head .global-page-summary .summary-card span,
body.compact-backoffice-ui.producers-page .content .behin-unified-page-head .producer-head-summary .summary-card span {
  font-size:11px !important;
  line-height:1.25 !important;
}
body .content .behin-unified-page-head .behin-header-upload {position:relative;z-index:5;flex:0 0 auto}
body .content .behin-unified-page-head .behin-header-upload > summary {list-style:none;cursor:pointer}
body .content .behin-unified-page-head .behin-header-upload > summary::-webkit-details-marker {display:none}
body .content .behin-unified-page-head .behin-header-upload-panel {
  position:absolute;right:0;top:calc(100% + 7px);z-index:50;
  min-width:min(310px,90vw);max-width:min(360px,90vw);
  padding:12px;background:white;border:1px solid #cfdeeb;border-radius:10px;
  box-shadow:0 14px 28px rgba(12,40,65,.16)
}
body .content .behin-unified-page-head .behin-header-upload-panel label {display:grid;gap:6px;font-size:12px;font-weight:700}
body .content .behin-unified-page-head .behin-header-upload-panel input[type=file] {max-width:100%;font-size:12px}
body .content .behin-unified-page-head .behin-header-upload-panel .btn {width:100%;margin-top:10px}
body .content .behin-milk-quickbar {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 14px;margin:0 0 12px;padding:6px 9px;border:1px solid #d7e5f1;border-radius:9px;background:#fff}
body .content .behin-milk-quickbar .milk-head-weeks,
body .content .behin-milk-quickbar .milk-head-actions {display:flex;gap:5px;align-items:center;flex-wrap:wrap}
body .content .behin-milk-quickbar .btn {font-size:11px;min-height:30px;padding:5px 9px}
@media(max-width:700px){
  body .content .behin-unified-page-head .global-page-summary.summary-grid,
  body.compact-backoffice-ui .content .behin-unified-page-head .global-page-summary.summary-grid {grid-template-columns:repeat(2,minmax(0,1fr)) !important;max-width:none !important}
  body .content .behin-unified-page-head .behin-header-upload-panel {position:static;min-width:0;max-width:100%;margin-top:8px}
  body .content .behin-unified-page-head .behin-unified-page-actions {width:100%;justify-content:flex-start}
}

/* Muhasebe/Stok: mevcut alt sayfaların tek, sade bölüm navigasyonu. */
.behin-accounting-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 15px;padding:8px 10px;border:1px solid var(--border,#d7dee8);border-radius:12px;background:var(--card,#fff)}
.behin-accounting-tabs a{display:inline-flex;align-items:center;min-height:38px;padding:7px 12px;border-radius:9px;text-decoration:none;font-size:13px;font-weight:600;color:var(--text,#24364b);border:1px solid transparent}
.behin-accounting-tabs a:hover,.behin-accounting-tabs a:focus-visible{background:#eaf1f7;border-color:#b6d2e0}
.behin-accounting-tabs a.is-active{background:#285f76;color:#fff}
@media(max-width:720px){.behin-accounting-tabs{gap:5px;padding:7px;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}.behin-accounting-tabs a{white-space:nowrap;min-height:44px}}
