:root {
  --koyu: #20382a;
  --yesil: #2e7d4f;
  --yesil-acik: #e3f1e8;
  --kirmizi: #c0392b;
  --kirmizi-acik: #fbe7e4;
  --zemin: #f4f1ea;
  --kart: #ffffff;
  --yazi: #1d241f;
  --soluk: #5d6b62;
  --cizgi: #d9d4c7;
  --altin: #c9a227;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--zemin); color: var(--yazi);
  font: 19px/1.4 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.ust {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--koyu); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
}
.logo { font-weight: 700; font-size: 22px; letter-spacing: .3px; }
.kim { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 18px; }

.ekran { padding: 16px; max-width: 640px; margin: 0 auto; }
h2 { font-size: 24px; margin: 6px 0 12px; }
h3 { font-size: 20px; margin: 22px 0 8px; color: var(--soluk); font-weight: 600; }

/* alt menü */
.alt {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--cizgi);
  padding-bottom: env(safe-area-inset-bottom);
}
.alt button {
  background: none; border: 0; padding: 8px 0 10px; font-size: 15px; color: var(--soluk);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.alt button span { font-size: 26px; line-height: 1.1; }
.alt button.secili { color: var(--koyu); font-weight: 700; }
.alt button.secili span { transform: scale(1.1); }

/* mikrofon */
.mik {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 210px; border: 0; border-radius: 28px;
  background: radial-gradient(circle at 50% 35%, #3b9a63, var(--koyu));
  color: #fff; font-size: 22px; font-weight: 700; box-shadow: 0 8px 22px rgba(32,56,42,.3);
}
.mik .mik-ikon { font-size: 76px; line-height: 1; }
.mik.dinliyor { background: radial-gradient(circle at 50% 35%, #e0584a, #8e2418); animation: nabiz 1.2s infinite; }
@keyframes nabiz { 0%,100% { box-shadow: 0 0 0 0 rgba(224,88,74,.5); } 50% { box-shadow: 0 0 0 18px rgba(224,88,74,0); } }
.canli { min-height: 32px; margin: 12px 4px 0; font-size: 22px; font-style: italic; color: var(--koyu); text-align: center; }

.yaz { display: flex; gap: 8px; margin-top: 12px; }
.yaz input { flex: 1; min-width: 0; padding: 14px; border: 2px solid var(--cizgi); border-radius: 14px; background: #fff; font-size: 19px; }
.yaz button { border: 0; border-radius: 14px; background: var(--koyu); color: #fff; padding: 0 18px; font-weight: 700; }
.ornek { margin-top: 10px; font-size: 16px; color: var(--soluk); }
.ornek b { color: var(--yazi); font-weight: 600; }

.ozet-iki { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.kutu { background: var(--kart); border-radius: 18px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.kutu .et { font-size: 16px; color: var(--soluk); }
.kutu .deger { font-size: 26px; font-weight: 800; }
.cikan .deger { color: var(--kirmizi); }
.giren .deger { color: var(--yesil); }

.dugmeler { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.buyuk-dugme {
  border: 0; border-radius: 18px; padding: 18px 10px; background: var(--kart); font-size: 19px; font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.1); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
.buyuk-dugme span { font-size: 34px; }

/* listeler */
.liste { background: var(--kart); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.satir { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border: 0; background: none; text-align: left; border-bottom: 1px solid #eee9de; }
.satir:last-child { border-bottom: 0; }
.satir .ik { font-size: 28px; width: 40px; text-align: center; flex: none; }
.satir .orta { flex: 1; min-width: 0; }
.satir .bas { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.satir .alt-yazi { font-size: 15px; color: var(--soluk); }
.satir .tut { font-weight: 800; white-space: nowrap; }
.eksi { color: var(--kirmizi); }
.arti { color: var(--yesil); }
.bos { padding: 18px; color: var(--soluk); text-align: center; }
.gun-baslik { font-size: 16px; font-weight: 700; color: var(--soluk); margin: 18px 4px 6px; display: flex; justify-content: space-between; }

.ara { width: 100%; padding: 14px; border: 2px solid var(--cizgi); border-radius: 14px; font-size: 19px; background: #fff; }
.ust-satir { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.ust-satir .ara { flex: 1; }
.ekle { border: 0; background: var(--koyu); color: #fff; border-radius: 14px; padding: 14px 16px; font-weight: 700; white-space: nowrap; }

/* cari detay */
.geri { border: 0; background: none; font-size: 18px; color: var(--koyu); padding: 4px 0; font-weight: 700; }
.bakiye { border-radius: 20px; padding: 18px; text-align: center; margin: 8px 0 12px; }
.bakiye .b-et { font-size: 18px; }
.bakiye .b-tut { font-size: 34px; font-weight: 800; }
.bakiye.borclu { background: var(--kirmizi-acik); color: var(--kirmizi); }
.bakiye.alacakli { background: var(--yesil-acik); color: var(--yesil); }
.bakiye.kapali { background: #ece9e1; color: var(--soluk); }

/* alttan açılan sayfa */
.perde { position: fixed; inset: 0; z-index: 20; background: rgba(20,30,24,.5); display: flex; align-items: flex-end; justify-content: center; }
.perde[hidden] { display: none; }
.sayfa {
  background: var(--zemin); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto;
  border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  animation: yuksel .18s ease-out;
}
@keyframes yuksel { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sayfa h2 { margin-top: 0; }
.alan { margin: 12px 0; }
.alan > label { display: block; font-size: 16px; color: var(--soluk); margin-bottom: 6px; font-weight: 600; }
.alan input, .alan textarea { width: 100%; padding: 14px; border: 2px solid var(--cizgi); border-radius: 14px; background: #fff; font-size: 20px; }
.alan input.tutar-giris { font-size: 34px; font-weight: 800; text-align: center; }
.alan input:focus, .yaz input:focus, .ara:focus { outline: none; border-color: var(--yesil); }
.ipucu { font-size: 15px; margin-top: 6px; }
.ipucu.yeni { color: #9a6b00; }
.ipucu.var { color: var(--yesil); }

.cipler { display: flex; flex-wrap: wrap; gap: 8px; }
.cip { border: 2px solid var(--cizgi); background: #fff; border-radius: 999px; padding: 10px 14px; font-size: 17px; }
.cip.secili { background: var(--koyu); border-color: var(--koyu); color: #fff; font-weight: 700; }
.kat-izgara { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kat { border: 2px solid var(--cizgi); background: #fff; border-radius: 16px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; font-size: 15px; font-weight: 600; }
.kat span { font-size: 30px; }
.kat.secili { border-color: var(--yesil); background: var(--yesil-acik); }

.onay-ozet { background: #fff; border-radius: 20px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.onay-ozet .o-tip { font-size: 17px; font-weight: 800; letter-spacing: .5px; color: var(--soluk); text-transform: uppercase; }
.onay-ozet .o-ad { font-size: 24px; font-weight: 800; margin-top: 4px; }
.onay-ozet .o-tut { font-size: 40px; font-weight: 900; color: var(--koyu); }
.duyulan { font-size: 15px; color: var(--soluk); margin-top: 8px; font-style: italic; }

.eylem { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.sayfa .eylem {
  position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); z-index: 2;
  background: var(--zemin); margin: 16px -16px calc(-18px - env(safe-area-inset-bottom));
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--cizgi);
}
.eylem button { border: 0; border-radius: 18px; padding: 18px 8px; font-size: 21px; font-weight: 800; }
.kaydet { background: var(--yesil); color: #fff; }
.vazgec { background: #e3dfd5; color: var(--yazi); }
.sil { background: var(--kirmizi-acik); color: var(--kirmizi); }
.tek { display: block; width: 100%; margin-top: 10px; border: 0; border-radius: 16px; padding: 16px; font-size: 19px; font-weight: 700; }

.dort { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.cubuk { margin: 8px 0; }
.cubuk .c-ust { display: flex; justify-content: space-between; font-size: 17px; }
.cubuk .c-zemin { height: 12px; background: #e8e4da; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.cubuk .c-dolu { height: 100%; background: var(--yesil); border-radius: 6px; }

.sekme { display: grid; grid-template-columns: repeat(3, 1fr); background: #e3dfd5; border-radius: 14px; padding: 4px; margin-bottom: 12px; }
.sekme button { border: 0; background: none; padding: 10px; border-radius: 10px; font-weight: 700; color: var(--soluk); }
.sekme button.secili { background: #fff; color: var(--koyu); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

.tost {
  position: fixed; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30;
  background: #1d241f; color: #fff; border-radius: 16px; padding: 14px 16px; font-size: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 608px; margin: 0 auto;
}
.tost[hidden] { display: none; }
.tost button { background: none; border: 0; color: #9be3b4; font-weight: 800; font-size: 18px; }

.not { background: #fff7dc; border: 1px solid #ecd98f; border-radius: 14px; padding: 12px; font-size: 15px; margin-top: 18px; color: #6b5300; }
.ayar-satir { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--cizgi); }
.anahtar { width: 56px; height: 32px; }
