/* ทำให้พื้นหลังเทาเต็มหน้า - ยืดขึ้นไปทับ breadcrumb */
.section-padding.bg-sgray {
    background-color: #f5f5f5;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
    position: relative;
}
/* Shared White Card - Circuit2 & Vector2 Design */
.tree .org-box.white-circuit-card {
    width: 367px !important;
    height: 100px;
    background-image: 
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%202.png'),
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit2.png');
    background-position: calc(100% - 0px) center, left center;
    background-size: auto 100%, auto 100%;
    background-repeat: no-repeat;
    background-color: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25);
    position: relative;
    z-index: 120; /* ensure white card sits above orange-strip */
}

.tree .org-box.white-circuit-card .container-fluid,
.tree .org-box.white-circuit-card .row {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 125;
}

.tree .org-box.title.white-circuit-card {
    width: 367px !important;
    height: 100px;
    background-image: 
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%202.png'),
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit2.png');
    background-position: calc(100% - 0px) center, left center;
    background-size: auto 100%, auto 100%;
    background-repeat: no-repeat;
    background-color: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 4px 4px 0 rgba(0,0,0,0.25);
}

/* Center text in white-circuit-card only */
.tree .org-box.title.white-circuit-card .container-fluid,
.tree .org-box.title.white-circuit-card .row {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tree.p-0 li .org-box {
    overflow: hidden;
}
.tree li .org-box {
    position: relative;
    height: auto;
    width: 163px;
    padding: 1.5rem 0.5rem;
    text-decoration: none;
    background-color: white;
    color: #8b8b8b;
    z-index: 2;
    display: inline-block;
    box-shadow: 0 1px 2px rgb(0 0 0 / 10%);
    background-position: 50%;
    background-size: cover;
    background-repeat: no-repeat;
}
.tree .org-box.title {
    width: 29% !important;
    font-size: 28px;
    background: #092166;
    color: #fff;
    font-weight: 200;
    margin-bottom: 25rem;
    margin-left: 0px;
}
.tree .org-box.examine {
    font-size: 26px;
    padding: 1rem;
    top: 7rem;
    position: absolute;
    width: 300px;
    overflow: inherit !important;
}
.tree .org-box.top-under {
    width: 300px;
    font-size: 24px;
    font-weight: 200;
    top: -2rem;
    overflow: initial !important;
    text-align: left;
    color: #000;
    padding-left: 2rem;
}
.tree .org-box.secretary {
    border-radius: 10rem;
    font-size: 26px;
    padding: 1rem;
    position: absolute;
    top: 13rem;
    left: calc(42.6% + 10px);
    overflow: inherit !important;
}
.tree .org-box.sub-deputy {
    position: relative !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: none !important;
    height: 98px !important;
    font-size: 24px !important;
    color: #000;
    font-weight: 200;
    background-color: #DFA710;
    background-image:
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%205.png'),
        url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit4.png');
    background-position: calc(100% + 30px) center, left center;
    background-size: auto 120%, auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.12);
}
.tree .org-box.sub-deputy .container-fluid,
.tree .org-box.sub-deputy .row {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.tree .org-box.sub-deputy h5 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}
.tree .org-box.sub-deputy.sub-deputy-small {
    width: 100% !important;
    max-width: none !important;
    height: 98px !important;
    font-size: 24px !important;
}

/* Assistant cards (ผู้ช่วยเลขาธิการ) - Blue cards */
.tree .org-box.box-assistant {
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    background-color: #0B2B68 !important;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit5.png') !important;
    background-position: left bottom !important;
    background-size: auto 54% !important;
    background-repeat: no-repeat !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.12) !important;
    padding: 0.5rem !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}
.tree .org-box.box-assistant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/vector6.png');
    background-position: calc(100% - 0px) center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 1;
    border-radius: 10px;
    pointer-events: none;
}
.tree .org-box.box-assistant.line-up-custom {
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    height: 140px !important;
    min-height: 140px !important;
    max-height: 140px !important;
    padding: 0.5rem !important;
}
.tree .org-box.box-assistant .container-fluid,
.tree .org-box.box-assistant .row {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    z-index: 2;
}
.tree .org-box.box-assistant .row.name {
    font-size: 22px !important;
    line-height: 1.3;
    color: #FFFFFF;
    font-weight: 200;
}

