/* Sprint 7.5.18 - insan gözüyle genel yerleşim ve okunabilirlik düzeltmeleri */
html,
body,
#root,
.app-shell,
.app-stage,
.main-stage {
  max-width: 100%;
}

html,
body {
  overflow-x: hidden;
}

.app-shell,
.app-stage,
.main-stage,
body .school-overview-card {
  min-width: 0;
  overflow: hidden !important;
}

.main-stage {
  overflow-x: clip;
}

body .school-overview-table-wrap {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  contain: inline-size;
  overscroll-behavior-inline: contain;
}

body .school-overview-table {
  width: max-content;
  min-width: 1050px;
  max-width: none;
}

.s704-readiness-note {
  grid-column: 2;
  display: block;
  margin-top: 3px;
  color: #9a5b08;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.4;
}

.s47-backend-strip.s704-readiness-complete .s704-readiness-note {
  color: #087f5b;
}

@media (max-width: 1400px) {
  body .s47-backend-strip {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  body .s47-backend-strip .s47-strip-actions.toolbar-actions {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
  }

  body .s47-backend-strip .s47-strip-actions.toolbar-actions button {
    width: 100% !important;
    min-width: 0;
  }
}

@media (max-width: 980px) {
  .app-stage,
  .main-stage {
    width: 100% !important;
    margin-left: 0 !important;
  }

  body .s47-backend-strip .s47-strip-actions.toolbar-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .s51-overlay {
    align-items: stretch !important;
    padding: 0 !important;
  }

  .s51-modal {
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  .s51-header {
    padding: 12px 14px !important;
  }

  .s51-header h2 {
    font-size: 18px !important;
  }

  .s51-header > div > span {
    white-space: normal !important;
  }

  .s51-policy {
    align-items: flex-start !important;
    padding: 9px 14px !important;
  }

  .s51-policy > div {
    align-items: flex-start !important;
  }

  .s51-policy span {
    display: none !important;
  }

  .s51-body {
    display: block !important;
    overflow: auto !important;
  }

  .s51-sidebar {
    width: auto !important;
    max-height: none !important;
    border-right: 0 !important;
    border-bottom: 1px solid #edf1f6;
  }

  .s51-main {
    min-height: 70vh !important;
  }

  .s51-main-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .s51-head-actions {
    justify-content: flex-start !important;
    width: 100%;
  }

  .s51-head-actions button {
    min-height: 38px;
    white-space: normal;
  }

  .s51-tabs {
    overflow-x: auto !important;
  }

  .s51-tabs button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .s51-viewbar {
    flex-wrap: wrap !important;
  }

  .s51-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #fff;
  }
}

@media (max-width: 520px) {
  body .s47-backend-strip .s47-strip-actions.toolbar-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .s47-backend-strip > div:first-child {
    align-items: start !important;
  }

  .s51-metrics {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

