:root {
  --chili: #C1272D;
  --gold: #F3B01C;
  --ink: #2C1810;
  --ink-soft: #6b5b52;
  --line: #e7ddd2;
  --bg: #FBF3E7;
  --card: #ffffff;
  --danger: #B3261E;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--chili); }
h1, h2, h3 { margin: 0 0 8px; }
p { margin: 0 0 12px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 32px 20px 64px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; color: var(--chili); text-decoration: none; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.topbar .visit-site { font-size: 0.9rem; font-weight: 600; color: var(--chili); text-decoration: none; }
.topbar .visit-site:hover { text-decoration: underline; }
.topbar .logout { font-size: 0.9rem; color: var(--ink-soft); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.auth-shell {
  max-width: 380px;
  margin: 64px auto;
  padding: 0 20px;
}
.auth-shell .card { padding: 32px; }
.back-home { margin-top: 12px; }

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="email"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  margin-bottom: 16px;
}
textarea { min-height: 90px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.checkbox-row input { margin: 0; }
.checkbox-row label { margin: 0; font-weight: 500; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--chili); color: #fff; }
.btn-primary:hover { background: #a31f24; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1e18; }
.btn-icon { padding: 6px 10px; font-size: 0.95rem; }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn-block { width: 100%; }

.flash {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.92rem;
}
.flash-error { background: #fbe4e2; color: #7a1a15; border: 1px solid #f3b3ac; }
.flash-success { background: #e6f4e6; color: #1e5c1e; border: 1px solid #b9ddb9; }

.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 16px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--chili); border-bottom-color: var(--chili); }

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th { background: #f6efe4; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }

.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; display: block; background: var(--line); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-featured { background: rgba(243, 176, 28, 0.25); color: #8a5f00; }
.badge-price-none { color: var(--ink-soft); font-style: italic; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) {
  .form-grid.two-col { grid-template-columns: 1fr 1fr; gap: 0 20px; }
}

.current-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.current-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: -10px; margin-bottom: 16px; }

textarea::placeholder { color: #b6a89c; }
input[readonly] { background: #f6efe4; color: var(--ink-soft); }
.form-section-title { font-size: 1rem; margin: 8px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.section-note { font-size: 0.85rem; color: var(--ink-soft); margin: 0 0 16px; }
/* One field per row: label, full-width input, then its own hint underneath. */
.field { margin-bottom: 18px; }
.field input { margin-bottom: 0; }
.field .hint { margin: 6px 0 0; }
.char-counter { text-align: right; font-variant-numeric: tabular-nums; }
.char-counter.is-near { color: #8a5f00; }
.char-counter.is-full { color: var(--danger); font-weight: 600; }
