* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  background: #f4f4f2;
  color: #222;
  font-size: 14px;
}

.admin-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 600;
  color: #c0392b;
}

.view-site {
  color: #c0392b;
  text-decoration: none;
  font-size: 13px;
}

.view-site:hover { text-decoration: underline; }

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.panel h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #111;
}

/* Fields */
.field {
  margin-bottom: 20px;
}

.field > label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #888;
  margin-bottom: 7px;
}

input[type="text"],
input[type="number"],
input[type="url"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  color: #222;
  outline: none;
  transition: border-color 0.15s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus {
  border-color: #c0392b;
}

input[type="file"] {
  font-size: 13px;
  color: #555;
}

.hint {
  font-size: 11px;
  color: #aaa;
  margin-top: 5px;
}

/* Hero preview */
.img-preview {
  margin-top: 10px;
}

.img-preview img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid #eee;
  padding: 4px;
  border-radius: 4px;
}

/* Ingredients */
.ingredient-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.ingredient-row .ing-name {
  flex: 1;
}

.ingredient-row .ing-amount {
  width: 110px;
  flex-shrink: 0;
}

.remove-ing {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  width: 30px;
  height: 32px;
  cursor: pointer;
  color: #bbb;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.remove-ing:hover {
  border-color: #c0392b;
  color: #c0392b;
}

/* V:W */
.vw-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.vw-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vw-label {
  width: 55px;
  font-size: 13px;
  color: #555;
  flex-shrink: 0;
}

.vw-row input[type="number"] {
  flex: 1;
}

.unit-input {
  width: 52px !important;
  flex-shrink: 0;
  text-align: center;
}

.vw-ratio-display {
  font-family: 'Courier New', monospace;
  font-size: 15px;
  font-weight: bold;
  color: #c0392b;
  text-decoration: underline;
  padding: 6px 0 2px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: #c0392b;
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}

.btn-primary:hover { background: #a93226; }

.btn-secondary {
  background: none;
  border: 1px solid #c0392b;
  color: #c0392b;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: #c0392b;
  color: #fff;
}

.form-msg {
  font-size: 13px;
  margin-top: 10px;
  color: #27ae60;
  min-height: 20px;
}

/* Recipe list */
.recipe-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.recipe-item:last-child { border-bottom: none; }

.recipe-thumb {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border: 1px solid #eee;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafafa;
}

.recipe-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.no-img {
  font-size: 10px;
  color: #ccc;
  text-align: center;
}

.recipe-info {
  flex: 1;
  min-width: 0;
}

.recipe-ings {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 4px;
}

.recipe-vw {
  font-size: 12px;
  font-weight: 700;
  color: #c0392b;
  font-family: 'Courier New', monospace;
}

.recipe-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.edit-btn,
.delete-btn {
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
}

.edit-btn { color: #555; }
.edit-btn:hover { border-color: #555; background: #f5f5f5; color: #111; }

.delete-btn { color: #bbb; }
.delete-btn:hover { border-color: #c0392b; color: #c0392b; }

.btn-cancel {
  width: 100%;
  background: none;
  border: 1px solid #ddd;
  color: #888;
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}

.btn-cancel:hover { border-color: #999; color: #333; }

.empty-state {
  font-size: 13px;
  color: #bbb;
  text-align: center;
  padding: 32px 0;
}
