:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #101828;
    background: #fff;
}

* { box-sizing: border-box; }

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    display: grid;
    grid-template-rows: 48px minmax(0, 1fr);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 0 12px;
    border-bottom: 1px solid #ebedf1;
    background: #fff;
}

.back-link,
.tv-link {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid #d8dee9;
    border-radius: 7px;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.back-link { font-size: 19px; }
.back-link:hover,
.tv-link:hover { border-color: #1677ff; color: #1677ff; }

.sync-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d8dee9;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.sync-link:hover:not(:disabled) { border-color: #1677ff; color: #1677ff; }
.sync-link:disabled { cursor: default; opacity: 1; }
.sync-link[data-sync-state="pending"] { border-color: #d97706; background: #f59e0b; color: #fff; }
.sync-link[data-sync-state="pending"]:hover:not(:disabled) { border-color: #b45309; background: #d97706; color: #fff; }
.sync-link[data-sync-state="pending"]::before { background: #fff !important; }
.sync-link[data-sync-state="saving"] { border-color: #b2d4ff; background: #eff6ff; }
.sync-link[data-sync-state="saved"] { border-color: #86efac; background: #dcfce7; color: #087443; }

.chart-divisor {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    gap: 6px;
    min-width: 0;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
}

.chart-divisor select {
    min-width: 0;
    max-width: 180px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid #d8dee9;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 12px;
}

.chart-divisor select:hover,
.chart-divisor select:focus { border-color: #1677ff; outline: none; }

@media (max-width: 520px) {
    .chart-divisor span { display: none; }
    .chart-divisor select { max-width: 110px; }
}

.chart-identity {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    margin-right: auto;
}

.chart-identity strong { font-size: 15px; }
.chart-identity span {
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#chart-pro {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
}

#chart-pro.klinecharts-pro {
    height: 100%;
}

#chart-pro .klinecharts-pro-widget { position: relative; }

.chart-info-toggle {
    position: absolute;
    top: 5px;
    left: 4px;
    z-index: 50;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 1px solid #d8dee9;
    border-radius: 3px;
    background: #fff;
    color: #344054;
    font: 700 17px/18px Arial, sans-serif;
    cursor: pointer;
}

.chart-info-toggle:hover { border-color: #1677ff; color: #1677ff; }

.chart-latest-bar-button {
    position: absolute;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #d8dee9;
    border-radius: 50%;
    background: #fff;
    color: #344054;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .15);
    cursor: pointer;
}

.chart-latest-bar-button[hidden] { display: none; }
.chart-latest-bar-button:hover { border-color: #1677ff; color: #1677ff; }

#chart-pro.text-box-hover,
#chart-pro.text-box-hover canvas {
    cursor: grab !important;
}

/* Pro'nun Ayarlar ve İndikatör pencereleri: sayfadaki diğer pencerelerle (.most-settings) aynı
   görünüm. Solid her değişiklikte satırları yeniden kurduğu için DOM'a
   dokunulmaz; tek sütunlu satır düzeni ve ayraçlar yalnızca CSS ile verilir. */
.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content),
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) {
    --setting-row-height: 46px;
    --setting-line: var(--klinecharts-pro-border-color, #eaecf0);
    --setting-switch-off: #d0d5dd;
    /* Grafik kabı dar ekranda araç çubuğu kadar genişler; pencere ekrana ortalanır. */
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    padding: 16px;
    background: rgba(16, 24, 40, .28);
}

.klinecharts-pro[data-theme=dark] .klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) {
    --setting-switch-off: #3a3a40;
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .inner,
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .inner {
    display: flex;
    flex-direction: column;
    width: min(420px, 100%) !important;
    max-height: calc(100dvh - 32px);
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .2);
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .title-container,
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .title-container {
    flex: none;
    height: 56px;
    padding: 0 14px 0 22px;
    font-size: 16px;
    border-bottom-color: var(--setting-line);
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .inner .title-container .close-icon,
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .inner .title-container .close-icon {
    width: 30px;
    height: 30px;
    padding: 9px;
    border-radius: 6px;
    fill: var(--klinecharts-pro-text-second-color, #667085);
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .inner .title-container .close-icon:hover,
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .inner .title-container .close-icon:hover {
    background: var(--klinecharts-pro-hover-background-color);
    fill: var(--klinecharts-pro-primary-color);
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .content-container {
    min-height: 0;
    padding: 0 22px;
    overflow-y: auto;
}

.klinecharts-pro-setting-modal-content {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: var(--setting-row-height, 46px);
    column-gap: 16px;
    row-gap: 0;
    margin: 4px 0 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0 calc(var(--setting-row-height, 46px) - 1px),
        var(--setting-line, #eaecf0) calc(var(--setting-row-height, 46px) - 1px) var(--setting-row-height, 46px)
    );
}

.klinecharts-pro-setting-modal-content > span,
.klinecharts-pro-setting-modal-content > label {
    overflow: hidden;
    color: var(--klinecharts-pro-text-color);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.klinecharts-pro-setting-modal-content > label { cursor: pointer; }

.klinecharts-pro-setting-modal-content > :nth-child(even) { justify-self: end; }

.klinecharts-pro-setting-modal-content .klinecharts-pro-select {
    width: 150px !important;
    height: 32px;
    font-size: 13px;
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-select .selector-container {
    border-color: var(--setting-switch-off);
    border-radius: 6px;
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-select:hover .selector-container {
    border-color: var(--klinecharts-pro-primary-color);
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-select .drop-down-container {
    top: calc(100% + 4px);
    padding: 4px;
    border: 1px solid var(--setting-line);
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .14);
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-select .drop-down-container ul li {
    height: 32px;
    padding: 0 8px;
    border-radius: 4px;
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-select .drop-down-container ul li:hover {
    color: var(--klinecharts-pro-primary-color);
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-switch {
    width: 34px;
    height: 20px;
    border-radius: 10px;
    transition: background-color .2s;
}

.klinecharts-pro-setting-modal-content .klinecharts-pro-switch.turn-off { background-color: var(--setting-switch-off); }
.klinecharts-pro-setting-modal-content .klinecharts-pro-switch .thumb {
    width: 16px;
    height: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .2);
}
.klinecharts-pro-setting-modal-content .klinecharts-pro-switch.turn-on .thumb { left: 16px; }

/* Portföy işlemleri kutusu yerel bir onay kutusu; Pro anahtarlarıyla aynı görünür. */
.klinecharts-pro-setting-modal-content [data-portfolio-actions-setting] {
    width: 34px;
    height: 20px;
    margin: 0;
    border-radius: 10px;
    appearance: none;
    background: radial-gradient(circle, #fff 7.5px, transparent 8px) no-repeat 2px 2px / 16px 16px,
        var(--setting-switch-off);
    cursor: pointer;
    transition: background-position .2s, background-color .2s;
}

.klinecharts-pro-setting-modal-content [data-portfolio-actions-setting]:checked {
    background-color: var(--klinecharts-pro-primary-color);
    background-position: 16px 2px;
}

.klinecharts-pro-setting-modal-content [data-portfolio-actions-setting]:focus-visible {
    outline: 2px solid var(--klinecharts-pro-primary-color);
    outline-offset: 2px;
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .button-container {
    flex: none;
    padding: 14px 22px 18px;
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .klinecharts-pro-button {
    width: auto;
    height: 34px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--setting-switch-off);
    border-radius: 6px;
    background: transparent;
    color: var(--klinecharts-pro-text-color);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.klinecharts-pro-modal:has(.klinecharts-pro-setting-modal-content) .klinecharts-pro-button:hover {
    border-color: var(--klinecharts-pro-primary-color);
    color: var(--klinecharts-pro-primary-color);
}

#chart-pro.text-box-dragging,
#chart-pro.text-box-dragging canvas {
    cursor: grabbing !important;
}

#chart-error {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 200;
    max-width: min(460px, calc(100vw - 40px));
    padding: 14px 18px;
    transform: translate(-50%, -50%);
    border: 1px solid #fecdca;
    border-radius: 10px;
    background: #fef3f2;
    color: #b42318;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .12);
    font-size: 13px;
}

/* İndikatör penceresi: Pro'nun satırları ve bizim eklediğimiz özel satırlar
   (.most-dollar-menu-item) aynı iki sütunlu ızgarada, aynı onay kutusuyla durur. */
.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .inner {
    width: min(520px, 100%) !important;
}

.klinecharts-pro-modal:has(.klinecharts-pro-indicator-modal-list) .content-container {
    min-height: 0;
    padding: 0;
}

.klinecharts-pro-indicator-modal-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 2px 8px;
    height: min(480px, calc(100dvh - 32px - 56px));
    min-height: 0;
    margin: 0;
    padding: 0 14px 14px;
}

.klinecharts-pro-indicator-modal-list li.title {
    grid-column: 1 / -1;
    z-index: 1;
    height: 38px;
    margin-top: 6px;
    padding: 14px 8px 0;
    background: var(--klinecharts-pro-popover-background-color);
    color: var(--klinecharts-pro-text-second-color);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: default;
}

.klinecharts-pro-indicator-modal-list li.title:first-child { margin-top: 0; }

.klinecharts-pro-indicator-modal-list li.row {
    height: 36px;
    padding: 0 8px;
    border-radius: 6px;
    color: var(--klinecharts-pro-text-color);
    font-size: 13px;
    transition: background-color .15s;
}

.klinecharts-pro-indicator-modal-list li.row:has(.checked) {
    background-color: var(--klinecharts-pro-selected-color);
}

.klinecharts-pro-indicator-modal-list li.row:hover {
    background-color: var(--klinecharts-pro-hover-background-color);
}

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    font-size: 13px;
}

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox.checked {
    color: var(--klinecharts-pro-text-color);
    font-weight: 600;
}

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox .icon { display: none; }

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox .label {
    overflow: hidden;
    margin-left: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox::before,
.most-dollar-checkbox {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 1.5px solid var(--klinecharts-pro-text-second-color, #98a2b3);
    border-radius: 4px;
    background: transparent no-repeat center / 12px 12px;
    transition: background-color .15s, border-color .15s;
}

.klinecharts-pro-indicator-modal-list .klinecharts-pro-checkbox.checked::before,
.most-dollar-checkbox.checked {
    border-color: var(--klinecharts-pro-primary-color, #1677ff);
    background-color: var(--klinecharts-pro-primary-color, #1677ff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.most-dollar-menu-item {
    gap: 0;
}

/* JS onay işaretini metin olarak yazar; görünümü arka plan resmi verir. */
.most-dollar-checkbox {
    display: inline-block;
    font-size: 0;
}

.most-dollar-menu-item > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.most-dollar-menu-item:has(.most-dollar-checkbox.checked) > span:last-child { font-weight: 600; }

@media (max-width: 480px) {
    .klinecharts-pro-indicator-modal-list { grid-template-columns: minmax(0, 1fr); }
}

.most-settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(16, 24, 40, .28);
}

.most-settings {
    width: min(380px, 100%);
    /* Arka plan 20px dolgulu; pencere uzayınca ekran dışına taşıp Kaydet
       düğmesini erişilmez bırakmasın diye içeride kayar. */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 0 22px 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(16, 24, 40, .2);
}

.most-settings header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    margin-bottom: 12px;
    border-bottom: 1px solid #eaecf0;
}

.most-settings h2 { margin: 0; font-size: 16px; }

.most-settings-close {
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 24px;
    cursor: pointer;
}

.drawing-delete-button {
    display: grid;
    flex: none;
    width: 30px;
    height: 30px;
    margin-left: auto;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #b42318;
    cursor: pointer;
}

.drawing-delete-button:hover,
.drawing-delete-button:focus-visible {
    background: #fef3f2;
}

.most-settings label {
    display: grid;
    grid-template-columns: 1fr 120px;
    align-items: center;
    gap: 16px;
    margin: 12px 0;
    color: #344054;
    font-size: 13px;
}

.most-settings input {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font: inherit;
}

.most-settings select {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #fff;
    font: inherit;
}

.most-settings label.most-settings-check {
    display: flex;
    justify-content: flex-start;
    gap: 9px;
}

.most-settings label.most-settings-check input {
    width: 15px;
    height: 15px;
    padding: 0;
}

.most-settings footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.most-settings footer button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.most-settings-save {
    border-color: #1677ff !important;
    background: #1677ff !important;
    color: #fff !important;
}

.annotation-drawing-item {
    position: relative;
}

.annotation-drawing-trigger {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: 800 16px/1 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
}

.annotation-drawing-trigger:hover,
.annotation-drawing-trigger:focus-visible {
    background: rgba(22, 119, 255, .12);
    color: #1677ff;
    outline: 0;
}

.annotation-drawing-menu {
    position: absolute;
    z-index: 50;
    top: 0;
    left: 38px;
    width: 146px;
    padding: 5px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .14);
}

.annotation-drawing-menu button {
    display: block;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #344054;
    font: 12px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}

.annotation-drawing-menu button:hover,
.annotation-drawing-menu button:focus-visible {
    background: #eff8ff;
    color: #1677ff;
    outline: 0;
}

.annotation-dialog {
    width: min(440px, 100%);
}

.annotation-text-label {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}

.annotation-text-label textarea {
    width: 100%;
    min-height: 118px;
    resize: vertical;
    padding: 9px;
    border: 1px solid #d0d5dd;
    border-radius: 4px;
    font: 13px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}

.annotation-style-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 14px;
}

.annotation-style-grid label {
    display: grid;
    grid-template-columns: 1fr 68px;
    gap: 8px;
    margin: 0;
    font-size: 12px;
}

.annotation-style-grid input[type="color"] {
    padding: 2px;
}

.annotation-style-grid .annotation-opacity {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 150px;
}

.annotation-opacity span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.annotation-opacity input[type="range"] {
    width: 112px;
    padding: 0;
}

.annotation-opacity output {
    min-width: 31px;
    color: #475467;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Açıklama balonu / metin kutusu şablon satırları */
.annotation-template-row {
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 14px;
}

.annotation-template-row label {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin: 0;
    font-size: 12px;
}

.annotation-template-row button {
    flex: none;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #d7deea;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.annotation-template-row button:hover {
    border-color: #98a2b3;
    background: #f7f9fc;
}

.annotation-template-row .annotation-template-save {
    border-color: #a8c0ff;
    background: #eef3ff;
    color: #1f55df;
}

/* Çift tıklamayla açılan çizim stili menüsü */
.drawing-style-grid {
    display: grid;
    gap: 10px 14px;
}
.drawing-style-grid label {
    display: grid;
    grid-template-columns: 1fr 96px;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.drawing-style-grid input[type="color"] {
    padding: 2px;
    height: 32px;
}
.drawing-style-grid input[type="checkbox"] {
    justify-self: start;
    width: 16px;
    height: 16px;
    padding: 0;
}
.drawing-style-grid input[type="range"] {
    padding: 0;
    border: 0;
}
.drawing-style-heading {
    margin: 6px 0 0;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
}

/* KLineChart Pro, mum panelinin ortasına kendi logosunu filigran olarak koyuyor.
   Vendor CSS bizden önce yüklendiği için bu kural onu geçersiz kılar. */
.klinecharts-pro-watermark { display: none; }

/* Sembol aramasında geçmişin altına eklenen Yahoo sonuçları. Geçmiş boşken
   kütüphanenin "veri yok" görseli Yahoo sonuçlarının üstünde kalmasın. */
.klinecharts-pro-symbol-search-modal-list li.symbol-search-separator {
    height: 0;
    margin: 6px 0;
    border-top: 1px solid var(--klinecharts-pro-border-color);
    cursor: default;
}
.klinecharts-pro-symbol-search-modal-list li.symbol-search-status {
    justify-content: center;
    color: var(--klinecharts-pro-text-second-color);
    font-size: 13px;
    cursor: default;
}
.klinecharts-pro-symbol-search-modal-list li.symbol-search-separator:hover,
.klinecharts-pro-symbol-search-modal-list li.symbol-search-status:hover { background-color: transparent; }
.klinecharts-pro-symbol-search-modal-list li.symbol-search-separator:first-child { margin-top: 0; border-top: 0; }
.klinecharts-pro-symbol-search-modal-list:has(.symbol-search-remote) .klinecharts-pro-empty { display: none; }

.chart-period-shortcut {
    position: fixed;
    top: 58px;
    right: 16px;
    z-index: 1000;
    display: grid;
    gap: 6px;
    width: min(260px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .16);
    font-size: 12px;
}
.chart-period-shortcut[hidden] { display: none; }
.chart-period-shortcut label { font-weight: 700; }
.chart-period-shortcut input {
    width: 100%;
    padding: 7px 9px;
    border: 1px solid #98a2b3;
    border-radius: 5px;
    font: inherit;
    font-size: 16px;
}
.chart-period-shortcut span { color: #667085; }

@media (max-width: 700px) {
    .chart-header { gap: 8px; padding: 0 8px; }
    .chart-identity span { display: none; }
    .klinecharts-pro-period-bar .tools { padding: 0 7px; }
    .annotation-style-grid { grid-template-columns: 1fr; }
    .annotation-style-grid .annotation-opacity { grid-template-columns: 1fr 150px; }
}

.guest-symbol-notice {
    margin: 10px 0 0;
    padding: 10px 12px;
    border: 1px solid #fedf89;
    border-radius: 6px;
    background: #fffaeb;
    color: #93370d;
    font-size: 13px;
    line-height: 1.45;
}
.guest-symbol-notice a { color: inherit; font-weight: 700; }

/* Çizim listesi: sol çubuğun yanında açılan, modal olmayan panel. Düzenleme
   pencereleri (z-index 300) bu panelin üstünde açılır. */
.drawings-panel {
    position: fixed;
    z-index: 200;
    display: flex;
    flex-direction: column;
    width: 260px;
    max-height: min(360px, calc(100vh - 16px));
    border: 1px solid #eaecf0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18);
    font: 13px/1.3 Inter, ui-sans-serif, system-ui, sans-serif;
    color: #101828;
}

.drawings-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px 4px 14px;
    border-bottom: 1px solid #eaecf0;
}

.drawings-panel h2 { margin: 0; font-size: 14px; }

.drawings-panel-list {
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    list-style: none;
}

.drawings-panel-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 2px 2px 10px;
    border-radius: 4px;
    cursor: default;
    user-select: none;
}

.drawings-panel-row:hover { background: #f2f4f7; }

.drawings-panel-row.is-hidden .drawings-panel-name { color: #98a2b3; }

.drawings-panel-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawings-panel-action {
    display: grid;
    flex: none;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #475467;
    cursor: pointer;
}

.drawings-panel-action:hover,
.drawings-panel-action:focus-visible {
    background: rgba(22, 119, 255, .12);
    color: #1677ff;
    outline: 0;
}

.drawings-panel-action.is-danger { color: #b42318; }

.drawings-panel-action.is-danger:hover,
.drawings-panel-action.is-danger:focus-visible {
    background: #fef3f2;
    color: #b42318;
}

.drawings-panel-empty {
    padding: 14px 10px;
    color: #667085;
    text-align: center;
}

/* Not, haber ve heatmap: üst çubukta Full Screen'in sağındaki düğmeler ve
   pencereleri (assets/chart-panels.mjs). Pencere stilleri izleme listesindeki
   (assets/app.css) eşleriyle aynıdır. */
.klinecharts-pro-period-bar .chart-panel-trigger svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.klinecharts-pro-period-bar .chart-panel-trigger:focus-visible { outline: 2px solid #1677ff; outline-offset: -2px; }
.klinecharts-pro-period-bar .chart-panel-trigger[hidden] { display: none; }
.klinecharts-pro-period-bar .note-trigger.has-note { color: #b42318; }
/* Alarm zili: mavi dolu = etkin alarm, amber dolu = bakılmamış tetiklenme (assets/alarms.mjs). */
.klinecharts-pro-period-bar .alarm-trigger.has-alarm { color: #2962ff; }
.klinecharts-pro-period-bar .alarm-trigger.triggered { color: #e38b00; }
.klinecharts-pro-period-bar .alarm-trigger.has-alarm svg, .klinecharts-pro-period-bar .alarm-trigger.triggered svg { fill: currentColor; }
.note-dialog, .news-preview, .heatmap-preview { --line: #e2e7ef; --muted: #667085; --text: #111827; color: var(--text); font-size: 14px; }
.heatmap-preview { position: fixed; z-index: 31; width: min(1280px, calc(100vw - 24px)); max-height: calc(100vh - 24px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; visibility: hidden; opacity: 0; transform: translateY(7px) scale(.985); border: 1px solid #d9e0ea; border-radius: 16px; background: #fff; box-shadow: 0 28px 90px rgba(31,41,55,.22); overflow: hidden; transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.heatmap-preview.visible { visibility: visible; opacity: 1; transform: none; }
.heatmap-head { display: flex; align-items: center; gap: 16px; padding: 13px 17px 11px; border-bottom: 1px solid var(--line); }
.heatmap-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; margin-right: auto; }
#heatmap-meta { color: var(--muted); font-size: 11px; }
.heatmap-period { display: flex; padding: 2px; border: 1px solid #cfd8e6; border-radius: 8px; background: #f5f7fb; }
.heatmap-period[hidden] { display: none; }
.heatmap-period button { height: 24px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: #667085; font: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.heatmap-period button:hover, .heatmap-period button:focus-visible { color: #1d2939; outline: none; }
.heatmap-period button[aria-pressed="true"] { background: #fff; color: #3159b8; box-shadow: 0 1px 2px rgba(31,41,55,.12); }
.heatmap-basis { position: relative; z-index: 5; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.heatmap-basis label { font-weight: 650; }
.heatmap-basis-field { position: relative; display: block; }
#heatmap-basis-input { width: 210px; height: 30px; padding: 0 26px 0 9px; border: 1px solid #cfd8e6; border-radius: 8px; background: #fff; color: #1d2939; font: inherit; font-size: 12px; text-overflow: ellipsis; }
#heatmap-basis-input:focus { border-color: #8da9f8; outline: none; box-shadow: 0 0 0 3px rgba(49,89,184,.12); }
#heatmap-basis-clear { position: absolute; top: 50%; right: 3px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #667085; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; transform: translateY(-50%); }
#heatmap-basis-clear:hover, #heatmap-basis-clear:focus-visible { background: #f2f4f7; outline: none; }
#heatmap-basis-clear[hidden] { display: none; }
.heatmap-basis-results { position: absolute; top: calc(100% + 4px); right: 0; width: max(100%, 300px); max-height: 320px; margin: 0; padding: 4px; overflow: auto; list-style: none; border: 1px solid #d9e0ea; border-radius: 10px; background: #fff; box-shadow: 0 14px 40px rgba(31,41,55,.18); }
.heatmap-basis-results[hidden] { display: none; }
.heatmap-basis-results li { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 6px; color: #1d2939; font-size: 12px; cursor: pointer; }
.heatmap-basis-results li small { color: var(--muted); font-size: 10px; }
.heatmap-basis-results li:hover, .heatmap-basis-results li[aria-selected="true"] { background: #edf3ff; }
.heatmap-basis-results li.note { color: var(--muted); cursor: default; }
.heatmap-basis-results li.note:hover { background: transparent; }
.heatmap-legend { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); font-size: 9px; line-height: 1.25; }
.heatmap-legend span:first-child { color: #344054; font-weight: 750; }
#heatmap-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #667085; font: inherit; font-size: 25px; line-height: 1; cursor: pointer; }
#heatmap-close:hover, #heatmap-close:focus-visible { background: #f2f4f7; outline: none; }
.heatmap-body { overflow: auto; }
.heatmap-table { width: 100%; border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
.heatmap-table th { position: sticky; z-index: 1; padding: 4px 3px; background: #fff; color: #344054; font-size: 10px; font-weight: 700; line-height: 1.2; white-space: pre-line; }
.heatmap-table thead th { top: 0; z-index: 2; min-width: 78px; max-width: 110px; vertical-align: bottom; text-align: center; hyphens: auto; }
.heatmap-table tbody th { left: 0; padding-right: 7px; text-align: right; white-space: nowrap; }
.heatmap-table thead th:first-child { left: 0; z-index: 3; min-width: 0; hyphens: manual; }
.heatmap-table td { min-width: 64px; padding: 4px 3px; border-radius: 3px; color: #222; font-size: 10px; line-height: 1.25; text-align: center; white-space: nowrap; }
.heatmap-table td b { display: block; font-size: 11px; font-weight: 650; }
.heatmap-table td span { display: block; opacity: .82; }
.heatmap-table td.strong { color: #fff; }
.heatmap-table td.strong b { font-weight: 800; }
.heatmap-status { padding: 8px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.heatmap-status[hidden] { display: none; }
.heatmap-status.error { color: #d92d20; }
.note-dialog { position: fixed; z-index: 40; top: 50%; left: 50%; width: min(520px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); display: grid; grid-template-rows: auto auto minmax(200px, 1fr); visibility: hidden; opacity: 0; transform: translate(-50%, -48%); border: 1px solid #d5dce7; border-radius: 15px; background: #fff; box-shadow: 0 28px 80px rgba(31,41,55,.28); overflow-y: auto; transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.note-dialog.visible { visibility: visible; opacity: 1; transform: translate(-50%, -50%); }
.note-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid var(--line); }
.note-head > div:first-child { display:flex; flex-direction:column; gap:2px; }.note-head span { color:var(--muted); font-size:12px; }
.note-head-actions { display:flex; align-items:center; gap:8px; }
.note-head-actions #note-save { height:34px; padding:0 14px; border:0; border-radius:8px; background:#2962ff; color:#fff; font:inherit; font-size:13px; font-weight:750; cursor:pointer; }.note-head-actions #note-save:hover { background:#1f55df; }
.note-head-actions #note-close { width:30px; height:30px; border:0; border-radius:8px; background:transparent; color:#667085; font-size:25px; line-height:1; cursor:pointer; }.note-head-actions #note-close:hover { background:#f2f4f7; }
.note-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:5px; row-gap:6px; padding:9px 12px; border-bottom:1px solid var(--line); background:#fafbfc; }.note-toolbar button { min-width:31px; height:29px; padding:0 8px; border:1px solid #d7deea; border-radius:6px; background:#fff; color:#344054; cursor:pointer; font-size:12px; }.note-toolbar button:hover,.note-toolbar button:focus-visible { border-color:#98a2b3; background:#f7f9fc; outline:none; }.note-toolbar-separator { width:1px; height:21px; margin:0 2px; background:#d7deea; }.note-color-option { font-weight:800; text-decoration:underline; text-decoration-thickness:2px; }.note-color-option.note-color-dark { color:#1D2939; }.note-color-option.note-color-red { color:#E53935; }.note-color-option.note-color-amber { color:#E38B00; }.note-color-option.note-color-green { color:#16A34A; }.note-color-option.note-color-blue { color:#2962FF; }
.note-editor { min-height:230px; padding:14px 16px; color:#1d2939; font-size:14px; line-height:1.55; outline:none; overflow:auto; }.note-editor:empty::before { content:attr(data-placeholder); color:#98a2b3; pointer-events:none; }.note-editor p { margin:.2em 0 .7em; }.note-editor ul,.note-editor ol { margin:.3em 0 .75em; padding-left:24px; }
.note-editor hr { border:0; border-top:1px solid #cbd5e1; margin:1em 0; }
.news-preview { position: fixed; z-index: 30; width: min(470px, calc(100vw - 24px)); max-height: min(540px, calc(100vh - 24px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; visibility: hidden; opacity: 0; transform: translateY(7px) scale(.985); border: 1px solid #d9e0ea; border-radius: 16px; background: #fff; box-shadow: 0 28px 90px rgba(31,41,55,.22); overflow: hidden; transition: opacity .14s ease, transform .14s ease, visibility .14s; }
.news-preview.visible { visibility: visible; opacity: 1; transform: none; }
.news-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px 12px; border-bottom: 1px solid var(--line); }
.news-head > div { display: flex; flex-direction: column; gap: 2px; }
.news-head span, #news-count { color: var(--muted); font-size: 11px; }
.news-head-actions { display: flex; align-items: center; gap: 10px; }
#news-close { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: #667085; font: inherit; font-size: 25px; line-height: 1; cursor: pointer; }
#news-close:hover, #news-close:focus-visible { background: #f2f4f7; outline: none; }
.news-list { overflow: auto; }
.news-item { display: block; padding: 13px 17px; border-bottom: 1px solid #edf0f4; color: var(--text); text-decoration: none; }
a.news-item:hover, a.news-item:focus-visible { background: #f5f8ff; outline: none; }
.news-item strong { display: block; font-size: 13px; line-height: 1.4; }
.news-item span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.news-status { padding: 8px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.news-status.error { color: #d92d20; }
@media (max-width: 700px) {
    .klinecharts-pro-period-bar .chart-panel-trigger span { display: none; }
    .note-dialog { grid-template-rows: auto auto minmax(120px, 1fr); }
    .note-editor { min-height: 140px; }
    .heatmap-preview { inset: 0 !important; width: 100%; max-height: none !important; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
    .heatmap-legend { display: none; }
    .heatmap-head { flex-wrap: wrap; row-gap: 8px; }
    .heatmap-basis { order: 3; width: 100%; }
    .heatmap-basis-field { flex: 1; }
    #heatmap-basis-input { width: 100%; }
}
