:root {
    --color-baskan: #ba0d0d;
    --color-kurul: #e67e22;
    --color-kurul-header: #d35400;
    --color-yardimci: #1b77b4;
    --color-mudurluk: #28a8db;
    --color-dogrudan: #addb71;
    --color-dogrudan-header: #adc920;
    --color-danisman: #3dbbb5;
    --color-danisman-header: #15a3a5;
    --color-bg: #ffffff;
    --color-text-light: #fff;
    --color-text-dark: #333;
    --color-line: #7f8c8d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-bg);
    min-height: 100vh;
    padding: 20px;
}

.org-chart-container {
    max-width: 100%;
    margin: 0 auto;
}

.chart-title {
    text-align: center;
    color: var(--color-baskan);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

#chart-container {
    width: 100%;
    height: 800px;
    overflow: auto;
    background: var(--color-bg);
}

#chart-container svg {
    display: block;
    margin: 0 auto;
}

.link {
    fill: none;
    stroke: var(--color-line);
    stroke-width: 1.2px;
}

.node {
    cursor: default;
}

.node.clickable {
    cursor: pointer;
}

.node rect {
    stroke-width: 0;
    rx: 5;
    ry: 5;
}

.node text {
    font-size: 13px;
    font-weight: 600;
    fill: var(--color-text-light);
    text-anchor: middle;
    dominant-baseline: middle;
}

.node .subtitle {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.95;
}

.node:hover rect {
    filter: brightness(1.1);
}

.node.clickable:hover rect {
    filter: brightness(1.15);
}

.node.baskan rect {
    fill: var(--color-baskan);
}

.node.kurul-header rect {
    fill: var(--color-kurul-header);
}

.node.kurul rect {
    fill: var(--color-kurul);
}

.node.yardimci rect {
    fill: var(--color-yardimci);
}

.node.mudurluk rect {
    fill: var(--color-mudurluk);
}

.node.dogrudan-header rect {
    fill: var(--color-dogrudan-header);
}

.node.dogrudan-header text {
    fill: var(--color-text-dark);
}

.node.dogrudan rect {
    fill: var(--color-dogrudan);
}

.node.dogrudan text {
    fill: var(--color-text-dark);
}

.node.danisman-header rect {
    fill: var(--color-danisman-header);
}

.node.danisman rect {
    fill: var(--color-danisman);
}

@media (max-width: 70rem) {
    .chart-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 60rem) {
    body {
        padding: 5px;
    }

    .chart-title {
        font-size: 1.7rem;
        margin-bottom: 5px;
    }

    #chart-container {
        height: auto;
        min-height: 400px;
    }
}

@media (max-width: 48rem) {
    body {
        padding: 30px;
    }

    .chart-title {
        font-size: 2rem;
        margin-bottom: 5px;
    }

    .node text {
        font-size: 9px;
    }

    .node .subtitle {
        font-size: 8px;
    }
}

@media (max-width: 30rem) {
    body {
        padding: 20px;
    }

    .chart-title {
        font-size: 2rem;
        margin-bottom: 2px;
    }

    .node text {
        font-size: 11px;
    }

    .node .subtitle {
        font-size: 10px;
    }

    .link {
        stroke-width: 1.5px;
    }
}

@media print {
    body {
        background: white;
    }

    #chart-container {
        height: auto;
        overflow: visible;
    }
}