/* NeoFix modern technology theme. This file is intentionally loaded after the
   legacy styles so it can be evolved independently without touching features. */
:root {
    --neo-navy: #0a1530;
    --neo-ink: #17264a;
    --neo-blue: #2868f0;
    --neo-cyan: #2caee8;
    --neo-violet: #7759e8;
    --neo-panel: rgba(255, 255, 255, 0.94);
    --neo-line: #dde6f7;
    --neo-muted: #6f7e9a;
}

body.light-theme {
    background:
        radial-gradient(circle at 12% 4%, rgba(43, 113, 255, .18), transparent 28%),
        radial-gradient(circle at 90% 14%, rgba(126, 80, 236, .15), transparent 26%),
        #f4f7fc;
    color: var(--neo-ink);
    padding: 0;
}

body.light-theme #app {
    max-width: 1680px;
    margin: 0 auto;
    padding: 26px 30px 40px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}

#app > h1 {
    margin: 0 0 14px;
    padding: 0;
    color: #122759;
    font-size: clamp(25px, 2.4vw, 34px);
    font-weight: 800;
    letter-spacing: -.7px;
    text-align: left;
}

#app > .stats {
    display: flex;
    align-items: center;
    min-height: 66px;
    gap: 18px;
    margin-bottom: 16px;
    padding: 14px 18px;
    color: #fff;
    background: linear-gradient(110deg, #102a65, #254da8 52%, #6348c8);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(25, 54, 121, .18);
}

#app > .stats #user, #app > .stats #stats { font-weight: 650; }

.nav-container {
    display: flex;
    gap: 9px;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 0 0 20px;
    padding: 12px;
    background: var(--neo-panel);
    border: 1px solid var(--neo-line);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(28, 54, 108, .08);
}

.nav-container button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d5e0f5;
    border-radius: 10px;
    background: #fff;
    color: #285198;
    font-weight: 650;
    box-shadow: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.nav-container button:hover {
    transform: translateY(-1px);
    border-color: #91b0f4;
    background: #f1f6ff;
    color: #1d4caa;
}

/* 所有导航入口保持同一视觉层级，避免单个按钮过分抢眼。 */
.nav-container .btn-nav-accent {
    border-color: #d5e0f5;
    color: #285198;
    background: #fff;
}

/* Odoo 风格模块菜单：顶层只保留业务分类，具体操作进入下拉菜单。 */
.odoo-menu-bar {
    position: relative;
    min-height: 54px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 7px 12px;
    overflow: visible;
}

.odoo-menu-bar .odoo-home,
.odoo-menu-bar .odoo-menu-trigger {
    min-height: 38px;
    padding: 8px 13px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #23477f;
    font-weight: 700;
    box-shadow: none;
}

.odoo-menu-bar .odoo-home {
    padding-left: 7px;
    color: #1c3d78;
    font-size: 15px;
    letter-spacing: -.15px;
}