/* New orange header card (ฝ่ายทำกับการจัดหาและการควบคุมระบบไฟฟ้า) */
.tree .org-box.orange-white-card {
    width: 167px !important;
    min-width: 167px !important;
    max-width: 167px !important;
    height: 213px !important;
    min-height: 213px !important;
    max-height: 213px !important;
    background-color: #FFFFFF !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.tree .org-box.orange-white-card .orange-header {
    width: 167px;
    height: 82px;
    background-color: #F47638;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit6.png');
    background-position: right top;
    background-size: auto 60%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 8px;
    color: #FFFFFF;
    font-weight: 200;
    font-size: 22px;
    line-height: 1.1;
    text-align: center !important;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
    box-sizing: border-box;
}
.tree .org-box.orange-white-card .white-content {
    width: 167px;
    flex: 1;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 3px;
    background-color: #FFFFFF;
    box-sizing: border-box;
}
.tree .org-box.orange-white-card .bullet-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start !important;
    text-align: left !important;
    font-size: 20px;
    font-weight: 200;
    line-height: 1.1;
    color: #000000;
    padding-left: 20px;
    position: relative;
}
.tree .org-box.orange-white-card .bullet-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 16px;
    height: 8px;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/bullet1.png');
    background-size: 16px 8px;
    background-repeat: no-repeat;
    background-position: left center;
}

/* Orange only card (สำนักงานคณะกรรมการกำกับกิจการพลังงาน ประจำเขต 1-13) */
.tree .org-box.orange-only-card {
    width: 167px !important;
    min-width: 167px !important;
    max-width: 167px !important;
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    background-color: #F47638 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10) !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.tree .org-box.orange-only-card .orange-header-only {
    width: 100%;
    height: 100%;
    background-color: #F47638;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit6.png');
    background-position: right top;
    background-size: auto 60%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    color: #FFFFFF;
    font-weight: 200;
    font-size: 22px;
    line-height: 1.1;
    text-align: center;
    box-sizing: border-box;
}

/* Size variants - ไม่ปรับสีส้ม (orange header ยังคง 82px) */
.tree .org-box.orange-white-card.size-234 {
    height: 234px !important;
    min-height: 234px !important;
    max-height: 234px !important;
}
.tree .org-box.orange-white-card.size-233 {
    height: 233px !important;
    min-height: 233px !important;
    max-height: 233px !important;
}
.tree .org-box.orange-white-card.size-310 {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
}
.tree .org-box.orange-white-card.size-247 {
    height: 247px !important;
    min-height: 247px !important;
    max-height: 247px !important;
}
.tree .org-box.orange-white-card.size-195 {
    height: 195px !important;
    min-height: 195px !important;
    max-height: 195px !important;
}
.tree .org-box.orange-white-card.size-228 {
    height: 228px !important;
    min-height: 228px !important;
    max-height: 228px !important;
}
.tree .org-box.orange-white-card.size-171 {
    height: 171px !important;
    min-height: 171px !important;
    max-height: 171px !important;
}

/* Size variants - ปรับสีส้ม (orange header 46px) */
.tree .org-box.orange-white-card.size-138 {
    height: 138px !important;
    min-height: 138px !important;
    max-height: 138px !important;
}
.tree .org-box.orange-white-card.size-138 .orange-header {
    height: 46px !important;
}
.tree .org-box.orange-white-card.size-151 {
    height: 151px !important;
    min-height: 151px !important;
    max-height: 151px !important;
}
.tree .org-box.orange-white-card.size-151 .orange-header {
    height: 46px !important;
}
.tree .org-box.orange-white-card.size-173 {
    height: 173px !important;
    min-height: 173px !important;
    max-height: 173px !important;
}
.tree .org-box.orange-white-card.size-173 .orange-header {
    height: 46px !important;
}
.tree .org-box.orange-white-card.size-166 {
    height: 166px !important;
    min-height: 166px !important;
    max-height: 166px !important;
}
.tree .org-box.orange-white-card.size-166 .orange-header {
    height: 46px !important;
}

