* {
    box-sizing: border-box;
}

html,
body {
    min-width: 1180px;
    margin: 0;
    padding: 0;
    background: #f5f6f7;
    color: #1f2329;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
}

a {
    color: #3370ff;
}

.sidebar {
    position: fixed;
    z-index: 20;
    top: 0;
    bottom: 0;
    left: 0;
    width: 200px;
    border-right: 1px solid #e5e6eb;
    background: #fff;
}

.clinic-brand {
    display: block;
    height: 64px;
    padding: 12px 14px;
    color: #1f2329;
    text-decoration: none;
}

.brand-mark {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #3370ff;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 36px;
    text-align: center;
    vertical-align: middle;
    /* 白字压在彩色底上时，次像素抗锯齿会呈现彩色重影，改灰度抗锯齿 */
    -webkit-font-smoothing: antialiased;
}

.brand-copy {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

/* 租户上传了 logo 时侧栏用图片代替「名称首字」方块；等比缩放，超宽截断 */
.brand-logo {
    display: inline-block;
    height: 36px;
    max-width: 108px;
    border-radius: 8px;
    vertical-align: middle;
}

/* 登录页竖排品牌区的 logo 图片（无图时仍用 brand-mark 方块） */
.login-logo {
    display: block;
    height: 42px;
    max-width: 126px;
    margin: 0 auto;
    border-radius: 10px;
}

.brand-copy strong,
.brand-copy small {
    display: block;
}

.brand-copy strong {
    font-size: 16px;
    font-weight: 600;
}

.brand-copy small {
    margin-top: 3px;
    color: #8f959e;
    font-size: 12px;
}

.side-menu {
    padding: 8px;
}

.menu-item,
.tree-toggle,
.tree-children a {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 6px;
    color: #4e5969;
    font: inherit;
    text-align: left;
    text-decoration: none;
}

.menu-item,
.tree-toggle {
    position: relative;
    height: 40px;
    margin-bottom: 2px;
    padding: 0 10px;
    background: transparent;
    line-height: 40px;
    cursor: pointer;
}

.menu-item:hover,
.tree-toggle:hover,
.tree-children a:hover {
    background: #f2f3f5;
    color: #1f2329;
}

.menu-item.active,
.tree-toggle.active,
.tree-children a.active {
    background: #e8f0ff;
    color: #245bdb;
    font-weight: bold;
}

.menu-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 6px;
    border-radius: 6px;
    background: #f0f2f5;
    color: #596577;
    font-size: 12px;
    font-weight: bold;
    line-height: 22px;
    text-align: center;
    vertical-align: middle;
}

.active > .menu-icon,
.menu-item.active .menu-icon,
.tree-toggle.active .menu-icon {
    background: #dbe7ff;
    color: #245bdb;
}

.tree-arrow {
    position: absolute;
    top: 0;
    right: 8px;
    font-size: 18px;
    -webkit-transition: -webkit-transform 0.16s;
    transition: transform 0.16s;
}

.menu-tree.open .tree-arrow {
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}

.tree-children {
    display: none;
    padding: 2px 0 6px 36px;
}

.menu-tree.open > .tree-children {
    display: block;
}

.tree-children a {
    margin: 2px 0;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 20px;
}

.menu-tree.muted {
    margin-top: 8px;
    border-top: 1px solid #eff0f1;
    padding-top: 8px;
    opacity: 0.58;
}

.tree-toggle.static {
    cursor: default;
}

.coming-soon {
    position: absolute;
    right: 10px;
    color: #8f959e;
    font-size: 12px;
}

.sidebar-footer {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;
    color: #a2a8b0;
    font-size: 12px;
    text-align: center;
}

.workspace {
    min-height: 100vh;
    margin-left: 200px;
}

.workspace-header {
    position: fixed;
    z-index: 10;
    top: 0;
    right: 0;
    left: 200px;
    height: 64px;
    border-bottom: 1px solid #e5e6eb;
    background: #fff;
}

.header-copy {
    float: left;
    padding: 11px 28px;
}

.header-copy strong,
.header-copy span {
    display: block;
}

.header-copy strong {
    font-size: 16px;
    font-weight: 600;
}

.header-copy span {
    margin-top: 4px;
    color: #8f959e;
    font-size: 12px;
}

.user-menu {
    position: relative;
    float: right;
    margin: 13px 28px 0 0;
}

.user-chip {
    display: block;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #4e5969;
    line-height: 36px;
    cursor: pointer;
}

.user-chip .user-avatar,
.user-chip span {
    display: inline-block;
    width: 34px;
    height: 34px;
    margin-right: 7px;
    border-radius: 50%;
    background: #e8f0ff;
    color: #245bdb;
    font-weight: bold;
    line-height: 34px;
    text-align: center;
    vertical-align: middle;
}

.user-chip em {
    display: inline-block;
    font-style: normal;
    vertical-align: middle;
}

.user-menu-drop {
    display: none;
    position: absolute;
    z-index: 40;
    top: 44px;
    right: 0;
    width: 180px;
    padding: 8px 0;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.12);
}

.user-menu.open .user-menu-drop {
    display: block;
}

.user-menu-meta {
    padding: 8px 14px 10px;
    border-bottom: 1px solid #f0f1f3;
}

.user-menu-meta strong,
.user-menu-meta span {
    display: block;
}

.user-menu-meta strong {
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

.user-menu-meta span {
    margin-top: 2px;
    color: #8f959e;
    font-size: 12px;
    line-height: 18px;
}

.user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: #1f2329;
    font: inherit;
    font-size: 14px;
    line-height: 22px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-menu-item:hover {
    background: #f5f6f7;
}

.page {
    min-width: 940px;
    max-width: 1480px;
    margin: 0 auto;
    padding: 92px 30px 40px;
}

.page-heading {
    overflow: hidden;
    margin-bottom: 18px;
}

.page-heading > div {
    float: left;
}

.page-heading h1 {
    float: none;
}

.page-heading > .button {
    float: right;
}

h1 {
    margin: 0;
    color: #1f2329;
    font-size: 20px;
    font-weight: 600;
}

.page-description {
    margin: 6px 0 0;
    color: #8f959e;
    font-size: 12px;
}

.button {
    display: inline-block;
    min-width: 72px;
    padding: 8px 16px;
    border: 1px solid #c9cdd4;
    border-radius: 6px;
    background: #fff;
    color: #1f2329;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: background 0.15s, border-color 0.15s;
    transition: background 0.15s, border-color 0.15s;
}

.button:hover {
    border-color: #3370ff;
    color: #245bdb;
}

.button.primary {
    border-color: #3370ff;
    background: #3370ff;
    color: #fff;
}

.button.primary:hover {
    border-color: #245bdb;
    background: #245bdb;
}

.button.light {
    background: #f5f6f7;
}

.button.large {
    margin-right: 10px;
    padding: 11px 21px;
    font-size: 16px;
}

.button.loading,
.button:disabled {
    cursor: default;
    opacity: 0.65;
}

.notice {
    display: table;
    width: 100%;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 14px;
}

.notice > * {
    display: table-cell;
    vertical-align: top;
}

.notice.success {
    border-color: #b7ebc6;
    background: #f0fff4;
    color: #207a3c;
}

.notice.error {
    border-color: #f5b7b7;
    background: #fff2f2;
    color: #a62020;
}

.notice-icon {
    width: 26px;
    font-weight: bold;
}

/* 建档成功「去开单」条（9-16 试跑 §2）：文字与按钮同行，按钮靠右垂直居中 */
.go-prescribe-bar > span {
    vertical-align: middle;
}

.go-prescribe-bar .inline-form {
    width: 240px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}

.go-prescribe-bar .inline-form .button {
    margin-left: 12px;
}

.toast {
    position: fixed;
    z-index: 200;
    top: 80px;
    left: 50%;
    width: 360px;
    margin-left: -180px;
    padding: 10px 16px;
    overflow: hidden;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.12);
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
    text-align: left;
}

.login-body .toast {
    top: 24px;
}

.toast-dot {
    float: left;
    width: 8px;
    height: 8px;
    margin: 7px 10px 0 0;
    border-radius: 50%;
}

.toast-success {
    border: 1px solid #d9f5d6;
}

.toast-success .toast-dot {
    background: #34c724;
}

.toast-error {
    border: 1px solid #fcdad7;
}

.toast-error .toast-dot {
    background: #f54a45;
}

/* ===== 搜索/筛选栏：所有按钮与输入框在同一水平线、同高 ===== */
.filter-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.03);
}

.filter-bar input[type="text"],
.filter-bar select {
    height: 34px;
    padding: 5px 10px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    font-size: 13px;
    margin-right: 8px;
    box-sizing: border-box;
}

.filter-bar input[type="text"] {
    -webkit-flex: 0 1 220px;
    flex: 0 1 220px;
}

.filter-bar .button {
    height: 34px;
    padding: 5px 14px;
    font-size: 13px;
    line-height: 22px;
    margin-right: 6px;
}

.filter-bar .filter-actions {
    margin-left: auto;
    white-space: nowrap;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.filter-bar .filter-actions .button {
    margin-right: 0;
    margin-left: 8px;
}

/* filter-field（带 label 的筛选项）：label 与输入同行 */
.filter-bar .filter-field {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    margin-right: 8px;
}

.filter-bar .filter-field label {
    margin-right: 6px;
    color: #4e5969;
    font-size: 13px;
    white-space: nowrap;
}
.filter-bar .filter-check {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    margin: 0 8px;
    color: #4e5969;
    font-size: 13px;
    white-space: nowrap;
}

.filter-bar .filter-check input[type="checkbox"] {
    margin-right: 4px;
}




.data-table.edit-table .col-action-wide {
    width: 160px;
}

.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 20px;
    /* W76：状态标签一律单行，窄列里不许折成两行竖条 */
    white-space: nowrap;
}

.status-tag.is-on {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-tag.is-off {
    background: #f5f5f5;
    color: #8f959e;
}

/* 危险警示（未挂科室等）：沿用 notice.error 的红对色，不新造色值 */
.status-tag.is-danger {
    background: #fff2f2;
    color: #a62020;
}

.checkbox-label {
    display: inline-block;
    margin: 0 16px 9px 0;
    color: #4e5969;
    font-size: 14px;
    white-space: nowrap;
    vertical-align: bottom;
}

.summary {
    margin: 13px 2px;
    color: #8f959e;
    font-size: 13px;
}

.table-card {
    overflow: hidden;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31, 35, 41, 0.04);
}

.table-panel {
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31, 35, 41, 0.04);
}

.table-panel-head {
    overflow: hidden;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #eff0f1;
}

.table-panel-head > div {
    float: left;
}

.table-panel-head h2 {
    margin: 0;
    color: #1f2329;
    font-size: 16px;
    font-weight: 600;
}

.table-panel-head p {
    margin: 6px 0 0;
    color: #8f959e;
    font-size: 12px;
}

.table-panel-head > .button,
.table-panel-actions {
    float: right;
}

.table-panel-actions .button {
    margin-left: 8px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f1f2;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: #f5f6f7;
    color: #646a73;
    font-size: 13px;
    font-weight: 500;
}

