:root {
  --arka: #ffffff;
  --kart: #ffffff;
  --cizgi: #111111;
  --metin: #000000;
  --soluk: #000000;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: var(--metin);
  background: var(--arka);
  padding: 28px 20px 60px;
  -webkit-tap-highlight-color: transparent;
}

header {
  max-width: 1080px;
  margin: 0 auto 26px;
}

.marka {
  display: flex;
  align-items: center;
  gap: 13px;
}

.ust-sekmeler {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: #ffffff;
  border: 1.5px solid var(--cizgi);
  border-radius: 13px;
}

.ust-sekme {
  min-width: 120px;
  padding: 9px 24px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--metin);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.ust-sekme:hover {
  background: #eeeeee;
}

.ust-sekme.aktif {
  background: #000000;
  color: #ffffff;
}

.sayfa {
  display: none;
}

.sayfa.aktif {
  display: block;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 20px;
  align-items: start;
}

.kart {
  background: var(--kart);
  border: 1.5px solid var(--cizgi);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--soluk);
  margin: 14px 0 6px;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1.5px solid var(--cizgi);
  background: #ffffff;
  color: var(--metin);
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: box-shadow 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15);
}

textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.5;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  padding-right: 36px;
  cursor: pointer;
}

select option {
  background: #ffffff;
  color: var(--metin);
}

