/* ============================================================
   村卫生室系统 - 公共样式（模仿 Element UI 风格）
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #409eff;
  --primary-dark: #337ecc;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --info: #909399;
  --border: #dcdfe6;
  --border-light: #ebeef5;
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  --bg-page: #f0f2f5;
  --bg-card: #fff;
}

html, body {
  height: 100%;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---------- 顶部导航 ---------- */
.navbar {
  height: 50px;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 30px;
  white-space: nowrap;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  border-radius: 6px;
  transition: opacity .2s;
}
.navbar .logo:hover { opacity: .8; }
.icon-btn { vertical-align: -3px; margin-right: 4px; }
.navbar .logo .logo-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(43,127,224,.35));
}
.navbar .logo .logo-text {
  display: flex;
  flex-direction: column;
}
.navbar .logo .logo-line1 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
}
.navbar .logo .logo-line2 {
  font-size: 12px;
  font-weight: 400;
  color: #909399;
  margin-top: 2px;
  letter-spacing: 2px;
}
.navbar .menu {
  display: flex;
  flex: 1;
  height: 100%;
}
.navbar .menu-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-regular);
  transition: color .2s;
}
.navbar .menu-item:hover, .navbar .menu-item.active {
  color: var(--primary);
}
.navbar .menu-item:hover .submenu { display: block; }
.navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  padding: 6px 0;
  z-index: 200;
}
.navbar .submenu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-regular);
  font-size: 13px;
}
.navbar .submenu a:hover {
  background: #f5f7fa;
  color: var(--primary);
}
/* 二级分组（向右弹出） */
.navbar .submenu-group {
  position: relative;
  padding: 8px 16px;
  color: var(--text-regular);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.navbar .submenu-group:hover {
  background: #f5f7fa;
  color: var(--primary);
}
.navbar .submenu-group .group-arrow {
  font-size: 12px;
  color: #c0c4cc;
}
.navbar .submenu-group:hover .group-arrow {
  color: var(--primary);
}
.navbar .submenu-group-items {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  padding: 6px 0;
}
.navbar .submenu-group:hover > .submenu-group-items {
  display: block;
}
.navbar .submenu-group-items a {
  display: block;
  padding: 8px 16px;
  color: var(--text-regular);
  font-size: 13px;
  white-space: nowrap;
}
.navbar .submenu-group-items a:hover {
  background: #f5f7fa;
  color: var(--primary);
}
.navbar .right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.navbar .tenant {
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  font-size: 13px;
}
.navbar .warning-icon {
  position: relative;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-regular);
}
.navbar .warning-icon .badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  border-radius: 10px;
  padding: 0 4px;
  min-width: 16px;
  text-align: center;
  line-height: 14px;
}
.navbar .user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
}
.navbar .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* ---------- 多页签栏 ---------- */
.tags-view {
  height: 36px;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: fixed;
  top: 50px; left: 0; right: 0;
  z-index: 99;
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  margin-right: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 12px;
  color: var(--text-regular);
  cursor: pointer;
}
.tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.tag .close {
  margin-left: 6px;
  width: 14px; height: 14px;
  line-height: 12px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
}
.tag.active .close:hover { background: rgba(255,255,255,.3); }

/* ---------- 主内容区 ---------- */
.main-container {
  margin-top: 86px;
  padding: 12px;
  min-width: 1160px;
}
.cure-layout {
  display: flex;
  gap: 12px;
  height: calc(100vh - 98px);
  min-height: 600px;
}

/* ---------- 卡片 ---------- */
.el-card {
  background: var(--bg-card);
  border-radius: 4px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}
.sub-card {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 16px;
  font-weight: 600;
}

/* ---------- 左侧患者列表 ---------- */
.left-panel {
  width: 400px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.search-box {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
}
.el-input {
  width: 100%;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
.el-input:focus { border-color: var(--primary); }

.status-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
}
.status-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-regular);
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.status-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.status-tab .count {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 4px;
}
.status-tab.active .count { color: var(--primary); }

