/* DİLEKÇEM 7/24 — kurumsal kimlik: koyu yeşil #06452F, beyaz, siyah #111111; kırmızı #D50912 YALNIZ 7/24 rozetinde. */
:root {
  --green: #06452F; --green-2: #0B5A3F; --green-soft: #EAF2EE; --green-line: #D6E3DC;
  --black: #111111; --gray: #4A5551; --gray-2: #6B7671; --line: #E3E9E6; --bg: #FFFFFF; --bg-2: #F6F8F7;
  --red-brand: #D50912; --focus: #1A73E8; --warn-bg: #FFF8E6; --warn-line: #E8C76A;
  --radius: 18px; --fs: 17px; --tap: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html.large-text { --fs: 20px; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--black); }
body { font: 400 var(--fs)/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--green); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
@media (min-width: 900px) { body { background: var(--bg-2); } .app { box-shadow: 0 0 0 1px var(--line); } }

/* Üst bar ve logo */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green); font-weight: 800; letter-spacing: .2px; font-size: 22px; }
.logo img { width: 32px; height: 32px; }
.badge-724 { background: var(--red-brand); color: #fff; border-radius: 8px; padding: 1px 7px; font-weight: 800; font-size: 19px; line-height: 1.25; }
.icon-btn { width: var(--tap); height: var(--tap); border: 0; background: transparent; border-radius: 14px; display: grid; place-items: center; cursor: pointer; color: var(--black); }
.icon-btn:hover { background: var(--green-soft); }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--green); font-weight: 600; padding: 8px 0; cursor: pointer; }

main.page { flex: 1; padding: 18px 18px calc(96px + var(--safe-b)); }
h1, h2, h3 { color: var(--green); line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 1.45em; } h2 { font-size: 1.2em; } h3 { font-size: 1.05em; }
.hero { text-align: center; padding: 8px 6px 18px; }
.hero h1 { font-size: 1.55em; font-weight: 800; }
.hero p { color: var(--gray); margin: 4px 0 0; }
.muted { color: var(--gray); } .small { font-size: .88em; } .center { text-align: center; }

