#grid-flash-cells-custom {
    --ag-value-change-value-highlight-background-color: #ffe396;
  }

#cell-rendering-show-change-cell-grid.alt-colors {
    --ag-value-change-delta-down-color: #ffe396;
    --ag-value-change-delta-up-color: #ffe396;
    --ag-value-change-delta-color: #ffe396;
    --ag-value-change-value-highlight-background-color: #ffe396;
}

.center-aligned-group-header .ag-header-group-cell-label {
    justify-content: center;
}

.center-aligned-header .ag-header-cell-label {
    justify-content: center;
    text-align: center;
}

#spec-gop-table {
    --ag-header-background-color: #f8fafc;
}

#spec-gop-table .ag-header-cell-label {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.right-aligned-header .ag-header-cell-label {
    justify-content: flex-end;
    text-align: right;
}

/* Kolon grupları arasında belirgin separator */
#spec-gop-table .group-sep {
    border-right: 2px solid #CBD2DA !important;
}

#spec-gop-table .group-sep-header {
    border-right: 2px solid #CBD2DA !important;
}

#gpt-table {
    --ag-header-background-color: #f8fafc;
}

#gpt-table .ag-header-cell-label {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.01em;
}

#gpt-table .group-sep {
    border-right: 2px solid #CBD2DA !important;
}

#gpt-table .group-sep-header {
    border-right: 2px solid #CBD2DA !important;
}

#organization-track-table {
    --ag-header-background-color: #f8fafc;
}

#organization-track-table .ag-header-cell-label {
    font-size: 12px;
    color: #334155;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.show-hide {
    display: none;
}

html, body {
    overflow-y: hidden !important;
}

/* KPI bar segment premium hover tooltip */
.kpi-bar-seg { position: relative; }

.kpi-bar-tip {
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(16,24,40,.14), 0 2px 6px rgba(16,24,40,.08);
    padding: 8px 11px;
    white-space: nowrap;
    transition: opacity .14s ease, transform .14s ease;
}
.kpi-bar-seg:hover .kpi-bar-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* yukarı bakan ok (beyaz üçgen + ince border kenarı) */
.kpi-bar-tip::before,
.kpi-bar-tip::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
}
.kpi-bar-tip::after  { top: 100%; border-top-color: #ffffff; }
.kpi-bar-tip::before { top: calc(100% + 1px); border-top-color: #e2e8f0; }

/* Hamburger butonu: desktopta gizli */
.gd-burger-fab {
    display: none !important;
}

/* Yalnızca mobilde görünen elementler */
.gd-mobile-only {
    display: none !important;
}

/* KPI kartlari: desktop esit genislik */
.gd-kpi-card {
    flex: 1 1 0 !important;
    min-width: 155px;
}

/* Mobil (≤768px): sidebar gizle, burger göster */
@media (max-width: 768px) {
    .gd-sidebar-desktop {
        display: none !important;
    }
    .gd-burger-fab {
        display: flex;
    }
    .gd-mobile-only {
        display: flex !important;
    }

    /* KPI kartları: 2x2 grid */
    .gd-kpi-row {
        flex-wrap: wrap !important;
    }
    .gd-kpi-card {
        flex: 0 0 calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        min-width: 0 !important;
        box-sizing: border-box;
    }

    /* Barlar, divider'lar ve kirilim detaylari: gizle */
    .gd-kpi-mobile-hide {
        display: none !important;
    }

    /* KPI kart deger font kucultme */
    .gd-kpi-value {
        font-size: 16px !important;
    }

    /* Sayfa basligi kucultme */
    .gd-page-title {
        font-size: 20px !important;
    }

    /* Kontrol satiri: sol grup tam genislige uzansin, button saga dayali */
    .gd-ctrl-left {
        flex: 1 !important;
        justify-content: space-between !important;
    }

    /* Basla butonu kucultme */
    .gd-run-btn {
        --button-height: 30px !important;
        --button-padding-x: 10px !important;
        font-size: 12px !important;
    }

    /* AG-Grid tablo font kucultme */
    #gpt-table {
        font-size: 12px !important;
    }
    #gpt-table .ag-cell {
        font-size: 12px !important;
    }
    #gpt-table .ag-header-cell-label {
        font-size: 11px !important;
    }
    #gpt-table .ag-header-cell-comp-wrapper span {
        font-size: 11px !important;
    }
    #gpt-table .ag-header-cell-comp-wrapper span + span {
        font-size: 9px !important;
    }
}

