* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
}

#chart-container {
    height: auto;
    min-height: 500px;
    position: relative;
}

.controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 99;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 40px);
}

.controls button {
    margin: 0;
    padding: 6px 12px;
    border: none;
    background: #b79f74;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
    flex: 0 0 auto;
}

.controls button:hover {
    background: #a68f64;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(183, 159, 116, 0.4);
}

@media (max-width: 960px) {
    .controls {
        top: 10px;
        right: 10px;
        padding: 8px;
        gap: 4px;
    }

    .controls button {
        padding: 6px 10px;
        font-size: 11px;
    }
}

.node-card {
    background: white;
    border-radius: 8px;
    padding: 15px 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s;
    min-width: 180px;
    text-align: center;
}

.node-card:hover {

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.node-card.baskan {
    background: linear-gradient(135deg, #0e1a2b 0%, #1a2f4a 100%);
    color: white;
    font-weight: bold;
    font-size: 16px;
    min-width: 220px;
    padding: 20px 25px;
    border: 3px solid #b79f74;
}

.node-card.baskan-yardimcisi {
    background: linear-gradient(135deg, #b79f74 0%, #a68f64 100%);
    color: white;
    font-weight: 600;
    min-width: 200px;
    border: 2px solid #8b7554;
}

.node-card.mudurluk {
    background: #f8f9fa;
    border: 2px solid #d0d5db;
    color: #455062;
}

.node-title {
    font-size: 13px;
    line-height: 1.0;
}

.link {
    fill: none;
    stroke: #b79f74;
    stroke-width: 3px;
    stroke-opacity: 1;
}

.info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.info-panel h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-panel p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"] {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #0e1a2b 0%, #1a2f4a 100%);
    color: white;
    padding: 20px 25px;
    position: relative;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.close {
    color: white;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.9;
    z-index: 10;
}

.close:hover {
    opacity: 1;
}

.close:hover {
    transform: scale(1.2);
}

.person-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    object-position: top center;
}

.person-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.person-title {
    font-size: 15px;
    opacity: 0.9;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.person-info {
    margin-top: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.info-row:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #b79f74 0%, #a68f64 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 18px;
}

.info-text {
    flex: 1;
}

.info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.bio-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #b79f74;
}

.bio-title {
    font-size: 14px;
    color: #0e1a2b;
    font-weight: 600;
    margin-bottom: 10px;
}

.bio-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}


   /* jsTree özelleştirmeleri */
   #jstree-mobile {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.jstree-default .jstree-node {
    min-height: auto;
    line-height: 1.5;
    margin-left: 20px;
    min-width: 24px;
    margin-bottom: 12px;
}

.jstree-default .jstree-anchor {
    line-height: 25px;
    min-height: 25px;
    height: auto;
    padding: 0 4px 0 1px;
    font-size: 14px;
    font-weight: 400;
    color: #333;
}

.jstree-default .jstree-anchor b {
    font-weight: 500;
    color: #0e1a2b;
}

.jstree-default .jstree-anchor small {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    display: block;
    line-height: 1.4;
    margin-top: 6px;
    margin-bottom: 0;
    padding-bottom: 0;
}

.jstree-default .jstree-icon {
    width: 10px;
    height: 10px;
    line-height: 10px;
    margin-top: 8px;
}

.jstree-default .jstree-clicked {
    background: transparent;
    color: #333;
}

.jstree-default .jstree-clicked b,
.jstree-default .jstree-clicked span {
    color: #333;
}

.jstree-default .jstree-clicked small {
    color: #666;
}

.jstree-default .jstree-hovered {
    background: transparent;
}

.jstree-default .jstree-hovered b,
.jstree-default .jstree-hovered span {
    color: #0e1a2b;
}

.jstree-default .jstree-search {
    font-weight: 500;
    color: #b79f74;
}

/* Başkan için özel stil */
.jstree-default li[data-type="baskan"] > .jstree-anchor {
    font-weight: 500;
    color: #0e1a2b;
}

/* Başkan yardımcısı için özel stil */
.jstree-default li[data-type="baskan-yardimcisi"] > .jstree-anchor {
    font-weight: 450;
    color: #1a2f4a;
}

/* Birim için özel stil */
.jstree-default li[data-type="birim"] > .jstree-anchor {
    font-weight: 400;
    color: #455062;
    margin-top: 10px;
}

/* Genel iyileştirmeler */
.jstree-default .jstree-container-ul {
    padding: 10px 0;
}

/* Liste öğeleri arası margin */
.jstree-default li {
    margin-bottom: 12px;
}

.jstree-default li:last-child {
    margin-bottom: 0;
}

/* Alt seviye öğeler için ek margin */
.jstree-default .jstree-children > li {
    margin-bottom: 7px;
    margin-top: 7px;
}

/* Root elemanın altındaki children container'a margin */
.jstree-default li[data-type="baskan"] > ul.jstree-children {
    margin-top: 10px !important;
    padding-top: 0;
}

.jstree-default li[data-type="baskan"] > ul.jstree-children > li:first-child {
    margin-top: 0;
}

/* Root elemanın anchor'ına padding ekle (small tag için alan) */
.jstree-default li[data-type="baskan"] > .jstree-anchor {
    padding-bottom: 0px;
    margin-bottom: 0;
    min-height: auto;
    height: auto;
}

/* Başkan yardımcısı için de aynı margin */
.jstree-default li[data-type="baskan-yardimcisi"] > ul.jstree-children {
    margin-top: 16px !important;
    padding-top: 0;
}

.jstree-default li[data-type="baskan-yardimcisi"] > ul.jstree-children > li:first-child {
    margin-top: 0;
}

/* Başkan yardımcısının anchor'ına padding ekle (small tag için alan) */
.jstree-default li[data-type="baskan-yardimcisi"] > .jstree-anchor {
    padding-bottom: 12px;
    margin-bottom: 0;
    min-height: auto;
    height: auto;
}

/* Wholerow plugin stilleri - sade görünüm */
.jstree-default .jstree-wholerow {
    height: 36px;
}

.jstree-default .jstree-wholerow-hovered {
    background: transparent;
}

.jstree-default .jstree-wholerow-clicked {
    background: transparent;
}

/* Arama kutusu stili */
.search-input-mobile {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.search-input-mobile:focus {
    border-color: #b79f74;
    box-shadow: 0 0 0 3px rgba(183, 159, 116, 0.1);
    outline: none;
}

.search-input-mobile::placeholder {
    color: #999;
    font-weight: 400;
}

/* Modal stilleri (mobil için) */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"] {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #0e1a2b 0%, #1a2f4a 100%);
    color: white;
    padding: 20px 25px;
    position: relative;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.close {
    color: white;
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    opacity: 0.9;
    z-index: 10;
}

.close:hover {
    opacity: 1;
    transform: scale(1.2);
}

.person-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: block;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    object-position: top center;
}

.person-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.person-title {
    font-size: 15px;
    opacity: 0.9;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.person-info {
    margin-top: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s;
}

.info-row:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.info-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #b79f74 0%, #a68f64 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 18px;
}

.info-text {
    flex: 1;
}

.info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.info-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.bio-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #b79f74;
}

.bio-title {
    font-size: 14px;
    color: #0e1a2b;
    font-weight: 600;
    margin-bottom: 10px;
}

.bio-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}
