* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  background: #141414;
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar .brand { font-size: 18px; font-weight: 800; color: #e85d8a; margin-bottom: 8px; }
.admin-meta { font-size: 12px; color: #888; margin-bottom: 16px; padding: 0 10px; }
.admin-meta small { display: block; color: #666; margin-top: 2px; }
.nav-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #555;
  padding: 14px 10px 6px;
}
.nav-link {
  color: #bbb;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  display: block;
}
.nav-link:hover, .nav-link.active { background: #2a2a2a; color: #fff; }
.nav-link.active { color: #e85d8a; font-weight: 600; }
.nav-link.logout { margin-top: auto; color: #e85d8a; }
.content { flex: 1; padding: 28px 32px; overflow-x: auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; font-weight: 800; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #eee;
}
.stat-card .label { display: block; font-size: 13px; color: #888; margin-bottom: 8px; }
.stat-card .value { font-size: 26px; font-weight: 800; color: #e85d8a; }
.stat-card .sub { font-size: 12px; color: #aaa; margin-top: 6px; }
.detail-kv th { width: 140px; color: #666; font-weight: 600; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.text-muted { color: #999; font-size: 12px; }
.text-danger { color: #c0392b; }
.detail-empty { color: #888; font-size: 13px; margin: 0; }
.recipe-detail-thumb { text-align: center; }
.recipe-thumb-img { max-width: 320px; max-height: 200px; border-radius: 12px; object-fit: cover; border: 1px solid #eee; }
.detail-chip-section { margin-bottom: 12px; }
.detail-chip-section:last-child { margin-bottom: 0; }
.detail-chip-label { font-size: 12px; font-weight: 600; color: #888; margin-bottom: 6px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff0f5;
  color: #c2185b;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #ffcce0;
}
.detail-chip-muted { background: #f5f5f5; color: #555; border-color: #e0e0e0; }
.detail-link-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e8f4fd;
  color: #1565c0;
  font-size: 11px;
  font-weight: 600;
}
.detail-nutrition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.detail-nutrition-item {
  background: #fafafa;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #eee;
}
.detail-nutrition-label { display: block; font-size: 11px; color: #888; margin-bottom: 2px; }
.detail-nutrition-value { font-size: 16px; font-weight: 700; color: #333; }
.detail-tip-block { margin-bottom: 12px; }
.detail-tip-list { margin: 4px 0 0 18px; font-size: 13px; color: #444; }
.detail-steps { display: flex; flex-direction: column; gap: 12px; }
.detail-step-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  background: #fafafa;
}
.detail-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-step-num { font-weight: 700; color: #e85d8a; font-size: 13px; }
.detail-timer-badge { font-size: 11px; color: #666; background: #fff; padding: 2px 8px; border-radius: 6px; border: 1px solid #ddd; }
.detail-step-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.detail-step-body { font-size: 13px; color: #444; line-height: 1.5; }
.detail-step-tip { font-size: 12px; color: #888; margin-top: 6px; }
.detail-step-img { max-width: 80px; max-height: 80px; margin-top: 8px; border-radius: 6px; border: 1px solid #eee; }

.panel {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #eee;
  margin-bottom: 20px;
}
.panel h2 { font-size: 16px; margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.data-table th { background: #fafafa; font-weight: 600; color: #555; white-space: nowrap; }
.data-table tr:hover td { background: #fafcff; }
.data-table .actions { white-space: nowrap; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff8e1; color: #f57f17; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-muted { background: #f5f5f5; color: #777; }
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: #e85d8a;
  color: #fff;
}
.btn:hover { background: #d44a75; }
.btn-secondary { background: #eee; color: #333; }
.btn-secondary:hover { background: #ddd; }
.btn-danger { background: #d00000; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #555; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  max-width: 480px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.form-grid .form-row input,
.form-grid .form-row select,
.form-grid .form-row textarea {
  max-width: none;
}
.form-section { margin-top: 28px; padding-top: 4px; }
.form-section-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.form-hint { font-size: 12px; color: #888; margin: 0 0 12px; }
.form-input,
.recipe-form input[type="text"],
.recipe-form input[type="number"],
.recipe-form input[type="url"],
.recipe-form textarea,
.recipe-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a1a1a;
}
.recipe-form textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.recipe-form input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #e85d8a;
}
.ingredient-row,
.tool-row {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.ingredient-row { grid-template-columns: 2fr 1.6fr 0.9fr 0.9fr auto; }
.tool-row { grid-template-columns: 1.6fr 1fr auto; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px 14px;
}
.checkbox-grid .check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
}
.taxonomy-group { margin-bottom: 14px; }
.taxonomy-group-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
}
.step-card-sub {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ingredient-row .check-label,
.tool-row .check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  white-space: nowrap;
  margin: 0;
}
.step-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fafafa;
}
.step-card-head {
  display: grid;
  grid-template-columns: 80px 1fr 110px;
  gap: 8px;
  margin-bottom: 8px;
}
.step-card .form-input + .form-input,
.step-card textarea + .form-input {
  margin-top: 8px;
}
.locale-block {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fafafa;
}
.locale-block .form-row input,
.locale-block .form-row textarea {
  max-width: none;
}
.locale-block-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.locale-block-title .locale-code {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  background: #eee;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}
.locale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.form-meta { font-size: 12px; color: #666; margin-top: 16px; }
.content .form-hint a {
  color: #e85d8a;
  text-decoration: none;
  font-weight: 600;
}
.content .form-hint a:hover { text-decoration: underline; }
.taxonomy-tabs {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.content .taxonomy-tabs .tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.content a.tab-link,
.content .tab-bar .tab-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  color: #555;
  background: #f7f7f8;
  border: 1px solid #e5e5e5;
  white-space: nowrap;
}
.content a.tab-link:hover,
.content .tab-bar .tab-link:hover {
  border-color: #e85d8a;
  color: #e85d8a;
  background: #fff5f8;
}
.content a.tab-link.active,
.content .tab-bar .tab-link.active {
  background: #e85d8a;
  border-color: #e85d8a;
  color: #fff;
}
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tab-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #555;
  background: #fff;
  border: 1px solid #e5e5e5;
}
.tab-link:hover { border-color: #e85d8a; color: #e85d8a; }
.tab-link.active {
  background: #e85d8a;
  border-color: #e85d8a;
  color: #fff;
}
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.icon-upload-row input[type="file"] { max-width: 480px; }
.icon-preview { margin: 8px 0 10px; }
.icon-preview-img,
.table-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
  padding: 4px;
}
.table-icon-lg {
  width: 160px;
  height: 160px;
  padding: 8px;
  border-radius: 12px;
}
.table-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #eee;
  background: #fafafa;
  display: block;
}
.icon-upload-row .check-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin: 8px 0;
}
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { padding: 9px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; min-width: 220px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; background: #141414; }
.login-form { background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); width: 380px; }
.login-form h1 { text-align: center; color: #e85d8a; margin-bottom: 8px; }
.login-form .subtitle { text-align: center; color: #888; font-size: 13px; margin-bottom: 24px; }
.login-form input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.login-form button { width: 100%; padding: 14px; background: #e85d8a; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 700; cursor: pointer; }
.error { color: #d00000; margin-bottom: 12px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .nav-link.logout { margin-top: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}