.kontrat-kart:hover {
    border-color: #cbd5e1 !important;
    background-color: #fafbfc !important;
}

.gd-position-panel-heading,
.gd-position-source-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gd-position-panel-heading {
    margin-bottom: 10px;
    flex-shrink: 0;
}

.gd-position-panel-title,
.gd-position-source-title {
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.gd-position-panel-contract,
.gd-position-panel-time {
    color: #94a3b8;
    font-size: 10px;
}

.gd-position-panel-contract {
    color: #285a84;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.gd-position-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1;
}

/* Üst iki sütun: Pozisyon | PnL — grid ile satır yükseklikleri iki kolonda eşitlenir */
.gd-position-cols {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    grid-template-areas:
        "lh dv rh"
        "lc dv rc";
    column-gap: 16px;
    row-gap: 10px;
    min-height: 0;
}

.gd-area-lhero { grid-area: lh; }
.gd-area-rhero { grid-area: rh; }
.gd-area-lcards { grid-area: lc; display: flex; }
.gd-area-rcards { grid-area: rc; display: flex; }

/* Kart grupları satır yüksekliğini doldursun → 4 kart da eşit boy */
.gd-area-lcards > *, .gd-area-rcards > * { flex: 1; min-width: 0; }
.gd-position-sides, .gd-position-pnl-pair { height: 100%; }

.gd-position-coldiv {
    grid-area: dv;
    width: 1px;
    align-self: stretch;
    background: #eef2f6;
}

/* Ortak hero eyebrow (Net Pozisyon / Anlık PnL) */
.gd-hero-eyebrow {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.gd-position-panel-empty,
.gd-position-error {
    color: #94a3b8;
    font-size: 11px;
}

.gd-position-panel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 72px;
}

.gd-position-error {
    color: #b45309;
    margin-top: 6px;
}

/* dcc.Loading yükseklik zincirini geçir → pozisyon kartı flex alanını doldursun */
#aktif-kontrat-position-loading {
    height: 100%;
    min-height: 0;
}
#aktif-kontrat-position-loading > div {
    height: 100%;
    min-height: 0;
}

/* Net hero */
.gd-position-hero {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
}

.gd-position-hero-net {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* Ortak birim etiketi — tek tip: 11px gri italik */
.gd-unit {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    font-style: italic;
}

.gd-position-badge {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Alış / Satış mini-kartları */
.gd-position-sides {
    display: flex;
    gap: 8px;
}

.gd-position-side-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 8px 10px;
}

.gd-position-side-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
}

