/* Bilirkişi Rapor Sistemi — Rapor Yazım Asistanı ile aynı görsel dil:
   solda menü, ortada tek sütun, kapalı gelen akordiyon kartlar. */

:root {
  --brand: #5a8d4a;
  --brand-hover: #4a7a3c;
  --brand-dark: #3f6633;
  --brand-soft: rgba(90, 141, 74, 0.10);
}

/* ── Kenar menü ── */
#sidebar { width: 16rem; transition: width 200ms, opacity 200ms; }
#sidebar.collapsed { width: 0; overflow: hidden; border-right-width: 0; }
#sidebar.collapsed > * { display: none; }
@media (max-width: 900px) {
  #sidebar { position: fixed; z-index: 40; height: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
}
.tab-btn[data-active="true"] { background: var(--brand-soft); color: var(--brand-dark); }
.tab-btn[data-active="true"] svg { color: var(--brand-dark); }

/* ── Akordiyon kart ── */
.acc-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: .75rem;
  margin-top: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); overflow: hidden;
}
.acc-card > .acc-header {
  cursor: pointer; user-select: none; padding: .85rem 1.25rem;
  display: flex; align-items: center; gap: .75rem;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0; transition: background-color 150ms;
}
.acc-card.collapsed > .acc-header { border-bottom-color: transparent; }
.acc-card > .acc-header:hover { background: #f1f5f9; }
.acc-arrow { width: 1rem; height: 1rem; transition: transform 200ms; color: var(--brand-dark); flex-shrink: 0; }
.acc-card.collapsed .acc-arrow { transform: rotate(-90deg); }
.acc-card > .acc-body { padding: 1rem 1.25rem 1.25rem; }
.acc-card.collapsed > .acc-body { display: none; }
.acc-title { font-weight: 600; color: #1f2937; font-size: .875rem; }
.acc-subtitle {
  font-size: .7rem; color: #64748b; margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acc-badge { font-size: .65rem; font-weight: 700; padding: .15rem .55rem; border-radius: 9999px; flex-shrink: 0; white-space: nowrap; }
.acc-badge-ok { background: #dcfce7; color: #166534; }
.acc-badge-pending { background: #fef9c3; color: #854d0e; }
.acc-badge-opt { background: #f1f5f9; color: #64748b; }
.acc-card.vurgu { box-shadow: 0 0 0 2px var(--brand); }

.acc-toolbar { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: #64748b; margin: .25rem 0 .25rem; }
.acc-toolbar button {
  padding: .3rem .7rem; border: 1px solid #cbd5e1; border-radius: .375rem;
  background: #fff; color: #475569; cursor: pointer; font-size: .75rem; font-weight: 500;
}
.acc-toolbar button:hover { background: #f1f5f9; }

.bolum-not {
  font-size: .75rem; color: #64748b; background: #f8fafc; border-left: 3px solid #cbd5e1;
  padding: .45rem .7rem; border-radius: 0 .375rem .375rem 0; margin-bottom: .9rem;
}

/* ── Form ── */
.alanlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .8rem 1rem; align-items: end; }
.alan.genis { grid-column: 1 / -1; }
.alan > label { display: flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; color: #475569; margin-bottom: .25rem; }
.alan > label .yildiz { color: #dc2626; }
.alan > label .birim { font-weight: 400; color: #94a3b8; }
.inp {
  width: 100%; padding: .45rem .6rem; font-size: .85rem; color: #1e293b; background: #fff;
  border: 1px solid #cbd5e1; border-radius: .5rem; outline: none;
}
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inp[readonly], .inp:disabled { background: #f1f5f9; color: #64748b; }
textarea.inp { min-height: 4.2rem; resize: vertical; line-height: 1.5; }
.kutular { display: flex; flex-wrap: wrap; gap: .3rem .5rem; }
.kutular label {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: #334155;
  border: 1px solid #e2e8f0; border-radius: .5rem; padding: .25rem .55rem; cursor: pointer; background: #fff;
}
.kutular label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.kutular input { accent-color: var(--brand); }

/* yardım: her alanın altında yazı yerine ⓘ */
.ipucu { position: relative; display: inline-flex; color: #94a3b8; cursor: help; font-weight: 400; }
.ipucu:hover, .ipucu:focus { color: var(--brand-dark); }
.ipucu > span {
  display: none; position: absolute; z-index: 30; left: 0; top: 1.25rem; width: 17rem;
  background: #1e293b; color: #f1f5f9; font-size: .7rem; font-weight: 400; line-height: 1.45;
  padding: .5rem .65rem; border-radius: .5rem; box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.ipucu:hover > span, .ipucu:focus > span { display: block; }

details.ek { margin-top: .9rem; border-top: 1px dashed #e2e8f0; padding-top: .7rem; }
details.ek > summary { cursor: pointer; font-size: .75rem; font-weight: 600; color: #64748b; list-style: none; user-select: none; }
details.ek > summary::before { content: "＋ "; color: var(--brand-dark); }
details.ek[open] > summary::before { content: "－ "; }
details.ek > summary:hover { color: var(--brand-dark); }
details.ek > .alanlar, details.ek > .ek-ic { margin-top: .8rem; }

.kucuk-baslik { font-size: .7rem; font-weight: 700; letter-spacing: .06em; color: var(--brand-dark); text-transform: uppercase; margin-bottom: .35rem; }

/* ── Düğmeler ── */
.btn { font-size: .78rem; font-weight: 600; padding: .45rem .9rem; border-radius: .5rem; border: 1px solid #cbd5e1; background: #fff; color: #334155; cursor: pointer; }
.btn:hover { background: #f8fafc; }
.btn-ana { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-ana:hover { background: var(--brand-hover); }
.btn-koyu { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-koyu:hover { background: var(--brand); }
.btn-cizgi { border-color: var(--brand); color: var(--brand-dark); }
.btn-cizgi:hover { background: var(--brand-soft); }
.btn-kucuk { padding: .3rem .65rem; font-size: .72rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.dugmeler { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; align-items: center; }

/* ── Satır kartları (emsal, takyidat, itiraz…) ── */
.satir-kart { border: 1px solid #e2e8f0; border-radius: .6rem; padding: .75rem .9rem .9rem; margin-bottom: .6rem; background: #fcfdfd; }
.satir-kart > .ust { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.satir-kart > .ust .ad { font-size: .78rem; font-weight: 700; color: #334155; }
.satir-kart > .ust .sonuc { font-size: .72rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); padding: .12rem .5rem; border-radius: 9999px; }
.satir-kart > .ust .sil { margin-left: auto; color: #94a3b8; font-size: .72rem; cursor: pointer; background: none; border: none; }
.satir-kart > .ust .sil:hover { color: #dc2626; }
.satir-kart .alanlar { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .6rem .8rem; }

table.satirlar { border-collapse: collapse; width: 100%; font-size: .8rem; }
table.satirlar th { text-align: left; font-size: .68rem; font-weight: 700; color: #64748b; padding: .35rem .4rem; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
table.satirlar td { padding: .25rem .25rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
table.satirlar td .inp { padding: .35rem .5rem; font-size: .8rem; min-width: 5.5rem; }
table.satirlar td.no { color: #94a3b8; font-size: .72rem; width: 1.6rem; text-align: center; }
table.satirlar td.sil button { color: #94a3b8; background: none; border: none; cursor: pointer; }
table.satirlar td.sil button:hover { color: #dc2626; }
.tablo-sar { overflow-x: auto; }

/* ── Bildirim ── */
.bildirim { padding: .55rem .8rem; border-radius: .5rem; font-size: .78rem; margin-top: .7rem; line-height: 1.5; }
.bildirim.hata { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bildirim.uyari { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.bildirim.tamam { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.bildirim ul { margin: .35rem 0 0; padding-left: 1.1rem; list-style: disc; }
.bildirim li { margin: .15rem 0; }
.bildirim li a { text-decoration: underline; cursor: pointer; }

/* ── Hesap kartı ── */
.hesap-satir { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed #e2e8f0; font-size: .82rem; }
.hesap-satir:last-of-type { border-bottom: none; }
.hesap-satir .islem { display: block; font-size: .72rem; color: #64748b; }
.hesap-satir .tutar { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
.hesap-satir.toplam { font-weight: 700; border-top: 2px solid #e2e8f0; border-bottom: none; }
.yaziyla { font-size: .72rem; color: #64748b; font-style: italic; margin-top: .3rem; }
