/* Nötr teknik iskelet stilleri (AGENTS.md §4.1). */
:root {
  color-scheme: light dark;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  max-inline-size: 72rem;
  margin-inline: auto;
  padding: 1.25rem;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border-block-end: 1px solid currentColor;
  padding-block-end: 0.75rem;
  margin-block-end: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-block-end: 1rem;
  max-inline-size: 36rem;
}

.hint {
  font-size: 0.85rem;
  opacity: 0.8;
}

input, select, textarea, button {
  font: inherit;
  padding: 0.5rem 0.65rem;
}

.error-msg {
  display: none;
  color: #b3261e;
  font-size: 0.875rem;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  outline: 2px solid #b3261e;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

.panel-card {
  border: 1px solid currentColor;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-block-end: 1.25rem;
}

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(500px, 75vh);
  container-type: inline-size;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background: Canvas;
}

th, td {
  text-align: start;
  padding: 0.5rem 0.75rem;
  border-block-end: 1px solid currentColor;
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: Canvas;
}

@container (width < 600px) {
  table, thead, tbody, tr, th, td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    margin-block-end: 1rem;
    border: 1px solid currentColor;
    padding: 0.5rem;
  }

  tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
  }

  td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
  }
}

.dropzone {
  border: 2px dashed currentColor;
  padding: 1rem;
  margin-block: 0.75rem;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}
