:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #1f2937;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 12px;
  margin: 0 0 8px;
}

h1, h2 { margin-top: 0; }

.language-card {
  min-width: 240px;
  display: grid;
  gap: 8px;
  align-content: center;
}

.panel {
  padding: 24px;
  margin-bottom: 22px;
}

.item-form {
  display: grid;
  gap: 18px;
}

.image-upload {
  display: flex;
  gap: 18px;
  align-items: center;
}

.preview-box {
  width: 130px;
  height: 130px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fafafa;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.preview-box img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
}

input, select, textarea, button {
  font: inherit;
  border-radius: 10px;
}

input, select, textarea {
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.full {
  width: 100%;
}

.actions, .toolbar, .search-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.actions {
  justify-content: flex-start;
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

button.secondary {
  background: #e5e7eb;
  color: var(--text);
}

button.small {
  padding: 7px 10px;
  margin-right: 6px;
  margin-bottom: 6px;
}

button.danger {
  background: var(--danger);
}

.hint, .empty {
  color: var(--muted);
}

.toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.search-controls input {
  min-width: 260px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.thumb-cell {
  width: 130px;
}

.thumb {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.no-thumb {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .hero, .image-upload {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .search-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .search-controls input {
    min-width: 0;
  }
}
