body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8fafc;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: auto minmax(520px, 680px) auto;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-left {
    justify-self: start;
}

.header-right {
    justify-self: end;
}

.qb-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    padding-right: 6px;
}

.qb-logo img:first-child {
    width: 32px;
    height: 32px;
}

.qb-logo img:last-child {
    height: 18px;
    width: auto;
}

.client-switch {
    border: none;
    background: transparent;
    color: #111827;
    height: 36px;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.header-search {
    position: relative;
    width: 100%;
    max-width: 680px;
    justify-self: center;
}

.header-search input {
    width: 100%;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 12px 0 38px;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
}

.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
}

.header-icon-btn {
    min-width: 34px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-icon-btn i {
    font-size: 18px;
    line-height: 1;
}

.header-icon-btn.with-label {
    gap: 4px;
    padding: 0 8px;
}

.header-icon-label {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #4b5563;
    white-space: nowrap;
}

.header-icon-btn:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.avatar-badge {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #1f2937;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.page-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    border-radius: 10px 0px 20px 20px;
    border-top: 0px;
    border-right: 1px solid #d5dee3;
    border-bottom: 0px;
    border-left: 0px;
    width: 70px;
    height: calc(100vh - 56px);
    background: #ffffff;
    color: #111827;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.menu-group {
    margin-bottom: 6px;
}

.menu-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
    padding: 10px;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 8px;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.3s;
    color: #111827;
    text-decoration: none;
    text-align: center;
    min-height: 56px;
    position: relative;
}

.menu-item:hover {
    background: transparent;
}

.menu-item.active {
    background: transparent;
}

.menu-item.active .icon {
    padding: 10px;
    background: #e5e7eb;
    color: #111827;
}

.has-submenu .submenu {
    position: absolute;
    top: 0;
    left: calc(100% + 2px);
    width: 760px;
    max-width: calc(100vw - 140px);
    max-height: 80vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.15);
    padding: 8px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 20;
}

.accounting-item {
    position: relative;
}

