/* Each template changes presentation only; NavMenu remains the source of navigation. */
.sidebar-template-lightrail .app-bar { background: #fff !important; color: #2c463d; border-block-end: 1px solid #e1e9e5; box-shadow: none; }
.sidebar-template-lightrail .app-bar__subtitle { color: #62776e !important; }
.sidebar-template-lightrail .app-bar__branch { color: #2c463d !important; border-color: #bbcfc5 !important; }
.sidebar-template-lightrail .app-bar__avatar { background: #e5f1eb; color: #216849; }
.sidebar-template-violet .app-bar { background: #7256a5 !important; color: #fff; }
.sidebar-template-violet .app-bar__subtitle { color: #eee9f6 !important; }
.sidebar-template-violet .app-bar__avatar { background: #eee9f6; color: #5a407d; }
.sidebar-template-midnight .app-bar { background: #142d37 !important; color: #e6f1f6; }
.sidebar-template-midnight .app-bar__subtitle { color: #acc4cf !important; }
.sidebar-template-midnight .app-bar__branch { border-color: #718f9e !important; color: #e6f1f6 !important; }
.sidebar-template-midnight .app-bar__avatar { background: #477bb7; color: #fff; }
.sidebar-template-classic.pos-style-fresh .app-bar { background: #378f84 !important; }
.sidebar-template-classic.pos-style-fresh .app-bar__avatar { background: #c7eddf; color: #106448; }
.sidebar-template-lightrail .app-drawer {
    background: linear-gradient(to left, #f6f8fa 66px, #fff 66px) !important;
    border-inline-start: 1px solid #e4e8ec;
}
.sidebar-template-lightrail .app-drawer .mud-nav-link { border-radius: 8px; }
.sidebar-template-lightrail .app-drawer .mud-nav-link.active { background: #e9f2ed; color: #176947; }
.sidebar-template-lightrail .drawer-profile { padding-block: 12px; }
.sidebar-template-lightrail .app-drawer .mud-nav-link-icon { width: 34px; }

.sidebar-template-violet .app-drawer,
.sidebar-template-midnight .app-drawer {
    inset-block-start: 84px !important;
    height: calc(100% - 96px);
    width: 248px !important;
    margin-inline: 12px;
    border-radius: 20px;
    border: 1px solid #e7e4f1;
}
.sidebar-template-violet .app-drawer { background: #faf9ff !important; }
.sidebar-template-violet .app-drawer .mud-nav-link.active { background: #eee9f6; color: #7256a5; }
.sidebar-template-violet .drawer-profile .mud-avatar { background: #7256a5; }
.sidebar-template-violet .nav-section-label { color: #827793; }
.sidebar-template-violet .app-drawer .mud-nav-link:hover { background: #f0ecfa; }

.sidebar-template-midnight .app-drawer { background: #13272e !important; color: #dce8ee; border-color: #1b343d; }
.sidebar-template-midnight .app-drawer .mud-nav-link,
.sidebar-template-midnight .app-drawer .mud-nav-link-icon { color: #c2d1d8; }
.sidebar-template-midnight .app-drawer .mud-nav-link.active { color: #fff; background: #477bb7; }
.sidebar-template-midnight .app-drawer .mud-nav-link.active .mud-nav-link-icon { color: #fff; }
.sidebar-template-midnight .app-drawer .mud-nav-link:hover { background: #213a44; }
.sidebar-template-midnight .app-drawer .mud-nav-link.active:hover { background: #477bb7; }
.sidebar-template-midnight .nav-section-label,
.sidebar-template-midnight .drawer-profile .mud-text-secondary { color: #94aeb9 !important; }
.sidebar-template-midnight .drawer-profile .mud-avatar { background: #477bb7; color: #fff; }
.sidebar-template-midnight .sidebar-density-toggle { color: #c2d1d8; }
.sidebar-template-midnight .mud-nav-link-expand-icon { color: #94aeb9; }

.sidebar-density-toggle { width: 32px; height: 32px; }
.app-drawer .mud-drawer-header:has(.sidebar-density-toggle) { flex-wrap: wrap; gap: 4px; }
.app-drawer .mud-drawer-header:has(.sidebar-density-toggle) .drawer-profile { padding-block: 0 12px; }
.sidebar-compact .app-drawer .mud-drawer-header { padding: 12px 8px; justify-content: center; }
.sidebar-compact .app-drawer .drawer-profile { justify-content: center; }
.sidebar-compact .app-drawer .drawer-profile > div,
.sidebar-compact .app-drawer .nav-section-label,
.sidebar-compact .app-drawer .mud-nav-link-expand-icon { display: none; }
.sidebar-compact .app-drawer .mud-nav-link-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.sidebar-compact .app-drawer .mud-nav-link {
    display: flex;
    width: 44px;
    min-height: 44px;
    margin: 4px auto !important;
    padding: 10px !important;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 12px;
}
.sidebar-compact .app-drawer .mud-nav-link-icon { margin: 0 !important; width: 24px; height: 24px; min-width: 24px; flex-shrink: 0; }
.sidebar-compact .app-drawer .mud-nav-group .mud-navmenu { margin: 0 !important; padding: 0 !important; }
.sidebar-compact .app-drawer .mud-nav-group { min-width: 0; }
.sidebar-compact .app-drawer .mud-drawer-content { overflow-x: hidden; }
.sidebar-compact.sidebar-template-violet .app-drawer,
.sidebar-compact.sidebar-template-midnight .app-drawer { width: 60px !important; }
.sidebar-compact.sidebar-template-violet .app-drawer .mud-avatar,
.sidebar-compact.sidebar-template-midnight .app-drawer .mud-avatar { width: 32px; height: 32px; font-size: 14px; }

.sidebar-template-grid,
.pos-template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 20px; }
.sidebar-template-option {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e3dded;
    border-radius: 14px;
    background: #fff;
    color: #30283c;
    font: inherit;
    text-align: start;
    cursor: pointer;
}
.sidebar-template-option:hover { border-color: #7256a5; }
.sidebar-template-option.is-selected { border: 2px solid #7256a5; padding: 13px; background: #faf8fc; }
.sidebar-template-option:focus-visible { outline: 3px solid #7256a5; outline-offset: 3px; }
.sidebar-template-option__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; }
.sidebar-template-option__description { font-size: 14px; color: #71677e; }
.sidebar-preview { display: flex; width: 100%; height: 220px; border-radius: 10px; overflow: hidden; background: #f5f1f9; color: #30283c; border: 1px solid #e0e8e4; }
.sidebar-preview__rail { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 16px 10px; background: #f6f7f9; border-inline-end: 1px solid #e7eaec; }
.sidebar-preview__rail .mud-icon-root { font-size: 18px; }
.sidebar-preview__menu { display: flex; flex-direction: column; flex: 1; padding: 16px 10px; gap: 14px; background: #fff; font-size: 12px; }
.sidebar-preview__menu > span { display: flex; align-items: center; gap: 6px; }
.sidebar-preview__menu .mud-icon-root { font-size: 16px; }
.sidebar-preview__active { background: #eee9f6; color: #5a407d; padding: 8px; border-radius: 6px; }
.sidebar-preview__account { margin-block-start: auto; }
.sidebar-preview--classic .sidebar-preview__rail { display: none; }
.sidebar-preview--violet { padding: 8px; background: #e9e4f5; border: 0; gap: 4px; }
.sidebar-preview--violet .sidebar-preview__menu,
.sidebar-preview--violet .sidebar-preview__rail { background: #faf9ff; border-radius: 8px; }
.sidebar-preview--violet .sidebar-preview__active { background: #eee9f6; color: #7256a5; }
.sidebar-preview--midnight { padding: 8px; background: #e6edf0; border: 0; gap: 4px; }
.sidebar-preview--midnight .sidebar-preview__rail,
.sidebar-preview--midnight .sidebar-preview__menu { background: #13272e; color: #dce8ee; border-radius: 10px; border-color: transparent; }
.sidebar-preview--midnight .sidebar-preview__active { background: #477bb7; color: white; }

.pos-preview { display: flex; gap: 8px; width: 100%; height: 230px; padding: 10px; background: #faf8fc; border-radius: 10px; }
.pos-preview__catalog { flex: 1; min-width: 0; }
.pos-preview__search { display: flex; gap: 6px; align-items: center; background: white; border: 1px solid #e2e9e5; padding: 8px; font-size: 11px; border-radius: 6px; }
.pos-preview__search .mud-icon-root { font-size: 16px; }
.pos-preview__products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-block-start: 9px; }
.pos-preview__products > span { display: flex; flex-direction: column; gap: 6px; padding: 9px; background: white; border-radius: 8px; font-size: 9px; }
.pos-preview__products > span > .mud-icon-root { font-size: 24px; color: #7256a5; }
.pos-preview__products small { font-size: 9px; color: #7256a5; }
.pos-preview__cart { display: flex; flex-direction: column; gap: 12px; width: 26%; padding: 8px; border-radius: 8px; background: #fff; font-size: 11px; }
.pos-preview__cart > span { height: 12px; border-radius: 3px; background: #e8eeeb; }
.pos-preview__cart small { margin-block-start: auto; padding: 8px; border-radius: 6px; color: #fff; background: #7256a5; text-align: center; }
.pos-preview--fresh { background: #e1f4eb; }
.pos-preview--fresh .pos-preview__products > span { align-items: center; }
.pos-preview--fresh .pos-preview__products > span > .mud-icon-root { background: #dcf4e8; border-radius: 50%; padding: 6px; width: 36px; height: 36px; }
.pos-preview--fresh .pos-preview__products small { width: 100%; border-radius: 12px; background: #378f84; color: white; padding: 3px; text-align: center; }
.pos-preview--fresh .pos-preview__cart small { background: #378f84; }

@media (max-width: 959px) {
    .sidebar-template-violet .app-drawer,
    .sidebar-template-midnight .app-drawer { inset-block-start: 72px !important; margin: 0; height: calc(100% - 72px); border-radius: 0; width: 272px !important; }
    .sidebar-compact.sidebar-template-violet .app-drawer,
    .sidebar-compact.sidebar-template-midnight .app-drawer { width: 84px !important; }
}
