/* ===== Reset ===== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    box-sizing: border-box;
}

/* ===== Top Header Bar ===== */
.app-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background-color: #086983;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.app-title {
    font-size: 18px;
}

.nav-toggle-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
}
.nav-toggle-btn:hover {
    background: rgba(255,255,255,0.15);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
}

.user-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    font-size: 12px;
    font-weight: 600;
}

.account-menu {
    background: transparent !important;
    border: none !important;
}
.account-menu .dxm-content {
    color: #fff !important;
}

/* ===== Main Body Layout ===== */
.app-body {
    display: flex;
    margin-top: 44px;
    min-height: calc(100vh - 44px);
}

/* ===== Left Navigation Panel ===== */
.nav-panel {
    width: 220px;
    min-width: 220px;
    background: #f5f6f7;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    height: calc(100vh - 44px);
    position: fixed;
    top: 44px;
    left: 0;
    z-index: 100;
    transition: margin-left 0.2s ease;
}

.nav-panel.nav-collapsed {
    margin-left: -220px;
}

/* ===== Content Area ===== */
.app-content {
    flex: 1;
    margin-left: 220px;
    padding: 16px 20px;
    min-height: calc(100vh - 44px);
    position: relative;
    transition: margin-left 0.2s ease;
}

.app-content.nav-collapsed {
    margin-left: 0;
}

/* ===== Footer ===== */
.footer-wrapper {
    margin-top: 24px;
    border-top: 1px solid #eee;
    padding: 0;
}

.footer {
    font-size: 11px;
    color: #999;
    overflow: hidden;
}

.footer-left {
    float: left;
    padding: 12px 0;
}

.footer-right {
    float: right;
    padding: 12px 0;
}

.footer-link {
    color: #999;
    text-decoration: none;
    margin-left: 12px;
}

/* ===== Account Sub Menu ===== */
.header-sub-menu .item {
    padding: 10px 14px !important;
}

.theme-menu-item {
    padding: 8px 16px !important;
}

.myaccount-item {
    background-color: #e4e4e4;
}

.user-info .avatar img {
    float: left;
    height: 40px;
    border-radius: 50%;
}

.user-info .text-container {
    margin-left: 54px;
}

.user-info .text-container .user-name {
    color: #444;
    font-size: 1.1em;
}

.user-info .text-container .email {
    display: block;
    color: #666;
    font-size: 0.85em;
}

/* ===== Sign In page (no nav) ===== */
body .formLayout-verticalAlign {
    margin-left: 0 !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-panel {
        margin-left: -220px;
    }
    .nav-panel:not(.nav-collapsed) {
        margin-left: -220px;
    }
    .app-content {
        margin-left: 0;
    }
}