/* Orange header strip for specific cards */
.tree .org-box.orange-strip {
    position: relative;
    overflow: visible;
    width: 367px !important;
    height: 154px !important;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    z-index: 50; /* ensure this box sits above neighboring boxes */
}

/* Custom audit card (ฝ่ายตรวจสอบภายใน) style for exact match */
.tree .org-box.orange-strip.audit-card {
    width: 367px !important;
    height: 154px !important;
    background-color: #fff;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%204.png');
    background-position: calc(100% - 0px) center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    overflow: visible;
}
.tree .org-box.orange-strip.audit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    background-color: #F47638;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/citcuit%203.png');
    background-position: right center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    z-index: 2;
}
.tree .org-box.orange-strip.audit-card .container-fluid {
    padding: 0 !important;
    position: relative;
    z-index: 3;
    height: 100%;
}
.tree .org-box.orange-strip.audit-card .row {
    padding: 0 !important;
    margin: 0 !important;
    height: 100%;
}
.tree .org-box.orange-strip.audit-card .orange-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #FFFFFF;
    font-weight: 200;
    font-size: 28px;
    line-height: 39px;
    z-index: 999;
    margin: 0;
    background: transparent;
}
.tree .org-box.orange-strip.audit-card .orange-content {
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    padding: 0;
    margin: 0;
}
.tree .org-box.orange-strip.audit-card .bullet-item {
    display: block;
    font-family: 'DB Heavent';
    font-size: 28px;
    font-weight: 200;
    line-height: 28px;
    color: #000000;
    padding-left: 27px;
    margin-bottom: 8px;
    position: relative;
}
.tree .org-box.orange-strip.audit-card .bullet-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 16px;
    height: 8px;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/bullet1.png');
    background-size: 16px 8px;
    background-repeat: no-repeat;
    background-position: left center;
}
.tree .org-box.orange-strip.audit-card .orange-strip__head {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #fff;
    font-weight: 200;
    font-size: 16px;
    z-index: 4;
}
.tree .org-box.orange-strip.audit-card .orange-strip__body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tree .org-box.orange-strip.audit-card .orange-strip__body li {
    padding: 4px 0 4px 0;
    color: #222;
    font-size: 15px;
    font-weight: 200;
}
.tree .org-box.orange-strip.audit-card .orange-strip__body li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #F47638;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}
.tree {
    position: relative; /* anchor absolute group moves inside the tree */
}

