/* Zoka admin panel — all CSS lives here (CSP style-src 'self', zero inline).
   Palette from specs/zoka-design-system.md: FRUTA green #2E7D32 as accent,
   warm off-white surface #FAFAF6, warm near-black text #1F2A24,
   strawberry red #C62828 for errors. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: #FAFAF6;
  color: #1F2A24;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

/* ---- chrome ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #2E7D32;
  color: #FFFFFF;
}

.topbar h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* ---- cards ---- */

.card {
  background: #FFFFFF;
  border: 1px solid #E3E3DC;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.card.narrow {
  max-width: 420px;
  margin: 48px auto;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
}

/* ---- forms ---- */

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #4A554E;
}

input[type="text"],
input[type="tel"],
select {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #C9C9C0;
  border-radius: 8px;
  font-size: 1rem;
  background: #FFFFFF;
  color: #1F2A24;
}

input:focus,
select:focus {
  outline: 2px solid #2E7D32;
  outline-offset: 1px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.consent-row label {
  margin: 0;
}

.create-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.create-grid .field input,
.create-grid .field select {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .create-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- buttons ---- */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #1F1F1F;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  background: #333333;
}

.btn:disabled {
  background: #9A9A93;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid #FFFFFF;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
  background: #FFFFFF;
  color: #1F2A24;
  border: 1px solid #C9C9C0;
  font-weight: 500;
}

.btn-small:hover {
  background: #F0F0EA;
}

/* ---- messages ---- */

.error {
  color: #C62828;
  font-size: 0.9rem;
}

.info {
  color: #2E7D32;
  font-size: 0.9rem;
}

.hint {
  color: #6B756E;
  font-size: 0.8rem;
}

/* ---- product table ---- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #E3E3DC;
  color: #4A554E;
  font-weight: 600;
}

td {
  padding: 8px 10px;
  border-bottom: 1px solid #EFEFE9;
  vertical-align: middle;
}

tr.archived td {
  color: #9A9A93;
}

.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: #F0F0EA;
}

.no-photo {
  display: inline-block;
  width: 48px;
  height: 48px;
  line-height: 48px;
  text-align: center;
  border-radius: 6px;
  background: #F0F0EA;
  color: #9A9A93;
  font-size: 0.6rem;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active {
  background: #E5F2E6;
  color: #2E7D32;
}

.badge-archived {
  background: #F0F0EA;
  color: #6B756E;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
