/* Medikal Estetik ekranları (aesthetic-*.js). Mevcut tema değişkenlerini kullanır
   (style.css: --ink, --muted, --line, --surface, --brand, --danger, --warn ...).
   Kompakt klinik düzen; iç içe kart yok; kritik bilgi büyük ve renk + metinle. */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.aes-page { --aes-crit: var(--danger, #c0392b); --aes-crit-bg: var(--danger-soft, #fdecea); --aes-warn: #8a5300; --aes-warn-bg: #fff4e0; --aes-ok: #1f7a4a; --aes-ok-bg: #e6f5ec; }
html[data-theme="dark"] .aes-page, html[data-theme="dark"] .aes-pcard { --aes-warn: #ffcf8f; --aes-warn-bg: rgba(255,190,90,.14); --aes-ok: #9be3b9; --aes-ok-bg: rgba(90,200,140,.14); }
.aes-pcard, .overlay { --aes-crit: var(--danger, #c0392b); --aes-crit-bg: var(--danger-soft, #fdecea); --aes-warn: #8a5300; --aes-warn-bg: #fff4e0; --aes-ok: #1f7a4a; --aes-ok-bg: #e6f5ec; }
.aes-back { margin: 0 0 10px; }
.aes-red { color: var(--aes-crit, #c0392b) !important; font-weight: 650; }
.aes-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.aes-empty { padding: 26px 14px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2, var(--line)); border-radius: 12px; }
.aes-error { padding: 12px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.aes-note { padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); border: 1px solid var(--line); margin: 0 0 12px; font-size: 14px; }
.aes-note-crit { background: var(--aes-crit-bg); color: var(--aes-crit); border-color: transparent; font-weight: 600; }
.aes-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0 0 12px; }
.aes-bar .fld { margin: 0; }
.aes-inl { display: inline-flex !important; flex-direction: column; min-width: 150px; }
.aes-filters { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; margin: 0 0 14px; }
.aes-filters .fld { margin: 0; min-width: 150px; flex: 0 1 180px; }
.aes-chk { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; cursor: pointer; }
.aes-chk input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
.aes-chk-crit { padding: 8px 12px; border-radius: 10px; background: var(--aes-warn-bg); color: var(--aes-warn); font-weight: 600; }
.aes-ferr { color: var(--danger); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.aes-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 0 0 14px; }
.aes-sec > h3, .aes-h3 { margin: 0 0 12px; font-size: 16px; font-weight: 650; }
.aes-sec > h3 small { font-weight: 500; color: var(--muted); font-size: 13px; }
.aes-sec h4 { margin: 14px 0 8px; font-size: 14px; }
details.aes-sec > summary { cursor: pointer; font-weight: 650; }
.aes-grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 0 12px; }
.aes-grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 0 12px; }
.aes-wide { grid-column: 1 / -1; }
.aes-grow { flex: 1 1 240px; }
.aes-rowact { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.aes-danger-t { color: var(--danger) !important; }
.aes-dl { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 14px; }
.aes-dl dt { color: var(--muted); font-weight: 600; }
.aes-dl dd { margin: 0; overflow-wrap: anywhere; }
.aes-dl-big { font-size: 15.5px; }
/* Tablo: dar ekranda kart liste (tablo küçülmez; satırlar etiketli kartlara döner). */
.aes-tw { margin: 0 0 6px; }
.aes-tbl td, .aes-tbl th { vertical-align: middle; }
.aes-tbl td .btn-sm { min-height: 36px; }
@media (max-width: 720px) {
  .aes-tw { border: 0; overflow: visible; }
  .aes-tbl, .aes-tbl tbody, .aes-tbl tr, .aes-tbl td { display: block; width: 100%; }
  .aes-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .aes-tbl tr { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; background: var(--surface); }
  .aes-tbl td { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 5px 0; border: 0 !important; text-align: right !important; }
  .aes-tbl td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  .aes-tbl td[data-l=""]::before { content: none; }
  .aes-tbl td[data-l=""] { justify-content: flex-end; }
  .aes-pt-tbl td input, .aes-pt-tbl td select { max-width: 60%; }
  .fld-row { grid-template-columns: 1fr; }
}

/* ---------- Genel panel ---------- */
.aes-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.aes-kpi { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; color: var(--ink); font: inherit; min-height: 44px; }
.aes-kpi span { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.aes-kpi b { display: block; font-size: 28px; line-height: 1.2; margin-top: 4px; font-family: Poppins, var(--font-head, inherit), sans-serif; }
.aes-kpi.crit { border-color: var(--aes-crit); background: var(--aes-crit-bg); }
.aes-kpi.crit b { color: var(--aes-crit); }
.aes-kpi:focus-visible, .aes-wl-i:focus-visible, .aes-tabgroups button:focus-visible, .aes-seg button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.aes-dash { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.aes-wl { border-top: 1px solid var(--line); padding: 8px 0; }
.aes-wl:first-of-type { border-top: 0; }
.aes-wl summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; min-height: 36px; }
.aes-wl summary b { margin-left: auto; }
.aes-wl ul { list-style: none; margin: 4px 0 0; padding: 0; }
.aes-wl-i { width: 100%; text-align: left; background: none; border: 0; padding: 7px 8px; border-radius: 8px; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; min-height: 36px; }
.aes-wl-i:hover { background: var(--surface-2); }
.aes-wl-i small { color: var(--muted); }
.aes-pri { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.aes-pri.critical { background: var(--aes-crit); } .aes-pri.high { background: #d97a00; } .aes-pri.normal { background: var(--brand); }
@media (max-width: 1100px) { .aes-dash { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .aes-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aes-kpi b { font-size: 22px; } }

/* ---------- Hasta kartı ---------- */
/* Sabit hasta başlığı: yalnız yeterli yükseklikte (kısa ekranda içerik alanını yemesin). */
@media (min-width: 721px) and (min-height: 760px) { .aes-pcard .pcard-hero { position: sticky; top: var(--topbar-h, 62px); z-index: 6; } }
.aes-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.aes-flags.big { margin: 0 0 12px; }
.aes-flag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink); }
.aes-flag.crit { background: var(--aes-crit-bg); color: var(--aes-crit); border-color: transparent; }
.aes-flag.warn { background: var(--aes-warn-bg); color: var(--aes-warn); border-color: transparent; }
.aes-flag.ok { background: var(--aes-ok-bg); color: var(--aes-ok); border-color: transparent; font-weight: 600; }
.aes-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 12px 0 14px; overflow: hidden; }
.aes-strip > div { padding: 10px 14px; border-left: 1px solid var(--line); min-width: 0; }
.aes-strip > div:first-child { border-left: 0; }
.aes-strip span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.aes-strip b { display: block; font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 900px) { .aes-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aes-strip > div { border-left: 0; border-top: 1px solid var(--line); } .aes-strip > div:nth-child(-n+2) { border-top: 0; } }
.aes-tabgroups { display: flex; gap: 6px; align-items: center; margin: 4px 0 6px; }
.aes-tabgroups > button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
.aes-tabgroups > button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
html[data-theme="dark"] .aes-tabgroups > button.on { color: #111; }
.aes-tabsel { display: none; flex: 1; }
.aes-tabsel select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); color: var(--ink); font: inherit; }
.aes-pcard #pc-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.aes-pcard #pc-tabs button { white-space: nowrap; }
@media (max-width: 720px) {
  .aes-tabgroups > button { display: none; }
  .aes-tabsel { display: block; }
  .aes-pcard #pc-tabs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.aes-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.aes-sum .aes-sec { margin: 0; }
@media (max-width: 900px) { .aes-sum { grid-template-columns: 1fr; } }
.aes-flaglist { margin: 0 0 8px; padding-left: 18px; }
.aes-flaglist li { margin: 3px 0; }
.aes-flaglist li.crit, .aes-sum .aes-flaglist li { color: var(--aes-crit); }
.aes-pick-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.aes-pick-list button { flex: none; height: auto; text-align: left; padding: 8px 10px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.aes-pick-list button small { color: var(--muted); }

/* ---------- Konsültasyon / anamnez ---------- */
.aes-co-head, .aes-ws-head { display: flex; flex-wrap: wrap; gap: 8px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0 0 14px; }
.aes-co-head span, .aes-ws-head span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.aes-co-head b, .aes-ws-head b { font-size: 14.5px; }
.aes-anam-sec { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 0 0 10px; }
.aes-anam-sec > summary { cursor: pointer; padding: 12px 16px; font-weight: 650; min-height: 44px; }
.aes-anam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px 14px; padding: 4px 16px 14px; }
.aes-yn { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 10px; margin: 0; min-width: 0; }
.aes-yn legend { font-weight: 600; font-size: 14px; padding: 0 4px; }
.aes-yn > label { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; min-height: 40px; cursor: pointer; }
.aes-yn input[type=radio] { width: 20px; height: 20px; accent-color: var(--brand); }
.aes-yn.yes { border-color: var(--aes-warn); background: var(--aes-warn-bg); }
.aes-yn.miss { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.aes-yn .aes-ferr { width: 100%; }
.aes-yn-d { display: flex !important; flex-direction: column; gap: 4px; width: 100%; margin: 4px 0 0 !important; }
.aes-yn-d[hidden] { display: none !important; }
.aes-yn-d span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.aes-yn-d input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; }
.aes-req { color: var(--danger); }
.aes-seg { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 0 0 12px; }
.aes-seg button { border: 0; background: none; padding: 8px 14px; min-height: 40px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.aes-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }

/* ---------- Sabit işlem çubuğu ---------- */
.aes-actbar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; margin: 14px -4px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -6px 18px rgba(14,31,59,.08); }
.aes-actbar .btn { min-height: 44px; }
.aes-actbar .aes-ws-dirty { margin-left: auto; }
@media (max-width: 720px) {
  /* Telefonda sabit çubuk ekranın küçük bir kısmını kaplasın: düğmeler tek satırda paylaşır, gerekirse sarar. */
  .aes-actbar { margin: 14px -8px 0; border-radius: 14px 14px 0 0; padding: 8px; gap: 6px; }
  .aes-actbar .btn { flex: 1 1 96px; width: auto; min-width: 0; min-height: 44px; padding: 8px 10px; font-size: 13px; white-space: normal; line-height: 1.2; }
  .aes-actbar .aes-ws-dirty { flex-basis: 100%; margin: 0; font-size: 12px; }
  /* Uzun estetik sayfa başlığı (ör. "Konsültasyon — Hasta adı") kullanıcı simgesini ekran dışına itmesin. */
  body.aes-on .topbar-left { min-width: 0; flex: 1 1 0; }
  body.aes-on .topbar-right { flex-shrink: 0; }
  body.aes-on .tb-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Plan ---------- */
.aes-steps { list-style: none; display: flex; gap: 0; margin: 0 0 14px; padding: 0; overflow-x: auto; }
.aes-steps li { flex: 1 0 auto; min-width: 110px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 3px solid var(--line); white-space: nowrap; }
.aes-steps li.done { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.aes-steps li.done::before { content: "✓ "; }
.aes-steps li.cur { color: var(--brand); border-color: var(--brand); }
.aes-fin { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 10px 0 12px; overflow: hidden; }
.aes-fin > div { padding: 10px 14px; border-left: 1px solid var(--line); }
.aes-fin > div:first-child { border-left: 0; }
.aes-fin span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.aes-fin b { font-size: 16px; }
@media (max-width: 720px) { .aes-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aes-fin > div { border-left: 0; border-top: 1px solid var(--line); } .aes-fin > div:nth-child(-n+2) { border-top: 0; } }
.aes-net { font-weight: 650; margin: 4px 0 0; }

/* ---------- İşlem çalışma ekranı ---------- */
.aes-ws-head { position: sticky; top: var(--topbar-h, 62px); z-index: 6; box-shadow: var(--sh-sm); }
@media (max-width: 720px) { .aes-ws-head { position: static; } }
.aes-safety { margin: 0 0 14px; }
.aes-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; }
.aes-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 650; border: 1px solid transparent; }
.aes-chip-i { font-weight: 800; }
.aes-chip.ok { background: var(--aes-ok-bg); color: var(--aes-ok); }
.aes-chip.warn { background: var(--aes-warn-bg); color: var(--aes-warn); }
.aes-chip.fail { background: var(--aes-crit-bg); color: var(--aes-crit); }
.aes-gates { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.aes-gates summary { cursor: pointer; font-weight: 650; min-height: 32px; }
.aes-gates ul { list-style: none; margin: 8px 0 0; padding: 0; }
.aes-gate { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 7px 10px; border-radius: 8px; margin: 4px 0; font-size: 14px; }
.aes-gate.block { background: var(--aes-crit-bg); color: var(--aes-crit); }
.aes-gate.warn { background: var(--aes-warn-bg); color: var(--aes-warn); }
.aes-gate.warn.ovr { opacity: .75; }
.aes-gate.info { background: var(--surface-2); }
.aes-gate .btn { margin-left: auto; }
.aes-gate-inline { margin: 6px 0 0; font-size: 13px; font-weight: 600; }
.aes-gate-inline.block { color: var(--aes-crit); } .aes-gate-inline.warn { color: var(--aes-warn); }
.aes-ws { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.aes-ws-side { position: sticky; top: calc(var(--topbar-h, 62px) + 86px); max-height: calc(100vh - var(--topbar-h, 62px) - 110px); overflow: auto; }
@media (max-width: 1100px) { .aes-ws { grid-template-columns: 1fr; } .aes-ws-side { position: static; max-height: none; overflow: visible; } }
.aes-usage { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.aes-usage-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aes-usage-q { margin-top: 6px; }
.aes-usage .fld { margin-bottom: 6px; }
.aes-lp-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; margin: 0 0 12px; }
.aes-lp-i { flex: none; height: auto; line-height: 1.4; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.aes-lp-i.bad { opacity: .6; cursor: not-allowed; }

/* ---------- Harita ---------- */
.aes-pe { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .aes-pe { grid-template-columns: 1fr; } }
.aes-map-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.aes-map-tools .fld { margin: 0; flex: 1 1 160px; }
.aes-map-add.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.aes-map-legend { flex: 1 1 100%; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.aes-map-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 3px; vertical-align: -1px; }
.lg.planned { background: #1b5faa; } .lg.applied { background: #1f8a4c; } .lg.needs_correction { background: #d97a00; } .lg.cancelled { background: #9aa4b2; } .lg.ae { background: #fff; box-shadow: inset 0 0 0 2px #c0392b; }
.aes-map-svg { width: 100%; aspect-ratio: 1 / 1; margin-top: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; touch-action: none; }
.aes-map-svg.adding { cursor: crosshair; outline: 2px dashed var(--brand); outline-offset: -2px; }
.m-skin { fill: #f4e5da; stroke: #b98f79; stroke-width: .6; }
html[data-theme="dark"] .m-skin { fill: #3a302b; stroke: #8a6b5b; }
.m-line { fill: none; stroke: #9b7563; stroke-width: .6; stroke-linecap: round; }
.m-guide { fill: none; stroke: #c9a998; stroke-width: .4; stroke-dasharray: 1 1; }
.m-mid { stroke: #9aa4b2; stroke-width: .3; stroke-dasharray: 1.5 1.5; }
.aes-pt { cursor: grab; outline: none; }
.aes-pt circle { fill: #1b5faa; stroke: #fff; stroke-width: .6; }
.aes-pt text { font-size: 2.6px; fill: #fff; font-weight: 700; pointer-events: none; font-family: sans-serif; }
.aes-pt.applied circle { fill: #1f8a4c; } .aes-pt.needs_correction circle { fill: #d97a00; } .aes-pt.cancelled circle { fill: #9aa4b2; }
.aes-pt.ae circle { stroke: #c0392b; stroke-width: 1.2; }
.aes-pt.sel circle, .aes-pt:focus circle { stroke: #142338; stroke-width: 1; }
.aes-pe-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-top: 8px; }
.aes-pt-go { min-width: 36px; min-height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; color: var(--ink); }
.aes-pt-tbl input, .aes-pt-tbl select { width: 100%; min-width: 70px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }

/* ---------- Fotoğraf ---------- */
.aes-ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.aes-ph { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.aes-ph.arch { opacity: .6; }
.aes-ph-img { display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; background: #11161b; cursor: pointer; }
.aes-ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aes-ph-ph { display: flex; align-items: center; justify-content: center; height: 100%; color: #9aa4b2; font-size: 13px; }
.aes-ph-meta { padding: 8px 10px 4px; font-size: 12.5px; line-height: 1.45; }
.aes-ph-sel { display: flex; align-items: center; gap: 6px; padding: 4px 10px 10px; font-size: 13px; min-height: 36px; }
.aes-ph-sel input { width: 20px; height: 20px; }
.aes-ph-big { background: #11161b; border-radius: 12px; min-height: 200px; margin: 0 0 12px; display: flex; align-items: center; justify-content: center; }
.aes-ph-big img { max-width: 100%; max-height: 60vh; border-radius: 12px; }
.aes-fs { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 0; margin: 0 0 12px; }
.aes-fs legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.aes-pu-src { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.aes-file { position: relative; overflow: hidden; min-height: 44px; display: inline-flex; align-items: center; }
.aes-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.aes-cam { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; max-height: 60vh; margin: 0 auto 8px; }
.aes-cam video, .aes-cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aes-cam img { pointer-events: none; }
.aes-cam-mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255,255,255,.6); pointer-events: none; }
.aes-pu-prev img { max-width: 100%; max-height: 240px; border-radius: 10px; display: block; margin: 0 0 10px; }
.aes-checklist { list-style: none; margin: 10px 0; padding: 0; }
.aes-checklist li { padding: 6px 10px; border-radius: 8px; margin: 3px 0; font-size: 14px; font-weight: 600; }
.aes-checklist li.ok { background: var(--aes-ok-bg); color: var(--aes-ok); }
.aes-checklist li.bad { background: var(--aes-crit-bg); color: var(--aes-crit); }

/* ---------- Onam ---------- */
.aes-consent-body { max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; font-size: 14px; line-height: 1.6; background: var(--surface); }
.aes-sigpad { width: 100%; height: 170px; border: 1.5px dashed var(--line-2, var(--line)); border-radius: 12px; background: #fff; display: block; margin: 4px 0 6px; }
.aes-qr img { display: block; margin: 10px auto; }

/* ---------- Komplikasyon ---------- */
.aes-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); }
.aes-timeline li { position: relative; padding: 6px 0 10px 10px; font-size: 14px; }
.aes-timeline li::before { content: ""; position: absolute; left: -23px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.aes-timeline time { display: block; font-size: 12px; color: var(--muted); }
.aes-timeline small { color: var(--muted); }
.aes-add-entry { margin-top: 10px; }
.aes-typepick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 0 10px; }

/* ---------- Rapor grafiği ---------- */
.aes-chart { margin: 0 0 12px; }
.aes-chart svg { width: 100%; max-width: 720px; height: auto; }
.aes-chart rect { fill: var(--brand); } .aes-chart rect.neg { fill: var(--danger); }
.aes-ch-l, .aes-ch-v { font-size: 13px; fill: var(--ink); font-family: inherit; }
.aes-ch-v { font-weight: 650; }

/* ---------- Yazdırma (proforma, bakım talimatı) ---------- */
.aes-print { display: none; }
@media print {
  body > *:not(.aes-print) { display: none !important; }
  .aes-print { display: block !important; color: #000; font: 12pt/1.5 "Work Sans", Arial, sans-serif; padding: 12mm; }
  .aes-print table { width: 100%; border-collapse: collapse; margin: 10px 0; }
  .aes-print th, .aes-print td { border: 1px solid #999; padding: 4px 6px; text-align: left; }
  .aes-print-note { font-size: 10pt; color: #333; }
}
@media (prefers-reduced-motion: reduce) { .aes-page *, .aes-pcard * { transition: none !important; animation: none !important; } }