.gd-position-side-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.gd-position-side-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gd-position-side-total {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.gd-position-side-unit {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 500;
    font-style: italic;
    margin-left: 2px;
}

/* Bacaklar — etiket | hacim | AOF, sütunlar satırlar arası hizalı */
.gd-position-side-legs {
    display: grid;
    grid-template-columns: 1fr auto auto;
    column-gap: 10px;
    row-gap: 2px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.gd-leg-label {
    color: #64748b;
}

.gd-leg-vol {
    text-align: right;
    color: #1e293b;
    font-weight: 600;
}

.gd-leg-aof {
    text-align: right;
    color: #94a3b8;
}

/* Kırılım tablosu (eski emphasis satırı için korunur) */
.gd-position-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-position-brow {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #1e293b;
}

.gd-position-brow-head {
    padding: 0 2px 2px 2px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #94a3b8;
}

.gd-position-brow-label {
    color: #64748b;
    font-weight: 600;
}

.gd-position-brow-emphasis {
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px solid #e2e8f0;
    font-weight: 700;
}

.gd-position-brow-emphasis .gd-position-brow-label {
    color: #1e293b;
    font-weight: 700;
}

/* PnL kutucukları */
/* Anlık PnL hero — soldaki Net hero gibi, kartsız */
.gd-position-pnl-hero {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-position-pnl-hero-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.gd-position-pnl-hero-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.gd-position-pnl-hero-sub {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Anlık PnL — Kötümser ↔ İyimser aralık çubuğu */
.gd-pnl-range {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gd-pnl-range-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.gd-pnl-range-val {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.6px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.gd-pnl-range-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #e2e8f0;
}

.gd-pnl-range-bar-loss { background: #dc2626; }
.gd-pnl-range-bar-profit { background: #16a34a; }

.gd-pnl-range-caps {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #94a3b8;
}

/* Açık Pozisyonlar — senaryo satırları */
.gd-pnl-scn-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    padding: 1px 0;
}

.gd-pnl-scn-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #64748b;
}

.gd-pnl-scn-val {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Gerçekleşen / Potansiyel ikilisi */
.gd-position-pnl-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gd-position-pnl-tile {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 8px 10px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gd-position-pnl-tile-emphasis {
    background: rgba(40, 90, 132, 0.06);
    border-color: rgba(40, 90, 132, 0.28);
}

.gd-position-pnl-tile-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Değer + birim PnL bloğu — kart içinde dikey ortalı */
.gd-position-pnl-tile-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.gd-position-pnl-tile-value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.gd-position-pnl-tile-sub {
    color: #94a3b8;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.gd-position-pnl-warn {
    color: #b45309;
    font-size: 9px;
    line-height: 1.25;
    margin-top: 2px;
}

/* Tam genişlik stat footer (4 hücre) */
.gd-position-stat-footer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #cbd5e1;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
}

.gd-position-pnl-stat {
    background: #fcfdfe;
    padding: 9px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Üst bilgi barı — 3 metrik grubu, aralarında boşluk */
.gd-info-groups {
    flex: 1;
    display: flex;
    gap: 10px;
    min-width: 0;
}

/* Her grup kendi ızgara kutusu */
.gd-info-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(124px, 1fr);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    overflow: hidden;
}

/* Hücreler arası net dikey çizgi (gap yerine kenarlık — alt-piksel kaybı olmaz) */
.gd-info-strip .gd-position-pnl-stat + .gd-position-pnl-stat {
    border-left: 1px solid #cbd5e1;
}

.gd-info-time {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    color: #94a3b8;
}

/* Kontrat kapanış sayacı */
.gd-countdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.gd-countdown-urgent {
    background: rgba(220, 38, 38, 0.10);
    border-color: rgba(220, 38, 38, 0.30);
    color: #dc2626;
}

.gd-countdown-urgent .iconify {
    color: #dc2626 !important;
}

.gd-countdown-closed {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

.gd-position-pnl-stat-label {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.gd-position-pnl-stat-value {
    color: #1e293b;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    font-variant-numeric: tabular-nums;
}

.gd-position-loading-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    text-align: center;
}

.gd-position-loading-title {
    color: #285a84;
    font-size: 13px;
    font-weight: 700;
}

.gd-position-loading-help {
    color: #94a3b8;
    font-size: 10px;
}

.gd-system-console {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.gd-system-console-top,
.gd-system-health,
.gd-system-metric {
    align-items: center;
    display: flex;
}

.gd-system-console-top {
    justify-content: space-between;
    width: 100%;
}

.gd-system-health {
    gap: 7px;
    min-width: 0;
}

.gd-system-health-dot {
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
    flex-shrink: 0;
    height: 8px;
    width: 8px;
}

.gd-system-eyebrow,
.gd-system-metric-label,
.gd-system-clock-date {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.gd-system-health-label {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.gd-system-clock {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
}

.gd-system-clock-time {
    color: #1e293b;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1.05;
}

.gd-system-clock-date {
    margin-top: 2px;
}

.gd-system-metrics {
    border-top: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
    padding-top: 8px;
    width: 100%;
}

.gd-system-metric {
    gap: 5px;
    min-width: 0;
    padding: 0 7px;
}

.gd-system-metric:first-child {
    padding-left: 0;
}

.gd-system-metric + .gd-system-metric {
    border-left: 1px solid #e2e8f0;
}

.gd-system-metric-value {
    color: #334155;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 1100px) {
    .gd-position-cols {
        grid-template-columns: 1fr;
        grid-template-areas:
            "lh"
            "lc"
            "rh"
            "rc";
    }
    .gd-position-coldiv {
        display: none;
    }
}

@media (max-width: 768px) {
    .gd-position-pnl-pair {
        grid-template-columns: 1fr;
    }
    .gd-position-stat-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .gd-position-hero-net {
        font-size: 24px;
    }
    .gd-position-panel-time {
        display: none;
    }
}
