/* Promosyon/Fırsat Botu Paneli — sade, modern tema */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1d24;
  --muted: #6b7280;
  --primary: #d6453d;
  --primary-hover: #c0392b;
  --danger: #b00020;
  --success: #2e7d32;
  --info: #1565c0;
  --radius: 8px;
}

* { box-sizing: border-box; }

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

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-weight: 700;
  font-size: 17px;
  color: var(--primary);
  text-decoration: none;
}
.topbar nav a { margin-left: 12px; text-decoration: none; color: var(--text); }
.topbar nav a:hover { color: var(--primary); }

/* Container */
.container {
  max-width: 960px;
  margin: 24px auto;
  padding: 0 24px;
}

/* Flash messages */
.flashes { margin-bottom: 16px; }
.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  border-left: 4px solid;
  background: var(--surface);
}
.flash-success { border-color: var(--success); color: var(--success); }
.flash-error { border-color: var(--danger); color: var(--danger); }
.flash-info { border-color: var(--info); color: var(--info); }

/* Page head */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.page-head h1 { margin: 0; font-size: 22px; }

/* Hint text */
.hint {
  font-size: 13px;
  background: #fff7f5;
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: var(--radius);
  margin: 0 0 18px;
}
.hint.muted { background: #f0f1f3; border-left-color: var(--muted); }

/* Buttons */
.btn, .btn-sm {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}
.btn:hover, .btn-sm:hover { background: var(--primary-hover); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-ghost {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: #f0f1f3; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8b0017; }

/* Login */
.login-wrap {
  max-width: 360px;
  margin: 80px auto;
}
.login-card {
  background: var(--surface);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.login-card h1 { margin: 0 0 4px; font-size: 24px; }
.login-card p.muted { margin: 0 0 24px; }

/* Forms */
form label {
  display: block;
  margin-bottom: 16px;
}
form label span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
}
form input[type=text],
form input[type=url],
form input[type=number],
form input[type=password],
form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
form textarea { resize: vertical; }
form input[type=file] { font-size: 13px; }
form input:focus, form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
form small.muted {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 12px;
}

.recipe-form { max-width: 640px; }
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* Fieldset (settings) */
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 6px;
  margin-bottom: 24px;
  background: var(--surface);
}
legend {
  font-weight: 700;
  font-size: 15px;
  padding: 0 8px;
  color: var(--primary);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .two-col { grid-template-columns: 1fr; }
}

/* Promosyon list table */
.recipe-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.recipe-table th, .recipe-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.recipe-table th {
  background: #f0f1f3;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.recipe-table tr:last-child td { border-bottom: none; }
.recipe-table td.thumb { width: 60px; }
.recipe-table td.thumb img {
  width: 44px; height: 44px;
  object-fit: cover;
  border-radius: 6px;
}
.thumb-empty {
  width: 44px; height: 44px;
  background: #f0f1f3;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted);
}

/* Order/sıralama kolonu */
.col-order { width: 90px; }
.order-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.order-buttons form { display: inline; }
.order-buttons .btn-sm {
  padding: 4px 8px;
  min-width: 28px;
}
.order-spacer { display: inline-block; width: 28px; }
.order-num {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

/* Promosyon ad/açıklama hücreleri */
.promo-name { font-weight: 600; }
.promo-desc { font-size: 13px; color: var(--muted); max-width: 240px; }
.promo-link a { color: var(--info); font-size: 13px; word-break: break-all; }

.actions { white-space: nowrap; }
.actions form { display: inline; }

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.empty p { margin: 0 0 16px; color: var(--muted); }

/* Current photo edit */
.current-photo {
  margin-bottom: 16px;
  padding: 12px;
  background: #f0f1f3;
  border-radius: var(--radius);
}
.current-photo img {
  margin-top: 8px;
  max-width: 200px;
  max-height: 150px;
  border-radius: 6px;
  display: block;
}
.current-photo img.logo-preview {
  max-width: 240px;
  max-height: 80px;
  object-fit: contain;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-weight: 400 !important;
  font-size: 13px;
}
.inline-check input { margin: 0; }

.muted { color: var(--muted); }
small.muted { font-weight: 400; }

/* Preview note (form sayfasında) */
.preview-note {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.preview-note h3 {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--muted);
}
.preview-card {
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-card img {
  width: 100%;
  display: block;
  background: #f0f1f3;
}
.preview-body { padding: 12px 14px; }
.preview-line { margin-bottom: 6px; font-size: 14px; }
.preview-line:last-child { margin-bottom: 0; }
.preview-line a { color: var(--info); }
