:root {
  --bg: #eef3f9;
  --card: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4eaf2;
  --brand: #175cd3;
  --brand-dark: #1849a9;
  --ok: #059669;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --ok-bg: #ecfdf5;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.11), 0 3px 12px rgba(15, 23, 42, 0.04);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 520px at -5% -10%, rgba(191, 219, 254, .82) 0%, transparent 58%),
    radial-gradient(900px 480px at 105% 0%, rgba(199, 210, 254, .65) 0%, transparent 52%),
    linear-gradient(180deg, #f8fbff 0, var(--bg) 440px),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.page {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.brand-logo {
  height: 52px;
  width: auto;
  max-width: 240px;
  display: block;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  letter-spacing: -.035em;
  font-weight: 750;
}
.hero p {
  margin: 0 auto;
  max-width: 42rem;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(208, 218, 232, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px 42px 40px;
  backdrop-filter: blur(16px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 22px;
  padding-top: 4px;
}
.section-head:not(:first-child) {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.section-head .step {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #eff6ff, #dbeafe);
  color: var(--brand);
  border: 1px solid #b9d5ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
  font-size: .92rem;
  font-weight: 800;
}
.section-head div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.section-head strong { font-size: 1.06rem; letter-spacing: -.01em; }
.section-head small { color: var(--muted); font-size: .82rem; }

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 640px) {
  .grid.two { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field > span {
  font-size: .9rem;
  font-weight: 600;
}
.field em { color: #dc2626; font-style: normal; }
.field small, .hint {
  color: var(--muted);
  font-weight: 400;
  font-size: .8rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  border: 1px solid #c9d4e3;
  border-radius: 13px;
  padding: 14px 16px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  min-height: 50px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
textarea { resize: vertical; min-height: 130px; line-height: 1.45; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(23, 92, 211, .11), 0 2px 6px rgba(15, 23, 42, .04);
}

.order-box {
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  padding: 24px;
  background: linear-gradient(145deg, #fbfdff 0%, #f6f9fd 100%);
  box-shadow: inset 0 1px 0 #fff;
}
.order-box .field { margin-bottom: 10px; }
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  border-radius: 11px;
  padding: 10px;
  margin: 1px 0 10px;
  transition: background .15s;
}
.check-row:hover { background: #f1f5f9; }
.check-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}
.check-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .88rem;
}
.check-row small { color: var(--muted); line-height: 1.35; }
.lookup-btn {
  box-shadow: none;
  background: #fff;
  color: var(--brand);
  border: 1px solid #93c5fd;
}
.lookup-status {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .86rem;
  line-height: 1.4;
}
.lookup-status.ok {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.lookup-status.err {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.order-result {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.order-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.summary-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}
.summary-cell small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  margin-bottom: 3px;
}
.summary-cell strong {
  display: block;
  font-size: .84rem;
  overflow-wrap: anywhere;
}
.product-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.product-title > div { display: flex; flex-direction: column; gap: 2px; }
.product-title strong { font-size: .9rem; }
.product-title small { color: var(--muted); font-size: .76rem; }
.link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
  padding: 2px;
}
.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.product-item:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}
.product-item:has(input:checked) {
  border-color: #60a5fa;
  background: #eff6ff;
}
.product-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.product-info { min-width: 0; }
.product-name {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
}
.product-code {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  margin-top: 2px;
}
.product-qty {
  color: #334155;
  font-weight: 700;
  font-size: .8rem;
  white-space: nowrap;
}
.field-disabled { opacity: .48; }

.iptal-panel {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid #d6e1ef;
  border-radius: 18px;
  background: linear-gradient(145deg, #fbfdff 0%, #f6f9fd 100%);
}
.iptal-result { margin-top: 14px; }

@media (max-width: 640px) {
  .order-summary { grid-template-columns: 1fr; }
  .product-title { flex-direction: column; }
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1.5px dashed #94a3b8;
  border-radius: 16px;
  padding: 30px 20px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
  position: relative;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--brand);
  background: #eff6ff;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dz-icon { font-size: 1.4rem; margin-bottom: 4px; }
.dz-title { font-weight: 600; font-size: .95rem; }
.dz-sub { color: var(--muted); font-size: .8rem; }

.file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .88rem;
}
.file-list button {
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: .85rem;
}
.file-list button:hover { color: #b91c1c; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 15px 18px;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 12px 28px rgba(23, 92, 211, .25), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .16s, filter .16s, box-shadow .16s;
}
.btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 15px 32px rgba(23, 92, 211, .28), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn:disabled { opacity: .65; cursor: not-allowed; box-shadow: none; }
.btn.ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid #bfdbfe;
  box-shadow: none;
  margin-top: 14px;
}

.privacy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
  text-align: center;
}

.alert {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: .92rem;
  line-height: 1.4;
}
.alert-toast {
  position: fixed;
  z-index: 1000;
  top: 20px;
  left: 50%;
  width: min(720px, calc(100% - 32px));
  margin: 0;
  padding: 15px 48px 15px 16px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .2);
  transform: translateX(-50%);
  animation: alert-in .22s ease-out;
}
.alert-toast[hidden] { display: none; }
.alert-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: .9rem;
}
.alert-content {
  min-width: 0;
  padding-top: 4px;
}
.alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: currentColor;
  font: 400 1.45rem/1 Arial, sans-serif;
  cursor: pointer;
  opacity: .68;
}
.alert-close:hover {
  background: rgba(15, 23, 42, .08);
  opacity: 1;
}
.alert.err {
  background: var(--err-bg);
  color: var(--err);
  border: 1px solid #fecaca;
}
.alert.err .alert-icon {
  background: #fee2e2;
  border: 1px solid #fca5a5;
}
.alert.ok {
  background: var(--ok-bg);
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert.ok .alert-icon {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
}
@keyframes alert-in {
  from { opacity: 0; transform: translate(-50%, -12px) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.success-card {
  text-align: center;
  padding: 36px 24px;
}
.success-card .btn {
  margin: 16px auto 8px;
  max-width: 280px;
  display: inline-flex;
  justify-content: center;
}
.success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 1px solid #a7f3d0;
}
.success-card h2 { margin: 0 0 8px; }
.success-card p { color: var(--muted); margin: 0; line-height: 1.5; }
.ticket-no {
  margin-top: 14px !important;
  color: var(--ink) !important;
  font-size: 1rem;
}

.foot {
  text-align: center;
  margin-top: 22px;
}

@media (min-width: 900px) {
  #formCard {
    position: relative;
  }
  #formCard::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: var(--radius) 0 0 var(--radius);
    background: linear-gradient(180deg, #175cd3, #7f56d9 55%, #12b76a);
    opacity: .9;
  }
  textarea {
    min-height: 160px;
  }
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 24px, 1040px);
    padding: 24px 0 40px;
  }
  .card {
    padding: 24px 18px 28px;
    border-radius: 18px;
  }
  .brand-logo { height: 44px; }
  .hero { margin-bottom: 20px; }
  .order-box { padding: 16px; }
  .alert-toast {
    top: 10px;
    width: calc(100% - 20px);
    padding: 13px 44px 13px 13px;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    border-radius: 14px;
    font-size: .86rem;
  }
  .alert-icon {
    width: 28px;
    height: 28px;
  }
}
.foot a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
}
.foot a:hover { color: var(--brand); }