/* Admin card (ฝ่ายอำนวยการคณะกรรมการ) - mirror of audit-card */
.tree .org-box.orange-strip.admin-card {
    width: 367px !important;
    height: 154px !important;
    background-color: #fff;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%204.png');
    background-position: calc(100% - 0px) center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    position: relative;
    overflow: visible;
}
.tree .org-box.orange-strip.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    background-color: #F47638;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/citcuit%203.png');
    background-position: right center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    z-index: 2;
}
.tree .org-box.orange-strip.admin-card .container-fluid {
    padding: 0 !important;
    position: relative;
    z-index: 3;
    height: 100%;
}
.tree .org-box.orange-strip.admin-card .row {
    padding: 0 !important;
    margin: 0 !important;
    height: 100%;
}
.tree .org-box.orange-strip.admin-card .orange-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #FFFFFF;
    font-weight: 200;
    font-size: 28px;
    line-height: 39px;
    z-index: 999;
    margin: 0;
    background: transparent;
}
.tree .org-box.orange-strip.admin-card .orange-content {
    position: absolute;
    top: 56px;
    left: 16px;
    right: 16px;
    padding: 0;
    margin: 0;
}
.tree .org-box.orange-strip.admin-card .bullet-item {
    display: block;
    font-family: 'DB Heavent';
    font-size: 28px;
    font-weight: 200;
    line-height: 28px;
    color: #000000;
    padding-left: 27px;
    margin-bottom: 8px;
    position: relative;
}
.tree .org-box.orange-strip.admin-card .bullet-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 16px;
    height: 8px;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/bullet1.png');
    background-size: 16px 8px;
    background-repeat: no-repeat;
    background-position: left center;
}
.tree .org-box.orange-strip.admin-card .orange-strip__head { color:#fff; font-weight:600; }
.tree .org-box.orange-strip.admin-card .orange-strip__body li::before { background:#F47638; }

/* Utility: move a set of nodes together for layout work */
.group-move {
    position: absolute;
    left: 600px; /* default group X - adjust as needed */
    z-index: 300;
}
.group-move--1 {
    top: 340px;
    left: 600px;
}
/* .group-move--2 removed - now controlled by inline CSS in 09.html */
.tree .org-box.orange-strip::before {
    content: '';
    position: absolute;
    top: 0; /* flush to top */
    left: 0;
    width: 100%;
    height: 39px;
    background-color: #F47638;
    background-image: url('/webupload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article3086/organize/citcuit%203.png');
    background-position: right center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    border-radius: 10px 10px 0 0;
    z-index: 51; /* above the box base */
}
.tree .org-box.orange-strip .container-fluid,
.tree .org-box.orange-strip .row {
    padding: 44px 16px 12px 16px; /* space under strip then normal content padding */
    position: relative;
    z-index: 52; /* content above the strip pseudo-element */
}

/* structured header and body for orange-strip */
.orange-strip__head {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    font-weight: 200;
    z-index: 60;
}
.orange-strip__body ul {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}
.orange-strip__body li {
    padding: 6px 0;
    color: #111;
}
.orange-strip__body li::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #F47638;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}


/* Secretary pill card (yellow) */
.tree .org-box.secretary-card {
    width: 263.62px !important;
    height: 71.83px !important;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%203.png');
    background-position: calc(50% + 50px) center;
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-color: #DFA710;
    color: #111;
    border-radius: 35.92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.12);
    font-weight: 200;
}
.tree ul.sub .org-box {
    position: relative;
    margin-top: 20px;
    overflow: inherit;
}

/* ========================================
   HIDE ALL CONNECTOR LINES FROM OLD CSS
   ======================================== */
.tree li::before,
.tree li::after,
.tree ul::before,
.tree ul::after,
.tree ul ul::before,
.tree ul ul::after,
.tree > ul > li::before,
.tree > ul > li::after,
.tree .secretary::before,
.tree .secretary::after,
.tree .title::before,
.tree .title:not(.energy-card)::after,
.tree .examine::before,
.tree .examine::after,
.tree .top-under::before,
.tree .top-under::after,
.tree .top-under.left::before,
.tree .top-under.left::after,
.tree .cotton .circle::before,
.tree .cotton .circle::after,
.tree ul ul .group-under .sub::before,
.tree .tree-flex-3::before,
/* ไม่ซ่อน ::after ของ tree-flex-3, sub-tree-3, sub-tree-2 เพราะใช้สำหรับ connector lines */
/* ไม่ซ่อน ::before ของ li ใน sub-tree เพราะใช้สำหรับ connector lines */
.tree .group-under::before,
.tree .group-under::after,
.tree .group-under ul.sub::before,
.tree .group-under ul.sub::after,
.tree .org-box::before,
.tree .org-box:not(.energy-card):not(.sub-deputy)::after {
    display: none !important;
    border: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
}

/* ซ่อน energy-card::after ด้วย - ใช้ div connector แทน */
.tree .org-box.title.energy-card::after {
    display: none !important;
    border: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
}

/* Re-enable pseudo-elements needed for card designs (not lines) */
.tree .org-box.box-assistant::before {
    display: block !important;
    content: '' !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/vector6.png') !important;
    background-position: calc(100% - 0px) center !important;
    background-size: auto 100% !important;
    background-repeat: no-repeat !important;
}

/* ========================================
   Connector lines for sub-deputy → box-assistant
   ใช้ CSS จาก 09.html inline styles แทน
   ======================================== */

.tree .org-box.orange-strip::before {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 39px !important;
    background-color: #F47638 !important;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/citcuit%203.png') !important;
    background-position: right center !important;
    background-size: auto 100% !important;
    background-repeat: no-repeat !important;
    border-radius: 10px 10px 0 0 !important;
    z-index: 2 !important;
}

.tree .org-box.orange-strip.audit-card::before,
.tree .org-box.orange-strip.admin-card::before,
.tree .top-under.org-box.orange-strip.audit-card::before,
.tree .top-under.org-box.orange-strip.admin-card::before,
.tree .top-under.org-box.orange-strip.group-move.audit-card::before,
.tree .top-under.org-box.orange-strip.group-move.admin-card::before {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 39px !important;
    background-color: #F47638 !important;
    background-image: url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/citcuit%203.png') !important;
    background-position: right center !important;
    background-size: auto 100% !important;
    background-repeat: no-repeat !important;
    border-radius: 10px 10px 0 0 !important;
    z-index: 2 !important;
}

/* ========================================
   CONNECTOR LINES - ใช้ div elements แทน pseudo-elements
   เพื่อให้ responsive ได้ดีกว่า
   CSS อยู่ใน 09.html inline styles
   ======================================== */

/* ========================================
   LAYOUT ADJUSTMENTS - Removed (use existing layout)
   ======================================== */

    /* Demo-mode: force admin/audit orange-strip cards to participate in normal flow for visual checks */
    .tree.demo-mode .org-box.orange-strip.audit-card,
    .tree.demo-mode .org-box.orange-strip.admin-card {
        position: static !important;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
        display: block !important;
        width: 367px !important;
    }
    .tree.demo-mode .group-move {
        position: static !important;
        left: auto !important;
        top: auto !important;
    }
    .tree.demo-mode .org-box.orange-strip.audit-card::before,
    .tree.demo-mode .org-box.orange-strip.admin-card::before {
        position: absolute; /* keep header strip positioned inside the box */
    }

    /* Energy Board Card - Circuit & Vector Design */
    .tree .org-box.title.energy-card {
        width: 367px !important;
        height: 100px;
        background-image:
            url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/Vector%2021.png'),
            url('/web-upload/200xf869baf82be74c18cc110e974eea8d5c/filecenter/admin_ercadmin_article-3086/organize/circuit1.png');
        background-position: calc(100% + 17px) center, left center;
        background-size: auto 100%, auto 100%;
        background-repeat: no-repeat;
        background-color: #092166;
        color: #fff;
        border-radius: 10px;
    }

/* Center text in energy-card only */
.tree .org-box.title.energy-card .container-fluid,
.tree .org-box.title.energy-card .row {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ========================================
   RESPONSIVE DESIGN - Media Queries
   ======================================== */

/* Large Desktop (1920px and above) - Default sizes already defined above */

/* Medium Desktop (1440px - 1919px) */
@media screen and (max-width: 1919px) {
    .tree .org-box.white-circuit-card,
    .tree .org-box.title.white-circuit-card,
    .tree .org-box.title.energy-card {
        width: 320px !important;
        height: 90px !important;
        font-size: 24px;
    }

    .tree .org-box.orange-strip {
        width: 320px !important;
        height: 140px !important;
    }

    /* Responsive สำหรับ audit-card และ admin-card */
    .tree .org-box.orange-strip.audit-card,
    .tree .org-box.orange-strip.admin-card {
        width: 320px !important;
        height: 140px !important;
    }

    .tree .org-box.orange-strip.audit-card .orange-header,
    .tree .org-box.orange-strip.admin-card .orange-header {
        font-size: 24px;
        height: 36px;
        line-height: 36px;
    }

    .tree .org-box.orange-strip.audit-card .orange-content,
    .tree .org-box.orange-strip.admin-card .orange-content {
        top: 48px;
    }

    .tree .org-box.orange-strip.audit-card .bullet-item,
    .tree .org-box.orange-strip.admin-card .bullet-item {
        font-size: 24px;
    }

    .tree .org-box.sub-deputy {
        width: 100% !important;
        max-width: none !important;
        height: 85px !important;
        font-size: 22px;
    }

    .tree .org-box.sub-deputy.sub-deputy-small {
        width: 100% !important;
        max-width: none !important;
        height: 85px !important;
        font-size: 22px;
    }

    .tree .org-box.box-assistant {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        height: 125px !important;
        min-height: 125px !important;
        max-height: unset !important;
        font-size: 20px;
    }

    .tree .org-box.orange-white-card {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        height: 185px !important;
        min-height: 185px !important;
        max-height: 185px !important;
    }

    .tree .org-box.orange-white-card .orange-header {
        width: 145px;
        height: 72px;
        font-size: 20px;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .tree .org-box.orange-white-card .white-content {
        width: 145px;
        font-size: 18px;
    }

    /* Size variants - ไม่ปรับสีส้ม */
    .tree .org-box.orange-white-card.size-234 { height: 204px !important; min-height: 204px !important; max-height: 204px !important; }
    .tree .org-box.orange-white-card.size-233 { height: 203px !important; min-height: 203px !important; max-height: 203px !important; }
    .tree .org-box.orange-white-card.size-310 { height: 270px !important; min-height: 270px !important; max-height: 270px !important; }
    .tree .org-box.orange-white-card.size-247 { height: 215px !important; min-height: 215px !important; max-height: 215px !important; }
    .tree .org-box.orange-white-card.size-195 { height: 170px !important; min-height: 170px !important; max-height: 170px !important; }
    .tree .org-box.orange-white-card.size-228 { height: 198px !important; min-height: 198px !important; max-height: 198px !important; }
    .tree .org-box.orange-white-card.size-171 { height: 149px !important; min-height: 149px !important; max-height: 149px !important; }

    /* Size variants - ปรับสีส้ม */
    .tree .org-box.orange-white-card.size-138 { height: 120px !important; min-height: 120px !important; max-height: 120px !important; }
    .tree .org-box.orange-white-card.size-138 .orange-header { height: 40px !important; }
    .tree .org-box.orange-white-card.size-151 { height: 132px !important; min-height: 132px !important; max-height: 132px !important; }
    .tree .org-box.orange-white-card.size-151 .orange-header { height: 40px !important; }
    .tree .org-box.orange-white-card.size-173 { height: 151px !important; min-height: 151px !important; max-height: 151px !important; }
    .tree .org-box.orange-white-card.size-173 .orange-header { height: 40px !important; }
    .tree .org-box.orange-white-card.size-166 { height: 145px !important; min-height: 145px !important; max-height: 145px !important; }
    .tree .org-box.orange-white-card.size-166 .orange-header { height: 40px !important; }

    .tree .org-box.orange-only-card {
        width: 145px !important;
        min-width: 145px !important;
        max-width: 145px !important;
        height: 72px !important;
        min-height: 72px !important;
        max-height: 72px !important;
        font-size: 20px;
    }

    .tree .org-box.secretary-card {
        width: 229px !important;
        height: 62px !important;
        font-size: 24px;
        background-position: calc(50% + 35px) center;
    }

    .tree .org-box.title.energy-card {
        background-position: calc(100% + 15px) center, left center !important;
    }
}

/* Small Desktop / Tablet Landscape (1024px - 1439px) */
@media screen and (max-width: 1439px) {
    .tree .org-box.white-circuit-card,
    .tree .org-box.title.white-circuit-card,
    .tree .org-box.title.energy-card {
        width: 280px !important;
        height: 80px !important;
        font-size: 28px;
    }

    .tree .org-box.orange-strip {
        width: 280px !important;
        height: 130px !important;
    }

    /* Responsive สำหรับ audit-card และ admin-card */
    .tree .org-box.orange-strip.audit-card,
    .tree .org-box.orange-strip.admin-card {
        width: 280px !important;
        height: 130px !important;
    }

    .tree .org-box.orange-strip.audit-card .orange-header,
    .tree .org-box.orange-strip.admin-card .orange-header {
        font-size: 20px;
        height: 32px;
        line-height: 32px;
    }

    .tree .org-box.orange-strip.audit-card .orange-content,
    .tree .org-box.orange-strip.admin-card .orange-content {
        top: 42px;
    }

    .tree .org-box.orange-strip.audit-card .bullet-item,
    .tree .org-box.orange-strip.admin-card .bullet-item {
        font-size: 20px;
    }

    .tree .org-box.sub-deputy {
        width: 100% !important;
        max-width: none !important;
        height: 72px !important;
        font-size: 19px;
    }

    .tree .org-box.sub-deputy.sub-deputy-small {
        width: 100% !important;
        max-width: none !important;
        height: 72px !important;
        font-size: 19px;
    }

    .tree .org-box.box-assistant {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        height: 110px !important;
        min-height: 110px !important;
        max-height: unset !important;
        font-size: 18px;
    }

    .tree .org-box.box-assistant .row.name {
        font-size: 18px !important;
    }

    .tree .org-box.orange-white-card {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
        height: 165px !important;
        min-height: 165px !important;
        max-height: 165px !important;
    }

    .tree .org-box.orange-white-card .orange-header {
        width: 130px;
        height: 64px;
        font-size: 18px;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .tree .org-box.orange-white-card .white-content {
        width: 130px;
        font-size: 16px;
    }

    .tree .org-box.orange-white-card .bullet-item {
        font-size: 16px;
    }

    /* Size variants - ไม่ปรับสีส้ม */
    .tree .org-box.orange-white-card.size-234 { height: 182px !important; min-height: 182px !important; max-height: 182px !important; }
    .tree .org-box.orange-white-card.size-233 { height: 181px !important; min-height: 181px !important; max-height: 181px !important; }
    .tree .org-box.orange-white-card.size-310 { height: 242px !important; min-height: 242px !important; max-height: 242px !important; }
    .tree .org-box.orange-white-card.size-247 { height: 192px !important; min-height: 192px !important; max-height: 192px !important; }
    .tree .org-box.orange-white-card.size-195 { height: 152px !important; min-height: 152px !important; max-height: 152px !important; }
    .tree .org-box.orange-white-card.size-228 { height: 177px !important; min-height: 177px !important; max-height: 177px !important; }
    .tree .org-box.orange-white-card.size-171 { height: 133px !important; min-height: 133px !important; max-height: 133px !important; }

    /* Size variants - ปรับสีส้ม */
    .tree .org-box.orange-white-card.size-138 { height: 107px !important; min-height: 107px !important; max-height: 107px !important; }
    .tree .org-box.orange-white-card.size-138 .orange-header { height: 36px !important; }
    .tree .org-box.orange-white-card.size-151 { height: 118px !important; min-height: 118px !important; max-height: 118px !important; }
    .tree .org-box.orange-white-card.size-151 .orange-header { height: 36px !important; }
    .tree .org-box.orange-white-card.size-173 { height: 135px !important; min-height: 135px !important; max-height: 135px !important; }
    .tree .org-box.orange-white-card.size-173 .orange-header { height: 36px !important; }
    .tree .org-box.orange-white-card.size-166 { height: 129px !important; min-height: 129px !important; max-height: 129px !important; }
    .tree .org-box.orange-white-card.size-166 .orange-header { height: 36px !important; }

    .tree .org-box.orange-only-card {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
        height: 64px !important;
        min-height: 64px !important;
        max-height: 64px !important;
        font-size: 18px;
    }

    .tree .org-box.secretary-card {
        width: 205px !important;
        height: 56px !important;
        font-size: 20px;
        background-position: calc(50% + 32px) center;
    }

    .tree .org-box.title.energy-card {
        background-position: calc(100% + 13px) center, left center !important;
    }

    .tree h5 {
        font-size: 22px;
    }
}

/* Tablet Portrait (768px - 1023px) */
@media screen and (max-width: 1023px) {
    .tree {
        transform: scale(0.75);
        transform-origin: top center;
    }

    .tree .org-box.title {
        margin-bottom: 18rem;
    }
}

/* Mobile Landscape (640px - 767px) */
@media screen and (max-width: 767px) {
    .tree {
        transform: scale(0.6);
        transform-origin: top left;
        overflow-x: auto;
    }

    .tree .org-box.title {
        margin-bottom: 15rem;
    }

    .tree-chart-top {
        margin-left: 60px !important;
    }
}

/* Mobile Portrait (below 640px) */
@media screen and (max-width: 639px) {
    .tree {
        transform: scale(0.45);
        transform-origin: top left;
        overflow-x: auto;
        min-width: 1400px;
    }

    .tree .org-box.title {
        margin-bottom: 12rem;
    }

    .tree-chart-top {
        margin-left: 40px !important;
    }

    .section-padding {
        padding: 1rem 0.5rem;
    }

    .container {
        padding: 0;
    }
}