:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #5b6478;
  --line: #e7eaf3;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --violet: #7c3aed;
  --accent: #f59e0b;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px -10px rgba(15, 23, 42, .10);
  --shadow-lg: 0 4px 10px rgba(15, 23, 42, .06), 0 24px 50px -16px rgba(79, 70, 229, .22);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }

/* ---------- Üst bar ---------- */
.topbar {
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(231, 234, 243, .9);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--ink);
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55);
}
.brand small { color: var(--muted); font-weight: 500; font-size: 11.5px; display: block; line-height: 1.2; letter-spacing: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .12s, box-shadow .2s, border-color .15s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6);
}
.btn-primary:hover { box-shadow: 0 10px 26px -8px rgba(79, 70, 229, .75); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: #cfd6e6; background: #fafbfe; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #15803d; }
.btn-red { background: #fee2e2; color: var(--red); }
.btn-red:hover { background: #fecaca; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 58px 20px 10px;
  text-align: center;
  overflow: visible;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .5;
  pointer-events: none;
  z-index: -1;
}
.hero::before {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(124, 58, 237, .35), transparent 65%);
  top: -120px; left: 4%;
}
.hero::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(79, 70, 229, .3), transparent 65%);
  top: -80px; right: 2%;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  letter-spacing: -1.4px;
  line-height: 1.12;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--primary), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { color: var(--muted); margin-top: 12px; font-size: 16.5px; }
.searchbox {
  max-width: 540px;
  margin: 26px auto 0;
  position: relative;
}
.searchbox .search-ico {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  color: #98a2b8;
  pointer-events: none;
  display: flex;
}
.searchbox input {
  width: 100%;
  padding: 15px 20px 15px 48px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 15.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .15s;
}
.searchbox input::placeholder { color: #9aa3b8; }
.hero-count { margin-top: 14px; font-size: 13.5px; color: #8a93a8; font-weight: 600; }

/* ---------- Kart ızgarası ---------- */
.grid {
  max-width: 1120px;
  margin: 30px auto 70px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  min-width: 0;
  animation: cardIn .45s ease both;
  transition: transform .2s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3) { animation-delay: .12s; }
.card:nth-child(4) { animation-delay: .18s; }
.card:nth-child(5) { animation-delay: .24s; }
.card:nth-child(6) { animation-delay: .3s; }
.card.pinned {
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, #f59e0b, #f97316) border-box;
}
.pin-badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: .5px;
  box-shadow: 0 6px 14px -6px rgba(245, 158, 11, .7);
}
.card-head { display: flex; align-items: center; gap: 13px; min-width: 0; }
.card-logo {
  width: 54px; height: 54px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 0 0 1px var(--line), 0 4px 10px -4px rgba(15, 23, 42, .18);
}
.card-firm { min-width: 0; }
.card-firm .name { font-weight: 800; font-size: 15px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-firm .loc {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.card-firm .loc .loc-text {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.card h3 { font-size: 19px; font-weight: 800; letter-spacing: -.5px; line-height: 1.25; }
.card .desc { color: var(--muted); font-size: 14px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 99px;
  background: #f1f3fa;
  color: #3c4356;
  text-decoration: none;
}
.chip.rate { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.chip.ok { background: #dcfce7; color: #166534; }
.chip.no { background: #fee2e2; color: #991b1b; }
a.chip:hover { background: #e8ebf5; }
.card .note {
  background: linear-gradient(135deg, #f5f6ff, #faf8ff);
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 10px 13px;
  font-size: 13px;
  color: #4b5268;
}
.card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.contact-panel { display: none; flex-direction: column; gap: 6px; width: 100%; }
.contact-panel.open { display: flex; animation: cardIn .25s ease both; }
.contact-panel a {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px;
  background: #f4f6fb;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  transition: background .15s;
}
.contact-panel a:hover { background: #e8ebf5; }
.contact-panel .contact-yetkili {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 13px;
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}
.card-date { font-size: 12px; color: #98a2b8; }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 70px 0;
  font-size: 15px;
}

/* ---------- Sihirbaz / formlar ---------- */
.wizard {
  max-width: 620px;
  margin: 36px auto 60px;
  padding: 0 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.steps {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.steps span {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--line);
  transition: background .2s;
}
.steps span.done { background: linear-gradient(90deg, var(--primary), var(--violet)); }
.step-label { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .8px; }
.panel h2 { font-size: 22px; margin-bottom: 18px; letter-spacing: -.4px; font-weight: 800; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.field textarea { resize: vertical; min-height: 90px; }
.wizard-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.logo-drop {
  border: 2px dashed #d4daea;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  transition: border-color .15s, background .15s;
}
.logo-drop:hover { border-color: var(--primary); color: var(--primary); background: #fafbff; }
.logo-preview { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line); display: block; margin: 0 auto 8px; }
.err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; font-weight: 700; }

/* ---------- Ödeme ---------- */
.pay-box {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #ddd6fe;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
}
.pay-box .amount { font-size: 40px; font-weight: 800; letter-spacing: -1px; color: var(--primary); }
.pay-box .amount small { font-size: 16px; color: var(--muted); font-weight: 500; }
.pay-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1120px; margin: 30px auto 60px; padding: 0 20px; }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-row.pinned { border-color: var(--accent); }
.admin-row.bekliyor { border-color: #f59e0b; background: #fffbeb; }
.badge-bekliyor {
  display: inline-block;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: .3px;
  vertical-align: 1px;
}
.admin-row .info { flex: 1; min-width: 220px; }
.admin-row .info .t { font-weight: 700; }
.admin-row .info .s { font-size: 13px; color: var(--muted); }
.admin-row img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 30px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-bg.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
}
.modal h3 { margin-bottom: 16px; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 13px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  .hero { padding-top: 34px; }
  .hero::before, .hero::after { width: 240px; height: 240px; filter: blur(55px); }
  .panel { padding: 20px; }
  .topbar-inner { padding: 11px 14px; }
  .brand { font-size: 18px; }
  .brand small { display: none; }
  .btn { padding: 10px 16px; font-size: 14px; }
  .grid { gap: 16px; margin-top: 22px; }
  .card { padding: 18px; }
}
