/* ==========================================================================
   还活着 / Alive.on —— 全局样式
   设计约束（来自需求文档）：
     · 柔和色彩，页面背景浅蓝色
     · 所有内容用一个很浅色的实线框、圆角框起来，形成一点立体感
     · 按钮：圆角长方形、深绿色背景、白色前景、有立体感
     · 平台（管理端 / 监护端）12px 字体；客户端 14px 字体
   ========================================================================== */
:root {
  --bg: #e7f1fa;
  --bg-grad: radial-gradient(1200px 600px at 12% -10%, #f3f9ff 0%, rgba(243, 249, 255, 0) 60%),
    linear-gradient(180deg, #eaf3fc 0%, #e2edf8 100%);
  --card: #fcfdff;
  --card-soft: #f6fbff;
  --line: #e2ecf6;
  --line-strong: #d2e2f1;
  --ink: #1e3a55;
  --ink-soft: #41637f;
  --muted: #8ba3ba;

  --green: #1F6B45;
  --green-hi: #2a8a5b;
  --green-lo: #175339;
  --green-deep: #0f3f2a;

  --red: #9c2f2a;
  --red-hi: #c8403a;
  --amber: #b8860b;

  --alive: #2fa36b;
  --offline: #a9b8c6;
  --emergency: #e0453e;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 0 #fff inset, 0 2px 4px rgba(30, 58, 85, 0.04), 0 10px 20px -14px rgba(30, 58, 85, 0.35);
  --shadow-btn: 0 1px 0 rgba(255, 255, 255, 0.32) inset, 0 2px 0 var(--green-deep), 0 4px 10px -4px rgba(15, 63, 42, 0.55);

  --font-platform: 12px;
  --font-client: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--ink);
  font-size: var(--font-platform);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.client-mode { font-size: var(--font-client); }

a { color: var(--green); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: 0.2px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------------- 布局 ---------------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 14px 18px 40px; }
.wrap.narrow { max-width: 860px; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px;
  background: linear-gradient(180deg, #fdfeff, #f3f9ff);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 2px 10px -8px rgba(30, 58, 85, 0.6);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--green-hi), var(--green-lo));
  box-shadow: var(--shadow-btn); color: #fff; font-size: 15px;
}
.brand-name { font-size: 1.15em; font-weight: 700; letter-spacing: 0.4px; }
.brand-sub { color: var(--muted); font-size: 0.92em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.who { color: var(--ink-soft); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line-strong); background: linear-gradient(180deg, #ffffff, #f2f8fe);
  color: var(--ink-soft); border-radius: 999px; padding: 6px 15px; cursor: pointer;
  box-shadow: 0 1px 0 #fff inset, 0 2px 3px rgba(30, 58, 85, 0.06);
  transition: transform 0.12s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.tab:hover { color: var(--green); border-color: #c3dbc9; }
.tab.active {
  background: linear-gradient(180deg, var(--green-hi), var(--green));
  border-color: var(--green-deep); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow-btn);
}
.tab .badge { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 5px; border-radius: 8px; background: var(--emergency); color: #fff; font-size: 0.85em; text-align: center; }

/* ---------------- 卡片 / 分区 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.card.tight { padding: 10px 12px; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-title { font-size: 1.12em; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.card-title::before {
  content: ""; width: 4px; height: 14px; border-radius: 3px;
  background: linear-gradient(180deg, var(--green-hi), var(--green-lo)); display: inline-block;
}
.card-sub { color: var(--muted); font-size: 0.94em; }
.spacer { flex: 1; }
.hr { height: 1px; background: var(--line); margin: 12px 0; border: 0; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.kv { display: flex; gap: 8px; padding: 3px 0; }
.kv .k { color: var(--muted); min-width: 96px; }
.kv .v { color: var(--ink); word-break: break-all; }

.metric { display: flex; flex-direction: column; gap: 4px; }
.metric .label { color: var(--muted); }
.metric .value { font-size: 1.6em; font-weight: 700; color: var(--green); letter-spacing: 0.5px; }
.metric .hint { color: var(--muted); font-size: 0.92em; }

.bar { height: 9px; border-radius: 6px; background: #eef5fb; border: 1px solid var(--line-strong); overflow: hidden; box-shadow: inset 0 1px 2px rgba(30, 58, 85, 0.08); }
.bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(180deg, var(--green-hi), var(--green)); transition: width 0.5s ease; }
.bar.warn > i { background: linear-gradient(180deg, #e0a13a, #c2841a); }
.bar.danger > i { background: linear-gradient(180deg, var(--red-hi), var(--red)); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 16px; min-height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-deep);
  background: linear-gradient(180deg, #29895a 0%, var(--green) 55%, var(--green-lo) 100%);
  color: #fff; font-weight: 600; letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  box-shadow: var(--shadow-btn);
  cursor: pointer; user-select: none;
  transition: transform 0.1s ease, box-shadow 0.12s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0) inset, 0 1px 0 var(--green-deep), 0 1px 4px -2px rgba(15, 63, 42, 0.6); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; filter: grayscale(0.25); }
.btn.ghost {
  background: linear-gradient(180deg, #ffffff, #f2f8fe); color: var(--green);
  border-color: var(--line-strong); text-shadow: none;
  box-shadow: 0 1px 0 #fff inset, 0 2px 3px rgba(30, 58, 85, 0.08);
}
.btn.ghost:hover { border-color: #bcd8c6; color: var(--green-lo); }
.btn.danger { background: linear-gradient(180deg, #c8403a, #9c2f2a); border-color: #7d2521; box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 2px 0 #7d2521, 0 4px 10px -4px rgba(120,30,26,.5); }
.btn.sm { padding: 4px 10px; min-height: 24px; font-size: 0.95em; border-radius: 8px; }
.btn.xs { padding: 2px 8px; min-height: 20px; font-size: 0.9em; border-radius: 7px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label { color: var(--ink-soft); font-weight: 600; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; padding: 6px 9px; min-height: 30px;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(30, 58, 85, 0.06);
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #8fc0a5; box-shadow: 0 0 0 3px rgba(47, 163, 107, 0.14); }
input:disabled, select:disabled, textarea:disabled { background: #f2f6fa; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .form-grid, .form-grid.two { grid-template-columns: 1fr; } }
.checkline { display: flex; align-items: center; gap: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(180deg, #f7fbfe, #eef6fd);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; color: var(--ink-soft);
}
.chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; }
.chip button:hover { color: var(--emergency); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; background: var(--card); }
table.data th, table.data td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { background: linear-gradient(180deg, #f4fafe, #eaf4fc); color: var(--ink-soft); font-weight: 650; white-space: nowrap; position: sticky; top: 0; }
table.data tbody tr:hover { background: #f6fbfe; }
table.data tbody tr:last-child td { border-bottom: 0; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------- 状态 ---------------- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
.dot.alive { background: radial-gradient(circle at 32% 30%, #63d39b, var(--alive)); }
.dot.offline { background: radial-gradient(circle at 32% 30%, #cbd6e0, var(--offline)); }
.dot.emergency { background: radial-gradient(circle at 32% 30%, #ff7b74, var(--emergency)); animation: pulse 1.1s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 69, 62, 0.55); } 50% { box-shadow: 0 0 0 5px rgba(224, 69, 62, 0); } }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fbfdff; }
.status-pill.alive { border-color: #bfe5d0; background: #f1fbf5; color: #1d7a4f; }
.status-pill.offline { border-color: #dbe3ea; background: #f6f9fc; color: #6d879c; }
.status-pill.emergency { border-color: #f3c3c0; background: #fff3f2; color: var(--emergency); font-weight: 700; }

/* ---------------- 客户端打卡大按钮 ---------------- */
.status-btn {
  width: 260px; height: 96px; border-radius: 18px; border: 1px solid var(--green-deep);
  color: #fff; font-size: 1.9em; font-weight: 700; letter-spacing: 2px; cursor: pointer;
  background: linear-gradient(180deg, #34a06b, var(--green) 60%, var(--green-lo));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 4px 0 var(--green-deep), 0 12px 20px -10px rgba(15, 63, 42, 0.7);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.3s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.status-btn small { font-size: 0.42em; letter-spacing: 1px; font-weight: 500; opacity: 0.9; }
.status-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--green-deep); }
.status-btn.is-offline {
  background: linear-gradient(180deg, #c3ced9, #a3b3c2 60%, #8e9fae);
  border-color: #7f90a0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 4px 0 #7f90a0, 0 12px 20px -10px rgba(80, 95, 110, 0.55);
  color: #fbfdff;
}
.status-btn.is-emergency {
  background: linear-gradient(180deg, #ef6b64, var(--emergency) 60%, #b8352f);
  border-color: #94251f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 4px 0 #94251f, 0 12px 20px -10px rgba(150, 35, 30, 0.7);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink { 0%, 49% { filter: brightness(1); } 50%, 100% { filter: brightness(1.45) saturate(1.2); } }
.status-btn[disabled] { cursor: default; }
.status-btn[disabled]:active { transform: none; }

/* ---------------- 地图 ---------------- */
.map-shell { position: relative; border-radius: var(--radius); border: 1px solid var(--line-strong); overflow: hidden; background: linear-gradient(180deg, #f2f9ff, #e6f2fc); box-shadow: inset 0 1px 3px rgba(30, 58, 85, 0.08); }
.map-shell svg { display: block; width: 100%; height: auto; touch-action: none; }
.map-shell .ocean { fill: url(#oceanGrad); }
.map-shell .land { fill: #fbfefb; stroke: #cfe2d8; stroke-width: 0.6; }
.map-shell .province { fill: #f7fcf8; stroke: #d5e6ef; stroke-width: 0.28; }
.map-shell .marker { cursor: pointer; transition: r 0.15s ease, opacity 0.15s ease; }
.map-shell .marker:hover { opacity: 0.85; }
.map-shell .marker-label { fill: #24506e; paint-order: stroke; stroke: #ffffff; stroke-linejoin: round; pointer-events: none; }
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-soft); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 120px;
  background: rgba(255, 255, 255, 0.97); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 8px 18px -10px rgba(30, 58, 85, 0.6); padding: 6px 9px; opacity: 0; transition: opacity 0.12s ease;
}
.map-tip.on { opacity: 1; }
.map-tip b { color: var(--ink); }
.map-tip .s { color: var(--muted); }
.map-zoom { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }

/* ---------------- 聊天 ---------------- */
.chat-split { display: grid; grid-template-columns: 70% 30%; gap: 12px; }
@media (max-width: 900px) { .chat-split { grid-template-columns: 1fr; } }
.chat-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-soft); display: flex; flex-direction: column; min-height: 460px; overflow: hidden; }
.chat-toolbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, #f5fafe); }
.chat-toolbar .peer { font-weight: 650; }
.icon-btn {
  width: 30px; height: 28px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #fff, #eef6fd); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 1px 0 #fff inset, 0 2px 3px rgba(30, 58, 85, 0.1);
  transition: all 0.15s ease; color: var(--ink-soft);
}
.icon-btn:hover { border-color: #bcd8c6; color: var(--green); }
.icon-btn.on {
  background: linear-gradient(180deg, var(--green-lo), var(--green-deep)); color: #fff; border-color: var(--green-deep);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.45);
  transform: translateY(1px);
}
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 380px; }
.msg { max-width: 72%; padding: 7px 11px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 1px 2px rgba(30, 58, 85, 0.06); position: relative; }
.msg .meta { color: var(--muted); font-size: 0.86em; margin-top: 2px; }
.msg.mine { align-self: flex-end; background: linear-gradient(180deg, #eaf8f0, #dff2e8); border-color: #c4e3d2; }
.msg.system { align-self: center; max-width: 88%; background: #fff8e8; border-color: #f0dcae; color: #7d6320; font-size: 0.95em; }
.chat-input { display: flex; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff; align-items: center; }
.chat-input input { flex: 1; }
.recording { color: var(--emergency); font-weight: 650; display: none; align-items: center; gap: 6px; }
.recording.on { display: inline-flex; }
.recording .wave { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.recording .wave i { width: 2px; background: var(--emergency); border-radius: 2px; animation: wv 0.7s infinite ease-in-out; }
.recording .wave i:nth-child(2) { animation-delay: 0.12s; }
.recording .wave i:nth-child(3) { animation-delay: 0.24s; }
.recording .wave i:nth-child(4) { animation-delay: 0.36s; }
@keyframes wv { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.contact-list { display: flex; flex-direction: column; height: 100%; }
.contact-tools { padding: 8px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; background: #fff; }
.contact-scroll { overflow-y: auto; max-height: 430px; }
.contact-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-bottom: 1px solid var(--line); cursor: pointer; background: #fff; }
.contact-item:hover { background: #f5fbff; }
.contact-item.active { background: linear-gradient(180deg, #eef8f2, #e3f4ea); box-shadow: inset 3px 0 0 var(--green); }
.contact-item .avatar { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(180deg, #e8f4fd, #d8e9f7); color: var(--green); font-weight: 700; flex: none; }
.contact-item .cname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-item .cmeta { color: var(--muted); font-size: 0.88em; }
.contact-item .ops { display: flex; gap: 3px; opacity: 0.55; }
.contact-item:hover .ops { opacity: 1; }
.unread { background: var(--emergency); color: #fff; border-radius: 999px; padding: 0 5px; font-size: 0.85em; }
.pin-flag { color: var(--amber); }

/* ---------------- 模态框 / 抽屉 ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(22, 45, 66, 0.34); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 60; animation: fade 0.16s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 780px; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 24px 60px -24px rgba(15, 40, 60, 0.6); animation: rise 0.18s ease; }
.modal.sm { max-width: 460px; }
.modal.lg { max-width: 1000px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, #f4faff); border-radius: var(--radius) var(--radius) 0 0; }
.modal-head h3 { font-size: 1.14em; }
.modal-body { padding: 14px 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 11px 16px; border-top: 1px solid var(--line); background: #fafdff; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------------- 杂项 ---------------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast { background: #fff; border: 1px solid var(--line-strong); border-left: 4px solid var(--green); border-radius: 10px; padding: 8px 13px; box-shadow: 0 10px 24px -14px rgba(30, 58, 85, 0.7); animation: rise 0.18s ease; max-width: 340px; }
.toast.err { border-left-color: var(--emergency); }
.toast.warn { border-left-color: var(--amber); }
.empty { color: var(--muted); text-align: center; padding: 26px 10px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fbfdff; }
.center { display: flex; align-items: center; justify-content: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.muted { color: var(--muted); } .soft { color: var(--ink-soft); }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: #f8fcff; color: var(--ink-soft); font-size: 0.92em; }
.list-reset { list-style: none; margin: 0; padding: 0; }
.sos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .sos-grid { grid-template-columns: 1fr; } }
.sos-btn {
  border-radius: 18px; padding: 20px 16px; min-height: 150px; border: 1px solid #94251f; cursor: pointer; color: #fff;
  justify-content: center;
  background: linear-gradient(180deg, #d5544e, #ab332e 60%, #8d2722);
  box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 5px 0 #7a201c, 0 14px 22px -12px rgba(140,35,30,.8);
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-shadow: 0 1px 0 rgba(0,0,0,.22);
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s;
  text-align: center;
}
.sos-btn:hover { filter: brightness(1.06); }
.sos-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #7a201c; }
.sos-btn .t { font-size: 1.55em; font-weight: 700; letter-spacing: 1.5px; }
.sos-btn .n { opacity: 0.95; }
.sos-btn .p { opacity: 0.9; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.sos-btn[disabled] { filter: grayscale(0.4) brightness(0.95); cursor: not-allowed; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
.role-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.role-card {
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(180deg, #fff, #f4faff);
  padding: 12px 10px; text-align: center; cursor: pointer; box-shadow: 0 1px 0 #fff inset, 0 3px 5px -4px rgba(30,58,85,.5);
  transition: all 0.15s ease;
}
.role-card .ic { font-size: 1.7em; line-height: 1; }
.role-card .rn { font-weight: 650; margin-top: 4px; }
.role-card .rd { color: var(--muted); font-size: 0.9em; }
.role-card:hover { border-color: #bcd8c6; transform: translateY(-1px); }
.role-card.active { border-color: var(--green); background: linear-gradient(180deg, #eefaf3, #e0f4e9); box-shadow: 0 0 0 3px rgba(47,163,107,.15); }
.tasks-list { display: flex; flex-direction: column; gap: 6px; }
.task-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(180deg, #ffffff, #f7fbff); }
.task-item .idx { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: #eaf6fd; color: var(--green); font-weight: 700; flex: none; }
.notice-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfdff; }
.notice-item .t { font-weight: 650; }
.notice-item .b { color: var(--ink-soft); }
.notice-item .m { color: var(--muted); font-size: 0.9em; white-space: nowrap; }
.placeholder-box { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); background: repeating-linear-gradient(45deg, #fbfdff, #fbfdff 10px, #f6fbff 10px, #f6fbff 20px); }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: #fff; }
.lang-switch button { border: 0; background: transparent; padding: 3px 10px; cursor: pointer; color: var(--ink-soft); }
.lang-switch button.on { background: linear-gradient(180deg, var(--green-hi), var(--green)); color: #fff; }
