/* 刚刚好云信系统 · 前台/后台样式 · 版权：刚刚好资源网 */
:root {
  --bg: #ededed;
  --bg-deep: #111111;
  --panel: #ffffff;
  --card: #ffffff;
  --ink: #191919;
  --muted: #888888;
  --line: #e5e5e5;
  --accent: #07c160;
  --accent-2: #576b95;
  --danger: #fa5151;
  --ok: #07c160;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --radius: 8px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  --nav-h: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-2); text-decoration: none; }
button, input, textarea, select { font: inherit; }
code { font-family: var(--mono); font-size: .9em; }

.auth-body {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(7,193,96,.18), transparent 60%),
    linear-gradient(160deg, #f7f7f7, #e8efe9 45%, #dce8e0);
}
.auth-card {
  width: min(420px, 94vw);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 26px 24px;
}
.install-card { width: min(560px, 94vw); }
.brand-mark {
  display: inline-block;
  background: var(--bg-deep);
  color: #fff;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 12px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 1.55rem; }
.muted { color: var(--muted); margin: 0 0 16px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea,
.composer input, .composer textarea, .toolbar input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  outline: none;
}
.form input:focus, .composer input:focus, .composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(7,193,96,.15); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 8px; padding: 10px 16px; cursor: pointer;
  background: #f2f2f2; color: var(--ink); font-weight: 600;
}
.btn:hover { filter: brightness(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-wechat { background: #07c160; color: #fff; margin-top: 8px; }
.btn-wechat:hover { filter: brightness(1.05); }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert-danger { background: #fee4e2; color: #912018; }
.alert-ok { background: #e8f8ef; color: #056334; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; background: #fff; border: 1px solid var(--line); }
.check-list .ok { border-color: #abefc6; }
.check-list .bad { border-color: #fecdca; color: var(--danger); }

/* App shell — WeChat-like */
#app, .app-shell { height: 100%; }
.app-shell {
  display: grid;
  grid-template-columns: 72px 300px 1fr;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
}
.nav-rail {
  background: #2e2e2e;
  color: #cfcfcf;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 6px;
  gap: 4px;
}
.nav-rail .logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent);
  color: #fff; font-weight: 800; display: grid; place-items: center;
  margin-bottom: 14px; overflow: hidden;
}
.nav-rail .logo img { width: 100%; height: 100%; object-fit: cover; }
.brand-logo { max-height: 56px; margin-bottom: 10px; border-radius: 8px; }
.nav-item {
  width: 100%; border: 0; background: transparent; color: inherit;
  padding: 10px 4px; border-radius: 8px; cursor: pointer; font-size: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.nav-item .nav-label { line-height: 1.2; }
.nav-item .nav-ico {
  width: 22px; height: 22px; border-radius: 5px;
  background: currentColor; opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.nav-item:nth-child(2) .nav-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h10v2H4v-2z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h16v2H4V6zm0 5h16v2H4v-2zm0 5h10v2H4v-2z'/%3E%3C/svg%3E");
}
.nav-item:nth-child(3) .nav-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-4 0-8 2-8 4v2h16v-2c0-2-4-4-8-4z'/%3E%3C/svg%3E");
}
.nav-item:nth-child(4) .nav-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.4 7.2H22l-6 4.4 2.3 7L12 16.8 5.7 20.6 8 13.6 2 9.2h7.6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l2.4 7.2H22l-6 4.4 2.3 7L12 16.8 5.7 20.6 8 13.6 2 9.2h7.6z'/%3E%3C/svg%3E");
}
.nav-item:nth-child(5) .nav-ico {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0-5-5 5 5 0 0 0 5 5zm0 2c-4.4 0-8 2.2-8 5v1h16v-1c0-2.8-3.6-5-8-5z'/%3E%3C/svg%3E");
}
.nav-item.active { color: #fff; }
.nav-item.active .nav-ico { opacity: 1; background: var(--accent); }
.nav-item:hover { background: rgba(255,255,255,.06); }
.side-panel, .chat-panel, .sub-panel {
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.panel-head {
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #f7f7f7; border-bottom: 1px solid var(--line); min-height: 52px;
}
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.panel-head .btn-row { flex: 0 0 auto; }
.list { overflow: auto; padding: 0; flex: 1; background: #fff; }
.list-item {
  position: relative;
  display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.list-item:hover, .list-item.active { background: #f5f5f5; }
.list-item .icon-btn { opacity: .45; }
.avatar {
  width: 48px; height: 48px; border-radius: 6px; object-fit: cover;
  background: linear-gradient(135deg, #07c160, #06ae56); color: #fff;
  display: grid; place-items: center; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.avatar.lg { width: 56px; height: 56px; border-radius: 8px; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.meta { min-width: 0; }
.meta .title { font-weight: 500; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .sub { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #fa5151; color: #fff; font-size: 11px; display: inline-grid; place-items: center;
}
.icon-btn {
  border: 0; background: transparent; color: var(--ink);
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
  font-size: 20px; line-height: 1; display: inline-grid; place-items: center;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }
.inline-menu {
  position: absolute; right: 12px; top: 70%; z-index: 5;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 100px; overflow: hidden;
}
.inline-menu button {
  border: 0; background: #fff; text-align: left; padding: 10px 14px; cursor: pointer; font-size: 14px;
}
.inline-menu button:hover { background: #f5f5f5; }
.inline-menu button.danger { color: var(--danger); }

.chat-panel { border-right: 0; background: #f5f5f5; }
.chat-head {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 4px; background: #f7f7f7; min-height: 52px;
}
.chat-title { flex: 1; min-width: 0; text-align: center; }
.chat-title strong { font-size: 16px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-toolbar {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px;
  background: #fff; border-bottom: 1px solid var(--line);
}
.messages {
  flex: 1; overflow: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 12px;
  background: #f5f5f5;
}
.bubble-row { display: flex; gap: 8px; max-width: min(720px, 92%); }
.bubble-row.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble {
  background: #fff; padding: 10px 12px; border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04); white-space: pre-wrap; word-break: break-word;
}
.bubble-row.me .bubble { background: #95ec69; }
.bubble.system { align-self: center; background: transparent; box-shadow: none; color: var(--muted); font-size: 12px; }
.bubble img.media { max-width: 240px; border-radius: 4px; display: block; }
.composer {
  border-top: 1px solid var(--line); background: #f7f7f7; padding: 10px 12px;
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: end;
  padding-bottom: calc(10px + var(--safe-bottom));
}
.composer textarea { min-height: 40px; max-height: 120px; resize: vertical; border-radius: 6px; }
.voice-msg { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.voice-msg audio { width: 100%; height: 32px; }
.read-state { margin-top: 4px; cursor: default; text-align: right; }
.bubble-row.me .read-state { cursor: pointer; }

/* Discover / Me */
.discover-list { padding: 12px 0; background: var(--bg); flex: 1; overflow: auto; }
.discover-row {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 0; background: #fff; cursor: pointer; text-align: left;
  border-bottom: 1px solid #f0f0f0; color: var(--ink); font-size: 16px;
}
.discover-row:first-child { border-top: 1px solid #f0f0f0; }
.discover-row:active { background: #f5f5f5; }
.d-ico {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  background: #07c160;
}
.d-moment { background: #f5a623; }
.d-todo { background: #10aeff; }
.d-org { background: #6467f0; }
.d-text { flex: 1; }
.d-chev { color: #c0c0c0; font-size: 20px; }

.me-page { background: var(--bg); padding-bottom: 24px; }
.me-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff; padding: 18px 16px; margin-bottom: 10px;
}
.cell-group {
  background: #fff; margin-bottom: 10px; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
}
.cell-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; font-size: 13px; color: var(--muted);
}
.cell-row, .cell-field, .cell-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 0; border-bottom: 1px solid #f0f0f0;
  background: #fff; color: var(--ink); font-size: 15px; text-align: left; cursor: pointer;
}
.cell-row:last-child, .cell-field:last-child { border-bottom: 0; }
.cell-row.switch { cursor: default; }
.cell-row.muted { color: var(--muted); font-size: 14px; }
.cell-row.danger { color: var(--danger); justify-content: center; font-weight: 600; }
.cell-field { display: grid; grid-template-columns: 64px 1fr; align-items: center; cursor: default; color: var(--muted); font-size: 14px; }
.cell-field input, .cell-field select {
  border: 0; background: transparent; padding: 0; text-align: right; color: var(--ink); font-size: 15px; outline: none;
}
.cell-btn.primary { justify-content: center; color: var(--accent); font-weight: 600; border-bottom: 0; }
.bot-item, .device-row {
  padding: 12px 16px; border-bottom: 1px solid #f0f0f0;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between;
}
.bot-item .tiny, .device-row .meta { width: 100%; }
.me-foot { text-align: center; padding: 8px 16px 20px; }

.call-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 28, 22, .92);
  display: grid; place-items: center; padding: 20px;
}
.call-stage {
  width: min(520px, 96vw); text-align: center; color: #fff; position: relative;
  min-height: 420px; display: flex; flex-direction: column; justify-content: space-between;
}
.call-stage.video { width: min(880px, 96vw); min-height: min(70vh, 560px); }
.call-remote {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  border-radius: 20px; background: #0b1f18; z-index: 0;
}
.call-local {
  position: absolute; right: 16px; top: 16px; width: 120px; height: 160px;
  object-fit: cover; border-radius: 12px; z-index: 2; background: #123;
  border: 2px solid rgba(255,255,255,.35);
}
.call-meta { position: relative; z-index: 1; padding: 40px 16px 16px; }
.call-meta h2 { margin: 0 0 8px; font-size: 24px; }
.call-actions { position: relative; z-index: 1; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 20px; }
.call-btn { min-width: 96px; border-radius: 999px; padding: 12px 18px; background: rgba(255,255,255,.12); color: #fff; border: 0; }
.call-btn.accept { background: #07c160; }
.call-btn.hang { background: #fa5151; }
.call-weak { color: #ffd666; margin-top: 8px; font-size: 13px; }
.notice-bar.unread { background: rgba(245,166,35,.12); border-left: 3px solid #f5a623; }
.empty {
  height: 100%; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px;
}
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1000px 500px at 0% 0%, rgba(7,193,96,.25), transparent 50%),
    linear-gradient(145deg, #0d1f16, #1a3d2c 55%, #2a5a40);
}
.login-box {
  width: min(440px, 94vw); background: rgba(255,255,255,.98); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow);
}
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; }
.tabs button.active { background: var(--bg-deep); color: #fff; }
.moment-card {
  background: #fff; border-radius: 0; padding: 14px 16px; margin-bottom: 0;
  border-bottom: 1px solid var(--line);
}
.moment-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.moment-media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.tiny { font-size: 12px; color: var(--muted); }
.desktop-only { display: grid; }
.mobile-only { display: none !important; }

/* Admin — keep green brand */
.admin-body {
  margin: 0; min-height: 100vh; background: #edf3ef;
  display: flex; align-items: stretch;
  --bg-deep: #0f3d2e;
  --accent: #1f7a54;
  --line: #d5e3da;
  --ink: #14241c;
  --muted: #5d7267;
}
.admin-side {
  box-sizing: border-box;
  width: 200px; min-width: 200px; max-width: 200px; flex: 0 0 200px;
  background: var(--bg-deep); color: #e7f2ec; padding: 18px 10px;
  display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto;
}
.side-brand { padding: 8px 8px 18px; }
.side-brand strong { display: block; font-size: 17px; }
.side-brand span { color: #a9c4b6; font-size: 12px; }
.admin-side nav { display: grid; gap: 4px; flex: 1; align-content: start; }
.admin-side nav a {
  color: inherit; padding: 9px 10px; border-radius: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; box-sizing: border-box; max-width: 100%;
}
.admin-side nav a.active, .admin-side nav a:hover { background: rgba(255,255,255,.1); }
.side-foot { padding: 12px 8px; color: #a9c4b6; font-size: 12px; word-break: break-all; }
.admin-main {
  flex: 1 1 auto; min-width: 0; width: auto;
  display: flex; flex-direction: column; overflow: hidden;
}
.admin-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; background: rgba(255,255,255,.7); border-bottom: 1px solid var(--line); }
.admin-top h1 { margin: 0; font-size: 1.2rem; }
.admin-content { padding: 20px; overflow: auto; max-width: 100%; box-sizing: border-box; }
.admin-footer { padding: 12px 22px; color: var(--muted); font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 16px; padding: 16px; border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font-size: 1.6rem; overflow-wrap: anywhere; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; min-width: 0; overflow: hidden; }
.panel > h3 { margin-top: 0; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; max-width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; table-layout: fixed; }
.table th, .table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left;
  font-size: 14px; vertical-align: top; overflow-wrap: anywhere; word-break: break-word;
}
.table.check-table th:nth-child(1), .table.check-table td:nth-child(1) { width: 48px; }
.table.check-table th:nth-child(3), .table.check-table td:nth-child(3) { width: 72px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.switch-row {
  display: flex !important; align-items: flex-start; gap: 12px;
  grid-template-columns: none !important; margin: 0;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.switch-row:last-of-type { border-bottom: 0; }
.switch-row input[type=checkbox] { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; }
.switch-row > span { display: block; min-width: 0; flex: 1; line-height: 1.45; }
.switch-row > span b { display: block; font-size: 14px; font-weight: 600; color: #123528; }
.switch-row small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; font-size: 12px; }
.module-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between; margin-bottom: 4px;
}
.module-toolbar .tips { margin: 0; flex: 1; min-width: 160px; }
.module-toolbar .actions { display: flex; gap: 8px; flex-shrink: 0; }
.module-list { display: grid; gap: 0; }
.module-actions { display: flex; gap: 8px; margin-top: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 14px; }
.inline-form { display: inline; }

.net-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: #b54708; color: #fff; text-align: center; padding: 8px; font-size: 13px;
}
.invite-banner {
  position: fixed; top: 0; left: 72px; right: 0; z-index: 90;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
}
.reply-quote {
  background: rgba(0,0,0,.04); border-left: 3px solid var(--accent);
  padding: 6px 8px; margin-bottom: 6px; border-radius: 4px;
  font-size: 12px; color: var(--muted);
}
.reply-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; background: #eef6f1; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.msg-actions {
  display: none; gap: 8px; margin-top: 6px;
}
.bubble:hover .msg-actions { display: flex; }
.msg-actions button {
  border: 0; background: transparent; color: var(--accent-2); font-size: 12px; cursor: pointer; padding: 0;
}
.at-panel {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0;
}
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.45);
  display: grid; place-items: center; padding: 16px;
}
.toast {
  position: fixed; left: 50%; bottom: calc(80px + var(--safe-bottom)); transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 99;
}
.notice-bar {
  padding: 8px 14px; background: #fff8e6; border-bottom: 1px solid #f5e0a8;
  color: #7a5b00; font-size: 13px;
}
.vote-list { padding: 8px 12px 16px; display: grid; gap: 10px; }
.vote-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px;
}
.vote-card .title { font-weight: 600; margin-bottom: 8px; }
.vote-opt { margin: 4px 0; }

@media (max-width: 960px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: inline-grid !important; }
  .invite-banner { left: 0; top: 0; }
  .app-shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .nav-rail {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(var(--nav-h) + var(--safe-bottom));
    flex-direction: row; justify-content: space-around; align-items: flex-start;
    z-index: 20; padding: 6px 4px var(--safe-bottom);
    background: #f7f7f7; color: #191919;
    border-top: 1px solid #e5e5e5;
  }
  .nav-rail .logo { display: none; }
  .nav-item { color: #7f7f7f; padding: 4px 2px; max-width: 72px; }
  .nav-item.active { color: #07c160; background: transparent; }
  .nav-item.active .nav-ico { background: #07c160; opacity: 1; }
  .nav-item:hover { background: transparent; }
  .nav-item .nav-label { font-size: 10px; }
  .side-panel { display: none; }
  .side-panel.show, .sub-panel.show { display: flex; position: absolute; inset: 0 0 calc(var(--nav-h) + var(--safe-bottom)) 0; z-index: 10; }
  .chat-panel { min-height: calc(100vh - var(--nav-h) - var(--safe-bottom)); min-height: calc(100dvh - var(--nav-h) - var(--safe-bottom)); }
  .admin-body { display: block; }
  .admin-side { display: none; }
  .admin-main { width: 100%; }
  .stat-grid, .grid-2 { grid-template-columns: 1fr 1fr; }
  .composer { grid-template-columns: auto auto 1fr auto; }
  .msg-actions { display: flex; flex-wrap: wrap; }
}
