/* Özet Tablo çalışma alanı */
.pv-field-search { width: 100%; min-height: 28px; border: 1px solid #d1d1d1; padding: 4px 8px; font: inherit; }
.pv-group-toggle { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-right: 5px; padding: 0; border: 1px solid #aaa; background: #fff; color: #333; font-size: 12px; cursor: pointer; vertical-align: middle; }
.pv-docked { left: auto !important; top: var(--pv-dock-top, 240px) !important; bottom: 38px !important; right: 0 !important; width: var(--pv-panel-width, 340px) !important; height: auto !important; background: white !important; align-items: stretch !important; z-index: 80 !important; }
.pv-panel-resize { display: none; }
.pv-docked .pv-panel-resize { display: block; position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; z-index: 3; cursor: ew-resize; touch-action: none; }
.pv-panel-resize::after { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: #c6c9cc; }
.pv-panel-resize:hover::after, .pv-panel-resize:focus-visible::after, body.pv-panel-resizing .pv-panel-resize::after { background: #107c41; width: 3px; }
.pv-panel-resize:focus-visible { outline: 2px solid #107c41; outline-offset: -2px; }
body.pv-panel-resizing, body.pv-panel-resizing * { cursor: ew-resize !important; user-select: none !important; }
.pv-docked .pivot-modal-window { width: 100%; max-width: none; height: 100%; max-height: 100%; border-radius: 0; box-shadow: -2px 0 5px #0002; }
.pv-docked .modal-header h3 { font-size: 14px; }
.pivot-modal-window .modal-header { gap: 6px; flex-wrap: wrap; }
.pivot-modal-window .modal-header h3 { flex: 1; min-width: 90px; }
#pvInsertChart { white-space: nowrap; font-size: 12px; padding: 5px 8px; }
.pv-docked .modal-header { padding: 8px; }
.pv-docked #pvPreview { width: 28px; height: 28px; padding: 0; flex-shrink: 0; }
.pv-docked .modal-close-btn { flex-shrink: 0; }
.pv-docked .pv-src, .pv-docked .pv-out, .pv-docked #insertPivotToSheetBtn, .pv-docked #updatePivotSheetBtn, .pv-docked .pv-status { display: none !important; }
.pv-docked .pv-main { flex: 0 0 auto; max-height: 180px; }
.pv-docked .pv-main:has(.pv-slicers:empty):has(.pv-timelines:empty) { display: none; }
.pv-docked .pv-slicer { width: 100%; }
.pv-docked .pv-modal-body { flex-direction: column; gap: 0; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; overflow-anchor: none; }
.pv-docked .pv-modal-body { scrollbar-color: #a8adb2 #f3f2f1; }
.pv-docked .pv-modal-body::-webkit-scrollbar { width: 12px; }
.pv-docked .pv-modal-body::-webkit-scrollbar-track { background: #f3f2f1; }
.pv-docked .pv-modal-body::-webkit-scrollbar-thumb { background: #a8adb2; border: 3px solid #f3f2f1; border-radius: 6px; }
.pv-docked .pv-modal-body::-webkit-scrollbar-thumb:hover { background: #777e85; }
.pv-docked .pv-toolbar { max-height: 110px; overflow-y: auto; flex-shrink: 0; padding: 8px; }
.pv-docked .pv-toolbar label:has(#pvView), .pv-docked .pv-toolbar label:has(#pvChartType), .pv-docked #pvChartPng { display: none; }
.pv-docked .pivot-field-list { flex: 0 0 150px; min-height: 100px; }
.pv-docked .pivot-zone-box { min-height: 62px; }
.pv-docked .pivot-zone-header { position: sticky; top: 0; z-index: 2; }
.pv-docked .pivot-zone-content { min-height: 28px; max-height: none; overflow: visible; }
.pv-docked .pivot-pill .pv-pl { white-space: normal; overflow-wrap: anywhere; }
.pv-docked .pv-modal-body { padding: 0; }
.pv-docked .pivot-builder-pane { flex: 0 0 auto; min-height: 0; width: 100%; border: 0; border-radius: 0; overflow: visible; }
.pv-docked .modal-footer { padding: 6px 10px; }
body.pv-editing .spreadsheet-workspace { margin-right: var(--pv-panel-width, 340px); }
@media (max-width: 760px) {
  .pv-docked { width: var(--pv-panel-width, 280px) !important; }
  body.pv-editing .spreadsheet-workspace { margin-right: var(--pv-panel-width, 280px); }
  .pivot-modal-window { width: 100vw; height: 96vh; }
  .pv-modal-body { flex-direction: column; overflow-y: auto; }
  .pivot-builder-pane { width: 100%; flex-basis: auto; min-height: 260px; }
}
@media (max-width: 520px) {
  .pv-docked { width: 100% !important; height: 50vh !important; top: auto !important; bottom: 38px !important; }
  .pv-docked .pv-panel-resize { display: none; }
  body.pv-editing .spreadsheet-workspace { margin-right: 0; margin-bottom: 50vh; }
  .pv-docked .pv-toolbar { max-height: 72px; }
  .pv-docked .pv-modal-body { overflow-y: auto; }
}
.pivot-modal-window { width: 96vw; max-width: 1500px; height: 92vh; max-height: 92vh; position: relative; }
.pv-src { font-size: 11px; font-weight: 400; color: #666; margin-left: 10px; }
.pv-toolbar { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 14px; background: #f8f9fa; border-bottom: 1px solid #e1dfdd; font-size: 12px; }
.pv-toolbar label { display: inline-flex; align-items: center; gap: 4px; color: #444; }
.pv-toolbar .btn-secondary { padding: 4px 9px; font-size: 12px; }
.pv-toolbar .ribbon-select { height: 26px; font-size: 12px; }
.pv-sep { width: 1px; height: 20px; background: #d1d1d1; }
.pv-modal-body { padding: 10px 14px; flex: 1; min-height: 0; display: flex; gap: 14px; overflow: hidden; }
.pv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.pv-out { flex: 1 0 300px; display: flex; flex-wrap: wrap; gap: 12px; }
.pv-out .pivot-table-render { flex: 1 1 460px; min-width: 0; min-height: 260px; border: 1px solid var(--excel-border-color, #d1d1d1); border-radius: 6px; background: #fff; overflow: auto; padding: 0; }
.pv-out .pv-chartbox { flex: 1 1 380px; min-width: 0; min-height: 260px; border: 1px solid var(--excel-border-color, #d1d1d1); border-radius: 6px; background: #fff; padding: 10px; position: relative; }
.pv-out.view-table .pv-chartbox { display: none; }
.pv-out.view-chart .pivot-table-render { display: none; }
.pv-empty { padding: 36px 20px; text-align: center; color: #777; font-size: 13px; line-height: 1.7; }
.pv-empty-s { padding: 8px; color: #888; font-size: 12px; }
.pv-status { font-size: 11px; color: #666; }

.pv-table { border-collapse: collapse; font-size: 12px; width: max-content; min-width: 100%; }
.pv-table th, .pv-table td { border: 1px solid #e1e1e1; padding: 4px 10px; white-space: nowrap; }
.pv-table thead th { background: #f3f2f1; font-weight: 600; text-align: center; position: sticky; top: 0; z-index: 1; }
.pv-table th.pv-rh { text-align: left; background: #e8f3ec; color: #0b5c31; }
.pv-table th.pv-corner { background: #f3f2f1; text-align: left; color: #0b5c31; }
.pv-table th.grand, .pv-table td.grand { background: #e2f0d9; }
.pv-table td.pv-num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-table td.pv-lab { font-weight: 500; }
.pv-table tr.pv-sub td { background: #f4fbf5; font-weight: 700; }
.pv-table tr.pv-grand td { background: #e2f0d9; font-weight: 700; border-top: 2px solid #107c41; }
.pv-table tbody tr:hover td { background-color: #f7fbf8; }

/* Dilimleyiciler */
.pv-sheet-slicer { position: absolute; z-index: 12; margin: 0; overflow: hidden; }
.pv-sheet-slicer .pv-sl-h { flex: 0 0 auto; cursor: move; touch-action: none; }
.pv-sheet-slicer .pv-sl-body { flex: 1; min-height: 0; max-height: none; padding-bottom: 12px; }
.pv-sheet-slicer .pv-sl-i { flex-shrink: 0; }
.pv-slicer-resize { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; cursor: nwse-resize; touch-action: none; border-right: 2px solid #87998e; border-bottom: 2px solid #87998e; }
.pv-slicers, .pv-timelines { display: flex; flex-wrap: wrap; gap: 10px; }
.pv-slicers:empty, .pv-timelines:empty { display: none; }
.pv-slicer { width: 190px; border: 1px solid #c8d4cc; border-radius: 6px; background: #fff; display: flex; flex-direction: column; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pv-sl-h { display: flex; align-items: center; gap: 3px; padding: 5px 6px 5px 10px; background: #eef5f0; border-bottom: 1px solid #d5e1d9; border-radius: 6px 6px 0 0; }
.pv-sl-t { flex: 1; font-weight: 600; font-size: 12px; color: #0b5c31; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-sl-b { border: 1px solid transparent; background: transparent; border-radius: 3px; width: 22px; height: 22px; cursor: pointer; font-size: 12px; color: #444; padding: 0; }
.pv-sl-b:hover { background: #dbe9df; border-color: #b9ccbf; }
.pv-sl-b.on { background: #107c41; color: #fff; }
.pv-sl-body { padding: 6px; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; }
.pv-sl-i { border: 1px solid #d2d2d2; background: #fff; border-radius: 3px; padding: 4px 8px; font-size: 12px; text-align: left; cursor: pointer; }
.pv-sl-i:hover { border-color: #107c41; background: #f0f7f2; }
.pv-sl-i.sel { background: #107c41; color: #fff; border-color: #0b5c31; }
.pv-sl-i.off { opacity: .4; }
.pv-timeline { flex: 1 1 100%; border: 1px solid #c8d4cc; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pv-timeline select { height: 22px; font-size: 11px; }
.pv-tl-body { display: flex; gap: 2px; padding: 8px 8px 4px; overflow-x: auto; height: 86px; align-items: stretch; }
.pv-tl-i { flex: 0 0 auto; min-width: 46px; border: 1px solid #d2d2d2; background: #f6f6f6; border-radius: 3px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0; cursor: pointer; position: relative; overflow: hidden; }
.pv-tl-bar { display: block; background: #b7d5c2; min-height: 2px; margin: 0 4px; border-radius: 2px 2px 0 0; transition: height .15s; }
.pv-tl-l { font-size: 10px; color: #333; padding: 3px 2px; text-align: center; white-space: nowrap; background: rgba(255,255,255,.7); }
.pv-tl-i:hover { border-color: #107c41; }
.pv-tl-i.sel { background: #107c41; border-color: #0b5c31; }
.pv-tl-i.sel .pv-tl-bar { background: #a8e0bd; }
.pv-tl-i.sel .pv-tl-l { background: transparent; color: #fff; }
.pv-tl-hint { font-size: 11px; color: #666; padding: 2px 10px 6px; }

/* Alan bölmesi */
.pv-classic-table .pv-classic-zone { outline: 1px dashed #7b9dbd; outline-offset: -2px; background: #f3f4f6; padding: 3px 5px; text-align: left; }
.pv-classic-table .pv-classic-zone.pv-classic-hover { background: #e0efdf !important; outline: 2px solid #107c41; outline-offset: -2px; }
.pv-classic-field { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; max-width: 100%; min-height: 25px; padding: 3px 6px; border: 1px solid #a3a8af; border-radius: 2px; background: #e4e6e9; color: #242424; font: 600 11px/1.2 "Segoe UI", sans-serif; cursor: grab; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; text-align: left; }
.pv-classic-field:hover { background: #f4f5f6; border-color: #6d8096; }
.pv-classic-field:focus-visible { outline: 2px solid #107c41; }
.pv-classic-field:active { cursor: grabbing; }
.pv-classic-field span { flex: 0 0 auto; }
.pv-classic-table .pv-classic-zone .cell-content { white-space: normal; overflow: hidden; }
.pivot-builder-pane { width: 300px; flex: 0 0 300px; background: #fafafa; border: 1px solid #d1d1d1; border-radius: 6px; display: flex; flex-direction: column; padding: 10px; gap: 10px; min-height: 0; overflow-y: auto; }
.pivot-pane-title { font-size: 13px; font-weight: 600; color: #242424; padding-bottom: 6px; border-bottom: 1px solid #e1dfdd; }
.pv-hint { font-size: 10px; font-weight: 400; color: #888; margin-left: 4px; }
.pivot-field-list { flex: 1 1 140px; min-height: 90px; overflow-y: auto; background: #fff; border: 1px solid #e1dfdd; border-radius: 4px; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.pivot-field-item { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 3px; cursor: grab; font-size: 12px; user-select: none; }
.pivot-field-item:hover { background: #f0f7f2; }
.pivot-field-item.sub { padding-left: 26px; color: #555; }
.pv-ic { width: 20px; text-align: center; font-size: 11px; font-weight: 700; color: #107c41; }
.pv-ic.text { color: #2b7cd3; } .pv-ic.calc { color: #8e44ad; } .pv-ic.vdate { color: #888; }
.pv-fl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pivot-zones-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; flex: 0 0 auto; align-items: start; }
.pivot-zone-box { background: #fff; border: 1px solid #d1d1d1; border-radius: 4px; display: flex; flex-direction: column; min-height: 84px; }
.pivot-zone-box.drop { border-color: #107c41; box-shadow: 0 0 0 2px rgba(16,124,65,.25); }
.pivot-zone-header { background: #f3f2f1; font-size: 11px; font-weight: 600; padding: 4px 8px; border-bottom: 1px solid #e1dfdd; color: #333; }
.pivot-zone-content { padding: 4px; display: flex; flex-direction: column; gap: 3px; min-height: 48px; flex: 1; }
.pivot-pill { display: flex; flex: 0 0 auto; min-width: 0; align-items: center; justify-content: space-between; gap: 4px; background: #e8f3ec; border: 1px solid #b7d5c2; color: #0b5c31; border-radius: 3px; padding: 2px 6px; font-size: 11px; cursor: pointer; }
.pivot-pill.val { background: #e7effa; border-color: #b6cbe8; color: #1b4f8f; }
.pivot-pill:hover { filter: brightness(.96); }
.pv-pl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pivot-pill-remove { flex: 0 0 auto; cursor: pointer; font-size: 14px; line-height: 1; color: #777; }
.pivot-pill-remove:hover { color: #c0392b; }

/* Açılır pencere */
.pv-pop { position: absolute; z-index: 20; background: #fff; border: 1px solid #b9c7bd; border-radius: 6px; box-shadow: 0 8px 28px rgba(0,0,0,.25); padding: 6px; min-width: 190px; max-width: 280px; font-size: 12px; }
.pv-pop.wide { width: 260px; }
.pv-pop-t { font-weight: 600; color: #0b5c31; padding: 4px 6px 6px; border-bottom: 1px solid #e5e5e5; margin-bottom: 4px; }
.pv-pop-list { max-height: 260px; overflow-y: auto; }
.pv-pop-i { padding: 5px 8px; border-radius: 3px; cursor: pointer; }
.pv-pop-i:hover { background: #e8f3ec; }
.pv-pop-r { display: flex; flex-direction: column; gap: 3px; padding: 4px 6px; color: #444; }
.pv-pop-r select, .pv-pop-r input, .pv-pop-s { height: 26px; border: 1px solid #ccc; border-radius: 3px; padding: 0 6px; font-size: 12px; }
.pv-pop-s { width: calc(100% - 4px); margin: 2px; }
.pv-pop-c { display: flex; align-items: center; gap: 6px; padding: 3px 6px; cursor: pointer; }
.pv-pop-c:hover { background: #f0f7f2; }
