: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;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th { background: #f5f5f5; font-weight: 600; color: var(--muted); }
.table .actions { display: flex; gap: 8px; }

.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;
}

.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);
}

.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; }
