.submain-background {
    background-color: white;
    margin-left: -10px;
    margin-right: -10px;
    margin-top: 71px;
    height: 100%;
    padding: 30px;
}

.menu-left-side {
    width: 250px;
    background-color: #072033;
    font-size: 14px;
    top: 0;
    left: 0;
    position: fixed;
    max-height: 100%;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: 12px 10px 10px 10px;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-top {
    top: 0;
    right: 0;
    width: calc(100% - 250px);
    position: fixed;
    z-index: 50;
    height: 56px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FFFFFF;
    border-bottom: 1px solid #F0F0F0;
}

.submain-content {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    position: relative !important;
    box-sizing: border-box;
    flex: 1;
}

/* ========== Sidebar Inner ========== */
.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 24px);
}

/* ========== Logo ========== */
.sidebar-logo-section {
    text-align: center;
    padding: 6px 0 10px 0;
}

/* ========== Sidebar Toggle Button ========== */
.sidebar-toggle-btn {
    position: absolute;
    top: 14px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    z-index: 101;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-toggle-btn svg {
    transition: transform 0.3s ease;
}

/* ========== Module Selector ========== */
.module-selector {
    position: relative;
    margin: 4px 0 8px 0;
    cursor: pointer;
}

.module-selector-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.module-selector-inner:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.module-selector-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.module-selector-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.module-selector-name {
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-selector-subtitle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-selector-chevron {
    display: flex;
    transition: transform 0.2s ease;
}

/* ─── Module Dropdown ─── */
.module-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #0D2E45;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px;
    z-index: 200;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.module-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.module-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.module-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.module-dropdown-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.module-dropdown-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-dropdown-info {
    display: flex;
    flex-direction: column;
}

.module-dropdown-name {
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.3;
}

.module-dropdown-subtitle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.3;
}

/* ========== Home Button ========== */
.sidebar-home-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 4px;
}

.sidebar-home-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

/* ========== Menu Area ========== */
.sidebar-menu-area {
    flex: 1;
    margin-top: 4px;
}

/* ─── Section Labels ─── */
.sidebar-section {
    margin-bottom: 2px;
}

.sidebar-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 5px 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

.sidebar-section-chevron {
    transition: transform 0.2s ease;
}

.sidebar-section-chevron.rotated {
    transform: rotate(-90deg);
}

.sidebar-section-items {
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.sidebar-section-items.collapsed {
    max-height: 0 !important;
    overflow: hidden;
}

/* ─── Menu Items ─── */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
    margin: 1px 0;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #FFFFFF;
}

.sidebar-item.active {
    background: #2580D3;
    color: #FFFFFF;
    font-weight: 500;
}

.sidebar-item-icon {
    opacity: 0.75;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-item-icon {
    opacity: 1;
}

.sidebar-item-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-item-chevron.rotated {
    transform: rotate(180deg);
}

/* ─── Children (nested items) ─── */
.sidebar-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 8px;
}

.sidebar-children.open {
    max-height: 300px;
}

.sidebar-child-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
    margin: 1px 0;
}

.sidebar-child-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.sidebar-child-item.active {
    color: #FFFFFF;
    background: rgba(37, 128, 211, 0.25);
}

.sidebar-child-icon {
    opacity: 0.6;
    flex-shrink: 0;
}

/* ========== Bottom ========== */
.sidebar-bottom {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ========== NEW HEADER BAR (Figma 2026) ========== */
.hdr-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 55px;
    gap: 16px;
    width: 100%;
}

.hdr-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.hdr-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── Company Chip ─── */
.hdr-company {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 6px;
    border-radius: 4px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    min-width: 200px;
    max-width: 280px;
    flex-shrink: 0;
}

.hdr-company:hover {
    border-color: #CBD5E1;
    background: #EDF2F7;
}

