/* Kodvira — araç istekleri, topluluk oylaması ve yönetici paneli için ortak görünüm */

/* Form */
.kf { display: grid; gap: 14px; }
.kf label, .kf .f { display: grid; gap: 6px; font-size: 14.5px; font-weight: 600; }
.kf small { font-weight: 400; color: var(--faint); font-size: 13px; }
.kf input[type=text], .kf textarea, .kf select {
  font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--text); width: 100%;
}
.kf textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.kf input:focus, .kf textarea:focus, .kf select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(240,90,26,.15); }
.kf .btn { justify-self: start; }
@media (max-width: 520px) { .kf .btn { justify-self: stretch; } }

/* Tür seçimi: büyük, dokunması kolay kutular */
.choice { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice label { position: relative; display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 14.5px; background: #fff; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .i { width: 20px; height: 20px; color: var(--k); }
.choice label:has(input:checked) { border-color: var(--k); background: var(--k-bg); box-shadow: 0 0 0 2px var(--k) inset; }
.choice label:has(input:focus-visible) { outline: 3px solid var(--cyan); outline-offset: 2px; }

.check { display: flex !important; grid-template-columns: none; align-items: start; gap: 10px; font-weight: 500 !important; padding: 12px 14px; background: var(--soft); border-radius: 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--purple); flex: none; }
.check b { display: block; }

.msg { font-size: 14.5px; border-radius: 10px; padding: 10px 12px; margin: 0; }
.msg.err { background: #fdecef; color: #b4233c; }
.msg.ok { background: #e2f8ee; color: #0f7a4f; }
.busy { opacity: .6; pointer-events: none; }

/* Panel kutusu */
.kbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
@media (max-width: 520px) { .kbox { padding: 20px 16px; } }
.kbox h2 { margin: 0 0 6px; font-size: 22px; }
.kbox > p { color: var(--muted); margin: 0 0 18px; }
.center { text-align: center; }
.center .ico { margin: 0 auto 12px; }

/* İstek gönderildi ekranı (formun yerine geçer) */
#formbox, #mine { scroll-margin-top: 130px; }
.done { padding: 10px 0 4px; }
.done h2 { font-size: 26px; margin: 4px 0 8px; }
.done > p { color: var(--muted); margin: 0 auto 18px; max-width: 460px; }
.okmark { width: 76px; height: 76px; margin: 0 auto 10px; }
.okmark svg { width: 100%; height: 100%; fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.okmark circle { stroke: #16a36b; fill: #e2f8ee; stroke-dasharray: 160; stroke-dashoffset: 160; animation: okdraw .6s ease-out forwards; }
.okmark path { stroke: #0f7a4f; stroke-dasharray: 40; stroke-dashoffset: 40; animation: okdraw .4s .45s ease-out forwards; }
@keyframes okdraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .okmark circle, .okmark path { animation: none; stroke-dashoffset: 0; } }
.done .next { list-style: none; padding: 0; margin: 0 auto 22px; max-width: 470px; text-align: left; display: grid; gap: 10px; }
.done .next li { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.done .next .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--purple); }
.done .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn.ghost-dark { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; }

/* İstek kartları */
.ilist { display: grid; gap: 14px; }
.icard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.icard.novote { grid-template-columns: 1fr; }
@media (max-width: 520px) { .icard { padding: 16px 14px; gap: 4px 12px; } }
.icard h3 { margin: 0; font-size: 17.5px; line-height: 1.35; word-break: break-word; }
.icard .desc { margin: 4px 0 0; color: var(--muted); font-size: 15px; white-space: pre-line; word-break: break-word; }
.icard .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--faint); margin-top: 8px; }
.icard .meta .tag { font-weight: 600; background: var(--soft); color: var(--muted); border-radius: 7px; padding: 2px 9px; }
.icard .reply { margin-top: 10px; background: var(--k-bg); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.icard .reply b { color: var(--k); }

.st { display: inline-block; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; background: var(--soft); color: var(--muted); }
.st.yeni { background: #efece5; color: #5e5c55; }
.st.inceleniyor { background: #fff4dc; color: #9a6500; }
.st.planlandi { background: var(--biz-bg); color: var(--biz); }
.st.yapiliyor { background: var(--app-bg); color: var(--app); }
.st.yapildi { background: #e2f8ee; color: #0f7a4f; }
.st.reddedildi { background: #f2efe9; color: #6c6a62; }

/* Oy düğmesi */
.vote { grid-row: span 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 58px; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--muted); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; align-self: start; transition: border-color .15s, background .15s, transform .15s; }
.vote .i { width: 22px; height: 22px; }
.vote:hover { border-color: var(--k); color: var(--k); }
.vote[aria-pressed="true"] { background: var(--k); border-color: var(--k); color: #fff; }
.vote small { font-size: 11px; font-weight: 600; opacity: .8; }

/* Yorumlar */
.ctoggle { justify-self: start; margin-top: 10px; background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--k); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ctoggle .i { width: 18px; height: 18px; }
.comments { grid-column: 1 / -1; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.cm { background: var(--light); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; }
.cm .who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--faint); margin-bottom: 2px; }
.cm .who b { color: var(--text); }
.cm .q { font-size: 11.5px; font-weight: 700; color: #9a6500; background: #fff4dc; border-radius: 6px; padding: 1px 7px; }
.cm.admin { background: var(--k-bg); }
.cm.admin .who b { color: var(--k); }
.cm p { margin: 0; white-space: pre-line; word-break: break-word; }
.cm .del { margin-left: auto; background: none; border: 0; color: #b4233c; font: inherit; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.cform { display: grid; gap: 8px; }
.cform textarea { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); min-height: 70px; resize: vertical; width: 100%; background: #fff; }
.cform .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cform .row .seg2 { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; }
.cform .seg2 button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.cform .seg2 button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.cform .btn { padding: 9px 16px; font-size: 15px; margin-left: auto; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; }

/* Üst araç çubuğu (sıralama/süzgeç) */
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.seg3 { display: inline-flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 2px; }
.seg3 button { font: inherit; font-size: 14.5px; font-weight: 600; border: 0; background: none; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.seg3 button[aria-pressed="true"] { background: var(--k); color: #fff; }
.seg3 button .n { opacity: .75; font-weight: 500; margin-left: 4px; }

/* Ekler: yükleme alanı */
.ekbar { display: grid; gap: 8px; }
.ekrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ekrow small { font-size: 12.5px; color: var(--faint); font-weight: 400; }
.ekbtn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 13px; border-radius: 10px; border: 1px dashed var(--line); background: #fff; color: var(--text); cursor: pointer; }
.ekbtn:hover { border-color: var(--purple); color: var(--purple); }
.ekbtn:disabled { opacity: .5; cursor: not-allowed; }
.ekbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ekcips { display: flex; flex-wrap: wrap; gap: 8px; }
.ekcips:empty { display: none; }
.ekcip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; background: var(--soft); border-radius: 10px; padding: 5px 6px 5px 6px; font-size: 13.5px; font-weight: 500; }
.ekcip img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; flex: none; }
.ekcip b { flex: none; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--purple); border-radius: 5px; padding: 3px 5px; }
.ekcip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.ekcip small { color: var(--faint); flex: none; }
.ekcip button { flex: none; width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.ekcip button:hover { background: #fdecef; color: #b4233c; }
.ekcip.yuk { opacity: .75; }
.ekcip.hata { background: #fdecef; color: #b4233c; }
.ekcip.hata small { color: #b4233c; }
form.ek-surukle { outline: 2px dashed var(--purple); outline-offset: 4px; border-radius: 12px; }

/* Ekler: gösterim */
.ekler { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ek-resim { display: block; width: 104px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.ek-resim img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ek-resim:hover img { transform: scale(1.04); }
.ek-dosya { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; text-decoration: none; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 13.5px; }
.ek-dosya:hover { border-color: var(--purple); }
.ek-dosya b { flex: none; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--purple); border-radius: 5px; padding: 3px 5px; }
.ek-dosya span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; font-weight: 600; }
.ek-dosya small { color: var(--faint); flex: none; }

.demo-note { background: #fff4dc; color: #7a5200; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
