/* Skeleton placeholders — CLS önleme */

.page-content-shell {
  position: relative;
  min-height: calc(100vh - var(--shell-header-h, 4.5rem) - var(--shell-content-offset, 12rem));
}

body:not(.has-shell) .page-content-shell {
  min-height: 0;
}

.page-content-shell--loading {
  pointer-events: none;
}

.page-content-shell--loaded {
  opacity: 1;
}

.skeleton {
  display: block;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(226, 232, 240, 0.85) 0%,
    rgba(248, 250, 252, 0.95) 45%,
    rgba(201, 162, 39, 0.14) 55%,
    rgba(226, 232, 240, 0.85) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.35s ease-in-out infinite;
}

.skeleton-kpi {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
}

.skeleton-kpi__label {
  height: 0.65rem;
  width: 55%;
  margin-bottom: 0.5rem;
}

.skeleton-kpi__value {
  height: 1.35rem;
  width: 40%;
  margin-bottom: 0.35rem;
}

.skeleton-kpi__sub {
  height: 0.55rem;
  width: 70%;
}

.skeleton-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skeleton-kpi-grid--5 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.skeleton-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.skeleton-category-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.skeleton-category-card__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skeleton-category-card__label {
  height: 0.75rem;
  width: 50%;
}

.skeleton-category-card__count {
  height: 1rem;
  width: 2rem;
}

.skeleton-category-card__bar {
  height: 6px;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.skeleton-category-card__pct {
  height: 0.5rem;
  width: 30%;
}

.skeleton-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 140px;
  padding: 0.5rem 0 0;
}

.skeleton-chart__bar-wrap {
  flex: 1 0 28px;
  max-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.skeleton-chart__bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
}

.skeleton-chart__label {
  height: 0.45rem;
  width: 70%;
  border-radius: 3px;
}

.skeleton-table-row td {
  padding: 0.45rem 0.5rem;
  vertical-align: middle;
}

.skeleton-cell {
  height: 0.75rem;
  width: 100%;
  max-width: 8rem;
}

.skeleton-cell--wide {
  max-width: 12rem;
}

.skeleton-cell--short {
  max-width: 3rem;
}

.skeleton-workflow-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.75rem;
}

.skeleton-workflow-row__title {
  height: 0.9rem;
  width: 45%;
  margin-bottom: 0.4rem;
}

.skeleton-workflow-row__meta {
  height: 0.55rem;
  width: 30%;
  margin-bottom: 0.7rem;
}

.skeleton-workflow-row__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.skeleton-pill {
  height: 1.6rem;
  width: 5.5rem;
  border-radius: 999px;
}

.skeleton-bucket-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--surface);
}

.skeleton-bucket-card__title {
  height: 1rem;
  width: 55%;
  margin-bottom: 0.45rem;
}

.skeleton-bucket-card__meta {
  height: 0.65rem;
  width: 70%;
  margin-bottom: 0.75rem;
}

.skeleton-bucket-card__badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.skeleton-badge {
  height: 1.4rem;
  width: 6rem;
  border-radius: 999px;
}

.skeleton-history-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.35fr) minmax(140px, 1fr) 100px minmax(160px, 1.1fr) 88px;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.skeleton-history-row .skeleton-cell {
  max-width: none;
}

.skeleton-feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1rem;
}

.skeleton-feedback-detail {
  min-height: 12rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

.skeleton-feedback-detail__block {
  height: 0.75rem;
  width: 80%;
  margin-bottom: 0.65rem;
}

.skeleton-feedback-detail__block--short {
  width: 45%;
}

.skeleton-pool-card {
  pointer-events: none;
}

.skeleton-pool-card__badge {
  height: 1.25rem;
  width: 5.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.skeleton-pool-card__title {
  height: 1rem;
  width: 75%;
  margin-bottom: 0.5rem;
}

.skeleton-pool-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.skeleton-pool-card__count {
  height: 2rem;
  width: 3.5rem;
  border-radius: 8px;
}

.skeleton-pool-card__btn {
  height: 2.25rem;
  width: 3.25rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.skeleton-fwa-job {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.55rem;
}

.skeleton-fwa-job__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.skeleton-fwa-job__id {
  height: 0.7rem;
  width: 5.5rem;
}

.skeleton-fwa-job__badge {
  height: 1.15rem;
  width: 4rem;
  border-radius: 999px;
}

.skeleton-fwa-job__line {
  height: 0.55rem;
  width: 88%;
}

.skeleton-fwa-job__line--short {
  width: 52%;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 900px) {
  .skeleton-feedback-layout {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: rgba(226, 232, 240, 0.9);
  }
}
