/* The application shell around Filament: the two-level sidebar (E1) and the context switchers. */

.erp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.erp-nav-zone {
    padding: 1rem 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
    list-style: none;
}

.erp-nav-module {
    list-style: none;
}

.erp-nav-module-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: start;
}

.erp-nav-module-btn:hover {
    background-color: var(--gray-100);
}

.erp-nav-module.erp-active > .erp-nav-module-btn {
    color: var(--primary-600);
}

.erp-nav-module-btn > svg {
    flex-shrink: 0;
    color: var(--gray-400);
}

.erp-nav-module.erp-active > .erp-nav-module-btn > svg {
    color: var(--primary-600);
}

.erp-nav-module-label {
    flex: 1;
}

.erp-nav-chevron {
    display: flex;
    color: var(--gray-400);
    transition: transform 150ms;
}

.erp-nav-chevron.erp-open {
    transform: rotate(180deg);
}

.erp-nav-submodules {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-inline-start: 1.25rem;
    margin-top: 0.25rem;
}

.erp-nav-submodules .fi-sidebar-group-btn {
    padding-block: 0.25rem;
}

.erp-nav-submodules .fi-sidebar-group-label {
    font-size: 0.8125rem;
    font-weight: 500;
}

.dark .erp-nav-module-btn {
    color: var(--gray-200);
}

.dark .erp-nav-module-btn:hover {
    background-color: rgb(255 255 255 / 0.05);
}

.dark .erp-nav-zone {
    color: var(--gray-500);
}

.erp-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-context select {
    max-width: 12rem;
    padding: 0.375rem 2rem 0.375rem 0.625rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    background-color: transparent;
    font-size: 0.8125rem;
    color: inherit;
}

.dark .erp-context select {
    border-color: rgb(255 255 255 / 0.1);
}

.erp-context label {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

@media (max-width: 640px) {
    .erp-context label {
        display: none;
    }

    .erp-context select {
        max-width: 7rem;
    }
}

/* Narrowed to its icons (on the Reports pages, J39, or by the user), each module keeps a small name under its icon. */
.erp-nav-rail-label {
    display: block;
    max-width: 4rem;
    overflow: hidden;
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-main-sidebar:not(.fi-sidebar-open) .erp-nav-module-btn {
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem 0.25rem;
}

.erp-nav-link.erp-active > .erp-nav-module-btn {
    background-color: var(--primary-50);
    color: var(--primary-600);
}

.erp-nav-link.erp-active > .erp-nav-module-btn > svg {
    color: var(--primary-600);
}

/* The Reports page's and help centre's left panel stays in view while the list beside it scrolls (wide screens only). */
@media (min-width: 1024px) {
    .erp-side-panel {
        position: sticky;
        top: 5.5rem;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
    }
}

/* The Reports page's left panel (J39): the lists, then the folders. */
.erp-report-panel {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.erp-report-panel-head {
    padding: 1rem 0.75rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.erp-report-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.erp-report-link:hover {
    background-color: var(--gray-100);
}

.erp-report-link > svg {
    flex-shrink: 0;
    color: var(--gray-400);
}

.erp-report-link.erp-active {
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
}

.erp-report-link.erp-active > svg {
    color: var(--primary-600);
}

.erp-report-count {
    margin-inline-start: auto;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Help (docs/specs/09-help.md): the help centre, the "?" on every page and the first-login tour. */

.erp-help-btn {
    display: inline-flex;
    align-items: center;
}

.erp-help-tree details > summary {
    cursor: pointer;
    list-style: none;
    font-weight: 600;
}

.erp-help-tree details > summary::-webkit-details-marker {
    display: none;
}

.erp-help-chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.15s;
}

.erp-help-tree details[open] > summary .erp-help-chevron {
    transform: rotate(90deg);
}

.erp-help-tree-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding-inline-start: 1.25rem;
}

.erp-help-tree-items .erp-report-panel-head {
    padding-top: 0.5rem;
}

.erp-help-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.erp-help-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background-color: #fff;
}

.erp-help-search > svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-400);
    flex-shrink: 0;
}

.erp-help-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    background: transparent;
    outline: none;
    box-shadow: none;
}

.erp-help-result {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.erp-help-result:hover {
    background-color: var(--gray-50);
}

.erp-help-result-title {
    font-weight: 600;
    color: var(--primary-700);
}

.erp-help-result-path,
.erp-help-path {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.erp-help-result-snippet {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.erp-help-title {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-950);
}

.erp-help-summary {
    margin: 0.25rem 0 1rem;
    color: var(--gray-600);
}

.erp-help-note {
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-size: 0.875rem;
}

.erp-help-empty {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.erp-help-text {
    max-width: 48rem;
}

.erp-tour {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.erp-tour-ring {
    position: fixed;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 2px var(--primary-500), 0 0 0 9999px rgb(15 23 42 / 0.45);
    pointer-events: none;
    transition: all 0.2s;
}

.erp-tour-ring-none {
    inset: 0;
    border-radius: 0;
    box-shadow: none;
    background-color: rgb(15 23 42 / 0.45);
}

.erp-tour-card {
    position: fixed;
    width: min(20rem, calc(100vw - 1.5rem));
    padding: 1rem;
    border-radius: 0.75rem;
    background-color: #fff;
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.25);
}

.erp-tour-count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.erp-tour-title {
    margin-top: 0.25rem;
    font-weight: 600;
    color: var(--gray-950);
}

.erp-tour-text {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.erp-tour-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.erp-tour-spacer {
    flex: 1;
}

/* A module not built yet: its entry tagged Coming soon, opening what it will hold. */
.erp-nav-soon > .erp-nav-module-btn {
    color: var(--gray-500);
}

.erp-nav-soon-tag {
    flex-shrink: 0;
    padding: 0.0625rem 0.5rem;
    border-radius: 9999px;
    background-color: var(--primary-50);
    color: var(--primary-700);
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
}

/* A part still to come of a module partly built, after its built sub-modules. */
.erp-nav-soon-part > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
}

.erp-nav-soon-part > a:hover,
.erp-nav-soon-part.erp-active > a {
    background-color: var(--gray-100);
}

.erp-nav-soon-part-label {
    flex: 1;
    min-width: 0;
}

.dark .erp-nav-soon-part > a {
    color: var(--gray-400);
}

.dark .erp-nav-soon-part > a:hover,
.dark .erp-nav-soon-part.erp-active > a {
    background-color: rgb(255 255 255 / 0.05);
}

.dark .erp-nav-soon-tag {
    background-color: color-mix(in oklab, var(--primary-400) 15%, transparent);
    color: var(--primary-300);
}

.erp-soon {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 56rem;
}

.erp-soon-summary {
    font-size: 1rem;
    color: var(--gray-600);
}

.erp-soon-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
}

.erp-soon-group {
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    background-color: white;
}

.erp-soon-group h2 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.erp-soon-group li {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.erp-soon-group li strong {
    display: block;
    color: var(--gray-900);
    font-weight: 600;
}

.dark .erp-soon-summary,
.dark .erp-soon-group li {
    color: var(--gray-400);
}

.dark .erp-soon-group {
    border-color: rgb(255 255 255 / 0.1);
    background-color: var(--gray-900);
}

.dark .erp-soon-group li strong {
    color: white;
}