.odoo-menu { position: relative; }
.odoo-menu-bar .odoo-menu-trigger span { margin-left: 4px; color: #7890bc; }
.odoo-menu-bar .odoo-menu-trigger:hover,
.odoo-menu.is-open .odoo-menu-trigger {
    background: #eaf1ff;
    color: #1b4b9f;
    transform: none;
}

.odoo-menu-panel {
    position: absolute;
    z-index: 5000;
    top: calc(100% + 8px);
    left: 0;
    display: none;
    min-width: 190px;
    padding: 7px;
    background: #fff;
    border: 1px solid #d9e4f6;
    border-radius: 11px;
    box-shadow: 0 16px 30px rgba(26, 54, 111, .18);
}

.odoo-menu.is-open .odoo-menu-panel { display: grid; gap: 2px; }
.odoo-menu-panel button,
.odoo-menu-bar .odoo-menu-panel .btn-nav-accent {
    width: 100%;
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #24477e;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.odoo-menu-panel button:hover,
body.light-theme .odoo-menu-panel .btn-nav-main:hover,
body.light-theme .odoo-menu-panel .btn-nav-sub:hover,
body.light-theme .odoo-menu-panel .btn-nav-accent:hover {
    border-color: transparent;
    background: #edf3ff;
    color: #17469d;
    box-shadow: none;
    transform: none;
}

/* 覆盖旧版导航的白字悬停规则：浅色悬停面必须配深色文字。 */
body.light-theme .nav-container .btn-nav-main:hover,
body.light-theme .nav-container .btn-nav-sub:hover,
body.light-theme .nav-container .btn-nav-accent:hover {
    background: #eaf2ff;
    border-color: #76a1f1;
    color: #173f8e;
    box-shadow: 0 6px 14px rgba(51, 101, 210, .16);
}

/* 下拉菜单不沿用顶层导航的悬停阴影和边框。 */
body.light-theme .odoo-menu-panel .btn-nav-main:hover,
body.light-theme .odoo-menu-panel .btn-nav-sub:hover,
body.light-theme .odoo-menu-panel .btn-nav-accent:hover {
    border-color: transparent;
    background: #edf3ff;
    color: #17469d;
    box-shadow: none;
    transform: none;
}


.tab {
    padding: 24px;
    background: var(--neo-panel);
    border: 1px solid var(--neo-line);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(29, 51, 96, .09);
}

.tab h3 {
    color: #183875;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    font-size: 22px;
    letter-spacing: -.35px;
}

.tab input, .tab select, .tab textarea {
    border: 1px solid #d6e0f2;
    border-radius: 9px;
    background: #fff;
    color: #16264a;
}

.tab input:focus, .tab select:focus, .tab textarea:focus {
    border-color: #5c8df1;
    box-shadow: 0 0 0 3px rgba(57, 111, 239, .12);
    outline: 0;
}

.btn-primary {
    border: 0;
    border-radius: 9px;
    background: linear-gradient(120deg, #2364e8, #6855dc);
    box-shadow: 0 7px 15px rgba(42, 91, 208, .18);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 19px rgba(42, 91, 208, .24); }
.btn-secondary { border-radius: 9px; }

/* 库存总览是使用频率最高的页面：搜索与列表分组更清晰。 */
#tab1 .search-container {
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px;
    background: #f6f8fd;
    border: 1px solid #e3eaf8;
    border-radius: 12px;
}

#tab1 .search-container input {
    min-height: 42px;
    padding: 10px 14px;
    background: #fff;
}

#tab1 .search-container button,
#tab1 .export-buttons button {
    min-height: 42px;
    padding: 9px 16px;
    white-space: nowrap;
}

#tab1 .export-buttons { margin: 0 0 16px; }

#tab1 #fullInventoryTable th { padding: 14px 12px; }
#tab1 #fullInventoryTable td { padding: 13px 12px; }

/* 预维修翻新：动态生成的表单也遵循列表 + 表单的后台结构。 */
#preMaintenanceTab > h4 {
    margin: 0 0 18px !important;
    color: #183875 !important;
    font-size: 22px;
}
#preMaintenanceTab > div:first-of-type {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px !important;
}
#preMaintenanceTab > div:first-of-type button { min-height: 38px; }
#preMaintenanceForm {
    margin: 0 0 18px !important;
    padding: 20px !important;
    background: #f6f8fd !important;
    border: 1px solid #e0e8f6;
    border-radius: 13px !important;
}
#preMaintenanceForm h5 { color: #234d9b !important; font-size: 16px; }
#preMaintenanceForm input, #preMaintenanceForm select, #preMaintenanceForm textarea {
    border-color: #d5e1f5 !important;
    background: #fff !important;
}
#preMaintenanceTable { border: 1px solid #e0e8f6; }
#preMaintenanceTable th { background: #eef4ff !important; color: #34558f !important; }
#preMaintenanceTab #pmOutboundList { border-color: #d7e3f6 !important; background: #fff !important; }

.table-container {
    overflow-x: auto;
    border: 1px solid #e0e8f7;
    border-radius: 12px;
    box-shadow: none;
}