.hdr-company-logo {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 14px;
    background: linear-gradient(218deg, #F9F9F9 14.9%, #F1F1F1 84.4%);
    border: 0.24px solid #CBD5E1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.hdr-company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.hdr-company-initials {
    font-size: 13px;
    font-weight: 700;
    color: #64748B;
    line-height: 1;
}

.hdr-company-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 152px;
}

.hdr-company-name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.hdr-company-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: #A3A3A3;
    display: block;
    line-height: 1;
}

.hdr-company-caret {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* ─── Company Dropdown ─── */
.hdr-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 260px;
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #E8E8E8;
    z-index: 9999;
    padding: 6px 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

.hdr-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hdr-dropdown-item {
    display: flex;
    align-items: center;
    padding: 9px 16px;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.hdr-dropdown-item:hover {
    background: #F8F8F8;
}

.hdr-dropdown-item.active {
    background: #F0F7FF;
}

.hdr-dropdown-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hdr-dropdown-text {
    flex: 1;
    min-width: 0;
}

.hdr-dropdown-name {
    font-size: 13px;
    font-weight: 600;
    color: #1A1A1A;
    display: block;
}

.hdr-dropdown-sub {
    font-size: 10px;
    color: #888;
    display: block;
    margin-top: 1px;
}

.hdr-dropdown-divider {
    height: 1px;
    background: #F0F0F0;
    margin: 4px 12px;
}

.hdr-dropdown-section-label {
    padding: 4px 16px 2px;
    font-size: 9px;
    font-weight: 700;
    color: #999;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ─── Search Pill ─── */
.hdr-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F1F5F9;
    border-radius: 20px;
    padding: 4px 12px 4px 6px;
    height: 40px;
    cursor: text;
    flex-shrink: 0;
}

.hdr-search-icon {
    flex-shrink: 0;
    opacity: 0.6;
    width: 25px;
    height: 25px;
}

.hdr-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    width: 60px;
    min-width: 40px;
}

.hdr-search-input::placeholder {
    color: #A3A3A3;
}

.hdr-search-input:focus {
    width: 140px;
}

.hdr-search-shortcut {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.hdr-search-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #A3A3A3;
    padding: 0 3px;
}

/* ─── User Info ─── */
.hdr-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    max-width: 180px;
    text-align: right;
    letter-spacing: -0.3px;
}

