:root {
  --sb-primary: #0f766e;
  --sb-primary-strong: #115e59;
  --sb-accent: #1d4ed8;
  --sb-bg: #eef7f5;
  --sb-panel: rgba(255, 255, 255, 0.92);
  --sb-text: #10201d;
  --sb-muted: #64748b;
  --sb-border: rgba(15, 118, 110, 0.14);
  --sb-warning: #f59e0b;
  --sb-danger: #dc2626;
  --sb-success: #16a34a;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(13, 148, 136, 0.22), transparent 34rem),
    linear-gradient(135deg, #f8fbfa 0%, var(--sb-bg) 48%, #e7f0ff 100%);
  color: var(--sb-text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 86px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--sb-border);
}

.topbar-title {
  font-size: 19px;
  font-weight: 800;
}

.topbar-subtitle {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: var(--sb-success);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.13);
}

.topbar-chip {
  flex: none;
  max-width: 120px;
  padding: 8px 10px;
  color: var(--sb-primary-strong);
  background: #d9f7f1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  padding: 16px;
}

.hero-card,
.panel-card {
  border: 1px solid var(--sb-border);
  border-radius: 24px;
  background: var(--sb-panel);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
}

.hero-card {
  padding: 22px;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--sb-primary-strong);
  background: rgba(15, 118, 110, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  margin-top: 10px;
  font-size: 25px;
  line-height: 1.25;
}

.hero-desc {
  margin-top: 8px;
  color: var(--sb-muted);
  line-height: 1.6;
}

.grid-2,
.grid-3,
.quick-grid {
  display: grid;
  gap: 12px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-stats {
  margin-top: 18px;
}

.stat-mini,
.summary-card {
  padding: 14px;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.stat-mini-label,
.summary-label {
  color: var(--sb-muted);
  font-size: 12px;
}

.stat-mini-value,
.summary-value {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 900;
}

.summary-desc {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.section-block {
  margin-top: 16px;
  padding: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 900;
}

.muted {
  color: var(--sb-muted);
  font-size: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.quick-action,
.todo-card,
.priority-card,
.list-item,
.action-card {
  width: 100%;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(15, 118, 110, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.quick-action {
  padding: 14px;
}

.quick-icon {
  display: block;
  font-size: 24px;
}

.quick-label,
.todo-label,
.item-title {
  display: block;
  margin-top: 8px;
  font-weight: 900;
}

.quick-desc,
.todo-desc,
.item-meta,
.item-desc {
  display: block;
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
  line-height: 1.45;
}

.priority-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  color: #fff;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--sb-primary), var(--sb-accent));
  box-shadow: 0 18px 45px rgba(15, 118, 110, 0.22);
}

.priority-callout.warning {
  background: linear-gradient(135deg, #b45309, #dc2626);
}

.priority-callout-tag,
.priority-callout-desc {
  opacity: 0.86;
  font-size: 12px;
}

.priority-callout-title {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 900;
}

.priority-callout-btn,
.refresh-btn,
.link-btn,
.action-btn,
.modal-btn,
.login-btn {
  padding: 10px 13px;
  color: #fff;
  background: var(--sb-primary);
  border-radius: 14px;
  font-weight: 800;
}

.priority-callout-btn {
  flex: none;
  background: rgba(255, 255, 255, 0.2);
}

.link-btn {
  color: var(--sb-primary-strong);
  background: rgba(15, 118, 110, 0.08);
}

.todo-list,
.priority-list,
.device-list,
.alert-list,
.timeline,
.store-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.todo-card,
.priority-card,
.list-item,
.action-card {
  padding: 14px;
}

.todo-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.todo-left,
.todo-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.todo-icon {
  font-size: 22px;
}

.todo-right {
  text-align: right;
  color: var(--sb-primary-strong);
  flex-direction: column;
  gap: 2px;
}

.badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge-success {
  color: #166534;
  background: #dcfce7;
}

.badge-warning {
  color: #92400e;
  background: #fef3c7;
}

.badge-danger {
  color: #991b1b;
  background: #fee2e2;
}

.badge-info {
  color: #1e3a8a;
  background: #dbeafe;
}

.filters {
  display: grid;
  gap: 10px;
}

.search-input,
.select-input,
.note-input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--sb-border);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--sb-text);
  background: #fff;
}

.note-input {
  min-height: 104px;
  resize: vertical;
}

.chip-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip-btn {
  flex: none;
  padding: 8px 10px;
  color: var(--sb-muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--sb-border);
  border-radius: 999px;
  font-weight: 800;
}

.chip-btn.active {
  color: #fff;
  background: var(--sb-primary);
}

.item-main {
  min-width: 0;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.action-btn.secondary,
.modal-btn.ghost {
  color: var(--sb-primary-strong);
  background: rgba(15, 118, 110, 0.08);
}

.empty-state {
  padding: 20px;
  color: var(--sb-muted);
  text-align: center;
}

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--sb-border);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(18px);
}

.tabbar-item {
  display: grid;
  gap: 2px;
  color: var(--sb-muted);
  text-align: center;
  text-decoration: none;
  font-size: 11px;
  border-radius: 16px;
  padding: 7px 4px;
}

.tabbar-item.active {
  color: var(--sb-primary-strong);
  background: rgba(15, 118, 110, 0.1);
  font-weight: 900;
}

.login-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 20px;
}

.login-card {
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.login-card h1 {
  margin-top: 10px;
  font-size: 26px;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  align-items: end;
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  padding: 18px;
  border-radius: 24px 24px 0 0;
  background: #fff;
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-subtitle {
  margin-top: 4px;
  color: var(--sb-muted);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.toast {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 92px;
  z-index: 60;
  padding: 12px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  text-align: center;
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 480px;
    margin: 0 auto;
  }
}
