:root {
  --brand: #F9A825;
  --brand-dark: #C17900;
  --text: #212121;
  --muted: #6b6b6b;
  --border: #e0e0e0;
  --bg: #fafafa;
  --danger: #c62828;
  --success: #2e7d32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--brand-dark); font-weight: 400; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav a { color: var(--text); text-decoration: none; font-size: 14px; }
.topbar nav a:hover { color: var(--brand-dark); }
.topbar-user { color: var(--muted); font-size: 14px; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-head h1 { margin: 0; font-size: 22px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: #eee;
}
.btn:hover { filter: brightness(0.96); }
.btn-primary { background: var(--brand); color: #1a1a1a; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: #fdecea; color: var(--danger); }
.link-button {
  background: none; border: none; padding: 0; font-size: 14px;
  color: var(--text); cursor: pointer; text-decoration: underline;
}
.inline-form { display: inline; }

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.table th, .table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th { background: #f5f5f5; font-weight: 600; color: var(--muted); }
.actions-buttons { display: flex; gap: 8px; align-items: center; }
.table tr.row-hidden { opacity: 0.55; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge-hidden { background: #fdecea; color: var(--danger); }
.badge-visible { background: #e8f5e9; color: var(--success); }

.thumb {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover;
  display: block; background: #eee;
}
.thumb-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px;
}

.sell-request-list { display: flex; flex-direction: column; gap: 16px; }
.sell-request-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 18px;
}
.sell-request-card.sell-request-unread { border-left: 4px solid var(--brand); }
.sell-request-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sell-request-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.sell-request-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.sell-request-body h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.sell-request-body p { margin: 0; font-size: 14px; line-height: 1.5; }

.flash {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}
.flash ul { margin: 0; padding-left: 18px; }
.flash-success { background: #e8f5e9; color: var(--success); }
.flash-error { background: #fdecea; color: var(--danger); }

.stacked-form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.stacked-form.narrow { max-width: 380px; }
.stacked-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.stacked-form input, .stacked-form textarea, .stacked-form select {
  font-size: 15px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  font-family: inherit; color: var(--text);
}
.stacked-form input:focus, .stacked-form textarea:focus {
  outline: none; border-color: var(--brand);
}
.stacked-form label.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.stacked-form label.checkbox-label input { width: auto; }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

.settings-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-section summary {
  padding: 16px 18px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.settings-section summary::-webkit-details-marker { display: none; }
.settings-section summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.15s ease;
}
.settings-section[open] summary::after { transform: rotate(45deg); }
.settings-section summary:hover { background: #fafafa; }
.settings-section-body { padding: 0 18px 20px; }

.machine-form { max-width: 640px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.photo-section { margin: 24px 0; }
.photo-section h3 { margin: 0 0 10px; font-size: 15px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-item {
  width: 140px; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px;
}
.photo-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; }
.photo-delete { width: 100%; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.auth-card {
  max-width: 360px;
  margin: 64px auto;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-align: center;
}
.auth-logo { max-width: 60%; margin-bottom: 16px; }
.auth-card h1 { margin: 0 0 6px; font-size: 20px; }
.auth-card .stacked-form { margin: 20px auto 0; text-align: left; }