/* Modül kartları (onaylı tasarım) */
.mod { display: block; width: 100%; text-align: left; border: 1.5px solid var(--green-line); border-radius: var(--radius); background: #fff; padding: 16px 16px 14px; margin: 0 0 14px; cursor: pointer; text-decoration: none; color: var(--black); }
.mod:hover { border-color: var(--green); }
.mod .row { display: flex; gap: 14px; align-items: center; }
.mod .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; flex: none; }
.mod .t { font-weight: 800; font-size: 1.18em; color: var(--green); }
.mod .s { color: var(--gray); font-size: .92em; }
.mod hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0 10px; }
.mod .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mod .free { font-weight: 700; font-size: .93em; }
.mod .paid { font-size: .9em; color: var(--gray); }
.mod.primary { background: var(--green); border-color: var(--green); color: #fff; }
.mod.primary .ico { background: rgba(255,255,255,.12); color: #fff; }
.mod.primary .t, .mod.primary .s, .mod.primary .paid { color: #fff; }
.mod.primary hr { border-top-color: rgba(255,255,255,.22); }
.official { text-align: center; font-size: .8em; color: var(--gray-2); margin-top: 6px; }

/* Alt gezinme */
.bottomnav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 10px; text-decoration: none; color: var(--gray); font-size: .82em; min-height: 62px; }
.bottomnav a.on { color: var(--green); font-weight: 800; }

/* Menü */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px); background: #fff; z-index: 51; padding: 18px; overflow-y: auto; }
.drawer a, .drawer button.link { display: block; width: 100%; text-align: left; padding: 14px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-decoration: none; color: var(--black); font-weight: 600; cursor: pointer; }

/* Ortak bileşenler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--green); background: var(--green); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--green); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--black); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.card { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; background: #fff; }
.card.soft { background: var(--bg-2); }
.notice { border-radius: 14px; padding: 12px 14px; background: var(--green-soft); border-left: 4px solid var(--green); margin: 10px 0; font-size: .93em; }
.notice.warn { background: var(--warn-bg); border-left-color: var(--warn-line); }
.chip { display: inline-flex; align-items: center; border: 1.5px solid var(--green-line); border-radius: 999px; padding: 8px 14px; margin: 0 8px 8px 0; background: #fff; cursor: pointer; font-weight: 600; min-height: 44px; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.tag { display: inline-block; font-size: .76em; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.tag.user { background: #EEF1F0; color: var(--gray); }
.tag.miss { background: var(--warn-bg); color: #7A5800; }
.field { margin: 0 0 14px; }
.field label { display: block; font-weight: 700; margin: 0 0 6px; }
.field .hint { font-size: .84em; color: var(--gray); margin-top: 4px; }
.input, textarea.input, select.input { width: 100%; min-height: var(--tap); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--green); outline: none; }
.field.missing .input { border-color: var(--warn-line); background: #FFFDF6; }
.field.error .input { border-color: #B3261E; }
.err { color: #B3261E; font-size: .88em; margin-top: 4px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--line); }
.list a, .list .item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 4px; text-decoration: none; color: var(--black); min-height: var(--tap); }
.price { font-weight: 800; color: var(--green); white-space: nowrap; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--green-line); border-top-color: var(--green); border-radius: 50%; animation: spin 0.9s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Sohbet */
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg .tools { margin-top: 6px; display: flex; gap: 8px; }
.msg .tools button { border: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; padding: 4px 0; }
.composer { position: sticky; bottom: calc(66px + var(--safe-b)); background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 8px; display: flex; gap: 6px; align-items: flex-end; }
.composer textarea { flex: 1; border: 0; resize: none; min-height: 44px; max-height: 160px; padding: 10px; outline: none; }
.composer .send { background: var(--green); color: #fff; border-radius: 12px; }
.rec { color: #fff !important; background: var(--green) !important; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--green-soft); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; color: var(--green); }

/* Belge önizleme (A4 benzeri) */
.paper { background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 8px rgba(0,0,0,.06); padding: 28px 22px; font-family: "Times New Roman", "DejaVu Serif", serif; font-size: 15px; line-height: 1.55; }
.paper .c { text-align: center; font-weight: 700; margin: 0 0 14px; }
.paper .h { font-weight: 700; margin: 14px 0 4px; }
.paper .r { text-align: right; }
.paper .sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; text-align: center; margin: 10px 0; }
.guide summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.guide ol { padding-left: 20px; margin: 8px 0; }
.guide li { margin-bottom: 6px; }
/* Ana ekran: sade ve kısa kartlar (özellik yazıları korunur, küçük punto) */
.home .hero { padding: 2px 6px 12px; }
.home .hero h1 { font-size: 1.3em; }
.home .hero p { font-size: .9em; }
.home .mod { padding: 12px 14px 10px; margin-bottom: 10px; }
.home .mod .row { gap: 12px; }
.home .mod .ico { width: 42px; height: 42px; border-radius: 12px; }
.home .mod .t { font-size: 1.05em; }
.home .mod .s { font-size: .86em; }
.home .mod hr { margin: 8px 0 6px; }
.home .mod .foot { font-size: .84em; line-height: 1.4; }
.home .mod .free, .home .mod .paid { font-size: 1em; }
.kinds { display: grid; gap: 10px; margin: 10px 0 14px; }
.kinds .mod .s { margin-top: 2px; }
.paper table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; }
.paper td { vertical-align: top; padding: 3px 6px 3px 0; }
.paper td:first-child { font-weight: 700; width: 34%; }
@media print { .topbar, .bottomnav, .no-print, .composer { display: none !important; } main.page { padding: 0; } .paper { border: 0; box-shadow: none; } }

.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; background: #fff; border-radius: 22px 22px 0 0; z-index: 61; padding: 20px 18px calc(20px + var(--safe-b)); max-height: 88vh; overflow-y: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); background: var(--black); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 70; max-width: 92vw; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* profil */
.avatar { border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.avatar.placeholder { background: var(--green-soft); color: var(--green); font-weight: 800; border: 1px solid var(--green-line); }
.profile-head { display: flex; gap: 14px; align-items: center; }
.drawer-profile { display: flex !important; gap: 10px; align-items: center; text-decoration: none; color: inherit; padding: 4px 0 !important; border: 0 !important; }
.self-draft { border: 2px solid var(--green); }
.self-draft .tag { margin-left: 6px; }

/* hukuki metinler ve sözleşme onayı */
.md h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.md p, .md li { line-height: 1.55; }
.md .bullets { padding-left: 20px; margin: 6px 0; }
.md ol { padding-left: 22px; }
.table-wrap { overflow-x: auto; margin: 8px 0; }
.md table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.md th, .md td { border: 1px solid var(--line, #dfe5e2); padding: 8px; text-align: left; vertical-align: top; }
.md th { background: #f3f7f5; }
details.contract { border: 1px solid var(--line, #dfe5e2); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
details.contract summary { cursor: pointer; font-weight: 600; color: var(--green, #06452F); }
label.check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; line-height: 1.45; }
label.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }

button.link { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* İlk giriş: karşılama ve onay penceresi */
.welcome-bg { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(6,69,47,.55), rgba(17,17,17,.62)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.welcome { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 24px;
  padding: 24px 20px 18px; box-shadow: 0 24px 60px rgba(6,69,47,.28), 0 0 0 1px rgba(6,69,47,.06); animation: welcome-in .28s ease-out; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .welcome { animation: none; } }
.welcome-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.welcome-head h2 { margin: 2px 0 0; font-size: 1.32em; line-height: 1.25; color: var(--black); }
.welcome .eyebrow { font-size: .74em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.welcome-lead { color: var(--gray); margin: 0 0 14px; font-size: .98em; }
.welcome-facts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.welcome-facts li { display: flex; gap: 12px; align-items: flex-start; font-size: .92em; color: var(--gray); line-height: 1.45; }
.welcome-facts b { color: var(--black); }
.wf-ico { flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.wf-dot { font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.welcome-check { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; transition: border-color .15s, background .15s; }
.welcome-check.on { border-color: var(--green); background: #F7FBF9; }
.welcome-check label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .92em; line-height: 1.45; }
.welcome-check input[type=checkbox] { flex: none; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--green); }
.welcome-check .link { margin: 6px 0 0 36px; min-height: 32px; padding: 0; }
.welcome-doc { margin: 8px 0 2px; max-height: 240px; overflow-y: auto; padding: 12px 14px; border-radius: 12px; background: var(--bg-2);
  font-size: .86em; line-height: 1.5; border: 1px solid var(--line); }
.welcome .btn.block { margin-top: 6px; }
.welcome .btn:disabled { opacity: .45; cursor: not-allowed; }
.welcome-skip { display: block; margin: 12px auto 0; text-align: center; color: var(--gray); }
.welcome-foot { text-align: center; font-size: .78em; color: var(--gray-2); margin: 10px 0 0; }
