.cdms-app-shell .navbar-brand {
    margin-left: 1rem;
    margin-right: 1rem;
    border-radius: 4px;
    padding: 0;
}

.account-brand-logo {
    height: 2.1rem;
    overflow: visible;
    width: auto;
}

.account-brand-text {
    margin: 0;
    padding-bottom: 0.3rem;
    padding-top: 0.3rem;
}

.navbar-stock-trigger {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-navbar-custom {
    font-size: 1rem;
}

.account-modal .modal-dialog {
    max-width: 800px;
}

.account-modal .modal-content {
    border: 0;
    min-height: 522px;
}

.account-modal .modal-header {
    border-bottom: 0;
    padding: 0.75rem 1rem 0.5rem;
}

.account-modal .modal-title {
    font-weight: 400;
}

.account-modal .modal-footer {
    border-top: 0;
}

.stock-picker-new {
    color: #2563eb;
    font-size: 0.875rem;
    text-decoration: none;
}

.stock-picker-search {
    border: 2px solid #2563eb;
    border-radius: 4px;
    height: 2.25rem;
    padding-left: 2rem;
}

.stock-picker-search-wrap {
    position: relative;
}

.stock-picker-search-wrap::before {
    border: 2px solid #5f6368;
    border-radius: 50%;
    content: "";
    height: 0.75rem;
    left: 0.75rem;
    position: absolute;
    top: 0.65rem;
    width: 0.75rem;
}

.stock-picker-search-wrap::after {
    background: #5f6368;
    content: "";
    height: 0.45rem;
    left: 1.35rem;
    position: absolute;
    top: 1.25rem;
    transform: rotate(-45deg);
    width: 2px;
}

.stock-picker-head,
.stock-picker-row {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1.25rem 1.25rem minmax(12rem, 1.4fr) minmax(8rem, 0.8fr) minmax(9rem, 1fr) 1.25rem;
    min-height: 1.9rem;
    padding: 0 0.75rem;
}

.stock-picker-head {
    border-bottom: 1px solid #d8dce1;
    font-size: 0.875rem;
    font-weight: 600;
}

.stock-picker-row {
    background: #fff;
    border: 0;
    border-bottom: 1px solid #d8dce1;
    color: inherit;
    font-size: 0.875rem;
    text-align: left;
    width: 100%;
}

.stock-picker-row:hover,
.stock-picker-row:focus {
    background: #f8fbff;
    outline: none;
}

.stock-picker-check {
    color: #2543eb;
    font-weight: 600;
}

.stock-picker-stock-icon {
    color: #5f6368;
    font-size: 0.875rem;
    text-align: center;
    width: 1rem;
}

.stock-picker-name {
    color: #0d6efd;
    text-decoration: underline;
}

.stock-picker-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-permissions-trigger {
    text-decoration: none;
}

.permissions-modal-list {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 2px;
    max-height: 14rem;
    overflow: auto;
}

.permissions-modal-list .list-group-item {
    border-color: #d8dce1;
    font-size: 0.875rem;
}

.bars-icon {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary-bg-subtle);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--bs-primary);
    --bs-btn-active-bg: var(--bs-primary-bg-subtle);

    border-radius: var(--bs-border-radius-sm);
    text-decoration: none;
}

.sidebar-tree {
    --sidebar-tree-line: #202124;
    --sidebar-tree-link: #0d6efd;
    --sidebar-tree-hover-bg: #f0f6ff;
    --sidebar-tree-active-bg: #e7f1ff;

    font-size: 1.25rem;
}

.sidebar-tree-list,
.sidebar-tree-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-tree-node {
    position: relative;
}

.sidebar-tree-link {
    align-items: center;
    border-radius: 0;
    color: var(--sidebar-tree-link);
    display: flex;
    gap: 0.6rem;
    line-height: 1.2;
    max-width: 100%;
    min-height: 2.4rem;
    padding: 0.3rem 0.5rem;
    text-decoration: none;
}

.sidebar-tree-link:hover,
.sidebar-tree-link:focus {
    background: var(--sidebar-tree-hover-bg);
    color: var(--sidebar-tree-link);
    outline: none;
}

.sidebar-tree-link.active {
    background: var(--sidebar-tree-active-bg);
    color: #0a58ca;
    font-weight: 600;
}

.sidebar-tree-link.disabled {
    background: transparent;
    color: var(--bs-secondary-color);
    cursor: default;
    pointer-events: none;
}

.sidebar-tree-link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sidebar-tree-icon {
    flex: 0 0 1.35rem;
    text-align: center;
    width: 1.35rem;
}

.sidebar-tree-parent,
.sidebar-tree-parent-link {
    font-size: 1rem;
}

.sidebar-tree-children {
    margin-left: 2rem;
    padding-left: 1.5rem;
    position: relative;
}

.sidebar-tree-children::before {
    border-left: 3px solid var(--sidebar-tree-line);
    bottom: 1.2rem;
    content: "";
    left: 0.55rem;
    position: absolute;
    top: -0.25rem;
}

.sidebar-tree-child::before {
    border-top: 3px solid var(--sidebar-tree-line);
    content: "";
    left: -0.95rem;
    position: absolute;
    top: 1.2rem;
    width: 0.95rem;
}

.account-modal .btn-close,
#accountsSidebar .btn-close {
    font-size: 0.825rem;
}

.erp-module-strip {
    background: #f3f6fa;
    border-bottom: 1px solid #d7dde5;
    min-height: 4.25rem;
    padding: 0.75rem 0;
}

.erp-module-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    min-width: 0;
    overflow-x: auto;
}

.erp-module-label {
    color: #64748b;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.erp-module-list {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.5rem;
    min-width: 0;
}

.erp-module-card {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.6rem;
    min-height: 2.75rem;
    min-width: 11rem;
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.erp-module-card i {
    color: #2563eb;
    flex: 0 0 1rem;
    text-align: center;
}

.erp-module-card strong,
.erp-module-card small {
    display: block;
    line-height: 1.2;
}

.erp-module-card small {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.erp-module-card[href]:hover,
.erp-module-card[href]:focus {
    background: #eef5f8;
    border-color: #9fb8c6;
    color: #0f172a;
}

.erp-module-card-disabled {
    background: #eef2f7;
    color: #94a3b8;
    cursor: not-allowed;
}

.erp-module-card-disabled i,
.erp-module-card-disabled small {
    color: #94a3b8;
}

.notice-message {
    color: #334155;
    white-space: normal;
}

.login-shell {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.login-card {
    background-color: #ffffffcc;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-shell .form-control,
.login-shell .btn {
    border-radius: 0.25rem !important;
}

.login-shell .alert,
.page-home .alert {
    border-radius: 0;
    font-size: 0.8rem;
}

.login-shell .btn-close,
.page-home .alert .btn-close {
    height: 1.2rem;
}

@media (max-width: 575.98px) {
    .navbar-stock-trigger {
        max-width: 42vw;
    }

    .stock-picker-head,
    .stock-picker-row {
        grid-template-columns: 1.25rem 1.25rem minmax(10rem, 1fr) 1.25rem;
    }

    .stock-picker-company,
    .stock-picker-responsible {
        display: none;
    }
}
