:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1d2433;
  --primary: #2663eb;
  --primary-dark: #184cb8;
  --secondary: #e5ebf7;
  --danger: #d94c4c;
  --success: #247a48;
  --border: #d6dce8;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.site-header h1,
.site-header p {
  margin: 0;
}

.header-actions,
.button-group,
.inline-form,
.filters,
.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(20, 28, 45, 0.06);
}

.card + .card,
.stack > * + * {
  margin-top: 1rem;
}

.nested {
  background: #f9fbff;
}

.narrow {
  max-width: 420px;
  margin: 3rem auto;
}

.stacked-form label,
.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}

.button {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover {
  background: var(--primary-dark);
}

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

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

.button.small {
  padding: 0.5rem 0.75rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.two-columns {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.three-columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.badge {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #dce7ff;
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.flash.success {
  background: #e1f4e8;
  color: var(--success);
}

.flash.error {
  background: #fdeaea;
  color: #9b1d1d;
}

.thumbnail,
.product-image {
  width: 100%;
  max-width: 220px;
  border-radius: 12px;
  object-fit: cover;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
