:root {
  --page-bg: #f5f7fb;
  --ink: #172033;
  --muted: #667085;
  --brand: #0d6efd;
  --border: #d9e2ef;
}

body {
  background: var(--page-bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

.content-wide {
  max-width: 1280px;
  margin: 0 auto;
}

.content-narrow {
  max-width: 980px;
  margin: 0 auto;
}

.login-shell {
  min-height: calc(100vh - 3rem);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(92vw, 440px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.bilingual-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: #fbfdff;
}

.bilingual-fieldset legend {
  float: none;
  width: auto;
  margin: 0 0 .75rem;
  padding: 0 .35rem;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
}

.compact-label {
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px 150px 220px 180px auto auto;
  gap: .75rem;
}

.filter-tabs,
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.record-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #b6d4fe;
  border-radius: 999px;
  background: #eaf2ff;
  color: #084298;
  padding: .25rem .75rem;
  font-size: .9rem;
  font-weight: 800;
}

.record-count-badge-muted {
  border-color: var(--border);
  background: #fff;
  color: var(--muted);
}

.bulk-actions .form-select {
  max-width: 310px;
}

.import-export-panel {
  border-color: #b6d4fe;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.chip-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-check span,
.chip-static,
.chip-button {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: .55rem 1rem;
  font-weight: 700;
  color: #344054;
}

.chip-check input:checked + span,
.chip-button.active {
  border-color: var(--brand);
  background: #eaf2ff;
  color: #084298;
}

.chip-button {
  cursor: pointer;
}

.chip-remove {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(220, 53, 69, .28);
}

.chip-remove:hover,
.chip-remove:focus {
  background: #b02a37;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: .75rem;
  padding: 1rem 0;
  background: linear-gradient(180deg, rgba(245,247,251,0), var(--page-bg) 30%);
}

.badge {
  font-size: .82rem;
  padding: .45rem .65rem;
}

.status-draft { background: #6c757d; }
.status-pending { background: #0dcaf0; color: #052c65; }
.status-pending_review { background: #0dcaf0; color: #052c65; }
.status-pushed { background: #198754; color: #fff; }
.status-approved { background: #198754; }
.status-rejected { background: #dc3545; }

.media-path {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: .75rem;
  background: #f8fafc;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.media-preview,
.existing-media {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .75rem;
  background: #f8fafc;
}

.media-preview img,
.existing-media img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.map-picker {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #e9eef5;
}

.form-control,
.form-select,
.btn {
  border-radius: 8px;
}

@media (max-width: 900px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .section-card {
    padding: 1rem;
  }

  .sticky-actions {
    flex-direction: column;
  }

  .sticky-actions .btn {
    width: 100%;
  }
}
