/* 远程喊话 Web 前端共用样式（普通用户页 / 管理员页） */
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { height: 100%; }
  body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5; color: #1f2329;
    display: flex; flex-direction: column;
    padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  }
  header { text-align: center; padding: 8px 0 4px; }
  header h1 { font-size: 20px; font-weight: 600; }
  header p { font-size: 12px; color: #86909c; margin-top: 2px; }
  header .logout { font-size: 12px; color: #1a73e8; cursor: pointer; margin-left: 8px; }
  main { flex: 1; display: flex; flex-direction: column; max-width: 560px; width: 100%; margin: 0 auto; gap: 12px; }
  .card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
  .row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
  .row:last-of-type { margin-bottom: 0; }
  label { font-size: 13px; color: #4e5969; flex-shrink: 0; width: 48px; }
  input[type=password], input[type=text] {
    flex: 1; min-width: 0; height: 44px; border: 1px solid #e5e6eb; border-radius: 8px;
    padding: 0 10px; font-size: 15px; background: #f7f8fa; outline: none;
  }
  input:focus { border-color: #1a73e8; background: #fff; }
  select#target {
    flex: 1; min-width: 0; height: 44px; border: 1px solid #e5e6eb; border-radius: 8px;
    padding: 0 10px; font-size: 15px; background: #f7f8fa; outline: none; color: #1f2329;
  }
  select#target:focus { border-color: #1a73e8; background: #fff; }
  select#stay {
    flex: 1; min-width: 0; height: 44px; border: 1px solid #e5e6eb; border-radius: 12px;
    padding: 0 10px; font-size: 15px; background: #f7f8fa; outline: none; color: #1f2329;
  }
  select#stay:focus { border-color: #1a73e8; background: #fff; }
  textarea {
    width: 100%; min-height: 120px; border: 1px solid #e5e6eb; border-radius: 10px;
    padding: 12px; font-size: 17px; line-height: 1.5; resize: vertical;
    background: #f7f8fa; outline: none;
  }
  textarea:focus { border-color: #1a73e8; background: #fff; }
  .meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: #86909c; }
  button.primary {
    width: 100%; height: 52px; border: none; border-radius: 12px;
    background: #1a73e8; color: #fff; font-size: 18px; font-weight: 600;
    margin-top: 12px; cursor: pointer; transition: opacity .15s;
  }
  button.primary:active { opacity: .8; }
  button.primary:disabled { background: #94bfff; }
  .btn-row { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
  .btn-row button { flex: 1; width: auto; margin-top: 0; }
  .btn-row .stay-label { flex-shrink: 0; font-size: 13px; color: #4e5969; white-space: nowrap; }
  .btn-row select#stay { flex: 1; height: 44px; border-radius: 10px; }
  button.secondary {
    width: 100%; height: 52px; border: 1px solid #1a73e8; border-radius: 12px;
    background: #fff; color: #1a73e8; font-size: 18px; font-weight: 600;
    margin-top: 12px; cursor: pointer; transition: opacity .15s;
  }
  button.secondary:active { background: #eaf1fd; }
  button.secondary:disabled { border-color: #94bfff; color: #94bfff; }
  #err { display: none; margin-top: 10px; font-size: 13px; color: #d64545; text-align: center; }
  #toast {
    position: fixed; left: 50%; top: 18%; transform: translateX(-50%);
    background: rgba(0,0,0,.78); color: #fff; font-size: 14px;
    padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none;
    transition: opacity .25s; z-index: 99; max-width: 80vw; text-align: center;
  }
  #toast.show { opacity: 1; }
  #toast.err { background: rgba(214,69,69,.92); }
  #toast.ok { background: rgba(0,153,102,.92); }
  #histList { list-style: none; }
  #histList li, #schedList li { padding: 10px 2px; border-bottom: 1px solid #f0f2f5; font-size: 14px; display: flex; align-items: center; gap: 10px; }
  #histList li:last-child, #schedList li:last-child { border-bottom: none; }
  #histList .main, #schedList .main { flex: 1; min-width: 0; }
  #histList .t, #schedList .t { color: #86909c; font-size: 12px; margin-bottom: 3px; }
  #histList .x, #schedList .x { word-break: break-all; line-height: 1.45; }
  #histList .empty { text-align: center; color: #86909c; display: block; }
  #histList button.replay, #schedList button.replay {
    flex-shrink: 0; height: 30px; padding: 0 12px; border: 1px solid #1a73e8;
    color: #1a73e8; background: #fff; border-radius: 15px; font-size: 12px; cursor: pointer;
  }
  #histList button.replay:active, #schedList button.replay:active { background: #e8f0fe; }
  #histList button.replay:disabled, #schedList button.replay:disabled { opacity: .5; }
  /* 播报记录分页条 */
  .hist-pager {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 10px 2px 2px; font-size: 12px; color: #86909c;
  }
  .hist-pager span { flex: 1; text-align: center; }
  #userList { list-style: none; }
  #userList li { padding: 10px 2px; border-bottom: 1px solid #f0f2f5; font-size: 14px; display: flex; align-items: center; gap: 8px; }
  #userList li:last-child { border-bottom: none; }
  #userList .main { flex: 1; min-width: 0; }
  #userList .un { font-weight: 500; }
  #userList .badge { font-size: 11px; padding: 1px 8px; border-radius: 9px; margin-left: 6px; }
  #userList .badge.on { color: #009966; background: rgba(0,153,102,.12); }
  #userList .badge.off { color: #d64545; background: rgba(214,69,69,.12); }
  #userList .t { color: #86909c; font-size: 12px; margin-top: 3px; }
  #userList .empty { text-align: center; color: #86909c; display: block; }
  button.ghost {
    flex-shrink: 0; height: 30px; padding: 0 12px; border: 1px solid #e5e6eb;
    background: #fff; color: #4e5969; border-radius: 15px; font-size: 12px; cursor: pointer;
  }
  button.ghost.blue { border-color: #1a73e8; color: #1a73e8; }
  button.ghost:active { background: #f2f3f5; }
  button.ghost:disabled { opacity: .5; }
  #userCard h2 { display: flex; justify-content: space-between; align-items: center; }
  .overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    display: none; align-items: center; justify-content: center; z-index: 60; padding: 16px;
  }
  .overlay.show { display: flex; }
  .modal { background: #fff; border-radius: 14px; padding: 18px; width: 100%; max-width: 360px; }
  .modal h3 { font-size: 16px; margin-bottom: 12px; }
  .modal .mrow { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
  .modal label { width: 68px; font-size: 13px; color: #4e5969; flex-shrink: 0; }
  .modal input {
    flex: 1; min-width: 0; height: 40px; border: 1px solid #e5e6eb; border-radius: 8px;
    padding: 0 10px; font-size: 15px; background: #f7f8fa; outline: none;
  }
  .modal input:focus { border-color: #1a73e8; background: #fff; }
  .modal input:disabled { background: #f2f3f5; color: #86909c; }
  .modal .merr { font-size: 12px; color: #d64545; min-height: 16px; margin: 0 0 4px; }
  .modal .mbtns { display: flex; gap: 8px; margin-top: 6px; }
  .modal .mbtns button { flex: 1; height: 42px; border-radius: 10px; border: none; font-size: 15px; cursor: pointer; }
  .modal .cancel { background: #f2f3f5; color: #4e5969; }
  .modal .confirm { background: #1a73e8; color: #fff; }
  .modal .confirm:disabled { background: #94bfff; }
  h2 { font-size: 15px; margin-bottom: 4px; }
  /* 语音播报/文字留言两按钮统一尺寸（仅颜色区分），id 选择器确保覆盖基础样式 */
  #sendBtn, #textBtn {
    height: 44px; font-size: 16px; padding: 0; border-radius: 10px; margin-top: 0;
  }
  .btn-row #sendBtn, .btn-row #textBtn { flex: 1; width: auto; }
  .modal .mtip { font-size: 12px; color: #86909c; margin: -2px 0 8px; line-height: 1.4; }
  /* 定时发送：勾选框与时间选择器同一行，窄屏自动折行 */
  .row.sched-row { flex-wrap: nowrap; }
  .row.sched-row input[type=checkbox] {
    width: 16px; height: 16px; margin: 0; flex: 0 0 auto; cursor: pointer;
  }
  .row input.sched-input {
    flex: 1 1 150px; min-width: 0; height: 44px; border: 1px solid #e5e6eb; border-radius: 8px;
    padding: 0 10px; font-size: 14px; color: #1f2329; background: #f7f8fa; box-sizing: border-box;
  }
  .row input.sched-input:focus { border-color: #1a73e8; background: #fff; }
  /* 定时待发送卡片：行与按钮全部复用 #histList 的样式 */
  #schedList { list-style: none; }
  #schedCard .empty { text-align: center; color: #86909c; display: block; }
  /* 没有在线主机时的提示（与小程序文案一致） */
  .no-client {
    margin-top: 8px; padding: 8px 12px;
    background: #fff7e6; border-left: 3px solid #fa8c16; border-radius: 6px;
    font-size: 13px; line-height: 1.6; color: #ad6800;
  }
