/* Tarif Defteri - Premium PWA */
:root {
  --bg: #f6f5f2;
  --card-bg: #fff;
  --primary: #2d5016;
  --primary-light: #4a7c2a;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #e8e6e1;
  --radius: 10px;
  --radius-card: 16px;
  --radius-lg: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-soft: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --danger: #c33;
  --success: #2d5016;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  -webkit-tap-highlight-color: transparent;
}

/* Page container - 980px ortalı */
.page {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

/* İçerik alanı - beyaz kart, header altında doğal akış */
.main {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  min-height: 320px;
}

/* Header - sticky, normal akış, iOS safe-area */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--primary);
  color: #fff;
  padding: 14px 18px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  box-shadow: var(--shadow);
  border-radius: var(--radius-card);
  margin-bottom: 0;
  transition: box-shadow 0.2s ease;
}

.header.scrolled {
  box-shadow: var(--shadow-soft);
}

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

.header-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.btn-logout {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.3);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(255,255,255,0.95);
  color: var(--text);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Kategori chip bar – desktop’ta header-actions altında wrap */
.header-chips-wrap {
  margin-top: 10px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.chip:hover {
  background: rgba(255,255,255,0.4);
}

.chip.active {
  background: #fff;
  color: var(--primary);
}

.btn {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
}

.btn-back {
  background: transparent;
  color: var(--primary);
  margin-bottom: 12px;
  padding: 8px 0;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  margin-top: 6px;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.btn-remove {
  background: #e8e6e2;
  color: var(--text-muted);
  flex-shrink: 0;
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: rgba(204,51,51,0.08);
}

.btn-icon {
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
}

.btn-favorite {
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 1.25rem;
  border: none;
}

.btn-favorite.active,
.recipe-card-fav.active {
  color: #f5c842;
}

.btn-block {
  width: 100%;
}

/* Main / Screens */
.main {
  padding: 24px;
  padding-bottom: 32px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Liste */
.list-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.list-empty {
  text-align: center;
  padding: 40px 24px;
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-text {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.empty-hint {
  margin: 0 0 24px 0;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.list-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recipe-card {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border);
}

.recipe-card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.recipe-card:active {
  transform: translateY(0);
}

.recipe-card-fav {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, color 0.15s ease;
}

.recipe-card-fav:hover {
  color: #f5c842;
  transform: scale(1.1);
}

.recipe-card-fav.active {
  color: #f5c842;
}

.recipe-card-body {
  padding-right: 36px;
}

.recipe-card-title {
  margin: 0 0 10px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.recipe-card-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(45,80,22,0.12);
  color: var(--primary);
  margin-bottom: 10px;
}

.recipe-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.recipe-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Detay */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.detail-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.detail-badge {
  margin-bottom: 10px;
}

.detail-badge .recipe-card-badge {
  margin-bottom: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-notes-card {
  background: #f8f7f4;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
}

.detail-notes-title {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
}

.detail-notes {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.detail-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.detail-section-head .detail-subtitle {
  margin: 0;
}

.detail-list {
  margin: 0 0 20px 0;
  padding-left: 0;
  list-style: none;
}

.detail-list li {
  margin-bottom: 10px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail-list li input[type="checkbox"] {
  margin-top: 4px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.detail-list li label {
  flex: 1;
  cursor: pointer;
  user-select: none;
}

.detail-list li.checked label {
  text-decoration: line-through;
  color: var(--text-muted);
}

.detail-steps {
  margin: 0;
  padding-left: 24px;
  counter-reset: step;
}

.detail-steps li {
  margin-bottom: 18px;
  padding-left: 10px;
  line-height: 1.6;
  position: relative;
}

.detail-steps li::marker {
  font-weight: 600;
  color: var(--primary);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.detail-actions .btn {
  flex: 1;
  min-width: 100px;
}

/* Detay ekranı – kompakt spacing (sadece .recipe-detail içinde) */
.recipe-detail .detail-header {
  margin-bottom: 8px;
}

.recipe-detail .detail-title {
  margin-bottom: 0;
}

.recipe-detail .detail-badge {
  margin-bottom: 8px;
}

.recipe-detail .detail-badge .recipe-card-badge {
  margin-bottom: 0;
}

.recipe-detail .detail-meta {
  margin-bottom: 12px;
  gap: 10px;
}

.recipe-detail .detail-notes-card {
  padding: 12px 16px;
  margin-bottom: 16px;
}

.recipe-detail .detail-notes-title {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
}

.recipe-detail .detail-section {
  margin-bottom: 16px;
}

.recipe-detail .detail-section-head {
  margin-bottom: 8px;
}

.recipe-detail .detail-subtitle {
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.recipe-detail .detail-section-head .detail-subtitle {
  margin: 0;
}

.recipe-detail .detail-list {
  margin: 0 0 12px 0;
}

.recipe-detail .detail-list li {
  margin-bottom: 8px;
  gap: 10px;
}

.recipe-detail .detail-steps {
  padding-left: 20px;
}

.recipe-detail .detail-steps li {
  margin-bottom: 12px;
  padding-left: 8px;
}

.recipe-detail .detail-actions {
  margin-top: 16px;
  padding-top: 12px;
}

/* Form */
.create-form {
  background: transparent;
  padding: 0;
  padding-bottom: 100px;
}

.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 18px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-helper {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 64px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.dynamic-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dynamic-item input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.dynamic-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.dynamic-item-actions button {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #eee;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.dynamic-item-actions button:hover {
  background: #e0ddd8;
  color: var(--text);
}

.dynamic-item-actions button[data-delete] {
  color: var(--danger);
}

.dynamic-item-actions button[data-delete]:hover {
  background: rgba(204,51,51,0.1);
}

.form-actions {
  margin-top: 24px;
}

.form-actions-sticky {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  margin: 0 -24px -24px -24px;
  padding: 18px 24px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom, 0));
}

/* Toast - success / error */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 28px;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.modal-title {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.modal-message {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-actions .btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.modal-actions .btn-danger:hover {
  background: #a32828;
}

/* Utility */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(45,80,22,0.12);
  color: var(--primary);
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.button {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

/* Login ekranı */
.screen-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 40px 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.login-title {
  margin: 0 0 28px 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  letter-spacing: -0.02em;
}

.login-form {
  width: 100%;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
}

.login-error {
  background: #fee;
  color: #c33;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  border: 1px solid #fcc;
}

.login-form .form-actions {
  margin-top: 24px;
}

@media (min-width: 768px) {
  .login-container {
    padding: 40px 32px;
  }
  
  .login-title {
    font-size: 2rem;
    margin-bottom: 32px;
  }
}

/* Desktop/Tablet optimizasyonları */
@media (min-width: 768px) {
  body {
    padding: 24px;
  }
  
  .header {
    padding: 14px 20px 16px;
  }
  
  .header-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }
  
  .main {
    padding: 28px;
    padding-bottom: 40px;
  }
  
  .recipe-card {
    padding: 20px 24px;
  }
  
  .recipe-card-title {
    font-size: 1.2rem;
  }
  
  .create-form {
    padding: 0;
  }
  
  .form-actions-sticky {
    margin: 0 -28px -28px -28px;
    padding: 20px 28px;
  }
  
  .detail-title {
    font-size: 1.85rem;
  }
  
  .detail-subtitle {
    font-size: 1.1rem;
  }
}

/* ========== MOBİL (480px altı) – Ultra kompakt v3 ========== */
@media (max-width: 480px) {
  :root {
    --s1: 4px;
    --s2: 8px;
    --s3: 12px;
    --detail-bar-h: 60px;
  }

  body {
    padding: 12px;
    font-size: 16px;
    line-height: 1.6;
  }

  .page {
    max-width: 100%;
  }

  .main {
    padding: 16px;
    margin-top: 0;
    border-radius: 14px;
    min-height: 280px;
  }

  /* ----- HEADER (mobil) – 2 satır + chip bar, top:0 iOS-safe ----- */
  .header {
    padding: 12px 14px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
    border-radius: 14px;
    top: 0;
  }

  .header-top {
    margin-bottom: 12px;
  }

  .header-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
  }

  .btn-logout {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .header-actions {
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 12px;
  }

  .header-actions .search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 10px;
    min-height: 44px;
  }

  .header-actions .btn-primary {
    padding: 12px 18px;
    font-size: 1rem;
    min-height: 44px;
    flex-shrink: 0;
  }

  /* Kategori chip’leri – ayrı satır, yatay kaydırma, scroll-snap */
  .header-chips-wrap {
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    margin-left: -4px;
    margin-right: -4px;
    padding: 4px 0;
  }

  .header-chips-wrap .category-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 2px 4px;
    min-width: min-content;
  }

  .header-chips-wrap .chip {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  /* ----- LİSTE (mobil) ----- */
  .list-cards {
    gap: 14px;
  }

  .recipe-card {
    padding: 18px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    min-height: 72px;
  }

  .recipe-card:active {
    transform: none;
  }

  .recipe-card-fav {
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    -webkit-tap-highlight-color: transparent;
  }

  .recipe-card-body {
    padding-right: 48px;
  }

  .recipe-card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
  }

  .recipe-card-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .recipe-card-meta {
    font-size: 0.9rem;
    gap: 14px;
  }

  /* ----- DETAY (mobil) – ultra kompakt + alt bar yüksekliği kadar padding ----- */
  .screen-detail .detail-content {
    padding-bottom: var(--detail-bar-h);
  }

  .recipe-detail .detail-header {
    margin-bottom: var(--s2);
  }

  .recipe-detail .detail-title {
    margin-bottom: var(--s2);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .detail-badge .recipe-card-badge {
    margin-bottom: var(--s1);
  }

  .recipe-detail .detail-meta {
    margin-bottom: var(--s2);
    font-size: 0.95rem;
    gap: 8px;
  }

  .recipe-detail .detail-notes-card {
    padding: var(--s2);
    margin-bottom: var(--s3);
    border-radius: 12px;
  }

  .recipe-detail .detail-notes-title {
    font-size: 0.95rem;
    margin-bottom: var(--s1);
  }

  .recipe-detail .detail-notes {
    font-size: 1rem;
    line-height: 1.5;
  }

  .recipe-detail .detail-section {
    margin-top: var(--s3);
    margin-bottom: var(--s2);
  }

  .recipe-detail .detail-section:first-of-type {
    margin-top: 0;
  }

  .recipe-detail .detail-section-head {
    flex-wrap: wrap;
    gap: var(--s1);
    margin-bottom: var(--s2);
  }

  .recipe-detail .detail-subtitle {
    font-size: 1.05rem;
    margin: 0;
  }

  /* Panoya kopyala – bölüm başlığı yanında küçük pill */
  .detail-section-head .btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 999px;
  }

  .recipe-detail .detail-list {
    margin: 0 0 var(--s2) 0;
  }

  .recipe-detail .detail-list li {
    margin-bottom: 4px;
    gap: 6px;
    min-height: 36px;
    align-items: center;
    padding: 4px 0;
  }

  .recipe-detail .detail-list li input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 0;
    flex-shrink: 0;
  }

  .recipe-detail .detail-list li label {
    padding: 2px 0;
    line-height: 1.4;
    cursor: pointer;
  }

  .recipe-detail .detail-steps li {
    margin-bottom: 6px;
    padding-left: 6px;
    line-height: 1.5;
  }

  /* Mobil aksiyon bar – sabit yükseklik ~60px, padding az */
  .screen-detail.active .detail-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    min-height: var(--detail-bar-h);
    padding: 6px 10px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  }

  .screen-detail.active .detail-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.875rem;
    min-height: 42px;
    border-radius: 10px;
  }

  .screen-detail.active .detail-actions .btn-primary {
    order: 1;
  }

  .screen-detail.active .detail-actions .btn-danger {
    order: 2;
  }

  .screen-detail.active .detail-actions .btn-outline:not(.btn-danger) {
    order: 3;
  }

  /* ----- FORM (mobil) ----- */
  .create-form {
    padding-bottom: 120px;
  }

  .form-section {
    margin-bottom: 28px;
  }

  .form-section-title {
    font-size: 1rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .form-group input[type="text"],
  .form-group textarea {
    padding: 14px 16px;
    font-size: 16px;
    min-height: 48px;
  }

  .form-group textarea {
    min-height: 72px;
  }

  .form-actions-sticky {
    margin: 0 -16px -16px -16px;
    padding: 16px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  }

  .form-actions-sticky .btn {
    padding: 16px;
    font-size: 1rem;
    min-height: 52px;
    border-radius: 12px;
  }

  .btn-add-row {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    min-height: 48px;
    border-radius: 10px;
  }

  .btn-add-row.btn-outline {
    margin-top: 8px;
  }

  /* Malzeme / Adım ekle butonları mobilde full width */
  #btnAddIngredient,
  #btnAddStep {
    width: 100%;
    padding: 14px;
    min-height: 48px;
    border-radius: 10px;
    margin-top: 8px;
  }

  /* ----- Boş durum / Liste loading ----- */
  .list-empty {
    padding: 48px 20px;
  }

  .empty-icon {
    font-size: 4rem;
  }

  .empty-text {
    font-size: 1.2rem;
  }

  .empty-hint {
    margin-bottom: 24px;
    font-size: 1rem;
  }

  .list-empty .btn-primary {
    padding: 14px 24px;
    min-height: 48px;
    border-radius: 12px;
  }

  .list-loading,
  .detail-loading {
    padding: 40px 20px;
    gap: 14px;
  }

  .spinner {
    width: 44px;
    height: 44px;
  }

  .btn-back {
    padding: 10px 0;
    margin-bottom: 14px;
    font-size: 1rem;
  }
}