.ikili {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.secenekler {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 2px 16px;
  margin-top: 18px;
  border-top: 1.5px solid var(--cizgi);
  padding-top: 6px;
}

.renk-satir {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="color"] {
  width: 52px;
  height: 40px;
  padding: 3px;
  border: 1.5px solid var(--cizgi);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.minik {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  border: 1.5px solid var(--cizgi);
  background: #ffffff;
  color: var(--metin);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.minik:hover {
  background: #eeeeee;
}

input[type="file"] {
  width: 100%;
  font-size: 0.82rem;
  color: var(--soluk);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 1.5px solid var(--cizgi);
  border-radius: 9px;
  background: #ffffff;
  color: var(--metin);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
}

input[type="file"]::file-selector-button:hover {
  background: #eeeeee;
}

.minik-metin {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--metin);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.onizleme-kart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.qr-sarmal {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid var(--cizgi);
  padding: 7%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: background 0.2s;
}

.qr-sarmal.bos {
  background: #ffffff;
  border: 1.5px dashed var(--cizgi);
  box-shadow: none;
}

.qr-kutu {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-kutu canvas,
.qr-kutu img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.logo-onizleme {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20%;
  height: auto;
  pointer-events: none;
}

.bos-durum {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--soluk);
  text-align: center;
  padding: 22px;
}

.bos-durum svg {
  width: 54px;
  height: 54px;
  opacity: 0.5;
}

.bos-durum p {
  margin: 0;
  font-size: 0.9rem;
}

.hata-mesaj {
  color: var(--metin);
  font-size: 0.86rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
}

.butonlar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  flex: 1;
  min-width: 118px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.18s;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.birincil {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
}

.birincil:hover {
  background: #1f1f1f;
}

.ikincil {
  background: #ffffff;
  border-color: #000000;
  color: #000000;
}

.ikincil:hover {
  background: #eeeeee;
}

.kisi-bolum {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1.5px dashed var(--cizgi);
  padding-top: 16px;
}

.kisi-baslik {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.kisi-kart {
  border: 1.5px solid var(--cizgi);
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
}

.kisi-ust {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.kisi-avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
}

.kisi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.kisi-ad {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  word-break: break-word;
}

.kisi-alt {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: rgba(0, 0, 0, 0.6);
  word-break: break-word;
}

.kisi-satir {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.88rem;
  word-break: break-word;
}

.kisi-ikon {
  flex: none;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kisi-ikon svg {
  width: 16px;
  height: 16px;
}

.kisi-bos {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.5;
}

.ipucu {
  margin: 0 0 10px;
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.5;
}

.imza-alan {
  display: block;
  width: 100%;
  height: auto;
  border: 1.5px solid var(--cizgi);
  border-radius: 12px;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.imza-araclar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.imza-araclar input[type="range"] {
  flex: 1;
  min-width: 120px;
  accent-color: #000000;
}

.imza-yukle-etiket {
  font-size: 0.82rem;
  color: var(--metin);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.imza-onizleme {
  display: block;
  max-height: 64px;
  max-width: 100%;
  margin-top: 12px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1.5px dashed var(--cizgi);
  border-radius: 8px;
}

.pdf-ust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#sayfaBilgi {
  font-size: 0.86rem;
  font-weight: 600;
}

.pdf-alan {
  position: relative;
  width: 100%;
  min-height: 260px;
  border: 1.5px dashed var(--cizgi);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.pdf-alan canvas {
  display: block;
  width: 100%;
  height: auto;
}

.imza-katmani {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.imza-overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 150px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  border-radius: 4px;
}

.imza-overlay:hover {
  outline: 1.5px dashed #000000;
  outline-offset: 2px;
}

.pdf-bos {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(0, 0, 0, 0.55);
  text-align: center;
  padding: 22px;
}

.pdf-bos svg {
  width: 54px;
  height: 54px;
  opacity: 0.5;
}

.pdf-bos p {
  margin: 0;
  font-size: 0.9rem;
}

.btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.btn.yukleniyor {
  color: transparent !important;
  position: relative;
}

.btn.yukleniyor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: dondur 0.7s linear infinite;
}

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

.qr-durum {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.45;
  word-break: break-word;
}

.qr-durum.kayitli {
  color: #000000;
  font-weight: 600;
}

.qr-durum a {
  color: #000000;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}

.qr-durum a:hover {
  background: #eeeeee;
}

.profil-govde {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.profil-kart {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border: 1.5px solid var(--cizgi);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.1);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.profil-ust {
  text-align: center;
}

.profil-avatar {
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 700;
  overflow: hidden;
}

.profil-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.profil-ad {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.profil-alt {
  margin: 5px 0 0;
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.92rem;
  word-break: break-word;
}

.profil-butonlar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 6px;
}

.profil-btn {
  flex: 1;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid #000000;
  background: #ffffff;
  color: #000000;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.profil-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.profil-btn:hover {
  background: #eeeeee;
}

.profil-btn.birincil {
  background: #000000;
  color: #ffffff;
}

.profil-btn.birincil:hover {
  background: #1f1f1f;
}

.profil-liste {
  margin-top: 16px;
  border-top: 1.5px dashed var(--cizgi);
}

.profil-liste .kisi-satir {
  padding: 12px 0;
  font-size: 0.92rem;
}

.profil-liste a {
  color: #000000;
  text-decoration: none;
}

.profil-liste a:hover {
  text-decoration: underline;
}

.profil-imza {
  text-align: center;
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.04em;
}

.profil-durum {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.qr-modal-butonlar {
  display: flex;
  gap: 8px;
  width: 100%;
}

.cevirici {
  width: 100%;
  max-width: 430px;
  perspective: 1400px;
}

.cevirici-ic {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.cevirici.cevrildi .cevirici-ic {
  transform: rotateY(180deg);
}

.profil-arka {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
}

.qr-arka-qr {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-arka-qr canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.durum-kutu {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border: 1.5px solid var(--cizgi);
  border-radius: 20px;
  padding: 30px 22px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.durum-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  border-top-color: #000000;
  border-radius: 50%;
  animation: dondur 0.8s linear infinite;
}

.durum-ikon svg {
  width: 44px;
  height: 44px;
  display: block;
}

.durum-mesaj {
  margin: 0;
  font-size: 0.95rem;
  color: #000000;
  line-height: 1.5;
}

.durum-alt {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.04em;
}

.durum-btn {
  min-width: 0;
  padding: 10px 20px;
  flex: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: #000000;
  color: #ffffff;
  border: 1.5px solid #000000;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 50;
  max-width: calc(100vw - 40px);
}

.toast.gorunur {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 880px) {
  main {
    grid-template-columns: 1fr;
  }

  .onizleme-kart {
    position: static;
    max-height: none;
    overflow: visible;
  }

  body {
    padding: 20px 14px 50px;
  }

  .ikili {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 16px 10px 44px;
  }

  header {
    margin-bottom: 18px;
  }

  .ust-sekmeler {
    display: flex;
    width: 100%;
  }

  .ust-sekme {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }

  main {
    gap: 14px;
  }

  .kart {
    padding: 16px;
  }

  .butonlar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .btn {
    min-width: 0;
  }

  .imza-araclar {
    gap: 10px;
  }

  .kisi-avatar {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }

  .profil-kart {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .profil-btn {
    min-width: 0;
    flex: 1 1 calc(50% - 4px);
  }
}
