.admin-shell {
  --admin-bg: #0f1714;
  --admin-panel: #16201c;
  --admin-line: rgba(255,255,255,0.08);
  --admin-text: #e8efe9;
  --admin-muted: #8fa399;
  --admin-accent: #c9a227;
  --admin-forest: #1b4d3e;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background: #eef2ef;
  font-family: "Outfit", "Segoe UI", sans-serif;
}

.admin-side {
  background: linear-gradient(180deg, var(--admin-bg), #0a110e);
  color: var(--admin-text);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 1.5rem;
  border-bottom: 1px solid var(--admin-line);
  margin-bottom: 1.25rem;
}

.admin-brand img { width: 40px; height: 40px; object-fit: contain; }
.admin-brand strong { display: block; font-size: 1rem; }
.admin-brand span { font-size: 0.72rem; color: var(--admin-accent); letter-spacing: 0.12em; text-transform: uppercase; }

.admin-nav { display: grid; gap: 0.25rem; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  color: var(--admin-muted);
  font-size: 0.92rem;
  transition: 0.2s;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(201,162,39,0.12);
  color: var(--admin-text);
}

.admin-main { min-width: 0; }
.admin-top {
  background: white;
  border-bottom: 1px solid #dce5df;
  padding: 1rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.admin-top h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  color: #123328;
}

.admin-content { padding: 1.5rem 1.75rem 3rem; }

.admin-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-card {
  background: white;
  border: 1px solid #dce5df;
  padding: 1.25rem;
  border-radius: 8px;
}

.admin-card .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6d7f75;
  margin-bottom: 0.4rem;
}

.admin-card .value {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.2rem;
  color: #123328;
  font-weight: 600;
}

.panel {
  background: white;
  border: 1px solid #dce5df;
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #123328;
}

.table-wrap { overflow: auto; }
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.8rem 0.6rem;
  border-bottom: 1px solid #e7eee9;
  vertical-align: middle;
}

.admin-table th {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6d7f75;
}

.admin-table img.thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f3f6f4;
  border-radius: 4px;
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
  border-radius: 4px;
}

.btn-danger { background: #b42318; color: white; border: none; cursor: pointer; }
.btn-ghost {
  background: transparent;
  border: 1px solid #c5d2cb;
  color: #123328;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid .full { grid-column: 1 / -1; }

.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: #234438; }
.field input,
.field textarea,
.field select {
  padding: 0.7rem 0.85rem;
  border: 1px solid #cfdcd5;
  border-radius: 6px;
  background: #f8faf9;
}

.field textarea { min-height: 110px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid rgba(27,77,62,0.25);
  border-color: #1b4d3e;
  background: white;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(201,162,39,0.18), transparent 40%),
    linear-gradient(160deg, #071510, #1b4d3e 80%);
  padding: 1.5rem;
}

.login-box {
  width: min(420px, 100%);
  background: white;
  border-radius: 10px;
  padding: 2rem 1.75rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.login-box .logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.login-box h1 {
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  color: #123328;
  margin: 0 0 0.25rem;
}

.login-box .sub {
  text-align: center;
  color: #6d7f75;
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
}

.media-item {
  border: 1px solid #dce5df;
  border-radius: 8px;
  overflow: hidden;
  background: #f8faf9;
}

.media-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.media-item .meta {
  padding: 0.55rem 0.65rem;
  font-size: 0.75rem;
  color: #5d7167;
  word-break: break-all;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-ok { background: #e5f6ea; color: #17663a; }
.badge-off { background: #f1f1f1; color: #666; }

@media (max-width: 960px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: relative; height: auto; }
  .admin-cards { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .theme-picker-grid { grid-template-columns: 1fr 1fr; }
}

/* Theme picker */
.theme-group-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d7f75;
  margin: 1.5rem 0 0.85rem;
}

.theme-group-label:first-of-type {
  margin-top: 0;
}

.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.theme-picker-card {
  position: relative;
  text-align: left;
  border: 2px solid #dce5df;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.theme-picker-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.theme-picker-card.selected {
  border-color: #1b4d3e;
  box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.15);
}

.theme-swatch {
  height: 72px;
  width: 100%;
}

.theme-picker-info {
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.3rem;
}

.theme-picker-info strong {
  font-size: 0.95rem;
  color: #123328;
}

.theme-picker-info span {
  font-size: 0.78rem;
  color: #6d7f75;
  line-height: 1.4;
}

.theme-selected-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: #1b4d3e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}