table { border-collapse: separate; border-spacing: 0; }
th {
    background: #eef4ff;
    color: #315189;
    font-size: 12px;
    letter-spacing: .15px;
    text-transform: none;
}
td { border-bottom-color: #edf1f8; }
tr:hover td { background: #f7faff; }

.theme-toggle {
    top: 16px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid #dbe5fa;
    background: rgba(255,255,255,.9);
    box-shadow: 0 7px 16px rgba(23, 49, 104, .12);
}

/* 深色模式：与浅色工作台保持相同的信息层级，而不是仅把旧页面反色。 */
body.dark-theme {
    background:
        radial-gradient(circle at 10% 0%, rgba(43, 104, 240, .22), transparent 30%),
        radial-gradient(circle at 93% 10%, rgba(123, 89, 232, .18), transparent 27%),
        #091226;
    color: #dce7ff;
    padding: 0;
}
body.dark-theme #app {
    max-width: 1680px;
    margin: 0 auto;
    padding: 26px 30px 40px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}
body.dark-theme #app > h1 { color: #e7eeff; text-shadow: none; }
body.dark-theme #app > .stats {
    background: linear-gradient(110deg, #10285c, #1d4b9e 54%, #5842b9);
    border: 1px solid rgba(151, 180, 255, .24);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
}
body.dark-theme .theme-toggle {
    color: #dce8ff;
    background: #14254a;
    border-color: #2d4d87;
    box-shadow: 0 7px 16px rgba(0, 0, 0, .28);
}
body.dark-theme .nav-container,
body.dark-theme .tab {
    background: rgba(15, 30, 61, .96);
    border-color: #294777;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
}
body.dark-theme .tab h3 { color: #d7e4ff; border-color: #315da9; }
body.dark-theme .tab h4,
body.dark-theme .tab h5,
body.dark-theme .tab p,
body.dark-theme .tab label { color: #c8d7f3; }
body.dark-theme .tab [style*="color: #888"],
body.dark-theme .tab [style*="color:#888"] { color: #9db0d2 !important; }
body.dark-theme .search-container,
body.dark-theme #preMaintenanceForm,
body.dark-theme .backup-item,
body.dark-theme .manual-card,
body.dark-theme .bom-search-bar,
body.dark-theme .bom-header {
    background: #102448 !important;
    border-color: #2a4c80 !important;
    color: #dce7ff;
}
body.dark-theme .tab input,
body.dark-theme .tab select,
body.dark-theme .tab textarea,
body.dark-theme #preMaintenanceForm input,
body.dark-theme #preMaintenanceForm select,
body.dark-theme #preMaintenanceForm textarea {
    background: #0b1c3b !important;
    border-color: #34568d !important;
    color: #e7efff !important;
}
body.dark-theme .tab input::placeholder,
body.dark-theme .tab textarea::placeholder { color: #8399bd; }
body.dark-theme .tab input:focus,
body.dark-theme .tab select:focus,
body.dark-theme .tab textarea:focus { border-color: #6d9dff !important; box-shadow: 0 0 0 3px rgba(89, 142, 255, .18) !important; }
body.dark-theme .odoo-menu-bar .odoo-home,
body.dark-theme .odoo-menu-bar .odoo-menu-trigger {
    background: transparent;
    color: #cbdcff;
}
body.dark-theme .odoo-menu-bar .odoo-menu-trigger span { color: #88a6dd; }
body.dark-theme .odoo-menu-bar .odoo-menu-trigger:hover,
body.dark-theme .odoo-menu.is-open .odoo-menu-trigger { background: #193766; color: #fff; }
body.dark-theme .odoo-menu-panel { background: #10274f; border-color: #31598e; box-shadow: 0 16px 30px rgba(0, 0, 0, .34); }
body.dark-theme .odoo-menu-panel button,
body.dark-theme .odoo-menu-panel .btn-nav-accent { background: transparent; border-color: transparent; color: #d3e1ff; }
body.dark-theme .odoo-menu-panel button:hover,
body.dark-theme .odoo-menu-panel .btn-nav-accent:hover { background: #1c4278; color: #fff; box-shadow: none; transform: none; }
body.dark-theme .table-container { border-color: #294d81; background: #0e2041; }
body.dark-theme table { background: #0e2041; }
body.dark-theme th { background: #173766; color: #d5e3ff; border-bottom-color: #31558a; }
body.dark-theme td { color: #d7e3fa; border-bottom-color: #203e6c; }
body.dark-theme tr:hover td,
body.dark-theme #fullInventoryTable tr:hover td { background: #142e58; }
body.dark-theme .pagination-info { color: #aebfdd; }
body.dark-theme .btn-secondary { background: #17335f; border-color: #365b91; color: #d7e5ff; }
body.dark-theme .btn-secondary:hover { background: #204477; color: #fff; }
body.dark-theme #preMaintenanceTab > h4 { color: #d7e4ff !important; }
body.dark-theme #preMaintenanceTab #pmOutboundList { background: #0b1c3b !important; border-color: #34568d !important; }

@media (max-width: 720px) {
    body.light-theme #app { padding: 16px 12px 30px; }
    #app > h1 { padding-right: 45px; font-size: 25px; }
    #app > .stats { align-items: flex-start; flex-wrap: wrap; min-height: auto; }
    .odoo-menu-bar { overflow-x: auto; flex-wrap: nowrap; }
    .odoo-menu-bar .odoo-home, .odoo-menu-bar .odoo-menu-trigger { flex: 0 0 auto; font-size: 13px; }
    .odoo-menu-panel { position: fixed; left: 12px; right: 12px; top: auto; min-width: 0; }
    .tab { padding: 16px; border-radius: 14px; }
}

/* NeoFix enterprise portal layer — aligned with the redesigned login page. */
body.light-theme,body.dark-theme { background:radial-gradient(circle at 13% 4%,rgba(41,222,197,.14),transparent 27%),radial-gradient(circle at 91% 12%,rgba(52,110,245,.15),transparent 28%),linear-gradient(135deg,#040914,#07182e 55%,#071126) !important; color:#dceeff !important; }
body.light-theme::before,body.dark-theme::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.15; z-index:-1; background-image:linear-gradient(rgba(113,224,236,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(113,224,236,.18) 1px,transparent 1px); background-size:44px 44px; mask-image:linear-gradient(to bottom,black,transparent 70%); }
body.light-theme #app,body.dark-theme #app { max-width:1680px; padding:30px; }.theme-toggle { background:rgba(10,33,61,.74) !important; border-color:rgba(119,218,225,.25) !important; color:#d9fff4 !important; }
#app > h1 { color:#eafaff !important; letter-spacing:.4px; } #app > .stats { background:linear-gradient(105deg,rgba(9,54,74,.92),rgba(15,92,112,.82) 58%,rgba(37,87,164,.86)) !important; border-color:rgba(115,229,212,.24) !important; box-shadow:0 16px 32px rgba(0,0,0,.24) !important; }
.nav-container,.tab { background:rgba(10,28,53,.80) !important; border-color:rgba(126,204,235,.18) !important; box-shadow:0 16px 38px rgba(0,0,0,.19) !important; backdrop-filter:blur(16px); }.nav-container button,.odoo-menu-bar .odoo-home,.odoo-menu-bar .odoo-menu-trigger { color:#bfe1f5 !important; }.odoo-menu-bar .odoo-menu-trigger:hover,.odoo-menu.is-open .odoo-menu-trigger { background:rgba(42,133,153,.25) !important; color:#71f0d1 !important; }.odoo-menu-panel { background:#0b2343 !important; border-color:rgba(111,204,230,.22) !important; }.odoo-menu-panel button,.odoo-menu-bar .odoo-menu-panel .btn-nav-accent { color:#cde9fb !important; }.odoo-menu-panel button:hover { background:rgba(35,121,142,.28) !important; color:#78f1d2 !important; }
.tab h3 { color:#e5f8ff !important; }.tab input,.tab select,.tab textarea { background:rgba(3,14,31,.58) !important; border-color:rgba(124,201,234,.20) !important; color:#e7f6ff !important; }.tab input:focus,.tab select:focus,.tab textarea:focus { border-color:#58e8cb !important; box-shadow:0 0 0 3px rgba(77,230,201,.10) !important; }.btn-primary { background:linear-gradient(120deg,#087d7b,#22bda5 60%,#58dec6) !important; box-shadow:0 8px 18px rgba(24,195,162,.18) !important; }.btn-secondary { background:rgba(22,59,91,.72) !important; border-color:rgba(123,201,234,.23) !important; color:#c9e9fa !important; }
.table-container { background:rgba(4,17,36,.55) !important; border-color:rgba(117,196,233,.16) !important; } table { color:#d6e9fa !important; } th { background:rgba(24,72,105,.66) !important; color:#c8f7ed !important; } td { border-bottom-color:rgba(116,177,211,.12) !important; } tr:hover td { background:rgba(31,100,128,.22) !important; }

/* Readability guard: transactional data always uses dark ink on light table rows. */
#tab1 .search-container { background:rgba(11,35,63,.88) !important; border-color:rgba(118,210,230,.20) !important; }
#tab1 .search-container input,#quickSearch { background:#f5fbff !important; color:#162f4b !important; border-color:#b9d8e8 !important; }
#tab1 .search-container input::placeholder,#quickSearch::placeholder { color:#54728c !important; opacity:1 !important; }
#fullInventoryTable,#fullInventoryTable tbody tr { background:#fbfdff !important; }
#fullInventoryTable tbody td { color:#183652 !important; border-bottom-color:#dce9f0 !important; background:#fbfdff !important; }
#fullInventoryTable tbody tr:nth-child(even) td { background:#f2f8fb !important; }
#fullInventoryTable tbody tr:hover td { background:#e1f5f1 !important; }
#fullInventoryTable tbody td a { color:#176f89 !important; }
#fullInventoryTable tbody td input { background:#fff !important; color:#132f49 !important; border-color:#aebfcb !important; }

/* Navigation must stay above page content; glass panels otherwise create a stacking layer. */
.odoo-menu-bar { position:relative !important; z-index:9000 !important; overflow:visible !important; }
.odoo-menu { position:relative !important; z-index:9001 !important; }
.odoo-menu-panel { z-index:10000 !important; min-width:210px !important; padding:8px !important; background:#0b2343 !important; border:1px solid rgba(111,204,230,.32) !important; box-shadow:0 18px 36px rgba(0,0,0,.38) !important; }
.odoo-menu.is-open .odoo-menu-panel { display:flex !important; flex-direction:column !important; gap:3px !important; }
.odoo-menu-panel button,.odoo-menu-bar .odoo-menu-panel .btn-nav-accent { display:block !important; min-height:40px !important; color:#d8f2ff !important; background:transparent !important; text-align:left !important; }
.odoo-menu-panel button:hover,.odoo-menu-bar .odoo-menu-panel .btn-nav-accent:hover { background:rgba(38,134,151,.34) !important; color:#79f1d2 !important; }
#app > .tab { position:relative; z-index:1; }

/* Desktop navigation: equal-width entry points, no horizontal drift or clipping. */
.odoo-menu-bar { justify-content:center !important; flex-wrap:wrap !important; overflow:visible !important; }
.odoo-menu-bar .odoo-home,.odoo-menu { flex:0 0 122px; }
.odoo-menu-bar .odoo-home,.odoo-menu-bar .odoo-menu-trigger { width:100% !important; min-width:0 !important; justify-content:center; }
.odoo-menu-panel { left:50% !important; transform:translateX(-50%); }
.odoo-menu:nth-last-child(-n+2) .odoo-menu-panel { left:auto !important; right:0; transform:none; }

/* Skin switch: bright technology skin (light-theme) and deep-space skin (dark-theme). */
.theme-toggle { position:fixed !important; top:18px !important; right:22px !important; z-index:20050 !important; width:46px !important; height:46px !important; border-radius:50% !important; cursor:pointer; }
body.light-theme { background:radial-gradient(circle at 10% 0%,rgba(44,205,194,.16),transparent 28%),radial-gradient(circle at 93% 5%,rgba(74,117,240,.14),transparent 28%),linear-gradient(135deg,#edf8fb,#f5f8ff 54%,#e9f5fc) !important; color:#183653 !important; }
body.light-theme::before { opacity:.16; z-index:-1; background-image:linear-gradient(rgba(30,145,165,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(30,145,165,.22) 1px,transparent 1px); }
body.light-theme .theme-toggle { background:rgba(255,255,255,.86) !important; border-color:rgba(38,145,169,.25) !important; color:#17607b !important; box-shadow:0 9px 22px rgba(31,94,131,.18) !important; }
body.light-theme #app > h1 { color:#123b59 !important; } body.light-theme #app > .stats { color:#fff; background:linear-gradient(105deg,#0d6b79,#178d94 55%,#3569c3) !important; border-color:rgba(255,255,255,.34) !important; }
body.light-theme .nav-container,body.light-theme .tab { background:rgba(255,255,255,.88) !important; border-color:rgba(71,151,182,.18) !important; box-shadow:0 14px 34px rgba(45,90,127,.11) !important; }
body.light-theme .nav-container button,body.light-theme .odoo-menu-bar .odoo-home,body.light-theme .odoo-menu-bar .odoo-menu-trigger { color:#1c4d6a !important; }.light-theme .odoo-menu-bar .odoo-menu-trigger:hover,.light-theme .odoo-menu.is-open .odoo-menu-trigger { background:#e2f8f3 !important; color:#0e7d73 !important; }
body.light-theme .odoo-menu-panel { background:#fff !important; border-color:#cbe5e9 !important; box-shadow:0 18px 35px rgba(21,69,99,.18) !important; }body.light-theme .odoo-menu-panel button,body.light-theme .odoo-menu-bar .odoo-menu-panel .btn-nav-accent { color:#204b68 !important; }body.light-theme .odoo-menu-panel button:hover { background:#e8f8f5 !important; color:#087c70 !important; }
body.light-theme .tab h3 { color:#153e5d !important; }body.light-theme .tab input,body.light-theme .tab select,body.light-theme .tab textarea { background:#fff !important; color:#173752 !important; border-color:#bddae4 !important; }body.light-theme .tab input::placeholder { color:#5a7892 !important; }
body.light-theme .btn-secondary { background:#f5fbfc !important; color:#176078 !important; border-color:#b6dbe3 !important; }body.light-theme .table-container { background:#fff !important; border-color:#cce5ea !important; }body.light-theme table { color:#173752 !important; }body.light-theme th { background:#d9eff2 !important; color:#174e67 !important; }body.light-theme td { color:#173752 !important; }body.light-theme tr:hover td { background:#edf9f7 !important; }
body.light-theme #tab1 .search-container { background:linear-gradient(110deg,#e8f7f7,#edf5fb) !important; border:1px solid #c8e4e7 !important; box-shadow:inset 0 1px rgba(255,255,255,.9) !important; }
body.light-theme #tab1 .search-container input,body.light-theme #quickSearch { background:rgba(255,255,255,.94) !important; border-color:#c6dde5 !important; box-shadow:0 3px 10px rgba(44,102,129,.06) !important; }

/* Compact screens: use an equal-width menu grid instead of a scrollable row. */
@media (max-width:720px) {
    body.light-theme #app,body.dark-theme #app { padding:14px 10px 28px !important; }
    .odoo-menu-bar { display:grid !important; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px !important; padding:6px !important; overflow:visible !important; }
    .odoo-menu-bar .odoo-home,.odoo-menu-bar .odoo-menu-trigger { width:100% !important; min-width:0 !important; padding:8px 2px !important; font-size:11px !important; white-space:nowrap; }
    .odoo-menu { min-width:0; }
    .odoo-menu-panel { position:absolute !important; top:calc(100% + 6px) !important; left:0 !important; right:auto !important; min-width:190px !important; }
    .odoo-menu:nth-last-child(-n+2) .odoo-menu-panel { left:auto !important; right:0 !important; }
}

/* Final dark-skin navigation layout — explicit so legacy dark rules cannot win. */
body.dark-theme .odoo-menu-bar { display:flex !important; justify-content:center !important; align-items:center !important; flex-wrap:wrap !important; gap:4px !important; overflow:visible !important; }
body.dark-theme .odoo-menu-bar .odoo-home,body.dark-theme .odoo-menu-bar .odoo-menu { flex:0 0 122px !important; margin:0 !important; }
body.dark-theme .odoo-menu-bar .odoo-home,body.dark-theme .odoo-menu-bar .odoo-menu-trigger { display:flex !important; width:100% !important; min-width:0 !important; justify-content:center !important; align-items:center !important; }
body.dark-theme .odoo-menu-panel { left:50% !important; right:auto !important; transform:translateX(-50%) !important; }
body.dark-theme .odoo-menu:nth-last-child(-n+2) .odoo-menu-panel { left:auto !important; right:0 !important; transform:none !important; }

/* Adapt to the actual navigation width (including a narrow PC window or browser zoom). */
.nav-container { container-type:inline-size; }
@container (max-width:700px) {
    .odoo-menu-bar { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; justify-content:stretch !important; gap:5px !important; }
    .odoo-menu-bar .odoo-home,.odoo-menu-bar .odoo-menu { width:100% !important; min-width:0 !important; flex:auto !important; }
    .odoo-menu-bar .odoo-home,.odoo-menu-bar .odoo-menu-trigger { padding:8px 4px !important; font-size:12px !important; white-space:nowrap; }
    .odoo-menu-panel,body.dark-theme .odoo-menu-panel { position:absolute !important; top:calc(100% + 6px) !important; left:0 !important; right:auto !important; transform:none !important; min-width:205px !important; }
    .odoo-menu:nth-last-child(-n+2) .odoo-menu-panel,body.dark-theme .odoo-menu:nth-last-child(-n+2) .odoo-menu-panel { left:auto !important; right:0 !important; }
}
