﻿
.pdf-viewer-panel {
    color-scheme: dark;
    --bg: #0b1220;
    --panel: #111c2d;
    --panel2: #17253a;
    --line: #293950;
    --text: #e8eef8;
    --muted: #9aabc2;
    --accent: #4295ff;
    --accent2: #1769d2;
    height: 100%;
    display: grid;
    grid-template-rows: 62px 3px minmax(0,1fr) 27px;
    min-height: 0;
    font: 14px/1.4 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
    width: 100%;
    position: relative;
    overflow: hidden;
}

    /* Tüm alt elemanlar için box-sizing izolasyonu */
    .pdf-viewer-panel *, .pdf-viewer-panel *::before, .pdf-viewer-panel *::after {
        box-sizing: border-box;
    }

    .pdf-viewer-panel button,
    .pdf-viewer-panel input,
    .pdf-viewer-panel select {
        font: inherit;
    }

    .pdf-viewer-panel button {
        border: 1px solid var(--line);
        background: #172438;
        color: var(--text);
        border-radius: 9px;
        padding: 8px 11px;
        cursor: pointer;
        transition: .15s;
    }

        .pdf-viewer-panel button:hover {
            background: #223653;
            border-color: #49658b;
        }

        .pdf-viewer-panel button:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

    .pdf-viewer-panel .primary {
        background: var(--accent2);
        border-color: #3487ed;
    }

        .pdf-viewer-panel .primary:hover {
            background: #237be6;
        }

    .pdf-viewer-panel .iconbtn {
        width: 38px;
        height: 36px;
        padding: 0;
        font-size: 17px;
        display: inline-grid;
        place-items: center;
    }

    .pdf-viewer-panel .topbar {
        display: flex;
        align-items: center;
        gap: 18px;
        padding: 0 18px;
        background: #111c2b;
        border-bottom: 1px solid var(--line);
        min-width: 0;
    }

    .pdf-viewer-panel .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 17px;
        font-weight: 750;
        white-space: nowrap;
    }

    .pdf-viewer-panel .pdfmark {
        display: grid;
        place-items: center;
        width: 31px;
        height: 34px;
        background: #e94b58;
        border-radius: 7px;
        font-weight: 800;
        color: white;
        font-size: 12px;
    }

    .pdf-viewer-panel .version {
        font-size: 11px;
        color: var(--muted);
        font-weight: 500;
    }

    .pdf-viewer-panel .filename {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-left: 14px;
        min-width: 80px;
        flex: 1;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        color: #dbe7f7;
    }

    .pdf-viewer-panel .search {
        width: min(330px, 28vw);
        position: relative;
    }

        .pdf-viewer-panel .search input {
            width: 100%;
            padding: 10px 12px 10px 36px;
            background: #0c1523;
            border: 1px solid var(--line);
            border-radius: 10px;
            color: var(--text);
            outline: none;
        }

            .pdf-viewer-panel .search input:focus {
                border-color: var(--accent);
            }

        .pdf-viewer-panel .search span {
            position: absolute;
            left: 12px;
            top: 8px;
            color: var(--muted);
            font-size: 18px;
        }

    .pdf-viewer-panel .top-actions {
        display: flex;
        gap: 7px;
    }

    .pdf-viewer-panel .workspace {
        display: grid;
        grid-template-columns: 76px 200px minmax(0,1fr) 250px;
        min-height: 0;
        min-width: 0;
        overflow: hidden;
    }

        .pdf-viewer-panel .workspace.no-thumbs {
            grid-template-columns: 76px minmax(0,1fr) 250px;
        }

            .pdf-viewer-panel .workspace.no-thumbs .thumbpane {
                display: none;
            }

    .pdf-viewer-panel .rail {
        background: #101a29;
        border-right: 1px solid var(--line);
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 7px;
        gap: 6px;
    }

        .pdf-viewer-panel .rail button {
            border: 0;
            background: transparent;
            color: var(--muted);
            display: flex;
            flex-direction: column;
            gap: 5px;
            align-items: center;
            font-size: 11px;
            padding: 12px 3px;
        }

            .pdf-viewer-panel .rail button.active,
            .pdf-viewer-panel .rail button:hover {
                background: #1a3555;
                color: #77b9ff;
            }

        .pdf-viewer-panel .rail .glyph {
            font-size: 20px;
        }

    .pdf-viewer-panel .thumbpane {
        background: #101a29;
        border-right: 1px solid var(--line);
        overflow: auto;
        padding: 14px 12px;
    }

    .pdf-viewer-panel .pane-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-weight: 700;
        margin: 2px 3px 15px;
    }

    .pdf-viewer-panel .muted {
        color: var(--muted);
    }

    .pdf-viewer-panel .thumb {
        display: block;
        width: 100%;
        max-width: 130px;
        margin: 0 auto 17px;
        background: #1b2a3f;
        border: 1px solid transparent;
        padding: 6px;
        border-radius: 7px;
        color: var(--muted);
        font-size: 12px;
    }

        .pdf-viewer-panel .thumb canvas {
            display: block;
            width: 100%;
            height: auto;
            background: white;
            border-radius: 2px;
        }

        .pdf-viewer-panel .thumb.selected {
            border: 2px solid var(--accent);
            padding: 5px;
            color: #fff;
            box-shadow: 0 0 0 3px #328cff22;
        }

        .pdf-viewer-panel .thumb .n {
            padding-top: 6px;
        }

    .pdf-viewer-panel .viewer {
        min-width: 0;
        min-height: 0;
        display: grid;
        grid-template-rows: 52px minmax(0,1fr);
        background: #dfe5ed;
        color: #172033;
    }

    .pdf-viewer-panel .toolbar {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 7px 12px;
        background: #111c2b;
        border-bottom: 1px solid var(--line);
        color: var(--text);
        overflow-x: auto;
    }

        .pdf-viewer-panel .toolbar .sep {
            height: 26px;
            width: 1px;
            background: var(--line);
            margin: 0 5px;
            flex: none;
        }

    .pdf-viewer-panel .pageinput {
        width: 58px;
        text-align: center;
        background: #0b1524;
        border: 1px solid var(--line);
        border-radius: 7px;
        color: var(--text);
        padding: 8px 4px;
    }

    .pdf-viewer-panel .zoomselect {
        background: #0b1524;
        color: var(--text);
        border: 1px solid var(--line);
        border-radius: 7px;
        padding: 8px;
        min-width: 90px;
    }

    .pdf-viewer-panel .stage {
        overflow: auto;
        min-width: 0;
        min-height: 0;
        position: relative;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 18px;
        background: #dce2ea;
    }

    .pdf-viewer-panel .page-wrap {
        position: relative;
        background: #fff;
        box-shadow: 0 4px 18px #15223835;
        line-height: 0;
        max-width: 100%;
    }

        .pdf-viewer-panel .page-wrap canvas {
            display: block;
            max-width: 100%;
            height: auto;
        }

    .pdf-viewer-panel .empty {
        margin: auto;
        text-align: center;
        color: #334155;
        max-width: 420px;
        padding: 30px;
    }

        .pdf-viewer-panel .empty .big {
            font-size: 48px;
            margin-bottom: 10px;
        }

        .pdf-viewer-panel .empty h2 {
            margin: 0 0 8px;
        }

        .pdf-viewer-panel .empty p {
            color: #64748b;
        }

    .pdf-viewer-panel .sidepanel {
        background: #111c2b;
        border-left: 1px solid var(--line);
        overflow: auto;
        padding: 17px 14px;
    }

    .pdf-viewer-panel .sidehead {
        font-size: 16px;
        font-weight: 750;
        margin: 0 0 17px;
    }

    .pdf-viewer-panel .group {
        border-bottom: 1px solid var(--line);
        padding: 0 0 15px;
        margin-bottom: 15px;
    }

        .pdf-viewer-panel .group h3 {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: #9eb0c9;
            margin: 0 0 10px;
        }

    .pdf-viewer-panel .toolrow {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin: 8px 0;
    }

        .pdf-viewer-panel .toolrow button {
            flex: 1;
        }

        .pdf-viewer-panel .toolrow select {
            width: 100%;
            min-width: 0;
        }

        .pdf-viewer-panel .toolrow label {
            color: #b6c4d8;
            font-size: 12px;
        }

    .pdf-viewer-panel .hint {
        font-size: 12px;
        color: var(--muted);
        line-height: 1.5;
    }

    .pdf-viewer-panel .status {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        background: #111c2b;
        border-top: 1px solid var(--line);
        font-size: 11px;
        color: #a6b6cc;
    }

        .pdf-viewer-panel .status strong {
            color: #e0e9f7;
            font-weight: 600;
        }

    .pdf-viewer-panel .hidden {
        display: none !important;
    }

    .pdf-viewer-panel .progress {
        height: 3px;
        background: #23334a;
    }

        .pdf-viewer-panel .progress > div {
            height: 100%;
            width: 0;
            background: var(--accent);
            transition: width .15s;
        }

    .pdf-viewer-panel .toast {
        position: fixed;
        bottom: 42px;
        left: 50%;
        transform: translateX(-50%);
        background: #17263a;
        border: 1px solid #3c5472;
        padding: 10px 15px;
        border-radius: 9px;
        box-shadow: 0 8px 30px #0005;
        z-index: 20;
    }


/* --- RESPONSIVE (DUYARLI) TASARIM KURALLARI --- */

@media (max-width: 1024px) {
    .pdf-viewer-panel .workspace {
        grid-template-columns: 60px 160px minmax(0, 1fr) 220px;
    }

    .pdf-viewer-panel .search {
        width: min(220px, 25vw);
    }
}

@media (max-width: 768px) {
    .pdf-viewer-panel {
        grid-template-rows: 56px 3px minmax(0,1fr) 24px;
    }

        .pdf-viewer-panel .workspace {
            grid-template-columns: 1fr;
        }

        .pdf-viewer-panel .rail,
        .pdf-viewer-panel .thumbpane,
        .pdf-viewer-panel .sidepanel {
            display: none;
        }

        .pdf-viewer-panel .workspace.mobile-show-sidebar .sidepanel {
            display: block;
            position: absolute;
            inset: 0;
            z-index: 10;
            width: 100%;
        }

        .pdf-viewer-panel .filename {
            min-width: 50px;
            font-size: 13px;
        }

        .pdf-viewer-panel .search {
            display: none;
        }
}
