body { overflow: auto; }
#app { height: auto; min-height: 100vh; }

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.admin-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.admin-tab.active { background: var(--accent); color: #1a1408; border-color: var(--accent); }

.panel { display: none; }
.panel.active { display: block; }

.panel h2 { font-size: 16px; margin: 0 0 4px; }
.panel .hint { color: var(--text-faint); font-size: 12.5px; margin: 0 0 16px; }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
.card h3 { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11.5px; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 13px;
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 50px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 8px; }
.field.checkbox label { font-size: 13px; color: var(--text); }
.field input[type="color"] { padding: 2px; height: 34px; }

.form-actions { margin-top: 14px; display: flex; gap: 8px; }

.btn-primary {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #1a1408;
  padding: 8px 16px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.btn-secondary {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data-table th, table.data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data-table th { color: var(--text-faint); font-weight: 600; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.04em; }
table.data-table tr:hover td { background: var(--bg-week-b); }
.row-actions { display: flex; gap: 6px; }
.row-actions button { font-size: 11px; padding: 4px 9px; }

.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #e5484d; color: #ff8a8a; }
