/* Corecent-style header: dark blue title bar + light blue menu bar - compact */
:root {
    --corecent-title-bg: #1a3a5c;
    --corecent-menu-bg: #bbdefb;
    --corecent-menu-text: #0d47a1;
    --corecent-header-height: 72px;
}

/* Replace default header with Corecent layout */
.corecent-header-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: #fff;
}

/* Dark blue title bar - compact */
.corecent-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--corecent-title-bg);
    color: #fff;
    padding: 0.25rem 0.75rem;
    font-size: 0.72rem;
    min-height: 32px;
}

.corecent-title-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.4rem;
}

.corecent-title-bar .mobile_btn {
    color: #fff;
    padding: 0.25rem 0.5rem;
    display: none;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .corecent-title-bar .mobile_btn {
        display: inline-flex;
        align-items: center;
    }
}

.corecent-title-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.corecent-title-bar-actions a,
.corecent-title-bar-actions button {
    color: #fff;
    background: transparent;
    border: none;
    padding: 0.15rem 0.3rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    text-decoration: none;
}

.corecent-title-bar-actions a:hover,
.corecent-title-bar-actions button:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.1);
    border-radius: 0.2rem;
}

.corecent-title-bar-actions .corecent-user-profile {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.3rem;
}

.corecent-user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
}

/* User dropdown: visible font colors on white background */
.corecent-title-bar .menu-drop-user,
.corecent-title-bar-actions .menu-drop-user {
    background: #fff;
}
.corecent-title-bar .menu-drop-user .profileset h6,
.corecent-title-bar-actions .menu-drop-user .profileset h6 {
    color: #1a1a1a !important;
}
.corecent-title-bar .menu-drop-user .profileset p,
.corecent-title-bar-actions .menu-drop-user .profileset p,
.corecent-title-bar .menu-drop-user .profileset .text-muted {
    color: #333 !important;
}
.corecent-title-bar .menu-drop-user .dropdown-item,
.corecent-title-bar-actions .menu-drop-user .dropdown-item {
    color: #1a1a1a !important;
}
.corecent-title-bar .menu-drop-user .dropdown-item:hover,
.corecent-title-bar-actions .menu-drop-user .dropdown-item:hover {
    color: #fff !important;
    background-color: #1a3a5c !important;
}

.corecent-bell-badge {
    position: relative;
}

.corecent-bell-badge .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 0.6rem;
    background: #dc3545;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Light blue menu bar - compact */
.corecent-menu-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    min-height: 28px;
    background: var(--corecent-menu-bg);
    border-bottom: 1px solid rgba(0,0,0,0.08);
    overflow-x: auto;
    overflow-y: hidden;
}

.corecent-menu-bar::-webkit-scrollbar { height: 4px; }
.corecent-menu-bar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }

.corecent-menu-item {
    flex-shrink: 0;
    padding: 0.2rem 0.45rem;
    color: var(--corecent-menu-text);
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.corecent-menu-item:hover {
    background: rgba(0,0,0,0.06);
    color: var(--corecent-menu-text);
}

.corecent-menu-item.btn-quick-create {
    background: #ff6b35;
    color: #fff;
    border: none;
}

.corecent-menu-item.btn-quick-create:hover {
    background: #e55a2b;
    color: #fff;
}

.corecent-menu-item.btn-pos {
    background: #1a3a5c;
    color: #fff;
    border: none;
}

.corecent-menu-item.btn-pos:hover {
    background: #0d2842;
    color: #fff;
}

/* Company switcher in menu bar - compact */
.corecent-company-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.35rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.2rem;
    color: var(--corecent-menu-text);
    font-size: 0.72rem;
    cursor: pointer;
    text-decoration: none;
    max-width: 220px;
}

.corecent-company-switcher:hover {
    background: rgba(255,255,255,0.9);
    color: var(--corecent-menu-text);
}

.corecent-company-switcher .company-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corecent-company-switcher .company-hint {
    font-size: 0.6rem;
    color: #666;
}

/* Language selector in menu bar */
.corecent-menu-bar .form-select {
    font-size: 0.7rem;
    padding: 0.15rem 1.25rem 0.15rem 0.4rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 0.2rem;
    background: #fff;
    color: var(--corecent-menu-text);
    min-width: 100px;
}

/* Adjust page-wrapper for new header height */
.main-wrapper .page-wrapper {
    padding-top: var(--corecent-header-height) !important;
}

/* Sidebar: start below header, no overlap */
.sidebar.sidebar-two-pane {
    top: var(--corecent-header-height) !important;
    height: calc(100vh - var(--corecent-header-height)) !important;
}

/* Hide sidebar logo/branding (WingsBook360ERP) */
.sidebar.sidebar-two-pane .sidebar-logo {
    display: none !important;
}

/* Prevent sidebar labels from being cut off */
.sidebar.sidebar-two-pane .sidebar-pane-header {
    overflow: visible;
    min-height: 1.5rem;
}
.sidebar.sidebar-two-pane .sidebar-pane-label {
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    display: block;
}
