* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f8fd;
  --card: #ffffff;
  --panel: #f0f6ff;
  --line: #e3edff;
  --line2: #d6e4fb;
  --text: #1e293b;
  --muted: #64748b;
  --blue: #2563eb;
  --blue2: #3b82f6;
  --blue-deep: #1e40af;
  --ok: #059669;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(37, 99, 235, .08);
}
html, body { height: 100%; }
body { font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55; padding-top: 58px; }
a { color: var(--blue); text-decoration: none; }

/* ---------- 登录页（双栏宣传 + 白卡登录，参考 ddadmin） ---------- */
.login-body { background: linear-gradient(135deg, #e8f4ff 0%, #d0eaff 30%, #c8e6ff 55%, #e0d8f8 80%, #f0e8ff 100%); overflow-x: hidden; padding-top: 0; }
.login-page { position: relative; min-height: 100vh; display: flex; }
.left-panel { flex: 1; position: relative; display: flex; align-items: center; padding: 60px 6vw; min-height: 100vh; }
.left-tagline { position: relative; z-index: 2; max-width: 660px; }
.left-tagline .welcome { font-size: 15px; color: #1677ff; margin-bottom: 18px; letter-spacing: 1px; font-weight: 600; }
.left-tagline h1 { font-size: 44px; line-height: 1.4; font-weight: 800; color: #1a1a2e; }
.left-tagline h1 .highlight { background: linear-gradient(90deg, #1677ff 0%, #7c4fff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.left-visual { position: absolute; inset: 0; overflow: hidden; }
.shapes-wrap { position: absolute; inset: 0; }
.shape { position: absolute; border-radius: 18px; }
.shape-1 { width: 160px; height: 160px; background: linear-gradient(135deg, #93d5ff 0%, #4baeff 50%, #2b8ce8 100%); top: 60px; left: 80px; transform: rotate(-15deg); opacity: .9; box-shadow: 0 20px 60px rgba(43, 140, 232, .35); }
.shape-2 { width: 130px; height: 130px; background: linear-gradient(135deg, #b8e4ff 0%, #7ec8ff 50%, #4baeff 100%); top: 30px; left: 200px; transform: rotate(10deg); opacity: .85; box-shadow: 0 16px 50px rgba(75, 174, 255, .3); }
.shape-3 { width: 100px; height: 100px; background: linear-gradient(135deg, #d4b3ff 0%, #a87dff 50%, #7c4fff 100%); top: 120px; left: 290px; transform: rotate(-5deg); opacity: .8; box-shadow: 0 14px 44px rgba(124, 79, 255, .3); }
.shape-4 { width: 80px; height: 80px; background: linear-gradient(135deg, #fff 0%, #c8e9ff 100%); top: 200px; left: 130px; transform: rotate(20deg); opacity: .7; box-shadow: 0 10px 30px rgba(100, 180, 255, .25); }
.wave { position: absolute; bottom: 0; left: -40px; right: -40px; height: 180px; background: linear-gradient(180deg, transparent 0%, rgba(100, 180, 255, .15) 60%, rgba(100, 180, 255, .3) 100%); border-radius: 60% 60% 0 0; }
.wave-2 { position: absolute; bottom: 0; left: -80px; right: -80px; height: 140px; background: linear-gradient(180deg, transparent 0%, rgba(180, 140, 255, .12) 60%, rgba(180, 140, 255, .22) 100%); border-radius: 50% 50% 0 0; }
.right-panel { width: 460px; margin: 24px; background: #fff; border-radius: 18px; box-shadow: 0 24px 70px rgba(22, 119, 255, .18); display: flex; flex-direction: column; justify-content: space-between; padding: 36px 34px 22px; }
.brand-block { text-align: center; margin-bottom: 26px; }
.brand-block .logo-img { width: 60px; height: 60px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; }
.brand-block .logo-img svg { width: 60px; height: 60px; }
.brand-block .logo-name { font-size: 17px; font-weight: 700; color: #1a1a2e; letter-spacing: 1px; }
.form-title { font-size: 22px; font-weight: 700; color: #1a1a2e; text-align: center; }
.form-subtitle { text-align: center; color: #8c8c9c; margin: 6px 0 26px; font-size: 14px; }
.error-message { background: #fff2f0; border: 1px solid #ffccc7; color: #f5222d; padding: 10px 14px; border-radius: 6px; margin-bottom: 20px; font-size: 13px; }
.form-group { margin-bottom: 16px; }
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; width: 18px; height: 18px; color: #9aa5b5; pointer-events: none; }
.form-input { width: 100%; height: 46px; padding: 0 40px 0 40px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; color: #1a1a2e; background: #fafafa; transition: border-color .2s, box-shadow .2s, background .2s; outline: none; }
.form-input:hover { border-color: #1677ff; background: #fff; }
.form-input:focus { border-color: #1677ff; background: #fff; box-shadow: 0 0 0 3px rgba(22, 119, 255, .12); }
.eye-toggle { position: absolute; right: 12px; width: 18px; height: 18px; color: #9aa5b5; cursor: pointer; }
.btn-login { width: 100%; height: 46px; background: #1677ff; color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s, transform .1s; margin-top: 8px; letter-spacing: 2px; }
.btn-login:hover { background: #0e5fd8; }
.btn-login:active { background: #0a4db8; transform: scale(.99); }
.btn-login:disabled { background: #d9d9d9; cursor: not-allowed; }
.panel-footer { text-align: center; margin-top: 28px; color: #b0b0c0; font-size: 12px; }

/* ---------- 顶栏（白底科技蓝） ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line2); box-shadow: 0 2px 12px rgba(30, 64, 175, .06); position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 0 18px; min-height: 58px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: .5px; background: linear-gradient(90deg, var(--blue-deep), var(--blue2)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.tabs { display: flex; align-items: center; gap: 6px; flex: 1; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { color: #475569; padding: 7px 16px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.tab:hover { color: var(--blue); background: var(--panel); }
.tab.on { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue2)); box-shadow: 0 4px 12px rgba(37, 99, 235, .25); }
.userbox { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.uname { color: #475569; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue2); }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; border: 1px solid transparent; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; background: #eef4ff; color: var(--text); transition: all .15s; }
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, .28); }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-on { background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff !important; border-color: transparent; }
.btn-sm { padding: 4px 12px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- 容器与卡片 ---------- */
.container { max-width: 1320px; margin: 0 auto; padding: 22px 18px 64px; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head h1 { font-size: 18px; font-weight: 700; background: linear-gradient(90deg, var(--blue-deep), var(--blue2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec-head h2 { font-size: 15px; font-weight: 700; color: var(--blue-deep); border-left: 4px solid var(--blue2); padding-left: 10px; }
.muted { color: var(--muted); font-size: 12px; }
.ok { color: var(--ok); font-weight: 700; }

/* ---------- KPI 卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); box-shadow: var(--shadow); }
.card-title { font-weight: 700; color: var(--blue-deep); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.card-more { font-size: 12px; font-weight: 500; color: var(--blue); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { text-align: center; background: linear-gradient(180deg, var(--panel), #ffffff); border: 1px solid var(--line); border-radius: 10px; padding: 12px 4px; }
.kpi b { display: block; font-size: 22px; font-weight: 800; color: var(--blue); }
.kpi span { font-size: 12px; color: var(--muted); }
.mini-line { margin-top: 14px; font-size: 12px; color: var(--muted); }
.mini-line b { color: var(--blue-deep); }

/* ---------- 医院筛选标签 ---------- */
.hospital-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--panel); color: #334155; border: 1px solid var(--line2); border-radius: 999px; padding: 6px 16px; font-size: 13px; transition: all .15s; }
.chip:hover { border-color: var(--blue2); color: var(--blue); }
.chip.on { background: linear-gradient(135deg, var(--blue), var(--blue2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(37, 99, 235, .28); }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.tbl th { background: linear-gradient(180deg, #f0f6ff, #e8f1ff); color: var(--blue-deep); padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line2); white-space: nowrap; font-weight: 700; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: #f8fbff; }
.tbl tr.tot td { font-weight: 800; background: linear-gradient(180deg, #eef4ff, #e4eeff); color: var(--blue-deep); }
.ops { display: flex; gap: 6px; align-items: center; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.field { display: block; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input[type=text], .field input[type=password] { width: 100%; border: 1px solid #cbd9f0; border-radius: 8px; padding: 9px 12px; font-size: 14px; background: #fff; transition: border .15s; }
.field input:focus { outline: none; border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.checks { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
.check { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--blue); width: 15px; height: 15px; }
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

.alert { border-radius: 10px; padding: 11px 16px; margin-bottom: 16px; font-size: 13px; }
.alert-err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* ---------- 手机端 ---------- */
@media (max-width: 760px) {
  .left-panel { display: none; }
  .login-page { justify-content: center; padding: 16px; }
  .right-panel { width: 100%; max-width: 420px; margin: 0; padding: 30px 24px 20px; }
  .left-tagline h1 { font-size: 30px; }
  .topbar-in { padding: 0 12px; gap: 6px; min-height: auto; }
  .topbar-in > .brand { order: 1; padding: 10px 0 6px; }
  .topbar-in > .userbox { order: 2; margin-left: auto; padding: 10px 0 6px; }
  .tabs { order: 3; width: 100%; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding: 0 0 10px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  body { padding-top: 96px; }
  .tab { padding: 7px 14px; font-size: 13px; }
  .container { padding: 14px 10px 40px; }
  .sec { padding: 15px 13px; }
  .kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .kpi b { font-size: 18px; }
  .uname { display: none; }
  .hospital-chips { gap: 7px; }
  .chip { padding: 5px 12px; font-size: 12px; }
}