.hdr-user-name {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    line-height: 16.8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hdr-user-title {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #888;
    line-height: 13.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ─── Profile Pill ─── */
.hdr-profile-pill {
    width: 50px;
    height: 40px;
    border-radius: 20px;
    background: #F0F2F4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    flex-shrink: 0;
}

.hdr-profile-pill:hover {
    background: #E8EAED;
}

.hdr-profile-img {
    width: 28px;
    height: 28px;
    border-radius: 14px;
    object-fit: cover;
}

.hdr-profile-caret {
    flex-shrink: 0;
    opacity: 0.6;
}

/* ─── Profile Dropdown ─── */
.hdr-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid #E8E8E8;
    padding: 8px 0;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

.hdr-profile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.hdr-profile-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #30313D;
    text-decoration: none;
    transition: background 0.12s ease;
}

.hdr-profile-link:hover {
    background: #F5F5F5;
    color: #30313D;
}

.hdr-profile-divider {
    height: 1px;
    background: #F0F0F0;
    margin: 4px 12px;
}

.hdr-profile-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 12px 2px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    background: linear-gradient(135deg, #E53E3E, #C53030);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.hdr-profile-logout:hover {
    background: linear-gradient(135deg, #C53030, #9B2C2C);
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* ─── Notification Pill ─── */
.hdr-noti-pill {
    height: 40px;
    border-radius: 20px;
    background: #EAF5FF;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.hdr-noti-pill:hover {
    background: #D5EBFF;
}

.hdr-noti-bell {
    flex-shrink: 0;
}

.hdr-noti-count {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1A5A94;
    line-height: 28px;
    min-width: 20px;
    text-align: right;
}

/* ─── Legacy compat (keep old classnames for rest of app) ─── */
.header-name {
    text-align: right !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    max-width: 260px;
    padding-right: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-dropdown {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-pill {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-pill.has-notifications {
    background-color: #DEE9F4;
}
.sidebar-collapsed .menu-left-side {
    width: 65px;
    padding: 12px 6px 10px 6px;
}

.sidebar-collapsed .main-content {
    margin-left: 65px;
}

.sidebar-collapsed .header-top {
    width: calc(100% - 65px);
}

.sidebar-collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}

/* Hide text and expanded elements when collapsed */
.sidebar-collapsed .sidebar-text-hide,
.sidebar-collapsed .sidebar-section-label,
.sidebar-collapsed .sidebar-children,
.sidebar-collapsed .sidebar-bottom,
.sidebar-collapsed .sidebar-logo-full {
    display: none !important;
}

.sidebar-collapsed .sidebar-logo-collapsed {
    display: block !important;
}

.sidebar-collapsed .module-selector-inner {
    justify-content: center;
    padding: 8px;
}

.sidebar-collapsed .sidebar-home-btn {
    justify-content: center;
    padding: 9px;
}

.sidebar-collapsed .sidebar-home-btn span {
    display: none;
}

.sidebar-collapsed .sidebar-item {
    justify-content: center;
    padding: 9px;
}

.sidebar-collapsed .sidebar-item span {
    display: none;
}

.sidebar-collapsed .sidebar-logo-section {
    text-align: center;
}

/* Prevent body scroll during transition */
body {
    overflow-x: hidden;
}

.small-content {
    border-radius: 6px;
    padding-top: 3px;
    padding-bottom: 3px;
}

.background-main-whilte {
    background-color: white;
    margin-left: -28px;
    margin-right: -28px;
    margin-top: 40px;
    height: auto;
    min-height: 95vh;
    padding: 30px;
}

.empty-information {
    padding: 30px;
    gap: 7.721px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1.544px dashed var(--Stroke-Bluish-Gray, #BBCDDE);
    background: #F9F9F9;
    min-height: calc(100vh - 80px);
}

.ligth-gray-box {
    background-color: #F4F6F9;
    border-radius: 10px;
    padding: 5px 10px 10px 10px;
}

::-webkit-scrollbar {
    width: 8px;
    display: none;
}

::-webkit-scrollbar-thumb {
    background: #043A5C;
    border-radius: 3px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #072033;
}

.on-data-box {
    background-color: #F9F9F9;
    border: #A6CAFC dashed 1px;
    border-radius: 6px;
    height: 400px;
    align-content: center;
}

.no-data-img {
    width: 82px;
    height: 99px;
}

/* .modal-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    border: none;
} */

.header-name {
    text-align: right !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    max-width: 260px;
    padding-right: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dropdown {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-dropdown {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-label {
    background-color: #DEE9F4;
    border-radius: 19.5px;
    height: 40px;
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 3px;
    min-width: 20%;
    max-width: 30%;
}

.bell-noti {
    width: 18px;
    height: 20px;
}

.notification-pill {
    background-color: #F0F2F4;
    border-radius: 20px;
    height: 34px;
    width: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.notification-pill.has-notifications {
    background-color: #DEE9F4;
}

.center-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-center {
    display: flex;
    align-items: center;
}

.mid-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.start-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.end-center {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.between-start {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.between-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    /* ปรับให้ div เต็มพื้นที่ */
}

.flex-all-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.max-background {
    width: 100%;
    height: 100%;
}


.column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

.w-100 {
    width: 100vw;
    /* เต็มความกว้างของหน้าจอ */
    margin: 0;
    /* ลบ margin ที่อาจขัดขวาง */
    box-sizing: border-box;
}

.img-loading {
    width: 100%;
    min-height: 600px;
    position: relative;
    z-index: 99;
    background-color: white;
}