.product-add-card textarea[name="uretici"]::placeholder,
.product-add-card textarea[name="oem"]::placeholder,
.product-add-card textarea[name="aciklama"]::placeholder { text-align: center; }

.quantity .btn { flex: 0 0 1.2rem; padding-inline: 0; }

#productModalImage { cursor: zoom-in; }

.price-column { min-width: 8.5rem; width: 8.5rem; }

/* Ekleme satırında bütün alanlar aynı yükseklikte ve aralıklar daha dengeli. */
.product-add-card .add-product-row { height: 5.15rem; }
.product-add-card .add-product-row td { padding: .25rem .18rem; vertical-align: middle; }
.product-add-card input.form-control,
.product-add-card .table-textarea { height: 4.6rem; }

/* Raf kodlarının yalnızca metni vurgulanır; aynı hücrede farklı raflar ayrı renkte kalır. */
.shelf-editor { width: 100%; min-width: 5.75rem; overflow-y: auto; white-space: pre-wrap; text-align: left; }
.shelf-editor:empty::before { content: attr(data-placeholder); color: var(--bs-secondary-color); opacity: .65; pointer-events: none; }
.shelf-editor .shelf-tag { margin: .08rem .12rem .08rem 0; }
.price-input .input-group-text { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); font-weight: 600; }
.price-input input::placeholder { color: var(--bs-secondary-color); opacity: .58; }
.product-add-card .price-input input.form-control,
.product-add-card .price-input .input-group-text { height: 4.6rem; }
.stat-card.cost { border-color: #10b981; }

/* Her iki rolde de ürün bilgileri beş satırlık sabit bir alanda kalır. */
:root { --product-cell-height: 6.35rem; }

.table-wrap {
  overflow-y: auto;
}

.table tbody tr {
  height: 7rem;
}

.table-textarea,
.product-add-card input.form-control,
.product-add-card .table-textarea,
.product-add-card .price-input input.form-control,
.product-add-card .price-input .input-group-text,
.product-add-card .add-product-button,
.new-photo-trigger {
  height: var(--product-cell-height);
}

.table-textarea {
  line-height: 1.2;
  overflow-y: auto;
}

.readonly-cell-value {
  height: var(--product-cell-height);
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.2;
  padding: .375rem .75rem;
}

.shelf-list {
  height: var(--product-cell-height);
  max-height: var(--product-cell-height);
}

/* Arama kutusunda kayıt sayısı soluk, bulunan toplam stok ise yeşil görünür. */
.search-count { opacity: 1; }
.search-result-count { color: var(--bs-secondary-color); opacity: .58; }
.search-stock-count { color: #198754; font-weight: 600; }
.stock-list-card .card-header { display: flex; align-items: center; gap: .6rem; }
.stock-list-card .search-wrap { flex: 1 1 auto; min-width: 0; }
.stock-pagination { display: flex; flex: 0 0 auto; align-items: center; gap: .35rem; margin: 0; white-space: nowrap; }
.pagination-page { min-width: 2.8rem; color: #078587; font-size: .82rem; font-weight: 800; text-align: center; }
.page-nav { display: grid; width: 2rem; height: 2rem; place-items: center; padding: 0; border: 1px solid #4fd1c5; border-radius: .5rem; background: #d9fbf7; color: #078587; font-size: 1rem; }
.page-nav:hover:not(:disabled) { background: #a9f3eb; color: #056b6d; }
.page-nav:focus-visible { outline: 3px solid rgba(20, 184, 166, .35); outline-offset: 2px; }
.page-nav:disabled { border-color: #b9e8e3; background: #effdfb; color: #8ac9c2; cursor: default; }

/* Yönetim alanı, üst bardaki yeşil düğme ile hızlıca açılır/kapanır. */
.management-panel { display: grid; grid-template-rows: 0fr; margin: 0; pointer-events: none; transition: grid-template-rows 180ms ease, margin 180ms ease; }
.management-panel.is-open { grid-template-rows: 1fr; margin-bottom: 1rem; pointer-events: auto; }
.management-panel-content { min-height: 0; overflow: hidden; }
.management-toggle { border-color: #74c69d; background: #d1fae5; color: #087443; }
.management-toggle:hover { background: #a7f3d0; color: #065f36; }
.management-toggle:focus-visible { outline-color: rgba(16, 185, 129, .35); }

/* Renkler doğrudan hücrelere uygulanır; böylece Bootstrap ve tema kuralları tarafından griye çevrilemez. */
.stock-list-card .table tbody tr.stock-row > td { background-color: #dff1ff !important; box-shadow: inset 0 0 0 9999px #dff1ff !important; color: #12334b; }
.stock-list-card .table tbody tr.stock-row-alt > td { background-color: #a9d9f5 !important; box-shadow: inset 0 0 0 9999px #a9d9f5 !important; color: #0b2d44; }
.stock-list-card .table tbody tr.out-of-stock > td { background-color: #c73b48 !important; box-shadow: inset 0 0 0 9999px #c73b48 !important; color: #fff; }
.stock-list-card .table tbody tr.stock-row .form-control,
.stock-list-card .table tbody tr.stock-row-alt .form-control,
.stock-list-card .table tbody tr.out-of-stock .form-control,
.stock-list-card .table tbody tr.stock-row .input-group-text,
.stock-list-card .table tbody tr.stock-row-alt .input-group-text,
.stock-list-card .table tbody tr.out-of-stock .input-group-text { background-color: transparent !important; color: inherit; }
.stock-list-card .table.table-hover > tbody > tr.stock-row:hover > *,
.stock-list-card .table.table-hover > tbody > tr.stock-row-alt:hover > * { background-color: #c5e6fa !important; box-shadow: inset 0 0 0 9999px #c5e6fa !important; }
.stock-list-card .table.table-hover > tbody > tr.out-of-stock:hover > * { background-color: #ad2f3a !important; box-shadow: inset 0 0 0 9999px #ad2f3a !important; }
[data-bs-theme=dark] .management-toggle { background: #124b35; border-color: #2d9568; color: #a7f3d0; }
[data-bs-theme=dark] .page-nav { border-color: #199b92; background: #104846; color: #8df3ea; }
[data-bs-theme=dark] .page-nav:disabled { border-color: #265d5a; background: #1b3433; color: #5d9791; }
[data-bs-theme=dark] .pagination-page { color: #8df3ea; }

@media (max-width: 575px) {
  .stock-list-card .card-header { gap: .35rem; padding-inline: .65rem; }
  .stock-pagination { gap: .2rem; }
  .pagination-page { min-width: 2.55rem; font-size: .75rem; }
  .page-nav { width: 1.8rem; height: 1.8rem; border-radius: .45rem; }
  .search { height: 2.85rem; }
}

/* Masaüstünde ürünler dört satır yüksekliğinde, on satırlık sabit listede görünür. */
@media (min-width: 576px) {
  .stock-list-card .table-wrap {
    height: 50rem;
    max-height: 50rem;
    overflow-x: auto;
    overflow-y: auto;
  }

  /* Yatay kaydırma çalışmaya devam eder; çubuk ekranda yer kaplamaz. */
  .stock-list-card .table-wrap::-webkit-scrollbar:horizontal {
    height: 0;
  }

  .stock-list-card .table tbody tr {
    height: 4.75rem;
    border-bottom-width: 1px;
  }
  .stock-list-card .table tbody td { padding: .18rem .45rem; }

  .stock-list-card .table-textarea,
  .stock-list-card .shelf-editor,
  .stock-list-card .readonly-cell-value,
  .stock-list-card .shelf-list {
    height: 4.35rem;
    max-height: 4.35rem;
    font-size: .78rem;
    line-height: 1.15;
  }

  .stock-list-card .readonly-cell-value {
    box-sizing: border-box;
    padding: .24rem .5rem;
  }

  .stock-list-card .shelf-list { gap: .1rem; }
  .stock-list-card .photo-thumb { width: 3.5rem; height: 3.5rem; }

  /* C2-5X111 gibi sekiz karakterli raf kodları tek satırda rahatça sığar. */
  .stock-list-card .shelf-column,
  .stock-list-card .shelf-textarea,
  .stock-list-card .shelf-editor {
    width: 5.5rem;
    min-width: 5.5rem;
  }

  /* RAF sütununa açılan alanı dengelemek için açıklama biraz daha dar. */
  .stock-list-card .description-column,
  .stock-list-card .description-column .table-textarea {
    width: 10.5rem;
    min-width: 10.5rem;
  }
}