.data-table td {
    color: #1f2329;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8f9fb;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table .actions-column,
.data-table td.actions {
    white-space: nowrap;
}

.data-table .empty {
    color: #8f959e;
    text-align: center;
}

.table-link {
    display: inline-block;
    margin-right: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3370ff;
    font: inherit;
    font-size: 14px;
    line-height: 22px;
    text-decoration: none;
    cursor: pointer;
}

.table-link:hover {
    color: #245bdb;
}

.table-link.danger {
    color: #d83931;
}

.inline-form {
    display: inline;
}

.data-table .actions-column {
    width: 230px;
}

.drug-name {
    color: #1f2329;
    font-weight: 600;
}

a.drug-name {
    text-decoration: none;
}

a.drug-name:hover {
    color: #3370ff;
}

tr.js-row-link {
    cursor: pointer;
}

.muted-text {
    color: #8f959e;
    font-size: 12px;
}

.stock-qty-lines {
    line-height: 1.5;
}

.stock-qty-loose {
    color: #4e5969;
    font-size: 13px;
    margin-top: 2px;
}

.stock-qty-lines > div {
    display: block;
}

.actions {
    white-space: nowrap;
}

.actions a,
.link-button {
    margin-right: 12px;
    color: #3370ff;
    font-size: 13px;
    text-decoration: none;
}

.actions a:hover,
.link-button:hover {
    color: #245bdb;
    text-decoration: underline;
}

.actions form {
    display: inline;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.expired-row {
    background: #fff0f0;
}

.expiring-row {
    background: #fff8e8;
}

.inactive-row {
    background: #f7f8fa;
    color: #8f959e;
}

.low-stock {
    color: #d46b08;
    font-weight: bold;
}

.tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 10px;
    background: #eff0f1;
    color: #646a73;
    font-size: 11px;
    font-weight: normal;
    /* W76：标签文案一律单行不折行（全库固定文案标签）；例外见 .wb-patient-mini-info .tag */
    white-space: nowrap;
}

/* W76 例外：工作台「回退：<驳回原因>」是药师手填自由文本（无长度上限），
   单行会把整行撑爆，保持可折行 */
.wb-patient-mini-info .tag {
    white-space: normal;
}

.tag.type-tcm {
    background: #e8f7ed;
    color: #237b4b;
}

.tag.type-western {
    background: #e8f0ff;
    color: #245bdb;
}

.tag.type-patent {
    background: #f3e8ff;
    color: #6b21a8;
}

.tag-reject {
    margin-left: 0;
    background: #fff1f0;
    color: #c92a2a;
}

.empty {
    padding: 55px !important;
    color: #8f959e;
    text-align: center !important;
}

.pagination {
    margin: 20px 0;
    color: #646a73;
    font-size: 14px;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    margin: 0 4px;
    padding: 7px 12px;
}

.pagination a {
    border: 1px solid #d9dce1;
    border-radius: 5px;
    background: #fff;
    color: #4e5969;
    text-decoration: none;
}

.form-layout {
    display: table;
    width: 100%;
}

.form-main,
.form-aside {
    display: table-cell;
    vertical-align: top;
}

.form-main {
    padding-right: 22px;
}

.form-aside {
    width: 285px;
}

.form-card,
.drug-summary,
.info-card,
.dashboard-card {
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(31, 35, 41, 0.04);
}

.form-card {
    padding: 26px 30px;
}

.drug-form {
    max-width: 1040px;
}

.form-columns {
    overflow: hidden;
}

.form-column {
    float: left;
    width: 48%;
    margin-right: 4%;
}

.form-column + .form-column {
    margin-right: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group > label {
    display: block;
    margin-bottom: 6px;
    color: #1f2329;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    height: 40px;
}

.form-group textarea {
    resize: vertical;
}

.select-clearable {
    position: relative;
}

.select-clearable select {
    padding-right: 32px;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
}

.select-clearable:after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #646a73;
    pointer-events: none;
}

.select-clearable.has-value:after {
    display: none;
}

.select-clear {
    display: none;
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8f959e;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
}

.select-clearable.has-value .select-clear {
    display: block;
}

.select-clear:hover {
    background: #e5e6eb;
    color: #1f2329;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.form-group .checkbox-line {
    margin-top: 28px;
    cursor: pointer;
}

.form-group .checkbox-line input {
    width: auto;
    height: auto;
    margin-right: 7px;
}

.type-fields {
    display: none;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eff0f1;
}

.type-fields.is-visible {
    display: block;
}

.form-section-title {
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eff0f1;
    font-size: 16px;
    font-weight: 600;
}

.form-row {
    margin-bottom: 20px;
}

.form-row > label {
    display: inline-block;
    width: 170px;
    padding-top: 8px;
    color: #4e5969;
    font-size: 14px;
    vertical-align: top;
}

.form-control {
    display: inline-block;
    width: 420px;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.form-row input,
.form-row select {
    height: 40px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.form-row textarea {
    resize: vertical;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: #8f959e;
    font-size: 12px;
}

.required {
    color: #f54a45 !important;
    margin-left: 2px;
}

.input-with-unit {
    display: table;
    width: 100%;
}

.input-with-unit input,
.input-with-unit .field-unit {
    display: table-cell;
}

.input-with-unit .field-unit {
    width: 55px;
    padding-left: 10px;
    color: #646a73;
    vertical-align: middle;
}

.form-actions {
    margin: 28px 0 0 174px;
    padding-top: 20px;
    border-top: 1px solid #eff0f1;
}

.form-actions .button {
    margin-right: 8px;
}

.form-actions-left {
    margin-left: 0;
}

.drug-summary {
    margin-bottom: 18px;
    padding: 18px 22px;
}

.drug-summary strong {
    margin-right: 12px;
    font-size: 16px;
}

.drug-summary span {
    margin-right: 24px;
    color: #646a73;
    font-size: 14px;
}

.info-card {
    padding: 20px;
}

.info-card h3 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
}

.info-card p {
    margin: 8px 0;
    color: #646a73;
    font-size: 13px;
    line-height: 1.7;
}

.quantity-in {
    color: #00a870;
    font-weight: bold;
}

.quantity-out {
    color: #f54a45;
    font-weight: bold;
}

.quantity-adjust {
    color: #646a73;
    font-weight: bold;
}

.dashboard-welcome {
    overflow: hidden;
    margin-bottom: 22px;
    padding: 26px 28px;
    border-radius: 10px;
    background: #3370ff;
    color: #fff;
}

.dashboard-welcome h1 {
    color: #fff;
}

.dashboard-welcome p {
    margin-bottom: 0;
    color: #dbe7ff;
}

.dashboard-card {
    display: inline-block;
    width: 320px;
    min-height: 165px;
    margin: 0 16px 16px 0;
    padding: 22px;
    vertical-align: top;
}

.dashboard-card h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
}

.dashboard-card p {
    min-height: 44px;
    color: #646a73;
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-card .card-link {
    color: #3370ff;
    font-size: 14px;
    text-decoration: none;
}

.page-heading > .button {
    margin-left: 8px;
}

.patient-form {
    max-width: 900px;
}

.duplicate-card {
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid #ffd591;
    border-radius: 8px;
    background: #fffbe6;
}

.duplicate-card h3 {
    margin: 0 0 6px;
    color: #ad6800;
    font-size: 16px;
}

.duplicate-card p {
    margin: 0 0 12px;
    color: #646a73;
    font-size: 13px;
}

.duplicate-person {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 5px;
    background: #fff;
}

.duplicate-person span,
.duplicate-person a {
    margin-left: 18px;
    font-size: 13px;
}

.patient-profile {
    display: table;
    width: 100%;
    margin-bottom: 24px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.profile-item {
    display: table-cell;
    width: 25%;
    padding: 18px 20px;
    border-right: 1px solid #eff0f1;
}

.profile-item:last-child {
    border-right: 0;
}

.profile-address {
    width: 50%;
}

.profile-item span,
.profile-item strong {
    display: block;
}

.profile-item span {
    margin-bottom: 7px;
    color: #8f959e;
    font-size: 12px;
}

.profile-item strong {
    font-size: 14px;
    font-weight: 500;
}

.section-heading {
    overflow: hidden;
    margin: 22px 0 12px;
}

.section-heading h2 {
    float: left;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.section-heading span {
    float: left;
    margin: 4px 0 0 10px;
    color: #8f959e;
    font-size: 12px;
}

#template-form .section-heading h2 {
    line-height: 38px;
}

#template-form .section-heading .table-panel-actions {
    margin-top: 0;
}

#template-form .section-heading .table-panel-actions .button {
    vertical-align: top;
}

.timeline-card {
    padding: 8px 20px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.timeline-item {
    position: relative;
    display: block;
    min-height: 62px;
    padding: 18px 12px 16px 25px;
    border-bottom: 1px solid #eff0f1;
    color: #1f2329;
    text-decoration: none;
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-item:hover {
    background: #f7f9fc;
}

.timeline-dot {
    position: absolute;
    top: 25px;
    left: 5px;
    width: 8px;
    height: 8px;
    border: 2px solid #3370ff;
    border-radius: 50%;
    background: #fff;
}

.timeline-date {
    display: inline-block;
    width: 145px;
    color: #646a73;
    font-size: 13px;
}

.timeline-summary {
    display: inline-block;
    overflow: hidden;
    width: 42%;
    margin-left: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.timeline-doctor {
    float: right;
    color: #8f959e;
    font-size: 13px;
}

/* Run Z24a 块3：历次就诊行的处方状态徽标，与医生名同排右侧（float 顺序排医生名左边） */
.timeline-rx-badge {
    float: right;
    margin-right: 10px;
}

.previous-record {
    margin-bottom: 16px;
    padding: 15px 18px;
    border: 1px solid #bacefd;
    border-radius: 8px;
    background: #f2f6ff;
}

.previous-title {
    margin-bottom: 8px;
    color: #245bdb;
    font-size: 13px;
    font-weight: bold;
}

.previous-content span {
    margin-right: 24px;
    font-size: 13px;
}

.previous-content a {
    float: right;
    font-size: 13px;
}

.record-form > .form-card {
    margin-bottom: 16px;
}

.record-type-options {
    white-space: nowrap;
}

.record-type-option {
    display: inline-block;
    width: 30%;
    margin-right: 2%;
    padding: 15px 16px;
    border: 1px solid #dee0e3;
    border-radius: 7px;
    cursor: pointer;
    white-space: normal;
    vertical-align: top;
}

.record-type-option:hover {
    border-color: #3370ff;
    background: #f7f9ff;
}

.record-type-option.selected {
    border-color: #3370ff;
    background: #eef4ff;
}

.record-type-option input {
    float: left;
    margin: 4px 10px 0 0;
}

.record-type-option strong,
.record-type-option span {
    display: block;
    margin-left: 25px;
}

.record-type-option span {
    margin-top: 5px;
    color: #8f959e;
    font-size: 12px;
}

.record-type-fields {
    display: none;
}

.record-grid {
    overflow: hidden;
}

.record-wide {
    width: 100%;
}

.record-half {
    float: left;
    width: 48%;
    margin-right: 4%;
}

.record-half.last {
    margin-right: 0;
}

.record-submit {
    padding: 6px 0 20px;
}

.record-submit > span {
    margin-left: 12px;
    color: #8f959e;
    font-size: 12px;
}

.record-meta {
    margin-bottom: 16px;
    padding: 14px 18px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.record-meta span,
.record-meta strong {
    margin-right: 14px;
}

.record-meta > span:first-child {
    color: #8f959e;
    font-size: 13px;
}

.record-detail-card {
    overflow: hidden;
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.record-detail-card h2 {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eff0f1;
    font-size: 16px;
    font-weight: 600;
}

.record-detail-row {
    float: left;
    width: 48%;
    min-height: 78px;
    margin-right: 2%;
}

.record-detail-row.wide {
    float: none;
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
}

.record-detail-row span {
    display: block;
    margin-bottom: 6px;
    color: #8f959e;
    font-size: 12px;
}

.record-detail-row p {
    margin: 0;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* 体格检查回显（§3）：值 空格 单位，同一行流式排布 */
.pe-detail-list {
    overflow: hidden;
}

.pe-detail-item {
    float: left;
    width: 23%;
    margin: 0 2% 14px 0;
}

.pe-detail-item label {
    display: block;
    margin-bottom: 6px;
    color: #8f959e;
    font-size: 12px;
}

.pe-detail-item strong {
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
}

.checkbox-group {
    padding-top: 9px;
}

.compact-field {
    width: 48%;
}

.price-change-title {
    margin-top: 24px;
}

.price-adjust-card {
    margin-top: 24px;
    padding: 18px 20px 8px;
    border: 1px solid #c9d6f5;
    border-radius: 8px;
    background: #f7f9ff;
}

.price-adjust-card .form-section-title {
    margin-top: 0;
}

.price-adjust-note {
    margin: -4px 0 16px;
    color: #3370ff;
    font-size: 13px;
}

.price-adjust-history-title {
    margin: 8px 0 10px;
    color: #1f2329;
    font-size: 15px;
    font-weight: 600;
}

.common-tag {
    background: #fff2cc;
    color: #ad6800;
}

.rx-tag {
    background: #fce8e6;
    color: #c01c28;
}

.success-tag {
    background: #e8f8e5;
    color: #1fa313;
}

.warning-tag {
    background: #fff1cc;
    color: #ad6800;
}

.danger-tag {
    background: #ffe7e7;
    color: #b42318;
}

.muted-tag {
    background: #f2f3f5;
    color: #646a73;
}

.order-header-fields {
    display: table;
    width: 100%;
    margin-bottom: 18px;
}

.order-header-fields .form-group {
    display: table-cell;
    width: 210px;
    padding-right: 16px;
    vertical-align: bottom;
}

.order-header-fields .order-note {
    width: auto;
    padding-right: 0;
}

.order-header-fields select:disabled {
    border-color: #d9dce1;
    background: #f2f3f5;
    color: #646a73;
    cursor: not-allowed;
    opacity: 1;
}

.stock-order-form {
    max-width: none;
}

.table-card.stock-order-table {
    overflow: visible;
}

.stock-order-table > .data-table > thead > tr > th:first-child,
.stock-order-table > .data-table > tbody > tr > td:first-child {
    min-width: 280px;
}

.stock-order-table input,
.stock-order-table select {
    width: 100%;
    min-width: 88px;
    height: 36px;
    padding: 6px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.stock-order-table .row-drug-search {
    margin-bottom: 0;
}

.drug-search-cell {
    position: relative;
}

.stock-item-row.search-open .drug-search-cell {
    z-index: 30;
}

.drug-autocomplete {
    position: relative;
}

.drug-search-dropdown {
    position: absolute;
    z-index: 40;
    top: 39px;
    left: 0;
    display: none;
    width: 520px;
    overflow: hidden;
    border: 1px solid #c9cdd4;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.16);
}

.drug-search-dropdown.is-fixed,
.drug-search-dropdown.is-parked {
    position: fixed;
    right: auto;
    z-index: 1200;
}

.drug-search-head-wrap {
    overflow: hidden;
    padding-right: 17px;
    background: #f7f8fa;
    border-bottom: 1px solid #e5e6eb;
}

.drug-search-results {
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: scroll;
}

.drug-search-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.drug-search-col-name {
    width: 38%;
}

.drug-search-col-spec {
    width: 37%;
}

.drug-search-col-maker {
    width: 22%;
}

.drug-search-col-type {
    width: 25%;
}

.tpl-items-table .drug-search-dropdown,
.drug-search-dropdown.is-tpl-drop {
    width: 640px;
}

.tpl-items-table .drug-search-col-name,
.drug-search-dropdown.is-tpl-drop .drug-search-col-name {
    width: 28%;
}

.tpl-items-table .drug-search-col-spec,
.drug-search-dropdown.is-tpl-drop .drug-search-col-spec {
    width: 26%;
}

.tpl-items-table .drug-search-col-maker,
.drug-search-dropdown.is-tpl-drop .drug-search-col-maker {
    width: 28%;
}

.tpl-items-table .drug-search-col-type,
.drug-search-dropdown.is-tpl-drop .drug-search-col-type {
    width: 18%;
}

/* 模板行规格/厂家 meta：常驻固定高度（未选中时也预留），选中前后行高一致不变形 */
.tpl-drug-meta {
    display: block;
    min-height: 17px;
    margin-top: 2px;
    overflow: hidden;
    color: #8f959e;
    font-size: 12px;
    line-height: 17px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tpl-dx-field {
    position: relative;
}

.tpl-dx-field .dx-dropdown {
    z-index: 50;
}

.tpl-table-block {
    margin-top: 4px;
}

.tpl-table-head-wrap {
    overflow: hidden;
    border: 1px solid #e5e6eb;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #f5f6f7;
}

.tpl-table-body-wrap {
    max-height: 420px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e5e6eb;
    border-radius: 0 0 6px 6px;
    background: #fff;
}

.tpl-table-head-wrap .tpl-items-table,
.tpl-table-body-wrap .tpl-items-table {
    margin: 0;
    table-layout: fixed;
}

.tpl-table-head-wrap .tpl-items-table th {
    border-bottom: 0;
}

.tpl-col-drug {
    width: 46%;
}

.tpl-col-dose,
.tpl-col-unit {
    width: 18%;
}

.tpl-col-act {
    width: 88px;
}

#template-form.is-wm-tpl .tpl-col-drug {
    width: 22%;
}

#template-form.is-wm-tpl .tpl-col-usage,
#template-form.is-wm-tpl .tpl-col-freq {
    width: 12%;
}

#template-form.is-wm-tpl .tpl-col-dose,
#template-form.is-wm-tpl .tpl-col-days,
#template-form.is-wm-tpl .tpl-col-qty {
    width: 8%;
}

#template-form.is-wm-tpl .tpl-col-dose-unit,
#template-form.is-wm-tpl .tpl-col-qty-unit {
    width: 10%;
}

th.tpl-wm-col,
td.tpl-wm-col,
col.tpl-wm-col {
    display: none;
}

#template-form.is-wm-tpl th.tpl-wm-col,
#template-form.is-wm-tpl td.tpl-wm-col {
    display: table-cell;
}

#template-form.is-wm-tpl col.tpl-wm-col {
    display: table-column;
}

#template-form.is-wm-tpl th.tpl-tcm-col,
#template-form.is-wm-tpl td.tpl-tcm-col,
#template-form.is-wm-tpl col.tpl-tcm-col {
    display: none;
}

.tpl-items-table select,
.tpl-items-table .tpl-days,
.tpl-items-table .tpl-qty,
.tpl-items-table .tpl-dosage {
    width: 100%;
    max-width: 110px;
    /* 与药品检索框、删除按钮统一 36px，行内控件同高 */
    height: 36px;
    box-sizing: border-box;
}

.tpl-items-table .tpl-usage,
.tpl-items-table .tpl-freq {
    max-width: 120px;
}

.tpl-items-table .stock-item-row.search-open .drug-search-cell {
    z-index: 40;
}

.stock-order-table .drug-search-table th,
.stock-order-table .drug-search-table td,
.drug-search-dropdown .drug-search-table th,
.drug-search-dropdown .drug-search-table td {
    min-width: 0;
    padding: 8px 10px;
    overflow: hidden;
    border-bottom: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: normal;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.stock-order-table .drug-search-table th,
.drug-search-dropdown .drug-search-table th {
    color: #8f959e;
    font-size: 12px;
}

.stock-order-table .drug-search-option,
.drug-search-dropdown .drug-search-option {
    cursor: pointer;
}

.stock-order-table .drug-search-option td,
.drug-search-dropdown .drug-search-option td {
    border-bottom: 1px solid #eff0f1;
    color: #1f2329;
    font-size: 13px;
}

.stock-order-table .drug-search-option td:nth-child(2),
.drug-search-dropdown .drug-search-option td:nth-child(2) {
    color: #646a73;
}

.stock-order-table .drug-search-option td:last-child,
.drug-search-dropdown .drug-search-option td:last-child {
    color: #8f959e;
}

.stock-order-table .drug-search-option:hover,
.stock-order-table .drug-search-option.active,
.drug-search-dropdown .drug-search-option:hover,
.drug-search-dropdown .drug-search-option.active {
    background: #eef4ff;
}

.drug-search-empty {
    display: none;
    padding: 28px 12px;
    color: #8f959e;
    font-size: 13px;
    text-align: center;
}

.stock-order-table > .data-table > tbody > tr > td:nth-child(2) {
    width: 110px;
}

.stock-order-table > .data-table > tbody > tr > td:nth-child(3) {
    width: 95px;
}

.stock-order-table > .data-table > tbody > tr > td:nth-child(4) {
    width: 135px;
}

.stock-order-table > .data-table > tbody > tr > td:nth-child(5) {
    width: 145px;
}

.stock-order-table > .data-table > tbody > tr > td:nth-child(6) {
    width: 150px;
}

.stock-order-form:not([data-purchase-order="true"]) .js-price-col {
    display: none;
}

.stock-order-table > .data-table > tbody > tr > td.price-unit-cell {
    width: 90px;
    color: #646a73;
    white-space: nowrap;
}

.price-adjust-table > .data-table > tbody > tr > td:nth-child(2) {
    width: 140px;
}

.price-adjust-table > .data-table > tbody > tr > td:nth-child(3),
.price-adjust-table > .data-table > tbody > tr > td:nth-child(4) {
    width: 110px;
    color: #646a73;
    white-space: nowrap;
}

.price-adjust-table > .data-table > tbody > tr > td:nth-child(5) {
    width: 140px;
}

.price-adjust-table > .data-table > tbody > tr > td:nth-child(6) {
    width: 72px;
}

.price-adjust-table .row-drug-type {
    margin-top: 4px;
    font-size: 12px;
}

.hidden-template {
    display: none;
}

.order-actions {
    margin-top: 20px;
}

.order-actions .button {
    margin-right: 10px;
}

.order-actions .confirm-action {
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.reject-order-form input {
    width: 220px;
    height: 36px;
    margin-right: 8px;
    padding: 6px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    font: inherit;
    font-size: 13px;
    vertical-align: middle;
}

.order-actions .button.primary {
    float: right;
}

.order-actions > span {
    color: #8f959e;
    font-size: 12px;
}

.order-summary {
    display: table;
    width: 100%;
    margin-bottom: 18px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.order-summary > span {
    display: table-cell;
    padding: 15px 18px;
    border-right: 1px solid #eff0f1;
    color: #8f959e;
    font-size: 12px;
}

.order-summary > span:last-child {
    border-right: 0;
}

.order-summary strong {
    display: block;
    margin-top: 6px;
    color: #1f2329;
    font-size: 14px;
    font-weight: 500;
}

.form-group .readonly-price-input:disabled,
.form-group .readonly-input:disabled,
.form-group .readonly-input[readonly] {
    pointer-events: none;
    background: #f2f3f5 !important;
    color: #8f959e !important;
    cursor: not-allowed;
    opacity: 1;
    border-color: #d9dce1;
}

.price-field-heading {
    overflow: hidden;
    margin-bottom: 7px;
}

.price-field-heading label {
    float: left;
    color: #4e5969;
    font-size: 14px;
}

.price-trend-text-button {
    float: right;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3370ff;
    font: inherit;
    font-size: 13px;
    line-height: 20px;
    cursor: pointer;
}

.price-trend-text-button:hover {
    color: #245bdb;
    text-decoration: underline;
}

.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    overflow-y: auto;
    padding: 70px 0;
    background: rgba(31, 35, 41, 0.52);
}

/* Z35 W60 弹层关闭态守卫：全站弹窗关闭路径统一 fadeOut(120) + aria-hidden="true"
   （app.js 各处同步设置）。fadeOut 若被打断/排队异常，会停在 opacity:0 +
   display:block——不可见但继续吃点击的全屏 fixed 遮罩，「中药开方」页签点不中
   即此形态。守卫按 aria-hidden 强制 display:none（同类同特异度，源码序在后者胜）；
   服务端自动展开的弹窗（处方预览）改挂 .is-open 类而非内联 display:block，
   否则内联样式压过本守卫。 */
.modal-overlay.is-open {
    display: block;
}

.modal-overlay[aria-hidden="true"] {
    display: none;
}

.modal-card {
    width: 900px;
    margin: 0 auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(31, 35, 41, 0.2);
}

.modal-header {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e6eb;
}

.modal-header h2 {
    margin: 0;
    color: #1f2329;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header p {
    margin: 4px 0 0;
    color: #8f959e;
    font-size: 12px;
}

.modal-close {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-left: 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #646a73;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
}

.modal-close:hover {
    background: #f2f3f5;
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-header p {
    margin: 6px 0 0;
    color: #8f959e;
    font-size: 13px;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid #e5e6eb;
    text-align: right;
}

.modal-footer .button {
    margin-left: 8px;
}

.modal-close {
    display: block;
    position: absolute;
    top: 16px;
    right: 20px;
    width: 34px;
    height: 34px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #646a73;
    font-size: 22px;
    line-height: 34px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

a.modal-close,
a.modal-close:visited,
a.modal-close:hover {
    color: #646a73;
    text-decoration: none;
}

.modal-close:hover {
    background: #f2f3f5;
}

.modal-body {
    padding: 22px 24px 26px;
}

.price-trend-chart {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #eff0f1;
    border-radius: 7px;
    background: #fafbfc;
}

.price-trend-chart svg {
    display: block;
}

.trend-grid-line {
    stroke: #e5e6eb;
    stroke-width: 1;
}

.trend-line {
    fill: none;
    stroke: #3370ff;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.trend-point {
    fill: #fff;
    stroke: #3370ff;
    stroke-width: 3;
}

.trend-axis-text {
    fill: #8f959e;
    font-size: 11px;
}

.empty-chart {
    margin-bottom: 18px;
    padding: 60px 20px;
    border: 1px dashed #d9dce1;
    border-radius: 7px;
    background: #fafbfc;
    color: #8f959e;
    text-align: center;
}

.price-history-table {
    max-height: 280px;
    overflow-y: auto;
}

.drug-picker-card {
    width: 760px;
}

.drug-picker-toolbar {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 8px;
}

.drug-picker-search-wrap,
.drug-picker-filter-wrap {
    display: table-cell;
    vertical-align: middle;
}

.drug-picker-search-wrap {
    width: 70%;
    padding-right: 10px;
}

.drug-picker-filter-wrap {
    width: 30%;
}

.drug-picker-search-wrap input,
.drug-picker-filter-wrap select {
    width: 100%;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.drug-picker-count {
    margin: 0 0 8px;
    color: #646a73;
    font-size: 12px;
}

.drug-picker-table-wrap {
    clear: both;
    overflow: hidden;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
}

.drug-picker-table {
    table-layout: fixed;
    width: 100%;
}

.drug-picker-col-check {
    width: 88px;
}

.drug-picker-col-name {
    width: 42%;
}

.drug-picker-col-spec {
    width: 28%;
}

.drug-picker-col-type {
    width: 18%;
}

.drug-picker-table-wrap > .drug-picker-table {
    margin: 0;
    border-bottom: 1px solid #e5e6eb;
    background: #f7f8fa;
}

.drug-picker-table-wrap > .drug-picker-table th {
    border-bottom: 0;
}

.drug-picker-list {
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: scroll;
}

.drug-picker-check-label {
    font-weight: normal;
    color: #1f2329;
    cursor: pointer;
}

.drug-picker-check-label.is-disabled {
    color: #c0c4cc;
    cursor: not-allowed;
}

.drug-picker-row {
    cursor: pointer;
}

.drug-picker-row.selected {
    background: #eef4ff;
}

.drug-picker-row.is-locked {
    color: #c0c4cc;
    background: #f7f8fa;
    cursor: not-allowed;
}

.drug-picker-row.is-locked .drug-name,
.drug-picker-row.is-locked .muted-text {
    color: #c0c4cc;
}

.drug-picker-row.is-locked .tag {
    color: #c0c4cc;
    background: #ececec;
}

.drug-picker-row.is-locked .drug-picker-check {
    opacity: 0.45;
}

.drug-picker-actions {
    overflow: hidden;
    margin-top: 16px;
}

.drug-picker-actions .button {
    float: right;
    margin-left: 10px;
}

.is-hidden {
    display: none;
}

.inline-form {
    display: inline;
}

.patient-bar {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #c9d6f5;
    border-radius: 8px;
    background: #f7f9ff;
}

.patient-bar-main strong {
    margin-right: 12px;
    font-size: 18px;
}

.patient-bar-main span {
    margin-right: 12px;
    color: #646a73;
}

.patient-bar-summary {
    margin-top: 8px;
    color: #4e5969;
    font-size: 13px;
}

.rx-hint {
    margin: -4px 0 12px;
}

.rx-chip-list {
    overflow: hidden;
}

.rx-chip {
    display: inline-block;
    margin: 0 8px 8px 0;
    padding: 8px 14px;
    border: 1px solid #dee0e3;
    border-radius: 16px;
    background: #fff;
    color: #1f2329;
    font: inherit;
    cursor: pointer;
}

.rx-chip:hover {
    border-color: #3370ff;
    background: #eef4ff;
    color: #245bdb;
}

.rx-search-wrap {
    position: relative;
    max-width: 520px;
}

.rx-search-wrap input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    font: inherit;
}

.rx-search-dropdown {
    display: none;
    position: absolute;
    z-index: 20;
    top: 44px;
    right: 0;
    left: 0;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.12);
}

.rx-search-hit {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #f0f1f2;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.rx-search-hit strong,
.rx-search-hit span {
    display: block;
}

.rx-search-hit span {
    margin-top: 2px;
    color: #8f959e;
    font-size: 12px;
}

.rx-search-hit:hover {
    background: #f5f7fa;
}

.rx-toolbar {
    margin-top: 14px;
}

.rx-toolbar .button {
    margin-right: 8px;
}

.rx-total {
    margin-top: 16px;
    text-align: right;
    font-size: 14px;
}

.rx-total strong {
    margin: 0 4px;
    color: #3370ff;
    font-size: 20px;
}

.rx-pick-modal {
    width: 640px;
}

.rx-pick-card {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.rx-pick-card strong {
    margin-right: 8px;
}

.rx-pick-card .muted-text {
    display: block;
    margin-top: 6px;
}

.rx-pick-card:hover {
    border-color: #3370ff;
    background: #f7f9ff;
}

.rx-pick-card.is-busy {
    color: #4e5969;
    cursor: default;
    background: #f7f8fa;
}

.rx-pick-card.is-busy:hover {
    border-color: #dee0e3;
    background: #f7f8fa;
}

.rx-pick-busy {
    display: block;
    margin-top: 6px;
    color: #d83931;
    font-size: 12px;
    font-style: normal;
}

/* 工作台患者检索模态框（2026-09-17 派单 B）：底部操作栏常驻「创建档案」，
   有结果/无结果都在；结果多时列表在 body 内滚动，卡片不超视口、按钮不被推出屏 */
.patient-pick-modal {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    max-height: 100%;
}

.patient-pick-body {
    overflow-y: auto;
    /* flex 子项默认 min-height:auto 不肯收缩，显式给 0 才能在限高内滚（Chrome 49） */
    min-height: 0;
}

.patient-pick-footer {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    border-top: 1px solid #e5e6eb;
}

.patient-pick-hint {
    color: #8f959e;
    font-size: 13px;
}

/* Z123（T-53 追加）：检索弹窗「搜索」按钮与输入框同行——输入框 flex 收缩、
   按钮贴右不压缩；覆盖 .form-group input 的 width:100%（flex 子项下会把
   按钮挤掉），按钮定高 40px 与输入框等高。Chrome 49：flex 全带 -webkit- 前缀 */
.patient-search-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.patient-search-bar input[type="text"] {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    width: auto;
}

.patient-search-submit {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-left: 10px;
    height: 40px;
}

.fill-card-list {
    overflow: hidden;
}

.fill-card {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #dee0e3;
    border-radius: 10px;
    background: #fff;
    outline: none;
}

.fill-card:focus,
.fill-card.is-open {
    border-color: #3370ff;
    box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
}

.fill-card-head strong {
    margin-right: 10px;
    font-size: 20px;
}

.fill-card-meta {
    margin: 10px 0 16px;
    color: #646a73;
    font-size: 14px;
}

.fill-detail {
    display: none;
    margin-top: 16px;
}

.fill-card.is-open .fill-detail {
    display: block;
}

.fill-card.is-open .js-toggle-fill {
    display: none;
}

.button.fill-confirm {
    display: block;
    width: 100%;
    height: 56px;
    margin-top: 16px;
    border: 0;
    border-radius: 8px;
    background: #3370ff;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

.button.fill-confirm:hover {
    background: #245bdb;
}

.fill-hint {
    margin-top: 8px;
}

.page-fill {
    background: #f5f6f7;
}

.fill-table {
    background: #f5f6f7;
}

.fill-table .fill-col-list {
    width: 300px;
    padding: 12px;
    border-right: 0;
    background: #f5f6f7;
}

.fill-table .fill-col-main {
    padding: 12px 16px 16px 4px;
    border-right: 0;
    background: #f5f6f7;
}

.fill-table .wb-search {
    padding: 0 0 12px;
    border-bottom: 0;
    background: transparent;
}

.fill-table .wb-search input {
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
}

.fill-list-shell {
    width: 100%;
    height: calc(100vh - 88px);
    border-collapse: collapse;
}

.fill-list-search,
.fill-list-bar {
    height: 1%;
    vertical-align: top;
}

.fill-list-body {
    height: 100%;
    vertical-align: top;
}

.fill-tabs {
    overflow: hidden;
    margin: 0 0 10px;
    border-radius: 8px;
    background: #fff;
}

.fill-tabs a {
    float: left;
    width: 20%;
    padding: 8px 0;
    color: #646a73;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
}

.fill-tabs a.active {
    color: #245bdb;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #3370ff;
}

/* 待发药/待审退药数量徽标：复用工作台 wb-tab-badge，紧凑一号防挤 */
.fill-tabs a {
    white-space: nowrap;
}

.fill-tabs .wb-tab-badge {
    min-width: 15px;
    height: 15px;
    margin: 0 0 0 3px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 10px;
    line-height: 15px;
}

.fill-rx-list {
    height: 100%;
    overflow: auto;
}

.fill-days-bar {
    padding-top: 10px;
    color: #646a73;
    font-size: 13px;
    line-height: 32px;
    white-space: nowrap;
}

.fill-days-bar input {
    width: 48px;
    height: 32px;
    margin: 0 6px;
    padding: 0 6px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    background: #fff;
    color: #1f2329;
    font: inherit;
    text-align: center;
    outline: none;
}

.fill-days-bar input:focus {
    border-color: #3370ff;
}

.fill-days-bar .button {
    min-width: 56px;
    height: 32px;
    margin-left: 8px;
    padding: 0 12px;
    line-height: 30px;
    vertical-align: middle;
}

.fill-reject-reason {
    margin-top: 8px;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

.fill-reject-reason strong {
    font-weight: 700;
}

.fill-rx-card {
    display: block;
    overflow: hidden;
    margin-bottom: 10px;
    padding: 13px 15px;
    border: 1px solid #adc6f5;
    border-radius: 10px;
    background: #fff;
    color: #1f2329;
    text-decoration: none;
}

.fill-rx-card strong {
    display: block;
    margin-right: 56px;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
}

.fill-rx-card em {
    display: block;
    margin-top: 8px;
    color: #8f959e;
    font-size: 12px;
    font-style: normal;
    line-height: 18px;
    text-align: right;
}

.fill-rx-card.active {
    border-color: #3370ff;
    background: #e8f0ff;
}

.fill-type {
    float: right;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
}

.fill-type.is-tcm {
    background: #e8f0ff;
    color: #245bdb;
}

.fill-type.is-wm {
    background: #e8f7ed;
    color: #237b4b;
}

.fill-type.is-other {
    background: #f3e8ff;
    color: #7c3aed;
}

.fill-pane {
    min-height: calc(100vh - 96px);
    padding: 20px 24px 24px;
    border-radius: 10px;
    background: #fff;
}

.fill-pane-empty {
    padding-top: 80px;
}

.fill-pane-head {
    width: 100%;
    margin-bottom: 18px;
    border-collapse: collapse;
}

.fill-patient {
    vertical-align: top;
}

.fill-patient-main strong,
.fill-patient-main span {
    margin-right: 12px;
    font-size: 14px;
    line-height: 24px;
    vertical-align: middle;
}

.fill-patient-main strong {
    font-size: 18px;
}

.fill-patient-sub {
    margin-top: 8px;
    color: #646a73;
    font-size: 13px;
    line-height: 22px;
}

.fill-patient-sub span {
    margin-right: 16px;
}

.fill-actions {
    width: 1%;
    padding-left: 16px;
    white-space: nowrap;
    text-align: right;
    vertical-align: top;
}

.fill-reject,
.fill-confirm-form,
.fill-cancel-form {
    display: inline-block;
    margin: 0 0 0 8px;
    vertical-align: middle;
}

.fill-reject.reject-action {
    margin-top: 0;
}

.fill-reject input {
    width: auto;
    margin: 0;
}

.fill-actions .button {
    height: 36px;
    padding: 0 16px;
    line-height: 34px;
    vertical-align: middle;
}

.fill-reject .button {
    min-width: 72px;
    border-color: #3370ff;
    color: #3370ff;
}

.fill-reject .button:hover {
    background: #e8f0ff;
}

.stock-lack {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fff3e8;
    color: #d9480f;
    font-size: 12px;
    line-height: 18px;
    vertical-align: middle;
}

.fill-filled {
    padding: 8px 20px 28px;
    background: #f5f6f7;
}

.page-fill-history {
    max-width: none;
    min-width: 1180px;
    padding: 64px 16px 0;
    overflow: hidden;
}

.hist-shell {
    width: 100%;
    height: calc(100vh - 64px);
    table-layout: fixed;
    border-collapse: collapse;
}

.hist-search,
.hist-footer {
    height: 1%;
    vertical-align: top;
}

.hist-list {
    height: 42%;
    padding-bottom: 8px;
    vertical-align: top;
}

.hist-list-shell {
    width: 100%;
    height: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.hist-list-body {
    height: 100%;
    vertical-align: top;
}

.hist-list-paging {
    height: 1%;
    padding-top: 4px;
    vertical-align: middle;
}

.hist-detail {
    height: 38%;
    padding-bottom: 8px;
    vertical-align: top;
}

.hist-filter {
    margin-bottom: 10px;
}

.filter-bar input[type="date"] {
    width: 140px;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.hist-pick {
    position: relative;
}

.hist-pick .hist-pick-input {
    width: 160px;
}

.hist-list-wrap,
.hist-detail-wrap {
    height: 100%;
    overflow: auto;
}

.hist-rx-table a {
    color: inherit;
    text-decoration: none;
}

.hist-row {
    cursor: pointer;
}

.hist-row.active {
    background: #e8f0ff;
}

.hist-row.active td {
    background: #e8f0ff;
}

.hist-paging {
    margin: 0;
    padding: 0;
    text-align: left;
}

.hist-paging span,
.hist-paging a {
    padding: 4px 8px;
}

.hist-footer {
    padding: 10px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    color: #1f2329;
    font-size: 14px;
    line-height: 24px;
}

.hist-total {
    margin-right: 24px;
}

.hist-total strong {
    font-size: 18px;
    color: #245bdb;
}

.hist-return-amount {
    margin-right: 24px;
    color: #d83931;
    font-weight: 600;
}

.hist-return-box {
    margin-top: 16px;
    padding: 12px 14px 16px;
    border: 2px solid #d83931;
    border-radius: 8px;
}

.hist-return-title {
    display: block;
    margin-bottom: 8px;
    color: #d83931;
    font-size: 14px;
}

.hist-return-meta {
    margin-bottom: 10px;
    color: #646a73;
    font-size: 13px;
    line-height: 22px;
}

.hist-return-meta span {
    margin-right: 16px;
}

.hist-return-extra,
.fill-return-extra {
    margin-top: 8px;
    color: #d83931;
    font-size: 13px;
    font-weight: 600;
}

.hist-extra {
    margin-right: 18px;
}

.login-body {
    min-width: 0;
    background: #eef1f6;
}

.login-card {
    width: 400px;
    margin: 72px auto 0;
    padding: 36px 36px 28px;
    border: 1px solid #e5e6eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(31, 35, 41, 0.06);
}

.login-brand {
    margin-bottom: 24px;
    text-align: center;
}

.login-brand .brand-mark {
    /* 必须显式恢复 inline-block：下面的 .login-brand span 会把 span 全变成
       block，固定宽度 + block 会贴左，方块就无法与标题居中对齐 */
    display: inline-block;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 21px;
    line-height: 42px;
}

.login-brand strong,
.login-brand span {
    display: block;
}

.login-brand strong {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 600;
}

.login-brand span {
    margin-top: 6px;
    color: #8f959e;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-group input[type="text"],
.login-form .form-group input[type="password"] {
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #c9cdd4;
    border-radius: 6px;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.login-form .form-group input[type="text"]:focus,
.login-form .form-group input[type="password"]:focus {
    border-color: #3370ff;
}

.login-roles {
    overflow: hidden;
}

.login-role {
    float: left;
    width: 32%;
    margin-right: 2%;
}

.login-role:last-child {
    margin-right: 0;
}

.login-role input {
    position: absolute;
    left: -9999px;
}

.login-role span {
    display: block;
    height: 40px;
    border: 1px solid #c9cdd4;
    border-radius: 6px;
    background: #fff;
    color: #1f2329;
    font-size: 14px;
    line-height: 38px;
    text-align: center;
    cursor: pointer;
}

.login-role input:checked + span,
.login-role span:hover {
    border-color: #3370ff;
    background: #eef4ff;
    color: #245bdb;
}

.login-roles.is-stack .login-role {
    float: none;
    width: 100%;
    margin: 0 0 10px;
}

.login-roles.is-stack .login-role:last-child {
    margin-bottom: 0;
}

.login-actions {
    margin-top: 8px;
}

.login-actions .button.large {
    display: block;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 40px;
}

.login-switch {
    margin: 16px 0 0;
    line-height: 22px;
}

.login-switch a {
    display: inline;
}

.switch-role-card {
    width: 400px;
}

.app-dialog-card {
    width: 420px;
    max-width: 92%;
}

.app-dialog-body {
    padding: 18px 24px 8px;
}

.app-dialog-message {
    margin: 0;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.app-dialog-field {
    margin-top: 14px;
}

.app-dialog-field input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.app-dialog-field input:focus {
    border-color: #1f4fd8;
    box-shadow: 0 0 0 2px rgba(31, 79, 216, 0.28);
}

.check-line {
    display: block;
    margin: 6px 0;
}

.check-inline {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
}

.check-inline input {
    width: auto;
    height: auto;
    margin-right: 6px;
    vertical-align: middle;
}

.user-edit-row {
    overflow: hidden;
}

.user-edit-row > span,
.user-edit-row > input,
.user-edit-row > select,
.user-edit-row > label,
.user-edit-row > button {
    float: left;
    margin: 4px 10px 4px 0;
    vertical-align: middle;
}

.user-edit-row input[type="text"],
.user-edit-row input[type="number"],
.user-edit-row input[type="password"] {
    width: 140px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.user-edit-row select {
    width: 180px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.user-edit-row .check-line {
    display: inline-block;
    margin: 8px 10px 4px 0;
    line-height: 24px;
}

.user-edit-row .button {
    height: 32px;
    padding: 0 12px;
    line-height: 30px;
}

.data-table.edit-table th,
.data-table.edit-table td {
    vertical-align: middle;
}

.data-table.edit-table .col-name {
    width: 28%;
}

.data-table.edit-table .col-sort {
    width: 100px;
}

.data-table.edit-table .col-status {
    width: 120px;
}

/* T-14 诊断库「常用」一键切换（RunZ2）：独立小表单内联化，不撑高行 */
.dx-common-toggle {
    display: inline;
    margin: 0;
}

.data-table.edit-table .col-action {
    width: 100px;
}

.data-table.edit-table .cell-input {
    width: 100%;
    max-width: 280px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.data-table.edit-table .cell-input-narrow {
    width: 72px;
    max-width: 100%;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.data-table.edit-table .cell-select {
    width: 100%;
    max-width: 240px;
    height: 32px;
    padding: 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.data-table.edit-table .button {
    height: 32px;
    padding: 0 12px;
    line-height: 30px;
}

.dict-create-bar {
    overflow: hidden;
}

.dict-create-bar .form-group {
    float: left;
    width: 240px;
    margin: 0 16px 0 0;
}

.dict-create-bar .button {
    float: left;
    margin-top: 28px;
}

.menu-config-tree {
    margin: 0;
    padding-left: 18px;
}

.menu-config-row {
    display: inline-block;
    margin: 6px 8px 6px 0;
}

.menu-config-row input,
.menu-config-row select {
    margin-right: 6px;
}

.reject-action {
    margin-top: 10px;
}

.reject-action input {
    width: 70%;
    margin-right: 8px;
}

a.tree-toggle {
    display: block;
    color: inherit;
    text-decoration: none;
}

.page-workbench {
    max-width: none;
    min-width: 960px;
    padding: 64px 0 0;
    overflow-x: auto;
}

.page-workbench.is-expanded {
    min-width: 1200px;
}

.workbench-table {
    width: 100%;
    min-width: 960px;
    height: calc(100vh - 64px);
    table-layout: fixed;
    border-collapse: collapse;
    background: #f5f6f7;
}

.workbench-table.is-expanded {
    min-width: 1200px;
}

/* W82 修复（RunZ27 2026-09-18）：<1440px 视口展开患者档案列（expand=1）时，
   1200px 保底宽超出内容区可用宽（1280 视口 workspace 仅 1080），把页面撑到
   scrollWidth 1400，末列与「提交处方」按钮出界。窄视口回落与未展开相同的
   960px 保底：列收窄后开方网格放不下仍由 .wb-rx-grid-scroll 内部横向滚动
   兜底（RunR/RunV 口径），不再把溢出转嫁给页面级横向滚动。 */
@media (max-width: 1439px) {
    .page-workbench.is-expanded,
    .workbench-table.is-expanded {
        min-width: 960px;
    }
}

.workbench-col-list,
.workbench-col-main,
.workbench-col-history,
.workbench-col-patient {
    vertical-align: top;
    border-right: 1px solid #e5e6eb;
    background: #fff;
}

.workbench-col-list {
    width: 200px;
}

.workbench-col-history {
    width: 200px;
    border-right: 0;
}

/* 「近 3 个月」右栏收起形态见下方 .is-history-collapsed（2026-09-18 RunV ②，
   取代原 W22 的 <1400px display:none 媒体查询：收起升级为 44px 窄条可展开，
   默认值由 app.js 按视口/localStorage 决定，1440 档默认展开）。 */

/* ── 左侧患者列表列收窄条（2026-09-17 RunR ③，Vinson 拍板「窄条/可折叠」）──
   <1366px（1280×800 档）默认收成 44px 窄条给开单主列让宽；<1500px 且展开
   患者档案（expand=1）时也默认收窄（档案列 240px + 右栏已收，不收列表则
   1440 档开方区仅 ~700px 放不下单行网格）。窄条上「»」可随时展开复原。 */
.workbench-table.is-list-collapsed .workbench-col-list {
    width: 44px;
}

.workbench-table.is-list-collapsed .workbench-col-list .wb-search,
.workbench-table.is-list-collapsed .workbench-col-list .wb-dept,
.workbench-table.is-list-collapsed .workbench-col-list .wb-dept-name,
.workbench-table.is-list-collapsed .workbench-col-list .wb-tabs,
.workbench-table.is-list-collapsed .workbench-col-list .wb-patient-list {
    display: none;
}

/* 折叠按钮：窄条模式整列就是一枚按钮；展开模式压在列表列顶部占一行 */
.wb-list-toggle {
    display: block;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e5e6eb;
    background: #fff;
    color: #4e5969;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.wb-list-toggle:hover {
    background: #eef4ff;
    color: #245bdb;
}

.workbench-table.is-list-collapsed .wb-list-toggle {
    height: 44px;
    line-height: 44px;
    font-size: 18px;
}

/* ── 右侧「近 3 个月」栏收窄条（2026-09-18 RunV ②，Vinson 拍板「这片区域
   也可以像左侧列表一样有个收起功能」）──与左侧 .is-list-collapsed 同形态：
   44px 窄条 + 顶部开关，箭头方向镜像（展开态「»」收向右边、收起态「«」
   向左展开）。默认值由 app.js 决定：1440 档默认展开（时间轴常用，RunT 拍板
   保留）；<1400px 默认收起（原 W22 整栏隐藏升级为窄条，可手动展开；主列
   让宽口径不变，放不下仍由 .wb-rx-grid-scroll 横向滚动兜底）。手动选择存
   localStorage（wb-history-collapsed），两侧栏互相独立、不联动。 */
.workbench-table.is-history-collapsed .workbench-col-history {
    width: 44px;
}

.workbench-table.is-history-collapsed .workbench-col-history .wb-pane {
    display: none;
}

.wb-history-toggle {
    display: block;
    width: 100%;
    height: 32px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #e5e6eb;
    background: #fff;
    color: #4e5969;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
}

.wb-history-toggle:hover {
    background: #eef4ff;
    color: #245bdb;
}

.workbench-table.is-history-collapsed .wb-history-toggle {
    height: 44px;
    line-height: 44px;
    font-size: 18px;
}

.workbench-col-patient {
    width: 240px;
}

.workbench-col-main {
    background: #f5f6f7;
}

.workbench-col-list,
.workbench-col-history,
.workbench-col-patient {
    overflow: hidden;
}

.wb-search {
    padding: 12px;
    border-bottom: 1px solid #e5e6eb;
}

.wb-search input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.wb-search input:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.wb-tabs {
    overflow: hidden;
    border-bottom: 1px solid #e5e6eb;
}

.wb-tabs a {
    float: left;
    width: 50%;
    padding: 10px 0;
    color: #4e5969;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
}

.wb-tabs a.active {
    color: #245bdb;
    font-weight: bold;
    border-bottom: 2px solid #3370ff;
}

.wb-tab-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    margin: -1px 0 0 4px;
    padding: 0 5px;
    border-radius: 8px;
    background: #f54a45;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
}

.wb-patient-list {
    height: calc(100vh - 170px);
    overflow: auto;
}

.wb-card {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f1f3;
    color: inherit;
    text-decoration: none;
}

.wb-card strong,
.wb-card span,
.wb-card em {
    display: inline-block;
    margin-right: 6px;
}

.wb-card em {
    color: #245bdb;
    font-style: normal;
    font-size: 12px;
}

.wb-card.active {
    background: #e8f0ff;
}

.wb-main,
.wb-pane {
    position: relative;
    height: calc(100vh - 64px);
    overflow: hidden;
    padding: 16px;
}

.wb-main {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    background: #f5f6f7;
}

.wb-main-top {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

.wb-reject-box {
    margin: 10px 0 0;
    padding: 12px 14px;
    border: 1px solid #f5b7b7;
    border-radius: 8px;
    background: #fff2f2;
}

.wb-reject-title {
    display: block;
    margin-bottom: 8px;
    color: #a62020;
    font-size: 14px;
}

.wb-reject-item {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f5c6c6;
    color: #a62020;
    font-size: 13px;
    line-height: 24px;
}

.wb-reject-item span {
    display: inline-block;
    margin-right: 16px;
}

.wb-rx-reject-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    overflow: hidden;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    margin: 10px 0 0;
    padding: 8px 12px;
    border: 1px solid #f5b7b7;
    border-radius: 6px;
    background: #fff2f2;
    color: #a62020;
    font-size: 13px;
    line-height: 24px;
}

.wb-rx-reject-text {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 12px;
}

.wb-rx-reject-row .button {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    margin-left: 8px;
}

.rx-return-card {
    width: 860px;
}

.rx-return-list {
    margin-bottom: 14px;
    max-height: 320px;
    overflow: auto;
}

.rx-return-detail {
    display: none;
}

.rx-return-selected {
    margin-bottom: 12px;
    color: #4e5969;
    font-size: 13px;
    line-height: 22px;
}

.rx-return-pick {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.rx-return-pick.is-active {
    border-color: #3370ff;
    background: #e8f0ff;
}

.rx-return-qty {
    width: 72px;
    height: 32px;
    padding: 0 8px;
}

.rx-return-actions {
    overflow: hidden;
    margin-top: 16px;
    text-align: right;
}

.rx-return-actions .js-wb-return-back {
    float: left;
}

.rx-print-card {
    width: 760px;
    max-width: 96%;
}

.rx-print-modal-body {
    padding: 0;
    height: 520px;
    overflow: hidden;
    background: #f5f6f7;
}

.rx-print-modal-body iframe {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
    background: #f5f6f7;
}

.rx-print-modal-foot {
    overflow: hidden;
}

.wb-pane {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    padding: 0;
}

.wb-patient-form {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.wb-pane-body {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.wb-frost {
    position: absolute;
    z-index: 6;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.wb-frost form {
    margin-top: 30%;
}

.wb-frost .rx-pick-busy {
    margin-top: 30%;
    font-size: 16px;
}

.wb-pane-head {
    overflow: hidden;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e5e6eb;
    background: #fff;
}

.wb-pane-head strong,
.wb-rx-head strong,
.wb-consult-head strong,
.wb-rx-section-head strong {
    float: left;
    font-size: 16px;
    font-weight: 600;
    line-height: 32px;
}

.wb-pane-head .button,
.wb-rx-head .button,
.wb-rx-head form,
.wb-consult-head .button {
    float: right;
    margin-left: 8px;
}

.wb-rx-section-head .muted-text,
.wb-rx-section-head #rx-item-count {
    float: right;
    color: #8f959e;
    font-size: 12px;
    line-height: 32px;
}

.wb-patient-mini {
    overflow: hidden;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
}

.wb-patient-mini-info {
    float: left;
    max-width: 65%;
    padding-top: 2px;
    line-height: 24px;
}

.wb-patient-mini strong {
    margin-right: 10px;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
}

.wb-patient-mini-info span {
    margin-right: 12px;
    color: #646a73;
    font-size: 13px;
    line-height: 24px;
}

.wb-patient-mini .button,
.wb-patient-mini form {
    float: right;
    margin-left: 8px;
    white-space: nowrap;
}

.wb-rx-head {
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
}

.workbench-col-patient .form-group {
    margin-bottom: 14px;
}

.workbench-col-patient .form-group > label {
    margin-bottom: 6px;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

.workbench-col-patient .form-group input,
.workbench-col-patient .form-group select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.workbench-col-patient .form-group input:focus,
.workbench-col-patient .form-group select:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.wb-consult-section,
.wb-rx-section {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
}

.wb-consult-grid {
    overflow: hidden;
    margin: 0 -6px;
}

.wb-consult-grid .form-group {
    float: left;
    width: 33.33%;
    margin: 0 0 10px;
    padding: 0 6px;
}

.wb-consult-grid .form-group > label {
    margin-bottom: 4px;
    font-size: 12px;
}

.wb-consult-grid .form-group input {
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 4px 8px;
    font-size: 13px;
}

.wb-type-tabs {
    margin: 4px 0 10px;
}

.wb-type-tabs .record-type-option {
    width: auto;
    margin: 0 8px 8px 0;
    padding: 6px 12px;
}

.wb-type-tabs .record-type-option input {
    float: none;
    margin: 0 6px 0 0;
    vertical-align: middle;
}

.wb-type-tabs .record-type-option strong,
.wb-type-tabs .record-type-option span {
    display: inline;
    margin-left: 0;
    vertical-align: middle;
    font-size: 13px;
}

.wb-type-tabs .record-type-option span {
    display: none;
}

.wb-rx-meta {
    overflow: hidden;
    margin: 0 0 10px;
}

.wb-rx-meta .rx-tcm-fields,
.wb-rx-meta .rx-toolbar {
    float: left;
    margin: 0 16px 0 0;
}

.wb-rx-meta .rx-tcm-fields label {
    display: inline-block;
    margin: 0 12px 8px 0;
}

.wb-rx-meta .rx-tcm-fields select,
.wb-rx-meta .rx-tcm-fields input[type="number"] {
    width: auto;
    height: 32px;
    margin-left: 6px;
}

.wb-rx-meta .rx-toolbar .button {
    margin: 0 8px 8px 0;
}

.wb-search-row {
    max-width: none;
    margin: 0 0 10px;
}

.wb-rx-footer {
    overflow: hidden;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f1f2;
}

.wb-rx-footer .rx-total {
    float: left;
    margin: 6px 0 0;
    text-align: left;
}

.wb-rx-footer .button {
    float: right;
}

.workbench-col-history .wb-pane-body {
    padding: 12px 10px 14px 8px;
}

.wb-history-count {
    float: right;
    color: #8f959e;
    font-size: 12px;
    font-weight: 400;
    line-height: 32px;
}

.wb-history {
    position: relative;
    padding: 2px 0 4px 16px;
}

.wb-history:before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 5px;
    width: 2px;
    background: #e8eaed;
}

.wb-history-item {
    position: relative;
    display: block;
    margin: 0 0 10px;
    color: inherit;
    text-decoration: none;
}

.wb-history-item:last-child {
    margin-bottom: 0;
}

.wb-history-dot {
    position: absolute;
    top: 14px;
    left: -14px;
    width: 8px;
    height: 8px;
    border: 2px solid #34c724;
    border-radius: 50%;
    background: #fff;
}

.wb-history-item.is-current .wb-history-dot {
    border-color: #3370ff;
    background: #3370ff;
}

.wb-history-card {
    display: block;
    padding: 8px 8px 8px 9px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(31, 35, 41, 0.04);
}

.wb-history-item:hover .wb-history-card {
    border-color: #c9d6f5;
    background: #f7f9ff;
}

.wb-history-item.is-current .wb-history-card {
    border-color: #adc2f7;
    background: #f2f6ff;
}

.wb-history-tags {
    margin: 0 0 6px;
    line-height: 18px;
}

.wb-history-tag {
    display: inline-block;
    margin: 0 4px 0 0;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 18px;
    vertical-align: top;
}

.wb-history-tag.is-tcm {
    background: #e8f7ed;
    color: #237b4b;
}

.wb-history-tag.is-wm {
    background: #e8f0ff;
    color: #245bdb;
}

.wb-history-tag.is-mix {
    background: #f3e8ff;
    color: #6b21a8;
}

.wb-history-tag.is-rx {
    background: #e8f7ed;
    color: #237b4b;
}

.wb-history-tag.is-empty {
    background: #f2f3f5;
    color: #8f959e;
}

.wb-history-title {
    display: block;
    display: -webkit-box;
    margin: 0 0 4px;
    overflow: hidden;
    max-height: 36px;
    color: #1f2329;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    word-wrap: break-word;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.wb-history-item.is-current .wb-history-title {
    color: #1456f0;
}

.wb-history-meta {
    display: block;
    margin: 0 0 4px;
    color: #8f959e;
    font-size: 11px;
    line-height: 16px;
}

.wb-history-note,
.wb-history-drugs {
    display: block;
    overflow: hidden;
    max-height: 32px;
    color: #646a73;
    font-size: 12px;
    line-height: 16px;
    word-wrap: break-word;
}

.wb-history-drugs {
    margin-top: 4px;
    color: #8f959e;
}

.rx-tcm-fields {
    margin: 10px 0;
}

.rx-tcm-fields label {
    margin-right: 16px;
}

.allergy-text {
    color: #f54a45;
    font-style: normal;
    font-weight: 600;
}

.wb-rx-card {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding: 16px 16px 0;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    background: #fff;
}

.wb-rx-card-head {
    overflow: hidden;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    min-height: 38px;
    margin-bottom: 0;
}

.wb-rx-card-head strong {
    float: left;
    font-size: 16px;
    font-weight: 600;
    line-height: 38px;
}

.wb-rx-card-head .button {
    float: right;
}

.wb-rx-card-head .js-consult-save {
    visibility: hidden;
}

.wb-rx-card.is-rx-panel {
    padding-bottom: 0;
}

.wb-rx-form {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
    margin: 0;
}

.wb-rx-pane {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
}

.wb-rx-pane-body {
    display: -webkit-flex;
    display: flex;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
    /* 左右 16→10（W22）：开方面板内层让宽给单行开单网格，仅作用于 rx_panel */
    padding: 12px 10px;
}

.wb-rx-pane-foot {
    overflow: hidden;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    padding: 12px 16px 16px;
    border-top: 1px solid #e5e6eb;
    background: #fff;
}

.wb-rx-pane-foot .wb-rx-pack {
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e5e6eb;
    color: #646a73;
    font-size: 14px;
    line-height: 36px;
}

.wb-rx-pack-line {
    white-space: nowrap;
}

.wb-rx-pane-foot .rx-proxy-line {
    display: block;
    margin: 4px 0 0;
    line-height: 24px;
}

.wb-rx-pane-foot-bar {
    overflow: hidden;
}

/* W82 修复（RunZ27 2026-09-18）：右栏收成 44px 窄条时主列右缘=视口-44，底部
   操作条里的「提交处方」（float:right，贴 foot 内边 16px）与右下角 54px 的
   「消息通知」悬浮钮（fixed right:24/bottom:24，垂直上两者都贴近视口底缘）
   交叠——1280×577 实测重叠 54px，点提交会误开通知浮窗。收窄形态下操作条
   右端留 70px 让位（悬浮钮 54px + 间隙），提交钮完整可点；右栏展开（200px）
   时主列离视口右缘远，无需让位、版式不变。 */
.workbench-table.is-history-collapsed .wb-rx-pane-foot-bar {
    padding-right: 70px;
}

.wb-rx-pane-foot .rx-total-block {
    float: left;
    max-width: 62%;
}

.wb-rx-pane-foot .js-rx-submit {
    float: right;
    min-width: 112px;
    height: 36px;
    padding: 0 20px;
    font-size: 14px;
    line-height: 34px;
}

.rx-total-line {
    color: #1f2329;
    font-size: 14px;
    line-height: 28px;
}

.rx-total-label {
    color: #646a73;
}

.rx-total-line strong {
    color: #f54a45;
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
}

/* RunU 方案2（Vinson 2026-09-18 拍板）：总计旁 ? 圆钮 hover/focus 展开附加费明细，
   移出/失焦收起，不占常驻空间；无附加费时 JS 整钮隐藏。
   气泡由 JS 挂 document.body + position:fixed（防表格容器 overflow 裁切，同药品检索下拉），
   Chrome 49 只用 border-radius/box-shadow 等老特性，无 grid/sticky/gap/CSS 变量。 */
.rx-fee-q {
    display: none;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid #8f959e;
    border-radius: 50%;
    background: transparent;
    color: #8f959e;
    font-family: inherit;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    vertical-align: middle;
}

.rx-fee-q:hover,
.rx-fee-q:focus {
    border-color: #3370ff;
    color: #3370ff;
    outline: none;
}

.rx-fee-pop {
    position: fixed;
    z-index: 1200;
    display: none;
    min-width: 180px;
    max-width: 320px;
    padding: 8px 12px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    background: #fff;
    color: #4e5969;
    font-size: 12px;
    line-height: 20px;
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.12);
}

.rx-fee-pop-table {
    border-collapse: collapse;
}

.rx-fee-pop-table td {
    padding: 1px 0;
    white-space: nowrap;
}

.rx-fee-pop-name {
    padding-right: 18px;
}

.rx-fee-pop-amt {
    text-align: right;
    color: #1f2329;
}

/* Z131（T-60，Vinson 2026-09-23）：总计旁「编辑附加费」蓝色文字按钮——
   列表有药品且给药方式拉出了附加费才由 JS 显示；无附加费（含中药纯代煎费）隐藏 */
.rx-fee-edit {
    display: none;
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3370ff;
    font-family: inherit;
    font-size: 13px;
    line-height: 20px;
    cursor: pointer;
    vertical-align: middle;
}

.rx-fee-edit:hover,
.rx-fee-edit:focus {
    color: #1e54d0;
    text-decoration: underline;
    outline: none;
}

/* 编辑附加费弹窗（样式对齐退药二级弹窗 rx-return-card） */
.rx-fee-edit-card {
    width: 520px;
}

.rx-fee-edit-lead {
    margin: 0 0 12px;
    color: #86909c;
    font-size: 12px;
    line-height: 20px;
}

.rx-fee-edit-table .js-fee-edit-row.is-deleted td {
    color: #86909c;
}

.rx-fee-edit-del {
    color: #86909c;
}

.rx-fee-edit-del .rx-fee-edit-restore {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3370ff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}

.rx-fee-edit-table .rx-fee-edit-del-btn {
    padding: 2px 10px;
    border: 1px solid #e5e6eb;
    border-radius: 4px;
    background: #fff;
    color: #4e5969;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.rx-fee-edit-table .rx-fee-edit-del-btn:hover {
    border-color: #f53f3f;
    color: #f53f3f;
}

.rx-fee-edit-actions {
    overflow: hidden;
    margin-top: 16px;
    text-align: right;
}

.wb-field-row {
    overflow: hidden;
}

.wb-rx-tcm-fields {
    position: relative;
    z-index: 20;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.wb-rx-tcm-fields .wb-field {
    margin-bottom: 8px;
}

.wb-rx-tcm-fields .wb-label {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 18px;
}

.wb-rx-tcm-row {
    overflow: visible;
}

.wb-rx-tcm-row::after {
    content: "";
    display: table;
    clear: both;
}

.wb-rx-tcm-row .wb-field {
    float: left;
    width: 48%;
    margin-right: 4%;
    margin-bottom: 8px;
}

.wb-rx-tcm-row .wb-field + .wb-field {
    margin-right: 0;
}

.wb-rx-tcm-row.is-triple .wb-field {
    width: 32%;
    margin-right: 2%;
}

.wb-rx-tcm-row.is-triple .wb-field + .wb-field + .wb-field {
    margin-right: 0;
}

.wb-rx-input,
.wb-rx-select {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.wb-rx-select {
    padding-right: 24px;
}

.wb-rx-input.is-readonly {
    color: #646a73;
    background: #fff;
}

.wb-rx-input:focus,
.wb-rx-select:focus {
    border-color: #1f4fd8;
    box-shadow: 0 0 0 2px rgba(31, 79, 216, 0.28);
}

.wb-rx-input.is-error,
.wb-rx-select.is-error,
.wb-rx-input.is-error:focus,
.wb-rx-select.is-error:focus {
    border-color: #d83931;
    box-shadow: 0 0 0 2px rgba(216, 57, 49, 0.22);
}

.wb-rx-input:-webkit-autofill,
.wb-rx-input:-webkit-autofill:hover,
.wb-rx-input:-webkit-autofill:focus,
.wb-rx-select:-webkit-autofill,
.wb-rx-select:-webkit-autofill:hover,
.wb-rx-select:-webkit-autofill:focus {
    border-color: #dee0e3;
    -webkit-text-fill-color: #1f2329;
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-transition: background-color 99999s ease-out;
    transition: background-color 99999s ease-out;
}

.wb-rx-input:-webkit-autofill:focus,
.wb-rx-select:-webkit-autofill:focus {
    border-color: #1f4fd8;
    -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 2px rgba(31, 79, 216, 0.28);
    box-shadow: 0 0 0 1000px #fff inset, 0 0 0 2px rgba(31, 79, 216, 0.28);
}

.wb-rx-search {
    position: relative;
}

.wb-rx-search .dx-dropdown {
    z-index: 40;
}

.wb-rx-search .dx-dropdown.is-fixed {
    position: fixed;
    right: auto;
    z-index: 1200;
}

/* 药名检索下拉（RunR ①）：候选主行改为「名称 商品名 规格」半角单空格拼接，
   比输入框宽，给个下限避免换行成三行；pinDropdown 的行内 width 仍会放大它 */
.wb-rx-search .rx-drug-drop {
    min-width: 300px;
}

.wb-rx-table-block {
    display: -webkit-flex;
    display: flex;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    -webkit-flex-direction: column;
    flex-direction: column;
    min-height: 220px;
    margin-top: 2px;
    /* 左右 12→6（W22）：灰框内层让宽给单行开单网格/中药表格 */
    padding: 10px 6px 8px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #f7f8fa;
}

.wb-rx-table-head-wrap {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    overflow-x: hidden;
    overflow-y: scroll;
    background: transparent;
}

.wb-rx-table-body-wrap {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 120px;
    overflow-x: hidden;
    overflow-y: scroll;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
}

.wb-rx-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.wb-rx-table th {
    padding: 0 8px 8px 0;
    color: #8f959e;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
    line-height: 20px;
    border-bottom: 0;
}

.wb-rx-table-head-wrap .wb-rx-table th:first-child,
.wb-rx-table-body-wrap .wb-rx-table td:first-child {
    padding-left: 10px;
}

.wb-rx-table td {
    padding: 8px 8px 8px 0;
    vertical-align: middle;
    border-bottom: 1px solid #f0f1f3;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

.wb-rx-table .rx-editor-row td {
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8ebf0;
    background: #f5f8ff;
}

.wb-rx-table .rx-editor-row .wb-rx-input,
.wb-rx-table .rx-editor-row .wb-rx-select {
    border-color: #c9d6f5;
    background: #fff;
}

.wb-rx-table .rx-added td {
    height: 44px;
    background: #fff;
}

.wb-rx-table-body-wrap .wb-rx-table .rx-added:last-child td {
    border-bottom: 0;
}

/* ── 西药/输液开单行 div 单行布局（2026-09-17 W21：表头一行、一条数据一行）─────
   W22 合并视觉列（Run Q）：一行 = 药品(弹性吃满剩余) + 用法 + 用量(数量+单位
   .rx-pair 并排) + 频次 + 天数 + 总量(数量+单位并排) + 操作（视觉 6 列 + 操作）。
   RunR 收口（2026-09-17）：Run Q 实测仍溢出 915px，根因是 .rx-grid-cell 作为
   flex item 的 min-width:auto 被 pair 输入框固有宽度（~165px）顶开——116px 的
   用量/总量列实排 229px。修复：cell 显式 min-width:0（列宽回到 flex-basis），
   并按派单 ②③ 重排：单位下拉 56→80px、频次 94→112px、用法 94→102px、
   天数 50→46、操作 70→64。RunT（2026-09-18）修 W30：用法列 102→114px
   （下拉零裁切），定宽列合计 624（122+136+120+46+136+64）+ 行内距 12 +
   药名下限 150 = 786。
   Z35 W59（2026-09-19）：1440 档右栏常驻时网格容器实测仅 735px，786 地板
   必横滚。用法 122（W30 红线）/频次 120/单位下拉 80（W6 红线）/天数 46/
   操作 64 均有 test_rx_panel_fit 守护不动；改收两处：用量/总量列 136→130
   （数值框让 6px，单位下拉 80 不动）、药名下限 150→105：
   定宽列合计 612（122+130+120+46+130+64）+ 行内距 12 + 药名下限 105 = 729，
   留 6px 余量；容器不足 729 的档位仍走兜底横滚。
   配合 <1400 收右栏（RunT 回调，1440 档右栏常驻；RunV ②起收起态为可展开
   窄条 .is-history-collapsed）+ <1366/展开档案收患者列表窄条
   （见上方 .is-list-collapsed）；放不下时网格内横向滚动兜底。
   cell 的 flex-basis 含 8px 右内距，控件实际宽 = basis - 8；
   频次下拉 112px 覆盖字典最长值（4 汉字 56px + 内距 34px）与「选择频次」。
   中药面板仍走 table。 */
.wb-rx-grid-scroll {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 120px;
    overflow-x: auto;
    /* 垂直方向交给外层 .wb-rx-pane-body 滚；这里 hidden 避免 Win7 经典滚动条
       白吃 ~15px 宽（scroll 会常驻一条永远滚不动的竖条） */
    overflow-y: hidden;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
}

.rx-grid-line {
    display: -webkit-flex;
    display: flex;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-align-items: center;
    align-items: center;
    /* 单行最小需求（Z35 W59）：定宽列 612（122+130+120+46+130+64）
       + 行内距 12 + 药名下限 105 = 729，1440 档容器 735 放得下 */
    min-width: 729px;
    padding: 0 4px 0 8px;
}

.rx-grid-cell {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    /* 关键（RunR）：flex item 默认 min-width:auto 会被控件固有宽度顶开，
       Run Q 的 915px 溢出即由此而来；显式归零让列宽严格服从 flex-basis。
       药名列的下限由 .rx-col-name 自己的 min-width 单独兜底。 */
    min-width: 0;
    padding-right: 8px;
    vertical-align: middle;
}

/* 表头行：标签不折行，与下方控件逐列同宽（同 rx-col-* flex 参数） */
.wb-rx-grid-head {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    padding-top: 4px;
    padding-bottom: 6px;
    color: #8f959e;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}

/* 药品列弹性吃满剩余（两档视口下 ~250-330px），下限保检索可打字
   （Z35 W59：150→105，为 1440 档不横滚让位；弹性 basis 160 不变，
   宽档药名列仍优先吃满剩余宽） */
.rx-col-name {
    -webkit-flex: 1 1 160px;
    flex: 1 1 160px;
    min-width: 105px;
}

/* 用法 122px（RunT 修 W30）：下拉 114px，canvas 实测「选择用法」「静脉滴注」
   均需 56px，RunR 的 102px 总宽减内距与箭头后可用仅 48px，界面截成「选择用」。
   114px + 网格内右内距 20px（见 .wb-rx-grid-scroll 下拉规则）→ 可用 64px，
   留 8px 跨平台字体余量（Win7 微软雅黑 vs 开发机苹方度量有差） */
.rx-col-usage {
    -webkit-flex: 0 0 122px;
    flex: 0 0 122px;
}

/* 用量/总量合并列：数值框(弹性) + 单位下拉(80px) 在 .rx-pair 内并排
   （Z35 W59：136→130，数值框收 6px；单位下拉 80 是 W6 红线不动） */
.rx-col-dose {
    -webkit-flex: 0 0 130px;
    flex: 0 0 130px;
}

/* 频次 120px（派单 ② ≥110 / W6 截断红线，test_rx_panel_fit 钉死不动）：
   「选择频次」与字典最长「隔日一次」均完整显示 */
.rx-col-freq {
    -webkit-flex: 0 0 120px;
    flex: 0 0 120px;
}

.rx-col-days {
    -webkit-flex: 0 0 46px;
    flex: 0 0 46px;
}

.rx-col-qty {
    -webkit-flex: 0 0 130px;
    flex: 0 0 130px;
}

/* 操作列定宽（RunR 70→64）：清空(32，紧凑内距) + 2 间隙 + ⊕(24) ≈ 58，
   实测字体度量再宽几像素故取 64；已列行只有删除图标。再压到派单建议的 52
   需清空按钮零内距贴边（clipping），64 是保「清空」完整可读的下限 */
.rx-col-act {
    -webkit-flex: 0 0 64px;
    flex: 0 0 64px;
    padding-right: 0;
    white-space: nowrap;
}

.rx-grid-item {
    padding: 8px 4px 8px 8px;
    border-bottom: 1px solid #f0f1f3;
}

/* 编辑器行（蓝底）；与表头/已列行同列同源，天然逐列对齐 */
.wb-rx-grid-scroll .js-rx-editor.rx-editor-row {
    padding: 10px 4px 10px 8px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: #f5f8ff;
}

.wb-rx-grid-scroll .js-rx-editor.rx-editor-row .wb-rx-input,
.wb-rx-grid-scroll .js-rx-editor.rx-editor-row .wb-rx-select {
    border-color: #c9d6f5;
    background: #fff;
}

/* 已列行块行尾去边线 */
.wb-rx-grid-scroll .js-rx-list .rx-grid-item:last-child {
    border-bottom: 0;
}

/* 已列行内控件与药名文本，与中药 table 版观感一致 */
.wb-rx-grid-scroll .rx-grid-item .wb-rx-input,
.wb-rx-grid-scroll .rx-grid-item .wb-rx-select {
    width: 100%;
    height: 34px;
    border-color: #d0d3d6;
    background: #fff;
}

/* 合并列内部：数值框弹性 + 单位下拉定 80px（派单 ② ≥78，RunR 56→80：
   完整显示「单位」与「片」「袋」「ml」等选中值）；表头成对标签同构对齐 */
.rx-pair {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.wb-rx-grid-scroll .rx-grid-cell .rx-pair .wb-rx-input {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    padding: 0 6px;
}

.wb-rx-grid-scroll .rx-grid-cell .rx-pair .wb-rx-select {
    -webkit-flex: 0 0 80px;
    flex: 0 0 80px;
    width: 80px;
    padding: 0 18px 0 6px;
}

/* RunT 修 W30：网格内整格下拉（用法/频次）右内距 24→20。全局 .wb-rx-select 的
   24px 在 102px 总宽下把可用文本区压到 48px，canvas 实测「选择用法」需 56px
   被截成「选择用」。减 4px 内距后：频次 112px 可用 58→62px、「选择频次」56px
   由 2px 薄余量加固到 6px；配合用法列 110→122px 可用 64px。 */
.wb-rx-grid-scroll .rx-grid-cell > .wb-rx-select {
    padding-right: 20px;
}

.wb-rx-grid-head .rx-hdr-pair .rx-hdr-num {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
}

.wb-rx-grid-head .rx-hdr-pair .rx-hdr-unit {
    -webkit-flex: 0 0 80px;
    flex: 0 0 80px;
}

.wb-rx-grid-scroll .rx-grid-item .wb-rx-input:focus,
.wb-rx-grid-scroll .rx-grid-item .wb-rx-select:focus {
    border-color: #1f4fd8;
    box-shadow: 0 0 0 2px rgba(31, 79, 216, 0.28);
}

/* 药名文本：给行首编组勾选框（16+6）与库存不足角标（16+6）留位后省略号截断 */
.wb-rx-grid-scroll .rx-grid-cell .rx-name-text {
    display: inline-block;
    max-width: calc(100% - 56px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 34px;
}

.wb-rx-grid-scroll .rx-grid-item.is-stock-lack .rx-name-text {
    max-width: calc(100% - 76px);
    color: #d9480f;
}

/* 编组勾选框并入药品列行首（单行布局不再单设勾选列） */
.wb-rx-grid-scroll .rx-col-name .rx-check-wrap {
    margin-right: 6px;
    vertical-align: middle;
}

/* 药名 cell 内的编组条 + 文本排布 */
.wb-rx-grid-scroll .rx-col-name .rx-group-bar {
    display: none;
    float: left;
    margin: 8px 8px 0 0;
}

.wb-rx-grid-scroll .rx-grid-item.is-grouped-lead .rx-col-name .rx-group-bar,
.wb-rx-grid-scroll .rx-grid-item.is-grouped-follow .rx-col-name .rx-group-bar {
    display: block;
}

/* 默认行「清空」按钮（只清数据不移除行，2026-09-17 派单 §B.6）；
   RunR 紧凑化（内距 8→3、右距 4→2）配合操作列 70→56，仍完整显示「清空」 */
.rx-clear-btn {
    height: 24px;
    margin-right: 2px;
    padding: 0 3px;
    border: 1px solid #c9cdd4;
    border-radius: 4px;
    background: #fff;
    color: #4e5969;
    font-size: 12px;
    line-height: 22px;
    vertical-align: middle;
    cursor: pointer;
}

.rx-clear-btn:hover {
    border-color: #3370ff;
    color: #245bdb;
}

.form-group-full {
    clear: both;
    width: 100%;
    margin-bottom: 18px;
}

.checkbox-row {
    clear: both;
    padding-top: 4px;
    margin-bottom: 8px;
}

.checkbox-row .checkbox-line {
    display: inline-block;
    margin-top: 0;
    margin-right: 28px;
    vertical-align: middle;
    cursor: pointer;
}

.checkbox-row .checkbox-line input {
    width: auto;
    height: auto;
    margin-right: 7px;
    vertical-align: middle;
}

.tag-input-field {
    position: relative;
}

.tag-input {
    position: relative;
    min-height: 40px;
    padding: 4px 32px 4px 8px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    cursor: text;
}

.tag-input.is-focused {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.tag-input-inner {
    overflow: hidden;
}

.tag-input-chip {
    display: inline-block;
    max-width: 100%;
    margin: 3px 6px 3px 0;
    padding: 2px 6px 2px 8px;
    border: 1px solid #d3e0ff;
    border-radius: 4px;
    background: #eef3ff;
    color: #1f2329;
    font-size: 13px;
    line-height: 22px;
    vertical-align: middle;
}

.tag-input-chip-text {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.tag-input-chip-remove {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8f959e;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}

.tag-input-chip-remove:hover {
    background: #dbe4ff;
    color: #1f2329;
}

.tag-input-editor {
    display: inline-block;
    width: 160px;
    min-width: 120px;
    max-width: 100%;
    height: 28px !important;
    margin: 3px 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    vertical-align: middle;
    outline: none;
}

.tag-input-clear {
    display: none;
    position: absolute;
    top: 50%;
    right: 8px;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #8f959e;
    font-size: 16px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
}

.tag-input.has-value .tag-input-clear {
    display: block;
}

.tag-input-clear:hover {
    background: #e5e6eb;
    color: #1f2329;
}

/* Z49 别名框：清空走框内左下文字链接（非右上圆圈 ×），右侧不留圆圈按钮的空位 */
.alias-tags-box {
    padding-right: 8px;
}

/* Z49「全部清空」：小号蓝色文字链接（无边框、12px、下划线），有标签才显示 */
.tag-input-clear-text {
    display: none;
    margin: 1px 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3370ff;
    font-size: 12px;
    line-height: 18px;
    text-decoration: underline;
    cursor: pointer;
}

.tag-input.has-value .tag-input-clear-text {
    display: inline-block;
}

.tag-input-clear-text:hover {
    color: #1e5bd6;
}

.tag-input-dropdown {
    display: none;
    position: absolute;
    z-index: 40;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.12);
}

.tag-input-dropdown.is-open {
    display: block;
}

.tag-input-hit {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid #f0f1f2;
    background: #fff;
    color: #1f2329;
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.tag-input-hit:last-child {
    border-bottom: 0;
}

.tag-input-hit:hover,
.tag-input-hit.is-active {
    background: #eef4ff;
}

.tag-input-empty {
    display: none;
    padding: 10px 12px;
    color: #8f959e;
    font-size: 12px;
}


.wb-rx-form.is-tcm .wb-rx-table .rx-col-name {
    width: auto;
}

/* 中药三列微调（2026-09-17 W18）：96/80/80 → 92/78/78，药名列 1280 视口下
   199px → ≥207px，跨过 200px 红线；1440 下随之 359 → ≥371px */
.wb-rx-form.is-tcm .wb-rx-table .rx-col-usage {
    width: 92px;
}

.wb-rx-form.is-tcm .wb-rx-table .rx-col-dose {
    width: 78px;
}

.wb-rx-form.is-tcm .wb-rx-table .rx-col-unit {
    width: 78px;
}

/* W18 加固（2026-09-18 RunZ2）：上轮三列收窄后 1280 视口药名框 ~207px，本轮
   门槛 ≥220px（与西药面板同规格）。只把药名列自身的左右内距（10+8px）让给
   药名框：table-layout:fixed 下药名框宽 = 药名列整列宽，1280 下 ~225px ≥220、
   1440 下 ~377px ≥ 上轮 359px；其它列宽（92/78/78/40）与面板布局不动。
   表头/数据两张表同步生效，保持列对齐 */
.wb-rx-form.is-tcm .wb-rx-table th.rx-col-name,
.wb-rx-form.is-tcm .wb-rx-table td.rx-col-name {
    padding-left: 0;
    padding-right: 0;
}

.wb-rx-table .rx-col-act {
    width: 40px;
    padding-right: 0;
    text-align: center;
}

.wb-rx-table .wb-rx-input,
.wb-rx-table .wb-rx-select {
    height: 34px;
    font-size: 14px;
}

.wb-rx-table .rx-added .wb-rx-input,
.wb-rx-table .rx-added .wb-rx-select {
    width: 100%;
    border-color: #d0d3d6;
    background: #fff;
}

.wb-rx-table .rx-editor-row .wb-rx-input:focus,
.wb-rx-table .rx-editor-row .wb-rx-select:focus,
.wb-rx-table .rx-added .wb-rx-input:focus,
.wb-rx-table .rx-added .wb-rx-select:focus {
    border-color: #1f4fd8;
    box-shadow: 0 0 0 2px rgba(31, 79, 216, 0.28);
}

.wb-rx-table .rx-drug-cell .wb-rx-input {
    width: 100%;
}

.wb-rx-table .rx-name-text {
    display: inline-block;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.wb-rx-table .rx-added.is-stock-lack .rx-name-text {
    max-width: calc(100% - 40px);
    color: #d9480f;
}

.rx-stock-lack {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 8px;
    background: #d9480f;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
    cursor: default;
}

.rx-icon-btn {
    display: inline-block;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    vertical-align: middle;
    line-height: 24px;
    cursor: pointer;
}

.rx-icon-btn img {
    display: block;
    width: 24px;
    height: 24px;
}

.rx-group-bar {
    display: none;
    float: left;
    width: 8px;
    height: 18px;
    margin: 2px 8px 0 0;
    border-left: 2px solid #3370ff;
}

.rx-spec-text {
    margin-left: 6px;
    color: #8f959e;
    font-size: 12px;
}

.rx-check-wrap {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.wb-rx-pack {
    color: #646a73;
    font-size: 14px;
    line-height: 36px;
}

.rx-num {
    width: 52px;
    margin: 0 4px;
    text-align: center;
    vertical-align: middle;
}

.rx-proxy-line {
    color: #1f2329;
}

.rx-template-card {
    width: 920px;
}

.rx-template-body {
    padding: 0;
}

.rx-template-split {
    width: 100%;
}

.rx-tpl-left {
    width: 320px;
    border-right: 1px solid #eff0f1;
}

.rx-tpl-filter {
    overflow: hidden;
    padding: 12px;
    border-bottom: 1px solid #eff0f1;
}

.rx-tpl-filter input {
    float: left;
    width: 58%;
    height: 32px;
    box-sizing: border-box;
}

.rx-tpl-filter select {
    float: right;
    width: 38%;
    height: 32px;
    box-sizing: border-box;
}

.rx-tpl-list {
    height: 420px;
    overflow: auto;
}

.rx-tpl-item {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f5f6f7;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.rx-tpl-item:hover,
.rx-tpl-item.is-active {
    background: #e8f3ff;
}

/* 历史处方 modal 里与本面板类型不符的卡片：置灰禁用感（真正拦截在 applyDraft） */
.rx-tpl-item.is-disabled,
.rx-tpl-item.is-disabled:hover {
    background: #f4f5f7;
    color: #b0b6bf;
    cursor: not-allowed;
}

.rx-tpl-item.is-disabled strong,
.rx-tpl-item.is-disabled span {
    color: #b0b6bf;
}

.rx-tpl-item strong {
    display: block;
    color: #1f2329;
    font-size: 14px;
}

.rx-tpl-item span {
    display: block;
    margin-top: 4px;
    color: #8f959e;
    font-size: 12px;
}

/* W79（Run Z24a）历史处方卡片行内版式：时间/类型/味数/状态徽标一行排开，
   右端 chevron 提示可点；覆写上方 .rx-tpl-item strong/span 的块级默认 */
.rx-tpl-item .rx-history-head strong,
.rx-tpl-item .rx-history-head span {
    display: inline-block;
    margin-top: 0;
    vertical-align: middle;
}

.rx-tpl-item .rx-history-head strong {
    margin-right: 8px;
}

.rx-tpl-item .rx-history-head .tag,
.rx-tpl-item .rx-history-head .muted-text {
    margin-right: 8px;
}

.rx-history-chevron {
    float: right;
    color: #b0b6bf;
    font-size: 18px;
    line-height: 1;
    font-family: Arial, sans-serif;
}

/* 驳回原因/驳回人/驳回时间（W79）：有值才渲染，红字自然换行 */
.rx-tpl-item .rx-history-reject {
    color: #a62020;
    line-height: 18px;
    word-break: break-all;
}

/* 作废行只读置灰时徽标一并降灰，保持整行一致 */
.rx-tpl-item.is-disabled .status-tag {
    background: #f4f5f7;
    color: #b0b6bf;
}

.rx-tpl-right {
    vertical-align: top;
}

.rx-tpl-detail {
    height: 476px;
    overflow: auto;
    padding: 16px;
}

.rx-tpl-detail h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.rx-tpl-detail p {
    margin: 0 0 12px;
    color: #646a73;
    font-size: 13px;
}

.rx-tpl-detail .data-table {
    margin: 0;
}

.rx-stock-lack-card {
    width: 860px;
}

.rx-stock-lack-lead {
    margin: 0 0 14px;
    color: #646a73;
    font-size: 13px;
    line-height: 22px;
}

/* Z114：低库存/无库存警示统一红（低库存原橙 #ad6800 改红）；红值复用
   .required 必填星 / .quantity-out 超量红的 #f54a45，不新造色值 */
.dx-hit.is-low-stock em,
.dx-hit.is-out-stock em,
.dx-low-stock,
.dx-out-stock {
    display: inline-block;
    margin-left: 6px;
    color: #f54a45;
    font-style: normal;
    font-size: 12px;
}

.dx-hit.is-low-stock span,
.dx-hit.is-out-stock span {
    color: #f54a45;
}

.wb-panel-tabs {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: flex-end;
    align-items: flex-end;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    overflow: hidden;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    min-height: 42px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 1px solid #e5e6eb;
}

.wb-panel-tabs-nav {
    overflow: hidden;
}

.wb-panel-tabs-actions {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    min-height: 32px;
    padding-bottom: 4px;
    white-space: nowrap;
}

.wb-panel-tabs-actions .button {
    margin-left: 8px;
}

.wb-rx-card-body {
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 12px 16px 16px;
}

.wb-panel-tabs-nav a {
    float: left;
    margin-right: 28px;
    padding: 8px 0;
    color: #646a73;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.wb-panel-tabs-nav a.active {
    color: #3370ff;
    border-bottom-color: #3370ff;
}

.wb-field {
    margin-bottom: 14px;
}

.wb-label {
    display: block;
    margin-bottom: 6px;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

.wb-fixed-textarea,
.wb-field .dx-input,
.history-textarea,
.pe-grid input {
    width: 100%;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    outline: none;
}

.wb-fixed-textarea,
.history-textarea {
    height: 56px;
    padding: 7px 10px;
    line-height: 20px;
    resize: none;
    overflow: auto;
}

.wb-field .dx-input,
.pe-grid input {
    height: 36px;
    padding: 0 10px;
}

.wb-field .dx-input {
    padding-right: 56px;
}

.wb-fixed-textarea:focus,
.wb-field .dx-input:focus,
.history-textarea:focus,
.pe-grid input:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.dx-row-body {
    position: relative;
}

.dx-row-body.has-remove {
    padding-right: 30px;
}

.dx-row-input {
    position: relative;
}

.dx-custom-tag {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #ff8800;
    font-size: 12px;
    line-height: 20px;
}

.dx-remove {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    line-height: 22px;
    cursor: pointer;
}

.dx-row-body .dx-remove {
    position: absolute;
    top: 7px;
    right: 0;
}

.dx-remove img {
    display: block;
    width: 22px;
    height: 22px;
}

.dx-dropdown {
    display: none;
    position: absolute;
    z-index: 30;
    top: 38px;
    right: 0;
    left: 0;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    background: #fff;
}

.dx-dropdown.is-fixed {
    position: fixed;
    right: auto;
    z-index: 1200;
}

.rx-select-drop {
    min-width: 160px;
    max-height: 240px;
}

.dx-hit {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.dx-hit:hover,
.dx-hit.is-active {
    background: #eef4ff;
}

.dx-hit span {
    display: block;
    color: #8f959e;
    font-size: 12px;
}

/* W49：中药同义名命中小标（药名后淡灰别名，不写说明文案） */
.dx-alias {
    display: inline-block;
    margin-left: 6px;
    color: #a8adb5;
    font-size: 12px;
    font-style: normal;
}

.dx-empty {
    padding: 10px 12px;
    color: #8f959e;
    font-size: 12px;
}

.wb-add-link {
    display: inline-block;
    margin: 2px 0 14px;
    color: #3370ff;
    font-size: 14px;
    line-height: 22px;
    text-decoration: none;
}

.wb-add-link img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: -3px;
}

.pe-block,
.pe-sub {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 6px;
    background: #f5f6f7;
}

.pe-sub {
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #dee0e3;
}

.pe-block > .pe-body > .pe-sub:last-child {
    margin-bottom: 0;
}

.pe-toggle {
    display: block;
    position: relative;
    width: 100%;
    padding-right: 20px;
    color: #1f2329;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    cursor: pointer;
}

.pe-toggle:after {
    position: absolute;
    top: 8px;
    right: 4px;
    width: 0;
    height: 0;
    border-top: 6px solid #8f959e;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    content: "";
}

.pe-block.is-open > .pe-toggle:after,
.pe-sub.is-open > .pe-toggle:after {
    top: 6px;
    border-top: 0;
    border-bottom: 6px solid #8f959e;
}

.pe-sub .pe-body,
.pe-sub .pe-sub-body,
.pe-block .pe-body {
    display: none;
    margin-top: 12px;
}

.pe-block.is-open > .pe-body,
.pe-sub.is-open > .pe-sub-body {
    display: block;
}

.pe-grid {
    overflow: hidden;
}

.pe-grid label {
    float: left;
    width: 48%;
    margin: 0 2% 12px 0;
    color: #1f2329;
    font-size: 14px;
    line-height: 22px;
}

/* 体格检查「值 空格 单位」（2026-09-16 试跑 §3）：值在输入框里，单位在框右侧，
   用 8px 间隙呈现空格；血压拆收缩压/舒张压两框、中缝「/」、单位下拉。
   全部用 table/float 布局，兼容 Chrome 49。 */
.pe-value-row {
    display: table;
    width: 100%;
    margin-top: 6px;
}

.pe-value-cell {
    display: table-cell;
}

.pe-value-cell input {
    width: 100%;
}

.pe-unit-cell {
    display: table-cell;
    width: 1%;
    padding-left: 8px;
    white-space: nowrap;
    vertical-align: middle;
    color: #646a73;
    font-size: 14px;
    line-height: 36px;
}

.pe-unit-cell.is-select {
    width: 76px;
}

.pe-unit-cell select {
    width: 100%;
    height: 36px;
    padding: 0 4px;
    border: 1px solid #dee0e3;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: #1f2329;
    outline: none;
}

.pe-value-cell input:focus,
.pe-unit-cell select:focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px #e8f0ff;
}

.pe-bp-sep {
    display: table-cell;
    width: 18px;
    text-align: center;
    vertical-align: middle;
    color: #1f2329;
    font-size: 14px;
    line-height: 36px;
}

.exam-thumbs {
    overflow: hidden;
}

.exam-thumb,
.exam-add {
    position: relative;
    float: left;
    width: 72px;
    height: 72px;
    margin: 0 8px 8px 0;
    overflow: hidden;
    border: 1px dashed #c9cdd4;
    border-radius: 6px;
    background: #fff;
}

.exam-thumb img {
    display: block;
    width: 72px;
    height: 72px;
}

.exam-thumb .dx-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
}

.exam-thumb .dx-remove img {
    width: 18px;
    height: 18px;
}

.exam-add {
    color: #8f959e;
    font-size: 28px;
    line-height: 72px;
    text-align: center;
    cursor: pointer;
}

.exam-add input {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.pager {
    margin-top: 16px;
    color: #646a73;
}

.pager a {
    margin-right: 12px;
}

.sidebar-footer a {
    color: #646a73;
}

.admin-modal-card {
    width: 480px;
}

.admin-modal-card .form-group {
    margin-bottom: 14px;
}

.admin-modal-card .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #646a73;
    font-size: 13px;
}

.admin-modal-card .form-group input[type="text"],
.admin-modal-card .form-group input[type="password"],
.admin-modal-card .form-group input[type="number"],
.admin-modal-card .form-group select {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.check-grid .check-line {
    display: block;
    margin: 0 0 8px;
}

.suggest-field {
    position: relative;
}

.suggest-drop {
    position: absolute;
    z-index: 40;
    top: 38px;
    right: 0;
    left: 0;
    overflow: auto;
    max-height: 200px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.12);
}

.suggest-drop .dx-hit {
    height: 40px;
    padding: 6px 12px;
    box-sizing: border-box;
}

.suggest-drop .dx-hit strong {
    display: block;
    overflow: hidden;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.modal-open {
    overflow: hidden;
}

.wb-dept,
.wb-dept-name {
    padding: 8px 12px 0;
    color: #4e5969;
    font-size: 12px;
}

.wb-dept select {
    width: 100%;
    height: 32px;
}

.wb-dept-name.is-empty {
    color: #d83931;
}

.split-layout {
    width: 100%;
    border-collapse: separate;
    border-spacing: 16px 0;
    table-layout: fixed;
}

.split-left {
    width: 300px;
    vertical-align: top;
}

.split-right {
    vertical-align: top;
}

.split-panel {
    margin-bottom: 0;
}

.split-search {
    overflow: hidden;
    padding: 10px 12px;
    border-bottom: 1px solid #eff0f1;
}

.split-search input {
    float: left;
    width: 70%;
    height: 32px;
    box-sizing: border-box;
}

.split-search .button {
    float: right;
}

.dept-nav {
    height: 520px;
    overflow: auto;
}

.dept-nav-row {
    padding: 8px 12px;
    border-bottom: 1px solid #f5f6f7;
}

.dept-nav-row.is-current {
    background: #e8f3ff;
}

.dept-nav-link {
    color: #1f2329;
    text-decoration: none;
    vertical-align: middle;
}

.dept-indent {
    display: inline-block;
    vertical-align: middle;
}

.dept-toggle {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 6px;
    padding: 0;
    border: 1px solid #d0d3d6;
    border-radius: 3px;
    background: #fff;
    color: #4e5969;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
}

.dept-toggle.is-leaf {
    border-color: transparent;
    background: transparent;
    color: #c9cdd4;
    cursor: default;
}

.dept-name-input {
    display: inline-block;
    width: 240px;
    max-width: 72%;
    vertical-align: middle;
}

.modal-search {
    overflow: hidden;
    padding: 12px 20px 0;
}

.modal-search input {
    float: left;
    width: 72%;
    height: 32px;
    box-sizing: border-box;
}

.modal-search .button {
    float: right;
}


/* ===== 药品档案：自动填充底色统一压回白底（Chrome autofill 蓝底失焦不消失） ===== */
.form-card input:-webkit-autofill,
.form-card input:-webkit-autofill:hover,
.form-card input:-webkit-autofill:focus,
.form-card textarea:-webkit-autofill,
.form-card select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

/* ===== 药品档案：适应症诊断检索下拉 =====
   挂在 body 上由 JS 用 fixed 定位（.form-columns 有 overflow:hidden 会裁切
   绝对定位下拉，与药品检索下拉同一种解法），层级高于表单内容 */
.indication-dropdown {
    display: none;
    position: fixed;
    z-index: 60;
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(31, 35, 41, 0.12);
}

.indication-dropdown.is-open {
    display: block;
}

.indication-dropdown .indication-empty {
    display: none;
    padding: 10px 12px;
    color: #8f959e;
    font-size: 12px;
}

.indication-dropdown.is-empty .indication-empty {
    display: block;
}

.indication-hit {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    background: none;
    color: #1f2329;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.indication-hit:hover,
.indication-hit.is-active {
    background: #f0f4ff;
}

.indication-hit em {
    margin-left: 6px;
    color: #8f959e;
    font-style: normal;
    font-size: 12px;
}

/* ===== 药品档案：说明书长文本 ===== */
.drug-instructions {
    display: block;
    width: 100%;
    min-height: 180px;
    padding: 10px 12px;
    border: 1px solid #dee0e3;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* ===== 表单校验：漏填项红框（配合 JS 聚焦与提示） ===== */
.field-invalid,
.field-invalid:focus {
    border: 1px solid #f54a45 !important;
    box-shadow: 0 0 0 2px rgba(245, 74, 69, 0.12) !important;
}

.tag-input.field-invalid {
    border: 1px solid #f54a45 !important;
}

/* ===== 药品档案：剂量单位换算表 ===== */
.dose-conv-table {
    width: 100%;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.dose-conv-table th {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e6eb;
    background: #f7f8fa;
    color: #4e5969;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.dose-conv-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #f0f1f3;
    font-size: 13px;
}

.dose-conv-table tr:last-child td {
    border-bottom: 0;
}

.dose-conv-factor {
    width: 220px;
    padding: 6px 10px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    font-size: 13px;
}

.dose-conv-remove {
    min-width: 32px;
    padding: 4px 0;
}

.dose-conv-add {
    position: relative;
    margin-top: 8px;
}

.dose-conv-add-input {
    width: 280px;
    padding: 7px 10px;
    border: 1px dashed #c9cdd4;
    border-radius: 6px;
    font-size: 13px;
}

.dose-conv-add .tag-input-dropdown {
    top: 100%;
    left: 0;
    width: 280px;
}

/* ===== 剂量单位换算表：常驻编辑行 ===== */
.dose-conv-edit-row td {
    background: #fafbfc;
}

.dose-conv-unit-input {
    width: 140px;
    padding: 6px 10px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    font-size: 13px;
}

.dose-conv-edit-row .dose-conv-factor {
    border-style: dashed;
}

.dose-conv-empty-row td {
    color: #8f959e;
    font-size: 12px;
    text-align: center;
}

.dose-conv-dropdown {
    z-index: 60;
}

/* ===== 模板列表：诊断/证候标签（静态展示） ===== */
.tpl-dx-chip-static {
    display: inline-block;
    margin: 1px 4px 1px 0;
    padding: 0 8px;
    border-radius: 4px;
    background: #e8f0ff;
    color: #245bdb;
    font-size: 12px;
    line-height: 20px;
    vertical-align: middle;
}

/* 模板行：td 顶部对齐，保证药品检索框与同行用法/剂量等输入同一水平线
   （药品列因 meta 预留高度比其他列高，默认 middle 对齐会错位） */
.tpl-items-table td {
    vertical-align: top;
}

/* 模板行内控件高度统一（select 与 input 同高，顶部对齐后同一水平线） */
#tpl-items td > select,
#tpl-items td > input {
    margin-top: 0;
}

/* 模板行删除按钮与行内输入框同高（输入框 36px，基础按钮 38px） */
#tpl-items .tpl-remove {
    min-width: 56px;
    height: 36px;
    padding: 7px 12px;
    box-sizing: border-box;
}

/* ===== 平台看板：统计卡片 ===== */
.stat-grid {
    overflow: hidden;
    margin: 0 0 20px;
}

.stat-card {
    float: left;
    width: 23%;
    margin: 0 2% 12px 0;
    padding: 14px 16px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    background: #fff;
}

.stat-card:nth-child(4n) {
    margin-right: 0;
}

.stat-label {
    display: block;
    color: #8f959e;
    font-size: 12px;
}

.stat-value {
    display: block;
    margin-top: 6px;
    color: #1f2329;
    font-size: 24px;
    font-weight: 600;
}

/* 平台品牌方块（深色调区别于诊所） */
.brand-mark-platform {
    background: #1f2329;
}

/* 后台管理端品牌方块（深灰，区别于医务工作台蓝与平台黑；登录页专项 ②b） */
.brand-mark-admin {
    background: #4e5969;
}

/* ===== 药品身份字段锁定标记（编辑时不可改，新建可填） ===== */

.form-group input[data-locked="1"],
.form-group select[data-locked="1"] {
    background: #f2f3f5 !important;
    color: #8f959e !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}

.status-active { color: #34c724; }
.status-inactive { color: #a2a8b0; }

.brand-mark-ai {
    background: #3370ff;
    font-size: 20px;
    -webkit-font-smoothing: antialiased;
}


/* ===== 弹窗内表单统一排布 ===== */
.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-group > label {
    display: block;
    margin-bottom: 6px;
    color: #1f2329;
    font-size: 14px;
    font-weight: 500;
}

.modal-body .form-group > input,
.modal-body .form-group > select {
    width: 100%;
    height: 36px;
    padding: 7px 10px;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.modal-body .form-columns {
    margin: 0 -7px;
    overflow: hidden;
}

.modal-body .form-columns .form-column {
    float: left;
    width: 50%;
    padding: 0 7px;
    box-sizing: border-box;
}

.modal-body .field-help {
    display: block;
    margin-top: 4px;
    color: #8f959e;
    font-size: 12px;
}

/* ===== 站内消息浮窗（三端通用，可拖拽）===== */

#notify-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 900;
    width: 54px;
    height: 54px;
}

#notify-fab {
    display: block;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #3370ff 0%, #1e50d8 100%);
    -webkit-box-shadow: 0 6px 18px rgba(51, 112, 255, 0.45);
    box-shadow: 0 6px 18px rgba(51, 112, 255, 0.45);
    cursor: grab\9;
    cursor: grab;
    position: relative;
    -webkit-transition: -webkit-transform .2s ease, box-shadow .2s ease;
    transition: transform .2s ease, box-shadow .2s ease;
}

#notify-fab:hover {
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
    -webkit-box-shadow: 0 10px 26px rgba(51, 112, 255, 0.55);
    box-shadow: 0 10px 26px rgba(51, 112, 255, 0.55);
}

#notify-fab:active { cursor: grabbing; }

#notify-widget.is-dragging #notify-fab {
    -webkit-transform: scale(0.96);
    transform: scale(0.96);
    -webkit-box-shadow: 0 14px 30px rgba(51, 112, 255, 0.6);
    box-shadow: 0 14px 30px rgba(51, 112, 255, 0.6);
}

#notify-fab svg {
    display: block;
    margin: 15px auto 0;
}

/* 未读角标：红底白字 + 呼吸动画 */
.notify-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #ff4d4f;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    -webkit-box-shadow: 0 2px 6px rgba(255, 77, 79, 0.5);
    box-shadow: 0 2px 6px rgba(255, 77, 79, 0.5);
    -webkit-animation: notify-pulse 2.4s ease-in-out infinite;
    animation: notify-pulse 2.4s ease-in-out infinite;
}

@-webkit-keyframes notify-pulse {
    0%, 100% { -webkit-transform: scale(1); transform: scale(1); }
    50% { -webkit-transform: scale(1.18); transform: scale(1.18); }
}

@keyframes notify-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

/* 面板：从右下角回弹展开 */
.notify-panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: 340px;
    max-height: 460px;
    background: #fff;
    border-radius: 12px;
    -webkit-box-shadow: 0 12px 40px rgba(31, 35, 41, 0.18), 0 0 0 1px rgba(31, 35, 41, 0.04);
    box-shadow: 0 12px 40px rgba(31, 35, 41, 0.18), 0 0 0 1px rgba(31, 35, 41, 0.04);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    -webkit-transform: translateY(10px) scale(0.9);
    transform: translateY(10px) scale(0.9);
    -webkit-transform-origin: 100% 100%;
    transform-origin: 100% 100%;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: -webkit-transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease, visibility .25s;
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease, visibility .25s;
}

.notify-panel.is-open {
    -webkit-transform: none;
    transform: none;
    opacity: 1;
    visibility: visible;
}

/* 面板贴屏边时的翻转由 JS 切换 is-flip-x / is-flip-y */
.notify-panel.is-flip-x {
    right: auto;
    left: 0;
    -webkit-transform-origin: 0 100%;
    transform-origin: 0 100%;
}

.notify-panel.is-flip-y {
    bottom: auto;
    top: 66px;
    -webkit-transform-origin: 100% 0;
    transform-origin: 100% 0;
}

.notify-panel.is-flip-x.is-flip-y { -webkit-transform-origin: 0 0; transform-origin: 0 0; }

.notify-panel-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #ebeef2;
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
    cursor: grab\9;
    cursor: grab;
}

.notify-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #1f2329;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.notify-panel-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3370ff, #1e50d8);
    margin-right: 8px;
}

.notify-panel-actions { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }

.notify-link {
    border: none;
    background: none;
    padding: 0;
    margin-right: 12px;
    font-size: 12px;
    color: #3370ff;
    cursor: pointer;
}

.notify-link:hover { text-decoration: underline; }

.notify-panel-close {
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: #8f959e;
    cursor: pointer;
    padding: 2px 4px;
}

.notify-panel-close:hover { color: #1f2329; }

.notify-list {
    overflow-y: auto;
    -webkit-flex: 1;
    flex: 1;
    max-height: 400px;
}

.notify-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f2f4f7;
    cursor: pointer;
    -webkit-transition: background .15s ease;
    transition: background .15s ease;
}

.notify-item:last-child { border-bottom: none; }
.notify-item:hover { background: #f5f8ff; }

.notify-item-topline {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-align-items: center;
    align-items: center;
}

.notify-item-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2329;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.notify-item.unread .notify-item-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3370ff;
    margin-right: 6px;
    -webkit-flex: none;
    flex: none;
}

.notify-item.read .notify-item-title { color: #646a73; font-weight: 400; }

.notify-item-time {
    font-size: 11px;
    color: #8f959e;
    margin-left: 10px;
    -webkit-flex: none;
    flex: none;
}

.notify-item-content {
    margin-top: 3px;
    font-size: 12px;
    color: #646a73;
    line-height: 1.5;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notify-empty {
    padding: 42px 20px;
    text-align: center;
    color: #8f959e;
    font-size: 13px;
}

.notify-empty-icon {
    font-size: 30px;
    line-height: 1;
    margin-bottom: 10px;
    color: #d5d9e0;
}

.notify-loading {
    padding: 30px 20px;
    text-align: center;
    color: #8f959e;
    font-size: 13px;
}

/* 表格操作列里与按钮并排的内嵌表单 */
.data-table .inline-form {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

/* 引用平台项目弹窗内的行列表 */
.import-fee-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #ebeef2;
    border-radius: 6px;
}

.import-fee-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f2f4f7;
}

.import-fee-row:last-child { border-bottom: none; }

.import-fee-info {
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

.import-fee-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2329;
}

.import-fee-meta {
    display: block;
    font-size: 11px;
    color: #8f959e;
    margin-top: 2px;
}

.import-fee-price {
    width: 70px;
    height: 30px;
    margin-right: 8px;
    padding: 0 8px;
    border: 1px solid #d5d9e0;
    border-radius: 4px;
    text-align: right;
    box-sizing: border-box;
}

/* 表单即时校验缺失字段红框（新增药品申请页等） */
input.field-error, select.field-error, textarea.field-error {
    border: 1px solid #e54545 !important;
    background: #fff6f6;
}

/* 页脚备案号（法定悬挂项，三端 + 登录页共用）：小字次要色，不抢视觉主次 */
.site-footer {
    clear: both;
    margin: 0 30px;
    padding: 6px 0 18px;
    text-align: center;
    font-size: 12px;
    color: #9aa1ac;
}

.site-footer .beian-link {
    color: #9aa1ac;
    text-decoration: none;
}

.site-footer .beian-link:hover {
    color: #5b6b85;
    text-decoration: underline;
}

/* 登录页：卡片下方留一屏内的空隙即可（登录页无侧栏） */
.login-body .site-footer {
    margin: 48px 20px 12px;
    padding: 0;
}

/* ==== 主诉快速录入（2026-09-17 规格 v1）：症状 + 时长点选下拉 ==== */
.cc-revisit {
    margin: 0 0 8px;
    padding: 8px 10px;
    border: 1px solid #ffe1a8;
    border-radius: 6px;
    background: #fffaf0;
    font-size: 13px;
    color: #5b6b85;
}

.cc-revisit-text {
    margin-right: 10px;
}

.cc-revisit-text b {
    color: #333;
}

.cc-revisit .button {
    margin-right: 6px;
}

.cc-input-wrap {
    position: relative;
}

.cc-drop {
    display: none;
    position: absolute;
    z-index: 30;
    top: 62px;
    right: 0;
    left: 0;
    max-height: 340px;
    overflow: auto;
    border: 1px solid #dee0e3;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(31, 42, 68, 0.12);
}

.cc-drop.is-fixed {
    position: fixed;
    right: auto;
    z-index: 1200;
}

.cc-title {
    padding: 8px 12px 2px;
    font-size: 12px;
    color: #8f959e;
}

.cc-title-hint {
    color: #9fb0c6;
    font-weight: normal;
}

.cc-syms,
.cc-durs {
    padding: 4px 10px 8px;
}

/* 症状标签区自己滚动（2026-09-17 Run L 处置并入，可及性根因修复）：
   105 个标签曾铺 753px，把「持续时间」行与「搭配建议」行挤出 cc-drop 的 340px 可视区
   （Run L 复核实测建议行在 y=1291、可视底边 y=734）——医生看不到建议，点击命中点落在
   裁剪区外 elementFromPoint=null，表现为「点搭配建议无反应/时有时无」。
   标签区限高自滚后，时长行与搭配建议行常驻下拉底部、无需先在下拉里滚动即可点到。
   Chrome 49：overflow-y:auto 自 Chrome 1 起支持，无需前缀。 */
.cc-syms {
    max-height: 150px;
    overflow-y: auto;
}

.cc-durs {
    border-top: 1px dashed #e5e6eb;
}

.cc-chip {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 4px 12px;
    border: 1px solid #dee0e3;
    border-radius: 14px;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.cc-chip:hover {
    border-color: #3370ff;
    color: #3370ff;
}

.cc-chip.is-on {
    border-color: #3370ff;
    background: #e8f0ff;
    color: #3370ff;
}

.cc-chip.is-active {
    border-color: #3370ff;
    background: #eef4ff;
}

.cc-chip.is-suggest {
    border-color: #ffd98a;
    background: #fff8e6;
    color: #8a6100;
}

.cc-chip .cc-py {
    margin-left: 2px;
    color: #9fb0c6;
    font-size: 12px;
}

/* 无匹配：灰色暗文，不是标签，不阻断手打 */
.cc-empty {
    padding: 8px 12px;
    color: #a8b0bb;
    font-size: 13px;
}

.cc-suggest {
    padding: 2px 12px 10px;
}

.cc-suggest-label {
    margin-right: 4px;
    color: #6b7a90;
    font-size: 13px;
}

/* ==== 舌象/脉象要素下拉（Run AA 2026-09-19，T-29/T-32）====
   容器/标题/词条复用主诉便捷录入的 .cc-drop／.cc-title／.cc-chip；这里只补
   分组标题条（决策 44⑥ 点分组标题切维度）与词条区的内边距，令牌沿用
   #8f959e 辅助字色 / #3370ff 主色 / #e5e6eb 分隔线。Chrome 49：inline-block，无 grid。 */
.cc-dim-tabs {
    padding: 2px 12px 0;
    border-bottom: 1px dashed #e5e6eb;
}

.cc-dim-tab {
    display: inline-block;
    margin: 0 14px 0 0;
    padding: 5px 0 7px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    font: inherit;
    font-size: 12px;
    color: #8f959e;
    cursor: pointer;
}

.cc-dim-tab:hover {
    color: #3370ff;
}

.cc-dim-tab.is-on {
    color: #3370ff;
    border-bottom-color: #3370ff;
}

.cc-dim-tab .cc-dim-val {
    color: #3370ff;
}

.cc-terms {
    padding: 4px 10px 8px;
}

/* ==== 账号弹窗科室选择器（W45；原型：运维/UI巡检/原型/创建账号-科室选择.html）====
   外框与 .admin-modal-card 输入框同款（空态同高 36px、同边框/圆角/内边距）；
   内层检索输入框必须压掉 .form-group input[type="text"] 的整框样式（原型实测坑：
   不压会把内层输入框也撑成 36px 高，整个控件涨到 50px）。 */
.dept-pick {
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.dept-pick .dept-box {
    width: 100%;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: center;
    align-items: center;
    cursor: text;
}

.dept-pick .dept-box.is-focus {
    border-color: #3370ff;
    box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
}

/* specificity 高于 .admin-modal-card .form-group input[type="text"] 才压得平 */
.admin-modal-card .form-group input.dept-search-input {
    display: block;
    width: auto;
    min-width: 120px;
    height: 22px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    line-height: 22px;
    font: inherit;
    font-size: 14px;
    color: #1f2329;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
}

.dept-tag {
    display: inline-block;
    margin: 1px 6px 1px 0;
    padding: 0 6px;
    background: #e8f0ff;
    color: #3370ff;
    border-radius: 4px;
    font-size: 13px;
    line-height: 22px;
    white-space: nowrap;
    vertical-align: middle;
}

.dept-tag .dept-tag-x {
    margin-left: 6px;
    color: #3370ff;
    font-weight: 700;
    text-decoration: none;
}

.dept-tag .dept-tag-x:hover {
    color: #f54a45;
}

.dept-clear {
    margin-left: 10px;
    color: #646a73;
    font-size: 12px;
    white-space: nowrap;
    text-decoration: none;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
}

.dept-clear:hover {
    color: #3370ff;
}

/* 下拉挂 body + fixed 定位：跟住输入框，不被弹窗 overflow 裁切（药品检索下拉同款思路） */
.dept-drop {
    display: none;
    position: fixed;
    background: #fff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(31, 35, 41, 0.12);
    max-height: 240px;
    overflow: auto;
    z-index: 100000;
}

.dept-drop.open {
    display: block;
}

.dept-drop .dept-opt {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    padding: 7px 12px;
    cursor: pointer;
}

.dept-drop .dept-opt:hover,
.dept-drop .dept-opt.hl {
    background: #e8f0ff;
    color: #3370ff;
}

.dept-drop .dept-opt.sel {
    color: #3370ff;
    cursor: default;
}

.dept-drop .dept-opt.sel:hover {
    background: #fff;
}

.dept-drop .dept-opt .nm {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
}

.dept-drop .dept-opt .pth {
    margin-left: 8px;
    color: #8f959e;
    font-size: 12px;
}

.dept-drop .dept-opt .chk {
    margin-left: 8px;
    color: #3370ff;
    font-weight: 700;
}

.dept-drop .dept-none {
    padding: 10px 12px;
    color: #8f959e;
}

/* ===== T-36 本次就诊费用（病历详情页底部，派生自处方与退药单；版式对齐 visit-charge.html 原型） ===== */
.visit-charge-card {
    padding: 18px 24px 14px;
}

.visit-charge-head {
    overflow: hidden;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eff0f1;
}

.visit-charge-head h2 {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 16px;
    font-weight: 600;
}

.visit-charge-group {
    margin-bottom: 16px;
}

.visit-charge-group-head {
    overflow: hidden;
    padding: 7px 10px;
    border: 1px solid #e5e6eb;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    background: #fafbfc;
    color: #4e5969;
    font-size: 13px;
}

.visit-charge-group-head strong {
    font-size: 13px;
    color: #1d2129;
}

.visit-charge-badges {
    float: right;
}

.visit-charge-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #e8f0ff;
    color: #3370ff;
    font-size: 12px;
}

.visit-charge-badge.is-pending {
    background: #fff7e6;
    color: #b26b00;
}

.visit-charge-badge.is-refund {
    background: #ffece8;
    color: #c0392b;
}

.visit-charge-rx-meta {
    padding: 0;
    border: 1px solid #e5e6eb;
    border-top: 0;
    color: #86909c;
    font-size: 12px;
    line-height: 20px;
}

/* Run Z24a：处方状态行（徽标 + 重新开单钮），Chrome 49 兼容的前缀 flex */
.visit-charge-rx-meta .rx-status-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    padding: 6px 10px;
}

.visit-charge-rx-meta .rx-status-row + .rx-status-row {
    border-top: 1px solid #eff0f1;
}

.rx-status-row .rx-status-text {
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 auto;
    flex: 1 1 auto;
}

.rx-status-row .status-tag {
    margin-left: 10px;
}

.rx-status-row .rx-reopen-btn {
    margin-left: 12px;
    padding: 4px 12px;
    line-height: 20px;
    min-width: 0;
}

.visit-charge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.visit-charge-table th {
    padding: 7px 8px;
    border: 1px solid #e5e6eb;
    background: #fafbfc;
    color: #646a73;
    text-align: left;
    font-weight: 500;
}

.visit-charge-table td {
    padding: 7px 8px;
    border: 1px solid #e5e6eb;
    color: #1d2129;
}

.visit-charge-table .num {
    text-align: right;
    padding-right: 8px;
}

.visit-charge-table tr.is-refund td {
    color: #c0392b;
}

.visit-charge-table tfoot td {
    padding: 6px 8px;
    border: 1px solid #e5e6eb;
    text-align: right;
    color: #4e5969;
}

.visit-charge-table tfoot .is-refund-num {
    color: #c0392b;
}

.visit-charge-table tfoot tr.grand td {
    padding: 8px;
    background: #fafbfc;
    color: #1d2129;
    font-weight: 600;
}

.visit-charge-foot {
    margin: 10px 0 0;
    color: #86909c;
    font-size: 12px;
    line-height: 20px;
}

/* ── Z108 轮⑤ 给药方式页 token 选择器（关联费用多选，原型 v5）──
   弹窗内 .form-group input 的全站边框会画到 picker 输入框上，
   按派单 ⚠️ 用 border:none/background:transparent/box-shadow:none !important 压掉。 */
.fee-picker {
    position: relative;
    min-height: 40px;
    padding: 4px 6px;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    cursor: text;
    line-height: 26px;
}

.fee-picker .fee-chip {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef4ff;
    color: #3370ff;
    font-size: 12px;
    vertical-align: middle;
}

.fee-picker .fee-chip b {
    margin-left: 5px;
    font-weight: normal;
    cursor: pointer;
}

.fee-picker input[type="text"] {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    display: inline-block;
    vertical-align: middle;
    width: 2ch;
    min-width: 2ch;
    max-width: 100%;
    padding: 1px 2px;
    font-size: 14px;
    height: auto;
    outline: none;
}

.fee-picker .fee-drop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 101;
    margin-top: 2px;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #c9cdd4;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(31, 35, 41, 0.14);
}

.fee-picker .fee-option {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.fee-picker .fee-option:hover {
    background: #f2f3f5;
}

.fee-picker .fee-option.is-picked {
    color: #3370ff;
}

.fee-picker .fee-option-tick {
    color: #3370ff;
    font-weight: bold;
}

.fee-picker .fee-drop-empty {
    padding: 14px 10px;
    color: #8f959e;
    font-size: 13px;
    text-align: center;
}
