/* Yerel Excel - şerit, menüler, diyaloglar, filtre, form, nesneler */
/* ---------- Şerit ---------- */
.ribbon-container.collapsed .ribbon-content { display: none; }
.rb-collapse { border: 0; background: transparent; cursor: pointer; font-size: 14px; color: #555; padding: 0 8px; }
.ribbon-content { overflow-x: auto; overflow-y: hidden; }
.ribbon-panel { min-height: 82px; }
.ribbon-group-content { align-items: flex-start; gap: 2px; }
.rb-bigwrap { display: flex; flex-direction: column; align-items: stretch; position: relative; }
.rb-bigwrap .rb-btn { min-width: 54px; height: 62px; }
.rb-btn .rb-ico { font-size: 20px; line-height: 22px; display: block; }
.rb-bigwrap .rb-lbl { font-size: 10.5px; line-height: 12px; max-width: 74px; text-align: center; white-space: normal; }
.rb-caret { border: 0; background: transparent; font-size: 9px; line-height: 10px; cursor: pointer; color: #555; height: 12px; margin-top: -2px; }
.rb-caret:hover { background: #eee; }
.rb-caret.sm { height: 24px; margin: 0; width: 12px; padding: 0; border-radius: 0 3px 3px 0; }
.rb-sw { display: inline-flex; align-items: center; }
.rb-sw .ribbon-btn-small { min-width: 26px; height: 24px; font-size: 13px; padding: 0 5px; }
.rb-sw .ribbon-btn-small.wide { justify-content: flex-start; gap: 6px; min-width: 110px; }
.rb-sl { font-size: 11px; }
.rb-btn .rb-ico { font-size: inherit; }
.ribbon-btn-small .rb-ico { font-size: 13px; line-height: 14px; }
.ribbon-btn-large .rb-ico { font-size: 22px; }
.rb-row { display: flex; align-items: center; gap: 1px; }
.rb-col { display: flex; flex-direction: column; gap: 3px; }
.rb-stack { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.rb-chk { font-size: 11.5px; display: flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.rb-btn.active { background: #cfe8d6 !important; border-color: var(--excel-green-primary) !important; }
.rb-btn.highlight, .rb-bigwrap.highlight .rb-btn { background: linear-gradient(135deg, #f3e8ff, #dbeafe); border-color: #c4b5fd; }
.rb-color { position: relative; flex-direction: column; justify-content: center; }
.rb-swatch { position: absolute; left: 5px; right: 5px; bottom: 2px; height: 3px; display: block; }
.ribbon-select.rb-sel { height: 24px; }
.ribbon-tab.special-tab { color: #0b5c31; font-weight: 600; }
.freeze-big .rb-ico { font-size: 22px; }

/* ---------- Komut arama ---------- */
.tm-results { position: fixed; z-index: 5000; background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); overflow: hidden; }
.tm-item { padding: 7px 12px; cursor: pointer; display: flex; flex-direction: column; }
.tm-item small { color: #777; font-size: 11px; }
.tm-item.sel, .tm-item:hover { background: #e6f3ea; }
.tm-empty { padding: 10px 12px; color: #888; }

/* ---------- Diyalog ---------- */
.xl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 6000; }
.xl-dialog { background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.35); max-width: 94vw; max-height: 92vh; display: flex; flex-direction: column; }
.xl-dialog * { user-select: text; -webkit-user-select: text; }
.xl-d-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e5e5e5; font-size: 14px; }
.xl-draggable { cursor: move; touch-action: none; user-select: none; }
.xl-d-x { border: 0; background: transparent; font-size: 16px; cursor: pointer; }
.xl-d-body { padding: 14px 16px; overflow: auto; }
.xl-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
.xl-row { display: flex; flex-direction: column; gap: 4px; }
.xl-row label { font-size: 12px; font-weight: 600; color: #333; }
.xl-row input:not([type=checkbox]):not([type=radio]), .xl-row select, .xl-row textarea { border: 1px solid #c8c8c8; border-radius: 4px; padding: 6px 8px; font: inherit; font-size: 13px; outline: none; }
.xl-row input:focus, .xl-row select:focus, .xl-row textarea:focus { border-color: var(--excel-green-primary); box-shadow: 0 0 0 2px rgba(16,124,65,.15); }
.xl-row small { color: #777; font-size: 11px; }
.xl-chk { flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500 !important; }
.xl-radios { display: flex; flex-direction: column; gap: 5px; }
.xl-radios label { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.xl-info { background: #f1f7f3; border: 1px solid #cfe5d6; border-radius: 6px; padding: 8px 10px; font-size: 12.5px; line-height: 1.5; }
.xl-msg { font-size: 13px; line-height: 1.6; padding: 2px 0 8px; }
.xl-d-foot { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid #e5e5e5; background: #fafafa; border-radius: 0 0 8px 8px; flex-wrap: wrap; }
.xl-d-foot button { border: 1px solid #c8c8c8; background: #fff; padding: 6px 16px; border-radius: 4px; cursor: pointer; font: inherit; font-size: 13px; }
.xl-d-foot button:hover { background: #f0f0f0; }
.xl-d-foot button.pri { background: var(--excel-green-primary); color: #fff; border-color: var(--excel-green-primary); }
.cf-list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.cf-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid #e3e3e3; border-radius: 5px; font-size: 12.5px; }
.cf-row em { margin-left: auto; color: #888; font-style: normal; }
.sym-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.sym-grid button { height: 34px; border: 1px solid #ddd; background: #fff; border-radius: 4px; font-size: 16px; cursor: pointer; }
.sym-grid button:hover { background: #e6f3ea; }
.kb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kb-table td { padding: 5px 6px; border-bottom: 1px solid #eee; }
.kb-table kbd { background: #f1f1f1; border: 1px solid #ccc; border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.help-body h4 { margin: 10px 0 4px; color: var(--excel-green-dark); }
.help-body p { font-size: 13px; line-height: 1.55; }

/* ---------- Açılır menü ---------- */
.xl-menu { position: fixed; z-index: 7000; background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 4px 0; min-width: 210px; max-height: 80vh; overflow-y: auto; font-size: 12.5px; }
.xl-menu.sub { display: none; position: fixed; z-index: 7100; }
.xl-m-item { position: relative; display: flex; align-items: center; padding: 6px 12px 6px 8px; cursor: pointer; gap: 8px; }
.xl-m-item .ic { width: 20px; text-align: center; }
.xl-m-item .lb { flex: 1; white-space: nowrap; }
.xl-m-item em { color: #888; font-style: normal; font-size: 11px; }
.xl-m-item:hover { background: #e6f3ea; }

.xl-m-item.off { opacity: .45; pointer-events: none; }
.xl-m-sep { height: 1px; background: #e5e5e5; margin: 4px 0; }
.xl-m-head { padding: 5px 12px; font-size: 11px; font-weight: 700; color: #777; text-transform: uppercase; letter-spacing: .3px; }
.xl-m-gal { display: grid; gap: 4px; padding: 6px 8px; }
.xl-m-cell { border: 1px solid transparent; background: transparent; padding: 2px; cursor: pointer; border-radius: 3px; }
.xl-m-cell:hover { border-color: var(--excel-green-primary); background: #f3faf5; }
.xl-m-cell i { display: block; width: 18px; height: 18px; border: 1px solid #ccc; }
.ts-prev { display: grid; grid-template-columns: 1fr 1fr; width: 54px; height: 34px; border: 1px solid #ccc; }
.ts-prev i { display: block; }
.cs-prev { display: block; padding: 5px 6px; font-size: 11px; border: 1px solid #ddd; min-width: 90px; text-align: left; }

/* ---------- Izgara: gizli, filtre, bölme, görünüm ---------- */
.th-col.hid-before { box-shadow: inset 6px 0 0 -2px var(--excel-green-primary); }
.th-row.hid-before { box-shadow: inset 0 6px 0 -2px var(--excel-green-primary); }
.th-col.frz-r, .excel-cell.frz-r { border-right: 2px solid #8a8a8a !important; }
.th-row.frz-b, .excel-cell.frz-b { border-bottom: 2px solid #8a8a8a !important; }
.excel-cell { position: relative; }
.flt-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; line-height: 15px; text-align: center; font-size: 10px; background: #fff; border: 1px solid #999; border-radius: 3px; cursor: pointer; color: #333; z-index: 3; }
.flt-btn.on { background: #107c41; color: #fff; border-color: #0b5c31; }
.dv-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 18px; background: #f3f4f6; border: 1px solid #c4c9cf; border-radius: 2px; text-align: center; cursor: pointer; font-size: 11px; line-height: 1; display: flex; align-items: center; justify-content: center; color: #555; z-index: 6; opacity: .75; }
.dv-btn.dv-sel { background: #fff; border-color: #107c41; color: #107c41; opacity: 1; }
.dv-btn:hover { background: #e6f4ec; opacity: 1; }
.excel-cell.has-note::after { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent #c00000 transparent transparent; }
.notes-visible .excel-cell.has-note { outline: 1px dashed #c00000; }
.cell-link { color: #0563c1; text-decoration: underline; cursor: pointer; }
.cf-icon { font-size: 11px; }
.sp-val { margin-right: 6px; font-size: inherit; color: inherit; font-weight: inherit; }
.excel-cell.err { color: #c00000; }
.trace-pre { outline: 2px solid #1d6fd1 !important; outline-offset: -2px; }
.trace-dep { outline: 2px solid #e67e22 !important; outline-offset: -2px; }
.trace-self { outline: 2px dashed #555 !important; outline-offset: -2px; }
body.no-grid .excel-cell { border-color: transparent !important; }
body.no-headings .th-col, body.no-headings .th-row, body.no-headings .th-corner { display: none; }
body.no-fbar .formula-bar-container { display: none; }
body.no-status .sheet-tabs-bar .sheets-status-right { visibility: hidden; }
body.painter-on .excel-cell { cursor: copy; }
body.view-page .spreadsheet-grid-viewport { background: #d9d9d9; padding: 16px; }
body.view-page .excel-table { box-shadow: 0 2px 10px rgba(0,0,0,.3); margin: 0 auto; }
body.view-break .excel-table { outline: 3px solid #2b579a; }
body.view-break .spreadsheet-grid-viewport { background: #ececec; }

/* ---------- Süzgeç açılır penceresi ---------- */
.flt-pop { position: fixed; z-index: 7000; width: 260px; background: #fff; border: 1px solid #bbb; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.28); padding: 8px; font-size: 12.5px; }
.flt-pop * { user-select: text; }
.flt-title { font-weight: 700; padding: 2px 4px 6px; color: #0b5c31; }
.flt-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 6px; cursor: pointer; border-radius: 4px; font: inherit; }
.flt-item:hover { background: #e6f3ea; }
.flt-sep { height: 1px; background: #e5e5e5; margin: 6px 0; }
.flt-cond { display: flex; gap: 4px; margin-bottom: 6px; }
.flt-cond select, .flt-cond input, .flt-search { border: 1px solid #c8c8c8; border-radius: 4px; padding: 4px 6px; font: inherit; min-width: 0; }
.flt-cond select { flex: 1.3; } .flt-cond input { flex: 1; }
.flt-search { width: 100%; margin-bottom: 6px; }
.flt-all, .flt-row { display: flex; align-items: center; gap: 6px; padding: 2px 4px; }
.flt-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-row em { color: #999; font-style: normal; font-size: 11px; }
.flt-list { max-height: 200px; overflow: auto; border: 1px solid #e1e1e1; border-radius: 4px; padding: 3px; margin-bottom: 8px; }
.flt-foot { display: flex; gap: 6px; }
.flt-foot button { border: 1px solid #c8c8c8; background: #fff; border-radius: 4px; padding: 5px 10px; cursor: pointer; font: inherit; }
.flt-foot .flt-ok { background: #107c41; color: #fff; border-color: #107c41; }

/* ---------- Sağ tık menüsü ---------- */
.ctx-menu { position: fixed; z-index: 7000; background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 4px 0; min-width: 240px; font-size: 12.5px; }
.ctx-item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; }
.ctx-item span { width: 18px; text-align: center; }
.ctx-item em { margin-left: auto; color: #888; font-style: normal; font-size: 11px; }
.ctx-item:hover { background: #e6f3ea; }
.ctx-sep { height: 1px; background: #e5e5e5; margin: 4px 0; }

/* ---------- Yüzen nesneler ---------- */
.xl-obj { position: absolute; z-index: 30; cursor: move; }
.xl-obj.sel { outline: 2px solid #2b79d6; }
.xl-rs { display: none; position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: #2b79d6; cursor: nwse-resize; border: 1px solid #fff; }
.xl-obj.sel .xl-rs { display: block; }
.xl-text { width: 100%; height: 100%; padding: 6px; background: #fffbe6; border: 1px solid #d6c978; overflow: hidden; font-size: 13px; user-select: text; }
.xl-text[contenteditable=true] { outline: 2px solid #2b79d6; cursor: text; }

/* ---------- Veri formu ---------- */
.uf-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 6500; display: none; align-items: center; justify-content: center; }
.uf-overlay * { user-select: text; -webkit-user-select: text; }
.uf-modal { background: #fff; width: min(960px, 96vw); height: min(640px, 92vh); border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(0,0,0,.4); overflow: hidden; }
.uf-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: linear-gradient(135deg, #0b5c31, #107c41); color: #fff; gap: 10px; }
.uf-title { display: flex; gap: 10px; align-items: center; } .uf-title span { font-size: 22px; } .uf-title b { display: block; font-size: 15px; } .uf-title small { opacity: .85; font-size: 11.5px; }
.uf-head-r { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.uf-head-r button, .uf-sel { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 5px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 12px; }
.uf-sel option { color: #000; }
.uf-head-r button:hover { background: rgba(255,255,255,.3); }
.uf-main { flex: 1; display: flex; min-height: 0; }
.uf-side { width: 240px; border-right: 1px solid #e3e3e3; display: flex; flex-direction: column; background: #fafafa; overflow: auto; }
.uf-search { padding: 8px; } .uf-search input { width: 100%; border: 1px solid #c8c8c8; border-radius: 5px; padding: 6px 8px; font: inherit; }
.uf-list { overflow: auto; flex: 1; }
.uf-item { padding: 7px 12px; border-bottom: 1px solid #eee; cursor: pointer; position: relative; display: flex; flex-direction: column; }
.uf-item small { color: #777; font-size: 11px; } .uf-item i { position: absolute; right: 8px; top: 8px; font-size: 10px; color: #aaa; font-style: normal; }
.uf-item:hover { background: #eef6f0; } .uf-item.sel { background: #d7ecdd; border-left: 3px solid #107c41; }
.uf-empty { padding: 20px; color: #888; text-align: center; }
.uf-form { flex: 1; overflow: auto; padding: 14px 18px; }
.uf-mode { font-weight: 700; margin-bottom: 10px; color: #0b5c31; } .uf-mode.new { color: #1d6fd1; } .uf-dirty { color: #c0392b; font-size: 11px; }
.uf-grid { display: grid; gap: 12px 16px; }
.uf-field { display: flex; flex-direction: column; gap: 4px; }
.uf-field label { font-size: 12px; font-weight: 600; color: #333; } .uf-field label em { color: #c0392b; font-style: normal; margin-left: 2px; }
.uf-field input:not([type=checkbox]), .uf-field select, .uf-field textarea { border: 1px solid #c8c8c8; border-radius: 5px; padding: 7px 9px; font: inherit; font-size: 13px; outline: none; background: #fff; }
.uf-field input:focus, .uf-field select:focus, .uf-field textarea:focus { border-color: #107c41; box-shadow: 0 0 0 2px rgba(16,124,65,.15); }
.uf-field.err input, .uf-field.err select, .uf-field.err textarea { border-color: #c0392b; background: #fff6f5; }
.uf-err { color: #c0392b; font-size: 11px; } .uf-help { color: #888; font-size: 11px; } .uf-fx { color: #7c3aed; margin-left: 4px; font-size: 10px; }
.uf-field input[readonly] { background: #f3f3f3; }
.uf-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1px solid #e3e3e3; background: #f7f7f7; gap: 10px; flex-wrap: wrap; }
.uf-nav, .uf-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.uf-foot button { border: 1px solid #c8c8c8; background: #fff; padding: 6px 12px; border-radius: 5px; cursor: pointer; font: inherit; font-size: 12.5px; }
.uf-foot button:hover:not(:disabled) { background: #eee; } .uf-foot button:disabled { opacity: .4; cursor: move; resize: both; overflow: auto; box-sizing: border-box; }
.note-box.dragging { opacity: .85; user-select: none; }
.note-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 29; overflow: visible; }
.note-lines line { stroke: #2e7d32; stroke-width: 1; }
.uf-foot button.pri { background: #107c41; color: #fff; border-color: #107c41; } .uf-foot button.danger { color: #c0392b; border-color: #e6b5b0; }
.uf-pos { min-width: 62px; text-align: center; font-weight: 600; } .uf-keep { font-size: 12px; display: flex; gap: 5px; align-items: center; }
.uf-design .uf-side { width: 300px; padding: 10px; gap: 8px; }
.uf-prop { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; flex: 1; } .uf-prop label { font-size: 12px; font-weight: 600; }
.uf-prop input:not([type=checkbox]), .uf-prop select, .uf-prop textarea { border: 1px solid #c8c8c8; border-radius: 5px; padding: 6px 8px; font: inherit; }
.uf-row { display: flex; gap: 10px; flex-wrap: wrap; } .uf-chk { display: flex; gap: 5px; align-items: center; font-size: 12.5px; }
.uf-flist { display: flex; flex-direction: column; gap: 4px; overflow: auto; flex: 1; }
.uf-fitem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e0e0e0; border-radius: 6px; background: #fff; cursor: pointer; }
.uf-fitem.sel { border-color: #107c41; background: #e9f5ed; } .uf-fitem.off { opacity: .5; }
.uf-fitem b { flex: 1; font-size: 12.5px; } .uf-fitem em { color: #c0392b; font-style: normal; }
.uf-ftype { font-size: 10px; background: #e8eef8; color: #2b579a; border-radius: 3px; padding: 1px 5px; }
.uf-fbtns button { border: 0; background: transparent; cursor: pointer; font-size: 10px; padding: 2px 3px; }
.uf-addrow { display: flex; flex-direction: column; gap: 6px; } .uf-addrow button, .uf-addrow select { padding: 6px; border: 1px solid #c8c8c8; background: #fff; border-radius: 5px; cursor: pointer; font: inherit; }
.uf-props h4 { margin-bottom: 10px; color: #0b5c31; }

.pal-cell { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 2px 4px; }
.pal-strip { display: flex; } .pal-strip i { display: block; width: 14px; height: 14px; }
.pal-cell small { font-size: 10.5px; color: #444; }

/* Formül yardımcısı: engellemeyen yüzen pencere (tabloda seçim yapılabilir) */
.modal-overlay.fw-float { background: transparent; backdrop-filter: none; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: 96px 28px 0 0; }
.modal-overlay.fw-float .modal-window { pointer-events: auto; box-shadow: 0 10px 40px rgba(0,0,0,.35); border: 1px solid #b9c7bd; max-height: calc(100vh - 130px); overflow: auto; }
.fw-arg-row.fw-active { background: #eaf6ee; border-radius: 6px; box-shadow: inset 3px 0 0 var(--excel-green-primary); }

/* Anahat (gruplama) kenar kılavuzu */
.ol-line { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid #5e7467; pointer-events: none; }
.ol-tick { position: absolute; bottom: 0; width: 6px; height: 0; border-bottom: 1.5px solid #5e7467; pointer-events: none; }
.ol-hline { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px solid #5e7467; pointer-events: none; }
.ol-vtick { position: absolute; right: 0; height: 6px; width: 0; border-right: 1.5px solid #5e7467; pointer-events: none; }
.ol-btn { position: absolute; width: 11px; height: 11px; line-height: 9px; font-size: 11px; font-weight: 700; text-align: center; border: 1px solid #5e7467; background: #fff; color: #234; cursor: pointer; z-index: 3; font-style: normal; border-radius: 2px; }
.th-row .ol-btn { top: calc(50% - 5px); }
.th-col .ol-btn { left: calc(50% - 5px); }
.ol-btn:hover { background: #dff6dd; }
.ol-corner { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.ol-lv-c, .ol-lv-r { display: flex; gap: 2px; padding: 1px 2px; pointer-events: auto; }
.ol-lv-c { justify-content: flex-start; }
.ol-lv { width: 12px; height: 12px; line-height: 11px; font-size: 9px; font-weight: 700; text-align: center; border: 1px solid #5e7467; background: #fff; cursor: pointer; border-radius: 2px; }
.ol-lv:hover { background: #dff6dd; }

/* Yazdırma önizleme */
.pr-overlay { position: fixed; inset: 0; z-index: 2000; background: #5f6368; display: flex; flex-direction: column; outline: none; }
.pr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; background: #f3f2f1; border-bottom: 1px solid #c8c6c4; font-size: 12px; }
.pr-bar label { display: inline-flex; align-items: center; gap: 4px; }
.pr-bar select { height: 26px; font-size: 12px; }
.pr-bar button { height: 26px; padding: 0 10px; border: 1px solid #b9b9b9; background: #fff; border-radius: 3px; cursor: pointer; font-size: 12px; }
.pr-bar button:hover { background: #eef5f0; }
.pr-bar button.pri { background: #107c41; color: #fff; border-color: #0b5c31; }
.pr-title { color: #0b5c31; font-size: 13px; margin-right: 8px; }
.pr-sp { flex: 1; }
.pr-pg { min-width: 54px; text-align: center; font-weight: 600; }
.pr-scroll { flex: 1; overflow: auto; padding: 22px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pr-wrap { flex: 0 0 auto; box-shadow: 0 2px 14px rgba(0,0,0,.45); background: #fff; }
.pr-err { background: #fff; padding: 20px; border-radius: 6px; color: #b3261e; }

/* Grafik sihirbazı */
.cw-overlay { position: fixed; inset: 0; z-index: 1900; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.cw-win { width: min(1100px, 96vw); height: min(640px, 92vh); background: #fff; border-radius: 8px; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.4); overflow: hidden; }
.cw-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #f3f2f1; border-bottom: 1px solid #d1d1d1; color: #0b5c31; font-size: 14px; }
.cw-head button { border: 0; background: transparent; font-size: 16px; cursor: pointer; }
.cw-body { flex: 1; min-height: 0; display: flex; }
.cw-types { width: 210px; overflow-y: auto; border-right: 1px solid #e1dfdd; padding: 6px; background: #fafafa; }
.cw-g { font-size: 11px; font-weight: 700; color: #0b5c31; margin: 8px 4px 3px; text-transform: uppercase; letter-spacing: .3px; }
.cw-t { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 5px 8px; font-size: 12px; cursor: pointer; text-align: left; }
.cw-t span { width: 22px; text-align: center; font-size: 15px; }
.cw-t:hover { background: #eaf3ed; }
.cw-t.on { background: #107c41; color: #fff; }
.cw-prev { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 12px; gap: 8px; }
.cw-box { flex: 1; min-height: 0; position: relative; border: 1px solid #e1dfdd; border-radius: 6px; padding: 8px; }
.cw-note { font-size: 11px; color: #666; min-height: 16px; }
.cw-opts { width: 270px; overflow-y: auto; border-left: 1px solid #e1dfdd; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.cw-opts label { display: flex; flex-direction: column; gap: 3px; color: #444; }
.cw-opts label.cw-chk { flex-direction: row; align-items: center; gap: 6px; }
.cw-opts input:not([type=checkbox]), .cw-opts select { height: 28px; border: 1px solid #ccc; border-radius: 3px; padding: 0 6px; font-size: 12px; }
.cw-row { display: flex; gap: 4px; } .cw-row input { flex: 1; min-width: 0; } .cw-row button { height: 28px; border: 1px solid #bbb; background: #fff; border-radius: 3px; cursor: pointer; font-size: 11px; }
.cw-sc-h { font-weight: 600; color: #0b5c31; margin-bottom: 4px; }
.cw-sc { display: grid; grid-template-columns: 1fr 70px 80px; gap: 4px; align-items: center; margin-bottom: 4px; }
.cw-sc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-sc select { height: 24px !important; font-size: 11px !important; padding: 0 2px !important; }
.cw-foot { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid #e1dfdd; background: #f8f9fa; }
.cw-foot button { height: 30px; padding: 0 16px; border: 1px solid #b9b9b9; background: #fff; border-radius: 4px; cursor: pointer; }
.cw-foot button.pri { background: #107c41; color: #fff; border-color: #0b5c31; }
.cw-hint { font-size: 11px; color: #777; }
@media (max-width: 600px) {
  .cw-pivot .cw-body { flex-direction: column; overflow-y: auto; }
  .cw-pivot .cw-types { width: 100%; height: 130px; flex: 0 0 130px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid #e1dfdd; }
  .cw-pivot .cw-g { grid-column: 1 / -1; letter-spacing: 0; }
  .cw-pivot .cw-t { overflow-wrap: anywhere; min-width: 0; }
  .cw-pivot .cw-prev { flex: 1 0 200px; min-height: 200px; padding: 8px; }
  .cw-pivot .cw-opts { width: 100%; flex: 0 0 150px; max-height: 150px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; border-top: 1px solid #e1dfdd; padding: 8px; }
  .cw-pivot .cw-opts label, .cw-pivot .cw-opts input { min-width: 0; }
  .cw-pivot #cwSerCfg { grid-column: 1 / -1; }
  .cw-pivot .cw-foot { padding: 8px; }
}

/* Çalışma kitabı sekmeleri (LibreOffice benzeri, en üstte) */
.doc-tabs { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 2px; height: 32px; padding: 4px 8px 0; background: #1f2d26; overflow-x: auto; overflow-y: hidden; z-index: 110; scrollbar-width: thin; }
.dt-tab { display: flex; align-items: center; gap: 6px; max-width: 230px; min-width: 110px; height: 28px; padding: 0 6px 0 10px; border-radius: 6px 6px 0 0; background: #35473d; color: #cfe3d6; font-size: 12px; cursor: pointer; user-select: none; border: 1px solid transparent; border-bottom: 0; }
.dt-tab:hover { background: #41574a; }
.dt-tab.on { background: var(--excel-green-primary, #107c41); color: #fff; font-weight: 600; }
.dt-ic { font-size: 12px; opacity: .85; }
.dt-nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-x { border: 0; background: transparent; color: inherit; width: 18px; height: 18px; line-height: 16px; border-radius: 50%; cursor: pointer; font-size: 14px; opacity: .7; padding: 0; }
.dt-x:hover { background: rgba(255,255,255,.25); opacity: 1; }
.dt-new { border: 0; background: transparent; color: #cfe3d6; font-size: 16px; width: 28px; height: 28px; border-radius: 6px 6px 0 0; cursor: pointer; }
.dt-new:hover { background: #41574a; color: #fff; }
.dt-hint { margin-left: auto; align-self: center; font-size: 10px; color: #7f9a8a; padding: 0 8px; white-space: nowrap; }

/* Form tasarımcısı: sürükle-bırak sıralama */
.uf-fitem[draggable="true"] { cursor: grab; }
.uf-fitem.dragging { opacity: .4; }
.uf-fitem.drop-before { box-shadow: 0 -3px 0 0 #107c41; }
.uf-fitem.drop-after { box-shadow: 0 3px 0 0 #107c41; }

/* Sütun/satır taşıma göstergesi */
.mv-ind { position: fixed; z-index: 5000; background: #107c41; box-shadow: 0 0 6px rgba(16,124,65,.8); pointer-events: none; border-radius: 2px; }
.mv-ind.bad { background: #b3261e; box-shadow: none; opacity: .5; }

/* Grafik galerisi */
.cg-pop { position: fixed; z-index: 4000; width: 412px; background: #fff; border: 1px solid #c8c6c4; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.28); font-size: 12px; }
.cg-left { padding: 4px 0; overflow-y: auto; max-height: inherit; }
.cg-title { font-weight: 700; padding: 8px 14px 6px; font-size: 13px; color: #222; }
.cg-cat { display: flex; align-items: center; gap: 12px; padding: 8px 12px; cursor: pointer; }
.cg-cat:hover, .cg-cat.on { background: #e8f3ec; }
.cg-ic { flex: 0 0 48px; display: flex; justify-content: center; }
.cg-ic svg { border: 1px solid #e3e3e3; background: #fff; border-radius: 3px; }
.cg-tools { font-size: 22px; align-items: center; }
.cg-tx { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cg-tx b { font-size: 13px; color: #222; } .cg-tx small { color: #666; line-height: 1.3; }
.cg-ch { font-size: 18px; color: #555; }
.cg-sep { height: 1px; background: #e1dfdd; margin: 4px 0; }
.cg-fly { position: absolute; background: #fff; border: 1px solid #c8c6c4; border-radius: 6px; box-shadow: 0 8px 30px rgba(0,0,0,.28); padding: 8px; min-width: 150px; }
.cg-grid { display: grid; grid-template-columns: repeat(4, 140px); gap: 4px; max-height: 76vh; overflow-y: auto; }
.cg-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 4px; cursor: pointer; text-align: center; color: #333; font-size: 11px; line-height: 1.25; }
.cg-tile:hover { background: #e8f3ec; }
.cg-th { border: 1px solid #d8d8d8; background: #fff; padding: 2px; border-radius: 2px; }
.cg-tl { min-width: 240px; }
.cg-tool { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 12px; border-radius: 4px; }
.cg-tool:hover { background: #e8f3ec; } .cg-tool span { width: 20px; text-align: center; }
.chart-ctl { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 4px 10px; background: #f8f9fa; border-bottom: 1px solid #e1dfdd; font-size: 11px; color: #444; }
.chart-ctl label { display: inline-flex; align-items: center; gap: 6px; } .chart-ctl input[type=range] { width: 140px; } .chart-ctl select { height: 22px; font-size: 11px; }
.chart-ctl .cc-chk { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; } .chart-ctl .cc-chk i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.cw-t span svg { display: block; border: 1px solid #ddd; background: #fff; border-radius: 2px; }
.cw-t { gap: 8px; } .cw-t span { width: 40px !important; flex: 0 0 40px; }

/* 3B Harita Pro paneli ve açıklama */
.mp-panel { display: flex; flex-direction: column; gap: 9px; }
.mp-h { color: #38bdf8; font-size: 13px; border-bottom: 1px solid #2a3b4c; padding-bottom: 5px; margin-top: 4px; }
.mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.mp-row input[type=color] { width: 100%; height: 26px; border: 1px solid #334155; background: #0f172a; border-radius: 4px; padding: 1px; }
.mp-panel input[type=range] { width: 100%; accent-color: #38bdf8; }
.mp-panel b { color: #38bdf8; }
.mp-chk { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; font-size: 12px; color: #cbd5e1; }
.mp-chk label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.mp-panel input[type=number] { padding: 0 6px; }
.mp-miss { font-size: 11px; color: #fbbf24; line-height: 1.5; }
.mp-legend { position: absolute; left: 16px; bottom: 20px; z-index: 50; background: rgba(18,26,36,.9); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 9px 12px; color: #fff; font-size: 11px; min-width: 190px; box-shadow: 0 4px 16px rgba(0,0,0,.45); }
.mp-legend b { display: block; margin-bottom: 6px; font-size: 12px; }
.mp-bar { height: 10px; border-radius: 5px; }
.mp-lr { display: flex; justify-content: space-between; margin-top: 4px; color: #cbd5e1; gap: 12px; }
.mp-sz { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: #94a3b8; }
.mp-sz i { display: inline-block; border-radius: 50%; background: #94a3b8; opacity: .8; }

/* Izgara odağı düğmesi etkinken */
.rb-btn.gf-on, #gridFocusBtn.gf-on { background: #fff3b0 !important; outline: 2px solid #f2c200; border-radius: 4px; }

/* Şablon galerisi */
.tpl-dlg { width: 1040px; height: 86vh; }
.tpl-body { display: flex; flex: 1; min-height: 0; }
.tpl-side { width: 270px; border-right: 1px solid #e5e5e5; display: flex; flex-direction: column; background: #fafafa; }
.tpl-cats { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid #e5e5e5; }
.tpl-cat { border: 1px solid #d0d0d0; background: #fff; border-radius: 14px; padding: 3px 11px; font-size: 12px; cursor: pointer; }
.tpl-cat.on { background: #107c41; border-color: #107c41; color: #fff; }
.tpl-list { overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.tpl-item { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 8px; cursor: pointer; font-size: 13px; }
.tpl-item:hover { background: #eef5f0; }
.tpl-item.on { background: #e3f1e8; border-color: #107c41; }
.tpl-item small { display: block; color: #777; font-size: 11px; }
.tpl-ic { font-size: 22px; }
.tpl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 16px; }
.tpl-info h3 { margin: 0 0 4px; font-size: 16px; color: #0b5c31; }
.tpl-info p { margin: 0 0 10px; color: #555; font-size: 12.5px; }
.tpl-prev { flex: 1; overflow: auto; border: 1px solid #d8d8d8; background: #fff; padding: 8px; position: relative; }
.tpl-scale { transform-origin: top left; }
.tpl-tbl { border-collapse: collapse; table-layout: fixed; font: 12px "Segoe UI", sans-serif; color: #222; }
.tpl-tbl td { padding: 1px 4px; overflow: hidden; white-space: normal; border: 1px solid #f0f0f0; }
.tpl-hint { color: #777; font-size: 12px; }

/* ---------- Şablon galerisi: tam sayfa (sol kategori paneli + 5 sütun) ---------- */
.tg-page { position: fixed; inset: 0; z-index: 6000; background: #f3f5f4; display: flex; flex-direction: column; font-family: var(--excel-font-family); }
.tg-prevpage { z-index: 6100; }
.tg-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 0 18px; min-height: 58px; background: var(--excel-green-primary); color: #fff; }
.tg-top h2 { margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-back, .tg-use { border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.14); color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.tg-back:hover { background: rgba(255,255,255,.28); }
.tg-use { background: #fff; color: var(--excel-green-dark); border-color: #fff; }
.tg-use:hover { background: #e3f1e8; }
.tg-sp { flex: 1; }
.tg-search { flex: 1; max-width: 520px; margin-left: auto; height: 38px; border: 0; border-radius: 19px; padding: 0 16px; font: inherit; font-size: 14px; outline: none; user-select: text; -webkit-user-select: text; }
.tg-count { font-size: 13px; opacity: .9; white-space: nowrap; }
.tg-main { flex: 1; min-height: 0; display: flex; }
.tg-side { flex: none; width: 250px; overflow-y: auto; padding: 12px 10px; background: #fff; border-right: 1px solid #d9dedb; display: flex; flex-direction: column; gap: 2px; }
.tg-side .tg-cat { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; border-radius: 6px; padding: 10px 12px; text-align: left; background: transparent; font-size: 14px; }
.tg-side .tg-cat:hover { background: #eaf5ee; }
.tg-side .tg-cat.on { background: var(--excel-green-primary); color: #fff; font-weight: 600; }
.tg-sheets { flex: none; display: flex; gap: 8px; padding: 12px 18px; overflow-x: auto; background: #fff; border-bottom: 1px solid #dcdcdc; scrollbar-width: thin; }
.tg-sheets:empty { display: none; }
.tg-cat { flex: none; border: 1px solid #c9d3cd; background: #fff; border-radius: 18px; padding: 7px 14px; font: inherit; font-size: 13px; color: #1f1f1f; cursor: pointer; }
.tg-cat i { font-style: normal; color: #777; margin-left: 4px; font-size: 12px; }
.tg-cat:hover { background: #eaf5ee; }
.tg-cat.on { background: var(--excel-green-primary); border-color: var(--excel-green-primary); color: #fff; font-weight: 600; }
.tg-cat.on i { color: #d7efe0; }
.tg-grid { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 18px 28px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 16px; align-content: start; }
.tg-card { display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid #d7ddd9; border-radius: 10px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.tg-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.14); transform: translateY(-2px); }
.tg-thumb { position: relative; flex: none; height: 230px; background: #fafafa; border-bottom: 1px solid #e3e3e3; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tg-thumb:focus-visible { outline: 3px solid var(--excel-green-primary); outline-offset: -3px; }
.tg-thumb::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; background: linear-gradient(90deg, rgba(255,255,255,0), #fff); pointer-events: none; }
.tg-ph { font-size: 44px; opacity: .45; }
.tg-thumb.ready .tg-ph { display: none; }
.tg-thumb-in { position: absolute; left: 0; top: 0; transform-origin: top left; pointer-events: none; background: #fff; }
.tg-thumb-in .tpl-tbl { background: #fff; }
.tg-body { flex: 1; display: flex; flex-direction: column; padding: 12px 14px 14px; gap: 6px; }
.tg-cat-l { font-size: 11px; font-weight: 700; color: var(--excel-green-dark); text-transform: uppercase; letter-spacing: .3px; }
.tg-body h3 { margin: 0; font-size: 15.5px; line-height: 1.3; color: #1b1b1b; }
.tg-body p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #555; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 54px; }
.tg-btns { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.tg-btns button { flex: 1; min-height: 38px; border: 1px solid #b9c7bd; background: #fff; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: #1f1f1f; cursor: pointer; }
.tg-btns button:hover { background: #eef5f0; }
.tg-btns button.pri { background: var(--excel-green-primary); border-color: var(--excel-green-primary); color: #fff; }
.tg-btns button.pri:hover { background: var(--excel-green-dark); }
.tg-empty { grid-column: 1 / -1; text-align: center; color: #666; padding: 60px 0; font-size: 15px; }
.tg-foot { flex: none; padding: 9px 18px; font-size: 12px; color: #666; background: #fff; border-top: 1px solid #dcdcdc; }
.tg-pdesc { flex: none; padding: 10px 18px; background: #fff; font-size: 13.5px; color: #444; border-bottom: 1px solid #e3e3e3; }
.tg-pbody { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #d9dcdb; }
.tg-pscale { margin: 0 auto; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.25); overflow: hidden; }
.tg-pscale .tpl-tbl { transform-origin: top left; }
body.tg-open { overflow: hidden; }
@media (max-width: 1500px) { .tg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1150px) { .tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tg-side { width: 210px; } }
@media (max-width: 900px) { .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tg-top { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .tg-top h2 { font-size: 16px; flex: 1; }
  .tg-search { order: 5; flex: 1 1 100%; max-width: none; margin: 0; }
  .tg-count { display: none; }
  .tg-main { flex-direction: column; }
  .tg-side { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 8px 10px; gap: 6px; border-right: 0; border-bottom: 1px solid #d9dedb; }
  .tg-side .tg-cat { width: auto; flex: none; border: 1px solid #c9d3cd; border-radius: 18px; padding: 7px 14px; font-size: 13px; }
  /* Telefon: kartlar %50 küçük, bir sırada 2 şablon */
  .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px 8px 16px; gap: 8px; }
  .tg-thumb { height: 100px; }
  .tg-ph { font-size: 24px; }
  .tg-body { padding: 6px 8px 8px; gap: 3px; }
  .tg-cat-l { font-size: 9px; }
  .tg-body h3 { font-size: 12.5px; line-height: 1.25; }
  .tg-body p { font-size: 10.5px; line-height: 1.3; -webkit-line-clamp: 2; }
  .tg-btns { gap: 4px; padding-top: 3px; }
  .tg-btns button { min-height: 30px; font-size: 11px; border-radius: 5px; padding: 0 4px; }
  .tg-card { border-radius: 8px; }
  .tg-foot { font-size: 11px; padding: 8px 10px; }
  .tg-use { padding: 8px 10px; }
  .tg-pbody { padding: 8px; }
}

/* Sayfa sekmeleri: satır içi yeniden adlandırma, grup seçimi, renk paleti */
.sheet-rename { font: inherit; font-size: 12px; font-weight: 600; height: 22px; border: 1px solid var(--excel-green-primary); border-radius: 3px; padding: 0 5px; outline: none; background: #fff; color: #222; user-select: text; -webkit-user-select: text; }
.sheet-tab-item.grouped { background: #dcefe3 !important; }
.xl-m-gal .xl-m-cell { padding: 1px; }
.xl-m-gal .xl-m-cell i { width: 20px; height: 20px; }

/* Renkli sayfa sekmesi: tüm sekme boyanır, altında kalın çizgi */
.sheet-tab-item[data-tc] { background: color-mix(in srgb, var(--tab-c) 26%, #fff) !important; border-bottom: 4px solid var(--tab-c) !important; }
.sheet-tab-item[data-tc].active { background: color-mix(in srgb, var(--tab-c) 52%, #fff) !important; font-weight: 700; color: #111; }
.sheet-tab-item[data-tc].grouped { background: color-mix(in srgb, var(--tab-c) 40%, #dcefe3) !important; }
/* Renkli çalışma kitabı sekmesi (üst) ve şerit */
.dt-tab[data-dc] { background: color-mix(in srgb, var(--dc) 42%, #1f2d26); border-top: 3px solid var(--dc); }
.dt-tab[data-dc]:hover { background: color-mix(in srgb, var(--dc) 58%, #1f2d26); }
.dt-tab[data-dc].on { background: var(--dc); color: var(--dc-ink, #fff); }
.office-header.hdr-light, .office-header.hdr-light .hdr-btn:not(.ai-btn), .office-header.hdr-light .app-waffle-btn, .office-header.hdr-light .file-name-input, .office-header.hdr-light .search-box, .office-header.hdr-light .save-status { color: #1b1b1b; }
.office-header.hdr-light .search-box input::placeholder { color: rgba(0,0,0,.55); }
.office-header.hdr-light .hdr-btn:not(.ai-btn) { background: rgba(0,0,0,.08); }

/* Gelişmiş Filtre */
.af-dialog { font-size: 13px; }
.af-body { display: flex; flex-direction: column; gap: 8px; }
.af-sec { font-weight: 600; margin-bottom: 2px; }
.af-radio { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 1px 0; }
.af-radio input { margin: 0; accent-color: var(--excel-green-primary, #107c41); }
.af-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.af-in { display: flex; gap: 0; }
.af-in input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid #8a8886; border-right: 0; border-radius: 3px 0 0 3px; font: inherit; }
.af-in input:disabled { background: #f0f0f0; color: #8a8886; }
.af-in input:focus { outline: 2px solid var(--excel-green-primary, #107c41); outline-offset: -1px; }
.af-pick { width: 30px; border: 1px solid #8a8886; background: #fff; border-radius: 0 3px 3px 0; cursor: pointer; font-size: 14px; }
.af-pick:hover:not(:disabled) { background: #e8f3ec; }
.af-pick:disabled { background: #f0f0f0; color: #bbb; cursor: default; }
.af-uniq { margin-top: 4px; }
.af-msg { min-height: 18px; color: #a4262c; font-size: 12px; }
.af-help { font-size: 12px; color: #444; }
.af-help summary { cursor: pointer; color: #0b5c8a; }
.af-help div { margin-top: 6px; line-height: 1.5; }
.af-help code { background: #f3f2f1; padding: 0 4px; border-radius: 3px; }
.af-pickbar { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 7000; background: #fff; border: 1px solid var(--excel-green-primary, #107c41); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 8px 12px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.af-pickbar button { padding: 4px 14px; border: 1px solid #8a8886; background: #fff; border-radius: 3px; cursor: pointer; }
.af-pickbar button.pri { background: var(--excel-green-primary, #107c41); color: #fff; border-color: transparent; }

/* Formül Yardımcısı */
.fh-dialog { width: min(960px, 96vw); height: min(720px, 94vh); font-size: 13px; }
.fh-body { display: grid; grid-template-columns: minmax(280px, 42%) 1fr; gap: 14px; padding: 12px 16px; flex: 1; min-height: 0; overflow: hidden; }
.fh-left, .fh-right { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.fh-lab { font-weight: 600; }
.fh-sel, .fh-inp { padding: 5px 8px; border: 1px solid #8a8886; border-radius: 3px; font: inherit; background: #fff; }
.fh-filterrow { display: flex; align-items: center; gap: 8px; }
.fh-filterrow .fh-inp { flex: 1; min-width: 0; }
.fh-chk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.fh-list { flex: 1; min-height: 160px; border: 1px solid #8a8886; border-radius: 3px; font: inherit; padding: 2px; }
.fh-list option { padding: 3px 6px; }
.fh-list option:checked { background: var(--excel-green-primary, #107c41) linear-gradient(0deg, var(--excel-green-primary, #107c41), var(--excel-green-primary, #107c41)); color: #fff; }
.fh-count { color: #666; font-size: 12px; }
.fh-box { border: 1px solid #d0d0d0; border-radius: 4px; padding: 6px 12px 10px; margin: 0; }
.fh-box legend { padding: 0 6px; color: #333; }
.fh-args { display: flex; flex-direction: column; gap: 8px; max-height: 210px; overflow: auto; padding-top: 4px; }
.fh-arg { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: center; }
.fh-arg label { text-align: right; }
.fh-in { display: flex; }
.fh-in input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid #8a8886; border-right: 0; border-radius: 3px 0 0 3px; font: inherit; }
.fh-in input:focus { outline: 2px solid var(--excel-green-primary, #107c41); outline-offset: -1px; }
.fh-in input::placeholder { color: #b0b0b0; }
.fh-pick { width: 32px; border: 1px solid #8a8886; background: #fff; border-radius: 0 3px 3px 0; cursor: pointer; font-size: 14px; }
.fh-pick:hover { background: #e8f3ec; }
.fh-descbox { flex: 1; min-height: 120px; overflow: auto; background: #f7f7f7; }
.fh-desc p { margin: 0 0 8px; line-height: 1.45; }
.fh-argh { font-weight: 600; margin-top: 6px !important; }
.fh-argd { color: #333; }
.fh-forms { display: flex; flex-direction: column; gap: 4px; }
.fh-frow { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.fh-frow code { color: #0b5c8a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px Consolas, monospace; max-width: 100%; }
.fh-frow.open code { white-space: normal; word-break: break-all; }
.fh-i { color: #0b5c8a; }
.fh-prev { padding: 5px 8px; background: #f0f0f0; border-radius: 3px; min-height: 18px; color: #555; }
.fh-prev.ok { background: #e8f3ec; color: #0b5c2b; }
.fh-prev.err { background: #fdecea; color: #a4262c; }
.fh-msg { color: #a4262c; font-size: 12px; }
@media (max-width: 760px) { .fh-dialog { width: 100vw; height: 100dvh; } .fh-body { grid-template-columns: 1fr; overflow: auto; } .fh-list { height: 150px; min-height: 0; flex: none; } .fh-left, .fh-right { flex: none; } .fh-descbox { min-height: 90px; flex: none; } .fh-arg { grid-template-columns: 1fr; } .fh-arg label { text-align: left; } }

/* Çiz sekmesi / mürekkep katmanı */
.xl-ink { position: absolute; left: 0; top: 0; z-index: 35; pointer-events: none; overflow: visible; touch-action: none; }
.xl-ink.ink-active { pointer-events: auto; }
.xl-ink.ink-select path.ink-hit { pointer-events: stroke; cursor: move; }
.xl-ink path.ink-s.ink-sel { filter: drop-shadow(0 0 2px rgba(43,121,214,.9)); }
.xl-ink .ink-box { fill: rgba(43,121,214,.05); stroke: #2b79d6; stroke-width: 1.2; stroke-dasharray: 5 4; pointer-events: none; }
.xl-ink.ink-replay path.ink-s, .xl-ink.ink-replay path.ink-hit { pointer-events: none; }
.xl-ink path.ink-hit { pointer-events: none; }
.ink-pen { min-width: 36px; }
.ink-pen .rb-lbl { font-size: 10px; max-width: 54px; line-height: 1.1; }
.ribbon-panel#tab-draw .rb-bigwrap.ink-pen .rb-lbl { display: none; }
.ribbon-panel#tab-draw .rb-bigwrap.ink-pen .rb-btn { padding: 4px 6px; }
.ribbon-panel#tab-draw .rb-bigwrap.ink-pen .rb-btn.active { background: #cfe8d6; box-shadow: inset 0 0 0 1px #107c41; }

.ribbon-panel#tab-draw .rb-bigwrap.ink-pen .rb-ico { height: 48px; display: flex; align-items: center; justify-content: center; }
.ribbon-panel#tab-draw .rb-bigwrap.ink-pen .rb-ico svg { height: 46px; width: auto; }

/* Formüller: Excel tarzı küçük işlev kitaplığı düğmeleri + dar ekranda grup katlama */
.rb-col { display: flex; flex-direction: column; justify-content: center; gap: 1px; align-items: stretch; }
.rb-mini { display: flex; align-items: center; gap: 5px; height: 22px; padding: 1px 6px; border: 1px solid transparent; border-radius: 3px; background: transparent; font: 12px "Segoe UI", sans-serif; color: #242424; cursor: pointer; text-align: left; white-space: nowrap; }
.rb-mini:hover { background: #e9e9e9; }
.rb-mini .rb-ico { display: inline-flex; width: 16px; height: 16px; }
.rb-mini .rb-ico svg { width: 16px; height: 16px; }
.rb-mini .rb-sl { flex: 1; }
.rb-mini .rb-dd { font-size: 8px; color: #555; margin-left: 4px; }
.ribbon-panel .rb-fold .rb-lbl { white-space: normal; max-width: 90px; line-height: 1.15; }
.rb-popup { position: fixed; z-index: 7000; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; max-width: 94vw; padding: 8px; background: #fff; border: 1px solid #c8c8c8; border-radius: 6px; box-shadow: 0 8px 28px rgba(0,0,0,.28); }

/* Grafik galerisi: sihirbaz girişi ve sihirbazda örnek veri bölümü */
.cg-wiz { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; background: #eaf5ee; border: 1px solid #b9dcc6; margin-bottom: 4px; }
.cg-wiz:hover, .cg-wiz:focus { background: #d9eee1; outline: none; }
.cg-wiz .cg-wizic { width: 44px; text-align: center; font-size: 22px; }
.cg-wiz .cg-tx b { display: block; font-size: 13px; }
.cg-wiz .cg-tx small { display: block; color: #555; font-size: 11px; line-height: 1.3; }
.cw-sample { display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #eaf5ee; border: 1px solid #b9dcc6; border-radius: 6px; margin-bottom: 6px; }
.cw-sample button { padding: 7px 10px; border: 1px solid #107c41; background: #fff; color: #107c41; font-weight: 600; border-radius: 4px; cursor: pointer; }
.cw-sample button:hover { background: #107c41; color: #fff; }
.cw-sample small { color: #555; font-size: 11px; line-height: 1.3; }

/* ---------- Grafik öğesi seçimi (başlık / gösterge / çizim alanı) ---------- */
.xl-sel { position: absolute; border: 1px solid #4a4a4a; pointer-events: none; z-index: 5; box-sizing: border-box; }
.xl-sel-plot { border-style: solid; }
.xl-h { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid #555; border-radius: 50%; pointer-events: auto; touch-action: none; box-sizing: border-box; }
.xl-h-nw { left: -5px; top: -5px; cursor: nwse-resize; } .xl-h-n { left: calc(50% - 5px); top: -5px; cursor: ns-resize; } .xl-h-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.xl-h-e { right: -5px; top: calc(50% - 5px); cursor: ew-resize; } .xl-h-se { right: -5px; bottom: -5px; cursor: nwse-resize; } .xl-h-s { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.xl-h-sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .xl-h-w { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.xl-seltb { position: absolute; left: 0; display: flex; gap: 2px; align-items: center; background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.2); padding: 2px 4px; pointer-events: auto; white-space: nowrap; font-size: 12px; }
.xl-seltb .xl-seln { color: #555; padding: 0 6px 0 2px; font-weight: 600; }
.xl-seltb button { border: 0; background: transparent; cursor: pointer; padding: 3px 6px; border-radius: 4px; font: inherit; }
.xl-seltb button:hover { background: #e8f3ec; }
.xl-title-edit { position: absolute; z-index: 6; box-sizing: border-box; text-align: center; color: #444; background: #fff; border: 1px solid #107c41; border-radius: 3px; outline: none; padding: 0 6px; }

/* ---------- Hızlı Düzen açılır penceresi ---------- */
.ql-pop { position: fixed; z-index: 7000; background: #fff; border: 1px solid #c8c8c8; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.28); padding: 8px 10px 10px; }
.ql-head { font-size: 12px; font-weight: 600; color: #444; margin: 0 0 6px 2px; }
.ql-grid { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; }
.ql-item { border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 3px; cursor: pointer; line-height: 0; }
.ql-item:hover { border-color: #107c41; background: #eaf6ee; }
.xl-seltb .xl-clr { position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 26px; height: 24px; border-radius: 4px; cursor: pointer; }
.xl-seltb .xl-clr:hover { background: #e8f3ec; }
.xl-seltb .xl-clr span { font-weight: 700; line-height: 1; margin-top: 1px; }
.xl-seltb .xl-clr input { width: 18px; height: 5px; padding: 0; border: 0; background: none; cursor: pointer; margin-top: 1px; }
.xl-seltb .xl-clr input::-webkit-color-swatch-wrapper { padding: 0; } .xl-seltb .xl-clr input::-webkit-color-swatch { border: 0; border-radius: 1px; }

/* Satır numaraları: etkin kitabın rengi, sayıların solunda en sola yaslı çok ince bir çizgi (sayılar normal zeminde rahat okunur) */
.th-row, .th-corner { box-shadow: inset 5px 0 0 var(--doc-color, transparent); }
.th-row.selected-header { box-shadow: inset 5px 0 0 var(--doc-color, transparent); }
.rb-col { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.rb-row { display: flex; align-items: center; gap: 2px; }
.rb-sw > .ribbon-btn-small .rb-ico svg { display: block; width: 22px; height: 20px; }
.ribbon-btn-small.wide .rb-sl { white-space: nowrap; }
.note-box { position: absolute; z-index: 30; min-width: 120px; max-width: 260px; padding: 6px 8px; background: #ffffe1; color: #222; border: 1px solid #8a8a50; box-shadow: 2px 2px 5px rgba(0,0,0,.25); font-size: 12px; line-height: 1.35; white-space: pre-wrap; cursor: move; resize: both; overflow: auto; box-sizing: border-box; }
.note-box.dragging { opacity: .85; user-select: none; }
.note-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 29; overflow: visible; }
.note-lines line { stroke: #2e7d32; stroke-width: 1; }

.lang-switch { display: flex; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; overflow: hidden; margin-right: 4px; }
.lang-switch button { background: transparent; color: #fff; border: 0; padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer; letter-spacing: .4px; }
.lang-switch button.on { background: #fff; color: #0b5c31; }
.lang-switch button:not(.on):hover { background: rgba(255,255,255,.2); }
.user-avatar { cursor: pointer; }
@media (max-width: 700px) { .lang-switch button { padding: 3px 6px; font-size: 11px; } }

/* Birden fazla çalışma kitabı açıkken sekme şeridi belirginleşir */
.doc-tabs.multi { height: 42px; padding-top: 6px; background: #14201a; align-items: flex-end; }
.doc-tabs.multi .dt-count { align-self: center; flex: none; margin: 0 8px 4px 2px; padding: 4px 12px; border-radius: 999px; background: #ffc83d; color: #1b1b1b; font-size: 12px; font-weight: 700; white-space: nowrap; }
.doc-tabs.multi .dt-tab { height: 36px; min-width: 160px; max-width: 260px; font-size: 13px; background: #2a3a31; color: #aebfb4; border-bottom: 3px solid transparent; }
.doc-tabs.multi .dt-tab.on { background: var(--excel-green-primary, #107c41); color: #fff; font-weight: 700; border-bottom-color: #ffc83d; }
.doc-tabs.multi .dt-tab[data-dc] { border-bottom-color: transparent; }
.doc-tabs.multi .dt-tab[data-dc].on { border-bottom-color: #ffc83d; }
.dt-no { flex: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.2); color: inherit; font-size: 11px; display: inline-grid; place-items: center; }
.dt-tab.on .dt-no { background: #ffc83d; color: #1b1b1b; }
.dt-cur { flex: none; font-style: normal; font-size: 10px; font-weight: 700; background: rgba(255,255,255,.22); padding: 1px 7px; border-radius: 8px; }
.doc-tabs.multi .dt-hint { color: #ffc83d; font-size: 11px; }
.doc-tabs.dt-flash { animation: dtFlash .6s ease 3; }
@keyframes dtFlash { 50% { background: #3d5a49; box-shadow: inset 0 -3px 0 #ffc83d; } }

/* Formül ipucu (Excel benzeri imza + değer listesi) */
.formula-tip { position: fixed; z-index: 9000; display: none; max-width: min(520px, 94vw); background: #fff; color: #222; border: 1px solid #b9c4bd; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.2); padding: 6px 10px; font: 12.5px/1.4 "Segoe UI", system-ui, sans-serif; }
.formula-tip .ft-arg.cur { font-weight: 700; text-decoration: underline; }
.formula-tip .ft-hint { color: #555; margin-top: 3px; }
.formula-tip .ft-list { margin-top: 5px; border: 1px solid #cfd8d2; border-radius: 4px; }
.formula-tip .ft-item { padding: 3px 8px; cursor: pointer; }
.formula-tip .ft-item.on, .formula-tip .ft-item:hover { background: #107c41; color: #fff; }
.formula-tip .ft-desc { margin-top: 5px; padding-top: 4px; border-top: 1px solid #e3e8e5; color: #444; }
.formula-tip .ft-l { text-transform: lowercase; }
.formula-tip .ft-arg.opt::before { content: "["; }
.formula-tip .ft-arg.opt::after { content: "]"; }

/* Flowchart Maker / Organizasyon Şeması */
.dm-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; }
.dm-win { background: #fff; border-radius: 10px; width: min(1400px, 96vw); height: 94vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.dm-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #107c41; color: #fff; flex-wrap: wrap; }
.dm-head .dm-sheet { font-size: 12px; opacity: .85; }
.dm-sp { flex: 1; }
.dm-btn { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 5px 11px; cursor: pointer; font: inherit; font-size: 13px; }
.dm-btn:hover { background: rgba(255,255,255,.3); }
.dm-body { flex: 1; display: flex; min-height: 0; }
.dm-side { width: 270px; flex: none; overflow: auto; padding: 8px 14px 18px; border-right: 1px solid #e3e8e5; background: #f8faf9; font-size: 12.5px; }
.dm-side h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #5b6b62; }
.dm-side label { display: block; margin: 6px 0; color: #374151; }
.dm-side select, .dm-side input[type=number] { width: 100%; box-sizing: border-box; margin-top: 2px; padding: 5px 7px; border: 1px solid #cfd8d2; border-radius: 6px; background: #fff; font: inherit; }
.dm-side input[type=color] { display: block; width: 44px; height: 26px; margin-top: 2px; padding: 0; border: 1px solid #cfd8d2; border-radius: 4px; }
.dm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dm-pal { display: flex; flex-wrap: wrap; gap: 6px; } .dm-pal span { display: flex; align-items: center; gap: 4px; font-size: 12px; } .dm-pal i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); display: inline-block; }
.dm-hint { color: #6b7280; font-size: 11.5px; margin: 4px 0; line-height: 1.4; }
.dm-view { flex: 1; position: relative; overflow: hidden; background: #f3f4f6; cursor: grab; touch-action: none; }
.dm-view.grab { cursor: grabbing; }
.dm-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.dm-stage svg { display: block; }
.dm-zoom { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 6px; }
.dm-zoom button { width: 34px; height: 34px; border: 1px solid #cfd8d2; background: #fff; border-radius: 6px; cursor: pointer; font-size: 16px; }
.dm-msg { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; padding: 30px; color: #4b5563; font-size: 14px; pointer-events: none; }
.dm-msg[style*="block"] { display: flex !important; }
@media (max-width: 760px) { .dm-win { width: 100vw; height: 100vh; border-radius: 0; } .dm-overlay { padding: 0; } .dm-body { flex-direction: column; } .dm-side { width: auto; max-height: 34vh; border-right: 0; border-bottom: 1px solid #e3e8e5; } }
.dm-btn.dm-dirty { background: #ffb900; color: #1f2937; border-color: #ffb900; font-weight: 700; animation: dmPulse 1.2s ease-in-out infinite; }
@keyframes dmPulse { 50% { box-shadow: 0 0 0 4px rgba(255,185,0,.35); } }
.dm-dock { position: fixed; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 9400; display: flex; align-items: center; gap: 8px; background: #107c41; color: #fff; padding: 8px 12px; border-radius: 28px; box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 13px; flex-wrap: wrap; max-width: 96vw; }
.dm-dock .dm-dk-ttl { font-weight: 700; } .dm-dock .dm-dk-msg { opacity: .9; }
.dm-dock.dm-dirty .dm-dk-msg { color: #ffe08a; font-weight: 700; }
.dm-dock.dm-dirty [data-d="revise"] { background: #ffb900; color: #1f2937; border-color: #ffb900; font-weight: 700; }