.accounting-item .accounting-submenu {
    top: auto;
    bottom: 0;
    left: calc(100% + 2px);
    width: 260px;
    max-width: calc(100vw - 140px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px;
}

.accounting-item .accounting-submenu .submenu-column {
    display: grid;
    gap: 1px;
}

.accounting-item .accounting-submenu .submenu-section-title {
    padding: 8px 10px 6px;
}

.accounting-item .accounting-submenu .submenu-item {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    padding: 8px 10px;
}

.all-apps-item {
    position: relative;
}

.all-apps-submenu {
    position: absolute;
    top: auto;
    bottom: 0;
    left: calc(100% - 2px);
    width: 220px;
    max-width: calc(100vw - 140px);
    max-height: none;
    overflow: visible;
    background: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 30;
}

.all-apps-item:hover .all-apps-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.all-apps-item > .icon svg {
    width: 24px;
    height: 24px;
}

.menu-item.all-apps-item > span:nth-of-type(2) {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.all-apps-panel {
    position: relative;
    width: 220px;
}

.all-apps-section {
    position: static;
    border-bottom: none;
}

.all-apps-tab {
    width: 100%;
    border: none;
    background: #ffffff;
    padding: 10px 12px;
    text-align: left;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 400;
    color: #111827;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease;
    display: flex;
    align-items: center;
    font-family: inherit;
}

.all-apps-tab span:last-child {
    white-space: nowrap;
}

.all-apps-tab-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.all-apps-tab-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.all-apps-tab-icon img,
.all-apps-tab-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.all-apps-tab:hover {
    background: #f3f4f6;
    color: #111827;
}

.all-apps-tab.is-active {
    background: #f3f4f6;
    color: #111827;
}

.all-apps-section.is-active .all-apps-tab {
    background: #f3f4f6;
    color: #111827;
}

.all-apps-section:hover .all-apps-tab {
    background: #f3f4f6;
    color: #111827;
}

.all-apps-section-body {
    position: absolute;
    top: 0;
    left: 220px;
    width: 300px;
    max-height: 78vh;
    overflow-y: auto;
    display: none;
    grid-template-columns: 1fr;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
}

.all-apps-section:not(.is-active) .all-apps-section-body {
    display: none;
}

.all-apps-section.is-active .all-apps-section-body {
    display: grid;
}

.all-apps-section:hover .all-apps-section-body {
    display: grid;
}

.all-apps-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 24px;
    padding: 10px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #111827;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 400;
    font-family: inherit;
}

.all-apps-link::before {
    content: "";
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.all-apps-link:hover {
    background: #f3f4f6;
}

.all-apps-link.active {
    background: #eef2f7;
    font-weight: 600;
}

.left-panel-section--container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.left-panel-section--header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.left-panel-section--header-text {
    margin: 0;
    font-size: 18px;
    line-height: 1.1;
    color: #111827;
    font-weight: 700;
}

.my-menu-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-header-item,
.global-header-item-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hamburger-button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.hamburger-button:hover {
    background: #f3f4f6;
}

.left-panel-section-body {
    display: block;
}

.all-apps-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.all-apps-accordion-item {
    border: 1px solid #eef2f7;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.all-apps-accordion-item--open {
    box-shadow: inset 0 0 0 1px #eef2f7;
}

.all-apps-accordion-header {
    border-bottom: 1px solid #eef2f7;
}

.all-apps-app-button {
    width: 100%;
    border: none;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    text-align: left;
}

.all-apps-app-button:hover {
    background: #f9fafb;
}

.all-apps-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.all-apps-accordion-item--open .all-apps-chevron {
    transform: rotate(180deg);
}

.all-apps-accordion-body {
    display: grid;
    gap: 1px;
    padding: 4px 0 8px;
}

.all-apps-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #111827;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.25;
}

.all-apps-nav-item:hover {
    background: #f3f4f6;
}

.all-apps-nav-item.active {
    background: #eef4ff;
    font-weight: 600;
}

.all-apps-bookmark {
    color: #6b7280;
    font-size: 11px;
}

.all-apps-bookmark--outline {
    font-size: 12px;
}

.submenu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.submenu-column {
    min-width: 0;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.submenu-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #6b7280;
    text-transform: uppercase;
    padding: 8px 10px 6px;
}

.submenu-item {
    font-size: 12px;
    font-weight: 500;
    color: #111827;
    padding: 7px 10px;
    border-radius: 8px;
    line-height: 1.2;
}

.submenu-item:hover {
    background: #f3f4f6;
}

.icon {
    color: #111827;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-shrink: 0;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.icon svg,
.icon img {
    width: 24px;
    height: 24px;
    display: block;
}

.icon i {
    font-size: 20px;
    line-height: 1;
}

.sidebar .icon i {
    color: #111827;
}

.menu-item:hover .icon {
    padding: 10px;
    background: #005419;
    color: #ffffff;
}

.menu-item:hover .icon i {
    color: #ffffff;
}

.menu-item.active .icon i {
    color: #111827;
}

.icon img {
    object-fit: contain;
}

.icon img:last-child {
    display: none;
}

.menu-item:hover .icon img:first-child {
    display: none;
}

.menu-item:hover .icon img:last-child {
    display: block;
}

.menu-item > span:last-child {
    font-size: 11px;
    font-weight: 600;
}

.menu-item.accounting-item > span:nth-of-type(2) {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
}

.menu-footer {
    margin-top: auto;
}

.sidebar-title,
.menu-label {
    color: #111827;
    font-weight: 700;
}

.sidebar-title {
    font-size: 18px;
    padding: 6px 8px 8px;
}

.menu-label {
    font-size: 14px;
    padding: 6px 8px;
}

.section-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 6px 8px;
}

.main-content {
    flex: 1;
    padding: 20px;
}

@media (max-width: 1100px) {
    .top-header {
        grid-template-columns: 1fr;
        height: auto;
        padding: 10px;
        gap: 10px;
    }

    .header-search {
        max-width: none;
    }

    .header-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .all-apps-submenu {
        width: min(220px, calc(100vw - 110px));
    }

    .all-apps-section-body {
        width: 250px;
    }
}