.patient-list {
  flex: 1;
  overflow-y: auto;
}
.patient-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .15s;
}
.patient-item:hover { background: #f5f7fa; }
.patient-item.selected { background: #ecf5ff; }
.patient-item .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.patient-item .name { font-size: 14px; font-weight: 500; }
.patient-item .time {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.patient-item.completed .time { color: #c0c4cc; }
.patient-item .arrow {
  color: var(--text-secondary);
  font-size: 12px;
  transition: transform .2s;
}
.patient-item.expanded .arrow { transform: rotate(90deg); }
.patient-sub {
  padding: 8px 14px 8px 28px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.patient-sub .sub-name { color: var(--primary); }
.patient-sub .sub-id { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  gap: 6px;
  border-top: 1px solid var(--border-light);
}
.pagination button {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { color: #c0c4cc; cursor: not-allowed; }

/* ---------- 右侧医嘱执行区 ---------- */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.right-panel .main-card {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}
.info-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 16px;
  margin-bottom: 16px;
}
.form-item {
  display: flex;
  flex-direction: column;
}
.form-item label {
  font-size: 13px;
  color: var(--text-regular);
  margin-bottom: 4px;
}
.form-item label .required { color: var(--danger); margin-right: 2px; }
.form-item .el-input:disabled {
  background: #f5f7fa;
  color: var(--text-primary);
  cursor: not-allowed;
}
.age-row { display: flex; gap: 6px; }
.age-row .el-input { flex: 1; }

/* ---------- 诊疗项目 Tab ---------- */
.cure-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.cure-tab {
  padding: 8px 18px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-regular);
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.cure-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- 分割线 ---------- */
.el-divider {
  display: flex;
  align-items: center;
  margin: 16px 0 12px;
  color: var(--text-regular);
  font-size: 14px;
  font-weight: 500;
}
.el-divider::before, .el-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}
.el-divider::before { margin-right: 10px; }
.el-divider::after { margin-left: 10px; }

/* ---------- 表格 ---------- */
.el-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.el-table th, .el-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.el-table th {
  background: #f5f7fa;
  color: var(--text-regular);
  font-weight: 500;
}
.el-table tbody tr:hover { background: #f5f7fa; }

/* ---------- 按钮 ---------- */
.el-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 15px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-regular);
  cursor: pointer;
  transition: all .2s;
}
.el-button:hover { color: var(--primary); border-color: var(--primary); }
.el-button.is-round { border-radius: 16px; padding: 6px 14px; font-size: 12px; }
.el-button.mini { padding: 5px 11px; font-size: 12px; }
.el-button.warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.el-button.success { background: var(--success); color: #fff; border-color: var(--success); }
.el-button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.el-button.primary:hover { background: var(--primary-dark); }
.el-button:disabled { opacity: .6; cursor: not-allowed; }
.el-button.is-text { background: none; border: none; padding: 0; }
.el-button.is-text.success { color: var(--success); }
.el-button.is-text.warning { color: var(--warning); }

/* ---------- textarea ---------- */
.el-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  min-height: 60px;
}
.el-textarea:disabled { background: #f5f7fa; }

/* ---------- 弹窗 ---------- */
.el-dialog__wrapper {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding-top: 10vh;
}
.el-dialog__wrapper.show { display: flex; }
.el-dialog {
  background: #fff;
  border-radius: 4px;
  width: auto;
  min-width: 480px;
  max-width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.el-dialog__body { flex: 1; overflow-y: auto; min-height: 0; }
.el-dialog__header, .el-dialog__footer { flex-shrink: 0; }
.el-dialog__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-dialog__title { font-size: 16px; font-weight: 600; }
.el-dialog__close {
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
  background: none;
  border: none;
}
.el-dialog__body { padding: 20px; }
.el-dialog__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}
.el-dialog__footer .el-button { margin-left: 10px; }

.exec-time-row {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.exec-record-list {
  margin-top: 12px;
  max-height: 200px;
  overflow-y: auto;
}
.exec-record-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border-light);
}

/* ---------- 登录页 ---------- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e88e5, #43a047);
}
.login-box {
  width: 400px;
  background: #fff;
  border-radius: 8px;
  padding: 40px 36px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
}
.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary);
}
.login-box .form-item { margin-bottom: 18px; }
.login-box .el-input { height: 40px; font-size: 14px; }
.login-box .el-button.primary {
  width: 100%;
  height: 40px;
  font-size: 15px;
  margin-top: 10px;
}
.login-tip {
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 14px;
}

/* ---------- 空态 ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ---------- 加载指示器 ---------- */
.loading {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 患者列表展开子项 ---------- */
.patient-item .arrow {
  transition: transform .25s;
  display: inline-block;
}
.patient-item.expanded .arrow { transform: rotate(90deg); }
.patient-sub-list {
  background: #fafbfc;
  border-top: 1px solid var(--border-light);
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}
.patient-item.expanded + .patient-sub-list { max-height: 300px; }
.patient-sub-list .sub-item {
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid #f0f2f5;
  transition: background .15s;
}
.patient-sub-list .sub-item:hover { background: #ecf5ff; }
.patient-sub-list .sub-item .sub-name {
  color: var(--primary);
  font-weight: 500;
}
.patient-sub-list .sub-item .sub-id {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.patient-sub-list .sub-loading {
  padding: 10px 36px;
  color: var(--text-secondary);
  font-size: 12px;
}

/* ---------- 预警面板 ---------- */
.warning-panel {
  position: absolute;
  top: 50px;
  right: 80px;
  width: 420px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 200;
  display: none;
}
.warning-panel.show { display: block; }
.warning-panel__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.warning-panel__tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
}
.warning-panel__tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 13px;
  color: var(--text-regular);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}
.warning-panel__tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.warning-panel__body {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
}
.warning-panel__body .el-table { font-size: 12px; }
.warning-panel__body .el-table th,
.warning-panel__body .el-table td { padding: 7px 6px; }
.warning-panel__body .op-btn {
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
}
.warning-panel__body .op-btn:hover { text-decoration: underline; }

/* ---------- datetime-local 输入 ---------- */
.el-input[type="datetime-local"] {
  height: 32px;
  padding: 0 10px;
}

/* ---------- 页签关闭 hover ---------- */
.tag .close:hover {
  background: rgba(0,0,0,.1);
  border-radius: 50%;
}

/* ---------- 滚动条美化 ---------- */
.patient-list::-webkit-scrollbar,
.warning-panel__body::-webkit-scrollbar,
.exec-record-list::-webkit-scrollbar,
.main-card::-webkit-scrollbar {
  width: 6px;
}
.patient-list::-webkit-scrollbar-thumb,
.warning-panel__body::-webkit-scrollbar-thumb,
.exec-record-list::-webkit-scrollbar-thumb,
.main-card::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 3px;
}

/* ============================================================
   全站交互动态效果（微交互 / 过渡 / 动画）
   ============================================================ */

/* ---------- 关键帧 ---------- */
@keyframes anim-modal-in {
  from { opacity: 0; transform: scale(.92) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes anim-mask-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes anim-nav-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes anim-badge-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,108,108,.55); }
  70%  { box-shadow: 0 0 0 6px rgba(245,108,108,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,108,108,0); }
}
@keyframes anim-toast-in {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes anim-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes anim-spin { to { transform: rotate(360deg); } }
@keyframes anim-ripple {
  to { transform: scale(4); opacity: 0; }
}

/* 尊重用户的减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 全局过渡基础 ---------- */
.el-btn, .action-btn, .op-btn, .op-link,
.el-input, .el-select, select.el-input, textarea,
.el-tag, .badge, .tag, .tab-item, .nav-item,
.nav-panel-item, .close-current, .menu-item,
.el-table tbody tr, .el-checkbox, .el-radio {
  transition: all .2s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 按钮：悬停浮起 + 点击按压 ---------- */
.el-btn {
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.el-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(64,158,255,.25);
}
.el-btn.el-btn-primary:hover { box-shadow: 0 4px 12px rgba(64,158,255,.35); }
.el-btn.el-btn-success:hover { box-shadow: 0 4px 12px rgba(103,194,58,.3); }
.el-btn.el-btn-danger:hover  { box-shadow: 0 4px 12px rgba(245,108,108,.3); }
.el-btn.el-btn-warning:hover { box-shadow: 0 4px 12px rgba(230,162,60,.3); }
.el-btn:active {
  transform: translateY(0) scale(.97);
  box-shadow: 0 1px 4px rgba(0,0,0,.12) !important;
}
.el-btn:disabled, .el-btn.is-disabled {
  transform: none !important;
  box-shadow: none !important;
  cursor: not-allowed;
}
/* 按钮波纹 */
.el-btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transform: scale(0);
  animation: anim-ripple .6s ease-out;
  pointer-events: none;
}
.el-btn.el-btn-default .ripple-effect { background: rgba(64,158,255,.25); }

/* ---------- 表格行 hover 高亮 + 微动 ---------- */
.el-table tbody tr,
table tbody tr {
  transition: background-color .18s ease, box-shadow .18s ease;
}
.el-table tbody tr:hover,
table tbody tr:hover {
  background-color: #f5f7fa;
}
.el-table tbody tr:active {
  background-color: #ecf5ff;
}

/* ---------- 操作链接 / 操作按钮 ---------- */
.action-btn, .op-link, .op-btn {
  position: relative;
  cursor: pointer;
}
.action-btn:hover, .op-link:hover, .op-btn:hover {
  transform: scale(1.08);
}
.action-btn.del:hover { color: #f56c6c; }

/* ---------- 模态弹窗：遮罩淡入 + 内容缩放 ---------- */
.modal-mask, .pwd-mask, #cd-mask {
  animation: anim-mask-in .2s ease;
}
.modal-mask .modal,
.pwd-mask .pwd-box {
  animation: anim-modal-in .28s cubic-bezier(.16, 1, .3, 1);
  will-change: transform, opacity;
}
/* 关闭时的退出动画（由 JS 添加 .closing 类触发） */
.modal-mask.closing .modal,
.pwd-mask.closing .pwd-box {
  animation: anim-modal-in .2s cubic-bezier(.16, 1, .3, 1) reverse forwards;
}
.modal-mask.closing, .pwd-mask.closing {
  animation: anim-mask-in .18s ease reverse forwards;
}

/* ---------- 顶部下拉面板：下滑 ---------- */
.nav-panel {
  transform-origin: top right;
}
.nav-panel[style*="display: block"],
.nav-panel.is-open {
  animation: anim-nav-down .2s cubic-bezier(.16, 1, .3, 1);
}
.nav-item:active, .nav-panel-item:active {
  background: #d9ecff !important;
}

/* ---------- 角标：有数字时脉冲 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.badge:not(:empty):not(.is-zero) {
  animation: anim-badge-pulse 2s infinite;
}
.badge:empty { display: none; }

/* ---------- 页签 / Tab ---------- */
.tab-item {
  position: relative;
}
.tab-item:not(.active):hover {
  background: #f0f2f5;
  transform: translateY(-1px);
}
.tab-item.active {
  box-shadow: 0 2px 8px rgba(64,158,255,.3);
}
.tag:hover {
  background: #ecf5ff;
}
.tag .close:hover {
  transform: scale(1.15);
}

/* ---------- 输入控件：聚焦辉光 ---------- */
.el-input:focus, select.el-input:focus, textarea:focus,
input[type="text"]:focus, input[type="number"]:focus,
input[type="date"]:focus, input[type="search"]:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 3px rgba(64,158,255,.12);
  outline: none;
}

/* ---------- 卡片 / 搜索栏 / 表头悬浮阴影 ---------- */
.main-card, .search-bar, .page-header,
.el-table, .panel, .card {
  transition: box-shadow .25s ease, transform .25s ease;
}
.main-card:hover, .search-bar:hover, .card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

/* ---------- 标签悬浮 ---------- */
.el-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

/* ---------- 自定义弹窗 Toast ---------- */
.toast {
  animation: anim-toast-in .3s cubic-bezier(.16, 1, .3, 1);
}

/* ---------- 链接下划线动效 ---------- */
a:not(.el-btn):not(.logo):not(.nav-panel-item) {
  position: relative;
}

/* ---------- 加载旋转 ---------- */
.loading-spin, .el-icon-loading {
  display: inline-block;
  animation: anim-spin 1s linear infinite;
}

/* ---------- 图片淡入 ---------- */
img { transition: opacity .3s ease; }
img[src=""], img:not([src]) { opacity: 0; }

/* ---------- 下拉菜单（主菜单） ---------- */
.menu-item .submenu {
  transform-origin: top center;
}
.menu-item:hover > .submenu {
  animation: anim-nav-down .18s ease;
}

/* ---------- 全局滚动条轻微平滑 ---------- */
* { scroll-behavior: smooth; }
