:root {
  --bg: #f7f5f1;
  --bg-accent: #f2ede5;
  --card-bg: #ffffff;
  --text: #16150f;
  --muted: #726f66;
  --primary: #ff5b1f;
  --primary-2: #ff8a42;
  --primary-dark: #d8460f;
  --ink: #14120f;
  --gold: #ffb020;
  --gold-2: #ffc766;
  --border: #ece6da;
  --green: #12b76a;
  --whatsapp: #25d366;
  --shadow-sm: 0 1px 2px rgba(20, 18, 15, 0.07);
  --shadow-md: 0 8px 24px -8px rgba(216, 70, 15, 0.22);
  --shadow-lg: 0 20px 45px -12px rgba(216, 70, 15, 0.32);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1100px 500px at 100% -10%, #fde9d8 0%, rgba(253, 233, 216, 0) 60%),
    radial-gradient(900px 500px at -10% 10%, #fdf1e2 0%, rgba(253, 241, 226, 0) 55%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---------- Splash ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 50% 40%, rgba(255, 255, 255, 0.045), transparent 65%),
    #000000;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-inner { position: relative; text-align: center; padding: 60px 90px; }

.splash-logo {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(100deg,
    #5c5c66 10%, #ffffff 30%, #fff6df 42%, #ffd88a 50%, #fff6df 58%, #ffffff 70%, #5c5c66 90%);
  background-size: 260% 100%;
  background-position: 160% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  filter: drop-shadow(0 0 22px rgba(255, 216, 138, 0.18));
  animation: splashIn .7s cubic-bezier(.2,.8,.2,1) forwards, shine 2.8s linear .7s infinite;
}

.splash-sub {
  margin-top: 12px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0;
  animation: splashIn .8s cubic-bezier(.2,.8,.2,1) .2s forwards;
}

.splash-bar {
  margin: 30px auto 0;
  width: 140px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.splash-bar-fill {
  height: 100%;
  width: 45%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffd88a, transparent);
  animation: splashBar 1.3s ease-in-out infinite;
}

.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, .85);
  opacity: 0;
  animation: twinkle 2.4s ease-in-out infinite;
}
.sparkle.gold { background: #ffd88a; box-shadow: 0 0 8px 2px rgba(255, 216, 138, .85); }

.sparkle.s1 { top: 12%; left: 8%;  width: 3px; height: 3px; animation-delay: .1s; }
.sparkle.s2 { top: 70%; left: 4%;  width: 2px; height: 2px; animation-delay: .9s; }
.sparkle.s3 { top: 20%; left: 92%; width: 2px; height: 2px; animation-delay: .4s; }
.sparkle.s4 { top: 78%; left: 90%; width: 3px; height: 3px; animation-delay: 1.3s; }
.sparkle.s5 { top: 6%;  left: 45%; width: 3px; height: 3px; animation-delay: .6s; }
.sparkle.s6 { top: 85%; left: 60%; width: 3px; height: 3px; animation-delay: 1.6s; }
.sparkle.s7 { top: 45%; left: 2%;  width: 2px; height: 2px; animation-delay: 1.1s; }
.sparkle.s8 { top: 40%; left: 96%; width: 3px; height: 3px; animation-delay: .2s; }

@keyframes splashIn { to { opacity: 1; } }
@keyframes shine { to { background-position: -100% 0; } }
@keyframes splashBar {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(350%); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(.5); }
  50% { opacity: 1; transform: scale(1.4); }
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(160deg, #26241f, var(--ink));
  color: var(--primary-2);
  box-shadow: var(--shadow-md);
}
.brand-accent {
  background: linear-gradient(90deg, var(--primary), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-btn {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav-btn:hover { background: var(--bg-accent); color: var(--text); }
.nav-btn.active {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: white;
  box-shadow: var(--shadow-md);
}

#app { max-width: 920px; margin: 0 auto; padding: 32px 24px 64px; }

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

.view.narrow { max-width: 480px; margin: 0 auto; }

h1 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
h2 { font-size: 16px; margin: 0 0 8px; font-weight: 700; }

.btn {
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}
.btn.primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn.link { border: none; background: none; color: var(--primary-2); padding: 0; font-weight: 700; }
.btn.link:hover { transform: none; box-shadow: none; text-decoration: underline; }
.btn.whatsapp {
  background: linear-gradient(135deg, #2be387, var(--whatsapp));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(37, 211, 102, 0.55);
}
.btn.whatsapp.solid {
  background: linear-gradient(135deg, var(--whatsapp), #1da851);
}

.wa-qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 14px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  background: #fff;
}
.btn.danger { color: #dc2626; border-color: #fecaca; }
.btn.danger.solid {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(220, 38, 38, 0.5);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.mini { padding: 4px 10px; font-size: 12px; border-radius: 8px; }

.type-select {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #ffece0;
  color: var(--primary-dark);
  cursor: pointer;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 18, 15, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 24px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.modal-box p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

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

.section-heading {
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  margin: 22px 0 2px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.section-heading:first-child { margin-top: 0; }

.row-number {
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
}

.customer-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.customer-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.customer-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--primary-2);
  background: linear-gradient(160deg, #26241f, var(--ink));
  flex-shrink: 0;
}
.customer-card .row { display: flex; align-items: center; gap: 14px; }
.customer-card .name { font-weight: 700; }
.customer-card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ffece0;
  color: var(--primary-dark);
  font-weight: 700;
}
.badge.icerik { background: var(--ink); color: var(--gold-2); }

.payment-tag {
  display: inline-block;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.payment-tag.odendi { border-color: var(--green); color: var(--green); background: #f0fdf4; }
.payment-tag.bekliyor { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.payment-tag.zamani_gelmedi { border-color: #d97706; color: #b45309; background: #fffbeb; }
.payment-tag.next { border-color: #94a3b8; color: #475569; background: #f8fafc; }

.bildirimler-card {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bildirim-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #7c2d12;
  line-height: 1.6;
}
.bildirim-row.urgent { color: #9f1239; }
.bildirim-icon { font-size: 15px; flex-shrink: 0; }
.devam-onayi-list { display: flex; flex-direction: column; gap: 6px; }
.devam-onayi-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.duyuru-select-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.duyuru-customer-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 14px;
  background: #fbfaf5;
}
.duyuru-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  cursor: pointer;
}
.duyuru-row:last-child { border-bottom: none; }
.duyuru-group-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 12px 0 4px;
}
.duyuru-group-heading:first-child { padding-top: 4px; }
.duyuru-row.disabled { color: var(--muted); cursor: not-allowed; }
.duyuru-row input[type="checkbox"] { width: 16px; height: 16px; }

.duyuru-item-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 10px;
}
.duyuru-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-accent);
}
.duyuru-item.gonderildi { background: #dcfce7; color: #166534; }
.duyuru-item.hata { background: #fee2e2; color: #991b1b; }
.duyuru-item.gonderiliyor { background: #fef3c7; color: #92400e; }
.bildirim-name {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.payment-summary { margin-bottom: 24px; }
.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.summary-header-title { font-weight: 700; color: var(--ink); font-size: 14px; }
.summary-hidden-note { margin: 0; }
.payment-summary-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.summary-card {
  background: #fff;
  border: 1px solid rgba(20, 18, 15, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 220px;
  flex: 1;
}
.summary-title {
  font-weight: 800;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  padding: 3px 0;
}
.summary-row strong { color: var(--ink); font-size: 14px; }
.summary-row strong.ok { color: var(--green); }
.summary-row strong.warn { color: #dc2626; }
.summary-row.total { border-top: 1px solid rgba(20, 18, 15, 0.08); margin-top: 6px; padding-top: 8px; }
.summary-row.total strong { font-size: 16px; }

.btn.payment-toggle.odendi { border-color: var(--green); color: var(--green); }
.btn.payment-toggle.bekliyor { border-color: #dc2626; color: #dc2626; }
.btn.payment-toggle.zamani_gelmedi { border-color: #d97706; color: #b45309; }

.payment-status { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.ucret-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ucret-value { font-weight: 700; color: var(--ink); font-size: 14px; }

.reklam-metrik-baglanti { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.reklam-metrik-ozet-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.reklam-metrik-tablo { width: 100%; border-collapse: collapse; font-size: 13px; }
.reklam-metrik-tablo th, .reklam-metrik-tablo td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.reklam-metrik-tablo th { color: var(--muted); font-weight: 600; }
.reklam-metrik-ozet-card { margin-bottom: 24px; overflow-x: auto; }

.progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 92px; }
.progress-text { font-size: 12px; color: var(--muted); font-weight: 600; }
.progress-track {
  width: 92px;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-accent);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--primary-2));
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--card-bg);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form input, .form select, textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  background: #fbfaf5;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.form input:focus, .form select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(255, 91, 31, 0.15);
}
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.detail-head { display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); font-size: 13px; }

.steps-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease;
}
.step-card:hover { box-shadow: var(--shadow-md); }
.step-card.done {
  border-color: rgba(18, 183, 106, 0.35);
  background: linear-gradient(180deg, #f2fbf6, #ffffff);
}

.step-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.step-label { font-weight: 700; font-size: 14px; }
.step-done-tag {
  font-size: 12px;
  color: var(--green);
  font-weight: 700;
  background: rgba(18, 183, 106, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.step-message {
  margin-top: 12px;
  font-size: 13px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  white-space: pre-wrap;
  color: #4a463e;
}

.step-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.step-image-wrap { margin-top: 12px; }
.step-image {
  max-width: 260px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.step-image-hint { margin-top: 6px; font-size: 12px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.inline-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 14px 0;
}
.inline-label input,
.inline-label textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  background: #fbfaf5;
}

.template-row {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.template-row:first-child { border-top: none; }
.template-row-head { display: flex; justify-content: space-between; align-items: center; }
.template-row textarea { width: 100%; min-height: 70px; resize: vertical; }
.template-row select { width: 180px; }

.template-image-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.template-image-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.template-image-upload-label { cursor: pointer; margin: 0; }
.template-row input[type="text"] { font-weight: 600; }

.reklam-alt-baslik { margin: 20px 0 8px; font-size: 15px; }
.reklam-aralik-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.reklam-aralik-ozel { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.reklam-kart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.reklam-kart { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.reklam-kart-etiket { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.reklam-kart-deger { font-size: 18px; font-weight: 700; }
.reklam-kart-not { font-size: 11px; margin-top: 2px; word-break: break-word; }
.reklam-tablo-wrap { overflow-x: auto; }

.reklam-satir { cursor: pointer; }
.reklam-satir:hover { background: rgba(0,0,0,0.04); }
