/* AAO Business Hub R1.2 — 日期输入与权限提示 */
.aao-date{position:relative;display:flex;align-items:stretch;width:100%;min-width:0}
.aao-date>input{flex:1;min-width:0;padding-right:42px!important}
.aao-date-pick{position:absolute;right:2px;top:2px;bottom:2px;width:38px;display:grid;place-items:center;color:#6b778a;border-radius:8px;cursor:pointer;overflow:hidden}
.aao-date-pick:hover{background:rgba(0,0,0,.05);color:#2563eb}
.aao-date-native{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;margin:0;font-size:16px}
.aao-date-native::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;cursor:pointer;opacity:0}
.aao-date.disabled .aao-date-pick{display:none}
input[aria-invalid="true"]{border-color:#dc2626!important;background:#fff5f5!important}
.aao-date-msg{color:#b42318;font-size:12.5px;margin-top:3px;width:100%}
.aao-date-msg:empty{display:none}
.aao-noaccess{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.55);display:grid;place-items:center;padding:20px}
.aao-noaccess-box{background:#fff;color:#0f1c2e;border-radius:20px;padding:28px 24px;max-width:420px;width:100%;text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.25)}
.aao-noaccess-ic{font-size:34px}.aao-noaccess-box h2{margin:8px 0 6px;font-size:20px}.aao-noaccess-box p{color:#5b6677;margin:0 0 16px}
.aao-noaccess-links{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.aao-noaccess-links a{padding:9px 16px;border-radius:12px;background:#2563eb;color:#fff;text-decoration:none;font-weight:600}
[data-mod][hidden]{display:none!important}
[data-admin-only][hidden]{display:none!important}
/* R3.0：模块导航增加「经营分析」后，手机上导航可以左右滑动，不撑出页面 */
@media(max-width:700px){.bar .mods{max-width:100%;min-width:0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}.bar .mods::-webkit-scrollbar{display:none}}
/* R3.1：刷新按钮 */
.aao-refresh{appearance:none;display:inline-flex;align-items:center;gap:5px;border:1px solid var(--line,#d3ddda);background:var(--surface,#fff);color:var(--muted,#5a6b67);border-radius:999px;padding:5px 11px;font:inherit;font-size:13px;cursor:pointer;white-space:nowrap;flex:none}
.aao-refresh i{font-style:normal;font-size:15px;line-height:1}
.aao-refresh:hover{color:var(--ink,#13201d)}
.aao-refresh.new{background:#fde8e6;border-color:#f3b4ab;color:#b42318;font-weight:600}
.aao-refresh:disabled{opacity:.6}
[aria-busy="true"]{cursor:progress}

/* =====================================================================
 * R3.2 手机版：底部导航 + 精简顶部 + 统一的手机排版（宽度 ≤ 760px 时生效，电脑不变）
 * ===================================================================== */
.aao-bnav,.aao-more{display:none}
@media (max-width:760px){
 html body{padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
 /* 底部导航 */
 .aao-bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;background:rgba(255,255,255,.97);border-top:1px solid #dfe5e3;padding:4px 4px calc(4px + env(safe-area-inset-bottom,0px));box-shadow:0 -4px 16px rgba(0,0,0,.05);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
 .aao-bnav a,.aao-bnav button{flex:1;min-width:0;appearance:none;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:52px;border-radius:12px;color:#6b7a76;font:500 11px/1.2 "PingFang SC","Microsoft YaHei",system-ui,sans-serif;text-decoration:none;position:relative;cursor:pointer;-webkit-tap-highlight-color:transparent}
 .aao-bnav svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 .aao-bnav [aria-current="page"]{color:#0B7A63;font-weight:700}
 .aao-bnav [aria-current="page"]::before{content:"";position:absolute;top:2px;width:22px;height:3px;border-radius:3px;background:#0B7A63}
 html[data-aao-new="1"] .aao-bnav .more::after,.aao-bnav .dot::after{content:"";position:absolute;top:8px;right:calc(50% - 16px);width:8px;height:8px;border-radius:50%;background:#d92d20;border:2px solid #fff}
 .aao-more{position:fixed;inset:0;z-index:60;background:rgba(8,20,17,.4);align-items:flex-end}
 .aao-more.on{display:flex}
 .aao-more-box{background:#fff;width:100%;border-radius:18px 18px 0 0;padding:10px 14px calc(16px + env(safe-area-inset-bottom,0px));max-height:80vh;overflow:auto;color:#13201d}
 .aao-more-box .grab{width:40px;height:4px;border-radius:4px;background:#d3ddda;margin:2px auto 12px}
 .aao-more-box .who{font-size:13px;color:#5a6b67;margin:0 4px 10px}
 .aao-more-box a,.aao-more-box button{display:flex;align-items:center;gap:12px;width:100%;appearance:none;border:0;background:#f3f6f5;border-radius:12px;padding:14px;margin-bottom:8px;font:500 16px/1.2 "PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#13201d;text-decoration:none;text-align:left;cursor:pointer}
 .aao-more-box svg{width:22px;height:22px;stroke:#0B7A63;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
 .aao-more-box .new{background:#fde8e6;color:#b42318}.aao-more-box .new svg{stroke:#b42318}
 .aao-more-box small{margin-left:auto;font-size:12px;color:#8a9894}

 /* 各模块页面：顶部只保留一行（标志 + 页面名），模块切换在底部导航 */
 html body .top{position:relative!important}
 html body .top .bar{flex-wrap:nowrap!important;padding-block:10px 4px!important;gap:8px!important;min-height:0}
 html body .top .bar .mods,html body .top .bar .me,html body .top .bar #aaoRefresh{display:none!important}
 html body .top .brand{font-size:17px!important}
 html body .top .seal{width:30px!important;height:30px!important;font-size:11px!important}
 html body .tabs{position:sticky;top:0;z-index:4;background:inherit}
 html body .tab{padding:10px 12px!important;font-size:15px!important;white-space:nowrap}
 html body .view-h{margin-bottom:10px!important}
 html body .view-h h1,html body main h1{font-size:22px!important;line-height:1.3!important;margin:4px 0!important}
 html body .view-h p{font-size:13px!important;line-height:1.55!important;margin:2px 0 0!important}
 /* 输入框 16px，避免 iPhone 点击时页面被放大；按钮够大好点 */
 html body input:not([type=checkbox]):not([type=radio]),html body select,html body textarea{font-size:16px!important}
 html body .btn{min-height:40px}
 /* 筛选栏：两列排开，不再一行一个 */
 html body .tools{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html body .tools>*{min-width:0!important;width:100%!important;max-width:none!important;margin:0!important}
 html body .tools>input[type=search],html body .tools>input[type=text],html body .tools .aao-date{grid-column:auto}
 html body .tools>input[type=search]{grid-column:1/-1}
 html body .tools .btn{min-height:38px;font-size:14px!important;padding:6px 10px!important}
 /* 浮动按钮、提示条放到底部导航上方 */
 html body .fab{bottom:calc(76px + env(safe-area-inset-bottom,0px))!important}
 html body .toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))!important}
 /* 表格：左右滑动查看，第一列不竖排 */
 html body .adm-tbl-wrap,html body .as-tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
 html body .adm-tbl:has(thead){min-width:560px}
 html body .adm-tbl:has(thead) th,html body .adm-tbl:has(thead) td{white-space:nowrap}
 html body .adm-tbl:not(:has(thead)) td{white-space:normal!important;word-break:break-word}
 html body .adm-tbl:not(:has(thead)) td:first-child{width:38%!important}
 html body .adm-tbl td .pill{white-space:normal}
 html body .adm-card table:not(.adm-tbl) td,html body .adm-card table:not(.adm-tbl) th{word-break:break-word}
 html body .adm-card .pill{white-space:normal;max-width:100%}
 html body .adm-card{padding:14px!important;border-radius:12px!important}
 html body .adm-card h3{flex-wrap:wrap;gap:8px}
 /* 项目看板指标卡更紧凑 */
 html body .pd-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 html body .pd-kpi{padding:10px 12px!important}
 html body .pd-kpi b{font-size:22px!important}
 html body .pd-kpi:first-child{grid-column:1/-1}
 /* 抽屉 / 弹窗在手机上占满全屏，底部留出安全区 */
 html body .sheet .panel{width:100%!important;max-width:none!important;border-radius:0!important}
 html body .dlg-box{width:calc(100% - 32px)!important;max-width:420px}

 /* ---------- 产品管理（电子手册）---------- */
 html body aside.side{position:sticky!important;top:0!important;z-index:30!important;height:auto!important;min-height:0!important;padding:8px 10px!important;display:flex!important;flex-direction:row!important;gap:6px!important;overflow-x:auto!important;scrollbar-width:none;white-space:nowrap!important;grid-template-columns:none!important}
 html body aside.side::-webkit-scrollbar{display:none}
 html body aside.side>.brand,html body aside.side>.side-label,html body aside.side>.side-foot,html body aside.side>a.nav,html body aside.side>.crm-main-nav,html body aside.side>.project-main-nav,html body aside.side>.aftersales-main-nav,html body aside.side>.settings-main-nav,html body aside.side .pm-parent{display:none!important}
 html body aside.side .pm-group{display:contents!important}
 html body aside.side .pm-submenu{display:flex!important;flex-direction:row!important;gap:6px!important;max-height:none!important;overflow:visible!important;padding:0!important;margin:0!important;opacity:1!important;visibility:visible!important;position:static!important}
 html body aside.side .pm-submenu>div:not(#serviceNavSlot),html body aside.side #serviceNav{display:inline-flex!important;align-items:center;gap:6px;flex:none!important;width:auto!important;min-height:36px!important;padding:6px 14px!important;margin:0!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.18)!important;font-size:14px!important;color:#dbe6f5!important;background:transparent!important}
 html body aside.side #serviceNavSlot{display:contents!important}
 html body aside.side .pm-submenu .nav.active{background:#fff!important;color:#0b1728!important;font-weight:700}
 html body aside.side .pm-submenu .nav span{font-size:14px!important;width:auto!important}
 html body header.topbar{height:auto!important;min-height:0!important;padding:8px 12px!important;position:static!important}
 html body header.topbar .topright{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;width:100%!important;justify-content:flex-end!important;overflow-x:auto;scrollbar-width:none}
 html body header.topbar .topright>*{flex:none!important}
 html body header.topbar #lumioDisplayLabel,html body header.topbar #aaoRefresh,html body header.topbar .avatar{display:none!important}
 html body header.topbar .btn,html body header.topbar select{min-height:34px!important;height:34px!important;padding:4px 10px!important;font-size:13px!important;border-radius:999px!important;white-space:nowrap!important;max-width:150px;overflow:hidden;text-overflow:ellipsis}
 html body header.topbar .display-selector{display:inline-flex!important;align-items:center}
 html body .content{padding:14px 14px 20px!important}
 html body .content .heading{display:block!important;margin-bottom:10px!important}
 html body .content .heading h1{font-size:24px!important;margin:0 0 4px!important}
 html body .content .heading .sub{font-size:13px!important}
 html body .content .heading>div:last-child{display:flex!important;gap:8px!important;margin-top:10px}
 html body .content .heading>div:last-child .btn{flex:1;min-height:40px}
 html body .toolbar{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;align-items:center}
 html body .toolbar .search{grid-column:1/-1;min-width:0!important}
 html body .toolbar .search select,html body .toolbar .search input{padding-left:40px!important;width:100%!important;height:46px!important}
 html body .toolbar .filter{width:100%!important;height:46px!important;min-width:0!important}
 html body .toolbar .count{text-align:right}
 html body #grid.grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
 html body #grid .card{border-radius:14px!important}
 html body #grid .cover{height:auto!important;aspect-ratio:1/1;min-height:0!important}
 html body #grid .cover-count,html body #grid .cover .edit-product{transform:scale(.85);transform-origin:right bottom}
 html body #grid .cover-tag{font-size:11px!important;padding:3px 8px!important}
 html body #grid .cardbody{padding:10px 12px 12px!important}
 html body #grid .cardbody h3{font-size:16px!important;margin:0 0 2px!important}
 html body #grid .cardbody p{font-size:12.5px!important;line-height:1.45!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0 0 6px!important;min-height:0!important}
 html body #grid .specs{gap:4px!important;margin:6px 0!important}
 html body #grid .specs span{font-size:11px!important;padding:2px 6px!important}
 html body #grid .cardfoot{padding-top:8px!important;margin-top:6px!important;flex-wrap:wrap}
 html body #grid .price{font-size:11.5px!important;line-height:1.4}
 html body #grid .price b{font-size:16px!important;display:block}
 html body #grid .arrow{display:none!important}
}
@media (max-width:760px){
 /* 打开弹窗 / 抽屉时隐藏底部导航，弹窗盖在最上层 */
 html body:has(.overlay.show) .aao-bnav,html body:has(.sheet:not([hidden])) .aao-bnav,html body:has(.dlg:not([hidden])) .aao-bnav,html body:has(.aao-more.on) .aao-bnav{display:none}
 html body .overlay.show{z-index:50!important}
 html body .overlay .modal{max-height:100%!important}
 /* 页面标题区：按钮并排、变小 */
 html body .view-h{display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center}
 html body .view-h>div:first-child{flex:1 1 100%!important;min-width:0}
 html body .view-h>.btn{flex:1 1 auto!important;width:auto!important;min-height:38px;font-size:14px!important;padding:8px 12px!important;margin:0!important}
 html body .view-h>.weeknav{flex:1 1 100%}
 /* 筛选栏：日期框的日历图标在框内；只有一个筛选项时占满一行 */
 html body .tools .aao-date{display:flex!important;width:100%!important}
 html body .tools .aao-date>input{width:100%!important;min-width:0!important;flex:1 1 auto!important}
 html body .view-h>div+div{flex:1 1 100%!important;margin-left:0!important;justify-content:stretch!important}
 html body .view-h>div+div>.btn{flex:1 1 auto;min-height:40px;font-size:14px!important;padding:8px 10px!important}
 html body .pr-stage-grid3{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html body .pr-stage-grid3>label:last-child{grid-column:1/-1}
 html body #home .me{display:flex;align-items:center;gap:8px}
 html body #home .me #who{margin-right:auto}
 html body .tools>*:last-child:nth-child(2){grid-column:1/-1}
 /* 经营分析筛选 */
 html body .bi-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html body .bi-filters label{min-width:0}
 html body .bi-filters select,html body .bi-filters input,html body .bi-filters .aao-date{width:100%!important;min-width:0!important}
 html body .bi-filters label:first-child{grid-column:1/-1}
 html body .bi-quick{grid-column:1/-1;display:grid!important;grid-template-columns:repeat(4,1fr)}
 html body .bi-quick .btn{padding:6px 4px!important;font-size:13px!important}
 html body #fGroupL{grid-column:1/-1}
}
@media (max-width:360px){html body #grid.grid{grid-template-columns:1fr!important}}

/* R3.7 型号库快捷入口：手机上只显示图标 */
#aaoModels[aria-current=page]{color:var(--accent,#0b7a63);border-color:var(--accent,#0b7a63)}
@media (max-width:560px){#aaoModels span{display:none}}

/* R3.7.7：平板 / 窄屏电脑（761–1240px）：顶部第一行放标志和按钮，模块导航单独占第二行，页面不再左右滑动 */
@media (min-width:761px) and (max-width:1240px){
 html body .bar{flex-wrap:wrap!important;row-gap:8px}
 html body .bar>.brand{margin-right:auto}
 html body .bar .mods{order:9;flex:1 1 100%!important;max-width:100%;min-width:0;margin-right:0!important;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:flex-start}
 html body .bar .mods::-webkit-scrollbar{display:none}
}
html,body{max-width:100%}
