:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #172330;
  background: #edf3f7;
  font-size: 16px;
  --navy: #173f5f;
  --blue: #256b8f;
  --gold: #f2aa4c;
  --red: #bd3d3a;
  --line: #dbe5eb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #e8f2f7 0, #f7fafb 48%, #e9f0f4 100%);
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.shell {
  max-width: 520px;
  margin: auto;
  min-height: 100vh;
  background: #f8fafb;
  box-shadow: 0 0 40px #173f5f18;
}
.topbar {
  background: var(--navy);
  color: #fff;
  padding: calc(18px + env(safe-area-inset-top)) 20px 20px;
}
.topbar h1 {
  font-size: 1.35rem;
  margin: 0;
}
.topbar p {
  margin: 5px 0 0;
  color: #cbdce7;
  font-size: 0.9rem;
}
.content {
  padding: 18px;
}
.auth {
  max-width: 430px;
  margin: 8vh auto;
  padding: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.brand h1 {
  margin: 0;
  font-size: 1.65rem;
}
.brand p {
  margin: 3px 0 0;
  color: #667;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 9px 24px #173f5f0c;
  margin-bottom: 14px;
}
.field {
  display: block;
  margin: 14px 0;
}
.field span {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
  color: #334757;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #cddbe3;
  border-radius: 12px;
  padding: 13px;
  background: #fff;
  outline: none;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #256b8f1a;
}
.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}
.btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  background: var(--navy);
  color: #fff;
}
.btn.block {
  width: 100%;
}
.btn.light {
  background: #eaf1f5;
  color: var(--navy);
}
.btn.danger {
  background: var(--red);
}
.link {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 10px;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tabs button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px;
}
.tabs button.active {
  background: var(--navy);
  color: #fff;
}
.space {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.space h3 {
  margin: 0 0 5px;
}
.meta {
  color: #73828d;
  font-size: 0.9rem;
}
.pill {
  border-radius: 99px;
  padding: 5px 9px;
  background: #e8f4ed;
  color: #267347;
  font-size: 0.8rem;
  white-space: nowrap;
}
.compose-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 12px 0;
}
.type {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: #fff;
  text-align: left;
}
.type.active {
  border: 2px solid var(--blue);
  background: #edf7fb;
}
.type strong,
.type small {
  display: block;
}
.type small {
  color: #71818b;
  margin-top: 3px;
}
.type.emergency.active {
  border-color: var(--red);
  background: #fff1f0;
}
.notice {
  border-left: 4px solid var(--blue);
}
.notice.broadcast {
  border-color: var(--red);
}
.notice p {
  margin: 7px 0;
  line-height: 1.55;
}
.empty {
  text-align: center;
  color: #76858f;
  padding: 34px 12px;
}
.row {
  display: flex;
  gap: 9px;
  align-items: center;
}
.row > * {
  flex: 1;
}
.hidden {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  background: #132b3d;
  color: #fff;
  padding: 11px 17px;
  border-radius: 10px;
  transition: 0.2s;
  pointer-events: none;
  z-index: 10;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.confirm {
  background: #fff4ed;
  border: 1px solid #f1c7ad;
  border-radius: 13px;
  padding: 14px;
  margin: 12px 0;
  color: #713b20;
}
.date-divider {
  margin: 20px 4px 10px;
  color: #60727e;
  font-size: 0.9rem;
  font-weight: 800;
}
.delete-message {
  color: var(--red);
}
@media (min-width: 700px) {
  .shell {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 24px;
    overflow: hidden;
  }
}
