/* HelperBT CRM MVP shell: slim sidebar + inbox prominence.
   Scoped to body.crm-app so create-lot / stage-detail keep their own chrome. */

.crm-app .crm-sidebar {
    width: 220px;
}

.crm-app .crm-sidebar.collapsed {
    width: 72px;
}

.crm-app .crm-content {
    margin-left: 0 !important;
}

.crm-app .crm-main {
    margin-left: 220px;
    padding-top: 0;
    min-height: 100vh;
}

.crm-app .crm-sidebar.collapsed ~ .crm-main {
    margin-left: 72px;
}

.crm-app .crm-sidebar .sidebar-nav {
    padding: 12px 0 8px;
}

.crm-app .nav-section {
    margin-bottom: 12px;
}

.crm-app .nav-item {
    margin: 0 8px;
    padding: 9px 12px;
    border-left: none;
    border-radius: 8px;
    gap: 10px;
}

.crm-app .nav-item.active {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-left-color: transparent;
}

.crm-app .nav-item-inbox {
    position: relative;
}

.crm-app .nav-item-inbox.has-new {
    background: rgba(239, 68, 68, 0.08);
    color: var(--text-primary);
}

.crm-app .nav-badge,
.crm-app .topnav-badge {
    margin-left: auto;
}

.crm-app .sidebar-search {
    padding: 8px 12px 12px;
}

.crm-app .sidebar-search .global-search {
    width: 100%;
}

.crm-app .sidebar-search .global-search-input {
    height: 36px;
    font-size: 13px;
}

.crm-app .crm-sidebar.collapsed .sidebar-search,
.crm-app .crm-sidebar.collapsed .sidebar-more-title {
    display: none;
}

.crm-app .sidebar-footer {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crm-app .sidebar-footer .topnav-user-btn {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
}

.crm-app .sidebar-footer .topnav-user-dropdown {
    width: 100%;
}

.crm-app .sidebar-footer .topnav-user-dropdown .topnav-dropdown-menu {
    left: 0;
    right: auto;
    bottom: calc(100% + 6px);
    top: auto;
}

.crm-app .sidebar-footer-links {
    display: flex;
    gap: 8px;
}

.crm-app .sidebar-footer-links .topnav-site-link,
.crm-app .sidebar-footer-links .logout-btn {
    flex: 1;
    justify-content: center;
    margin: 0;
    padding: 8px;
}

.crm-app .crm-sidebar.collapsed .sidebar-footer-links,
.crm-app .crm-sidebar.collapsed .topnav-user-name,
.crm-app .crm-sidebar.collapsed .topnav-chevron {
    display: none;
}

.inbox-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.inbox-strip[hidden] {
    display: none !important;
}

.inbox-strip:hover {
    background: rgba(239, 68, 68, 0.14);
}

.inbox-strip-count {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inbox-strip-text {
    font-size: 14px;
    font-weight: 600;
}

.inbox-strip-hint {
    margin-left: auto;
    font-size: 13px;
    color: var(--text-secondary);
}

.dashboard-card-inbox {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.06);
}

.page-requests .page-title,
#page-requests .page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .crm-app .crm-main {
        margin-left: 0;
        padding-top: 56px;
    }

    .crm-app .crm-sidebar.collapsed ~ .crm-main {
        margin-left: 0;
    }

    .inbox-strip-hint {
        display: none;
    }
}
