/*
 * SUPER CHIOCHIO 成长花园管理系统 V1.0
 * 版权所有 © 2026 超级有爱（杭州）智能科技有限公司
 * 统一社会信用代码：91330110MAEPEDL512
 * 开发完成日期：2026-11-02　首次发表日期：2026-11-02
 */

:root {
  --paper: #f6f1e7;
  --paper-deep: #efe8da;
  --card: #fffdf8;
  --ink: #2b3a31;
  --ink-soft: #4c5b51;
  --muted: #7d887d;
  --line: #e3dcca;
  --line-soft: #ece6d8;
  --sage: #6f8f72;
  --deep: #2f4a3a;
  --rose: #b06a7e;
  --gold: #c2a15f;
  --amber: #c9894c;
  --danger: #a9513f;
  --shadow: 0 20px 50px -28px rgba(47, 74, 58, 0.35);
  --shadow-soft: 0 10px 30px -18px rgba(47, 74, 58, 0.28);
  --radius: 22px;
  --serif: "Songti SC", "Noto Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--deep); }
[hidden] { display: none !important; }

.page-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 520px at 12% -8%, rgba(176, 106, 126, 0.13), transparent 62%),
    radial-gradient(680px 500px at 96% 4%, rgba(194, 161, 95, 0.14), transparent 60%),
    radial-gradient(900px 640px at 60% 108%, rgba(111, 143, 114, 0.14), transparent 64%),
    linear-gradient(180deg, #f9f5ec 0%, #f4eee3 58%, #f1ebdf 100%);
}

.screen { min-height: 100vh; }

/* ---------------- 登录 ---------------- */

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px clamp(20px, 5vw, 72px);
}

.login-visual { display: grid; place-items: center; }
.botanical { width: min(100%, 430px); height: auto; }
.botanical .stem path {
  fill: none;
  stroke: rgba(47, 74, 58, 0.55);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.botanical .leaves ellipse { fill: rgba(111, 143, 114, 0.42); }
.botanical .bloom .halo { fill: rgba(194, 161, 95, 0.13); }
.botanical .bloom .petals ellipse { fill: rgba(176, 106, 126, 0.32); }
.botanical .bloom .core { fill: var(--gold); }
.botanical .motes circle { fill: rgba(47, 74, 58, 0.22); }
.botanical .bloom { transform-origin: 210px 128px; animation: bloom-in 1.6s ease-out both; }
.botanical .petals ellipse { animation: petal-in 1.3s cubic-bezier(0.2, 0.9, 0.25, 1) both; }
.botanical .petals ellipse:nth-child(2) { animation-delay: 0.12s; }
.botanical .petals ellipse:nth-child(3) { animation-delay: 0.24s; }
.botanical .petals ellipse:nth-child(4) { animation-delay: 0.36s; }
.botanical .petals ellipse:nth-child(5) { animation-delay: 0.48s; }

@keyframes bloom-in {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes petal-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.login-card h1 {
  margin: 4px 0 10px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: 0.04em;
}
.eyebrow {
  margin: 0;
  color: var(--sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}
.lede { margin: 0 0 28px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.field { display: block; margin-bottom: 16px; }
.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.field input,
.select-wrap select,
.inline-form input,
.inline-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus,
.select-wrap select:focus,
.inline-form input:focus,
.inline-form select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(111, 143, 114, 0.16);
}

.primary-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(160deg, #365441, #2a4233);
  color: #f8f4ea;
  font-weight: 600;
  letter-spacing: 0.14em;
  box-shadow: 0 14px 26px -16px rgba(47, 74, 58, 0.7);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 30px -16px rgba(47, 74, 58, 0.7); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.primary-btn.small { width: auto; margin: 0; padding: 10px 20px; font-size: 13px; }

.form-error { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.fineprint { margin: 18px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

/* ---------------- 主框架 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(150deg, #f0dfe4, #e8d3b4);
  color: var(--deep);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 20px -12px rgba(47, 74, 58, 0.5);
}
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: 0.22em; }
.brand strong { display: block; font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: 0.06em; }

.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 12px;
}
.badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(201, 137, 76, 0.14);
  color: #8c5a2a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.ghost-btn {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.ghost-btn:hover { background: var(--card); border-color: #d3c9b4; }

.layout {
  display: grid;
  grid-template-columns: 318px minmax(0, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 40px) clamp(16px, 4vw, 44px) 72px;
  align-items: start;
}

/* ---------------- 侧栏 ---------------- */

.sidebar { display: grid; gap: 16px; }
.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-soft);
}
.panel-title { margin: 0 0 12px; color: var(--sage); font-size: 10px; font-weight: 700; letter-spacing: 0.2em; }
.select-wrap { display: block; }
.select-wrap select { appearance: none; background-image: none; padding-right: 34px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 15px;
  bottom: 11px;
  color: var(--muted);
  pointer-events: none;
}
.hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-head strong { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: 0.08em; }
.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
}
.icon-btn:hover { background: #fff; border-color: #d3c9b4; }

.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.weekdays span { text-align: center; color: var(--muted); font-size: 10px; letter-spacing: 0.06em; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
}
.cal-cell.empty { pointer-events: none; }
.cal-cell.has-report::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  transform: translateX(-50%);
}
.cal-cell.is-today { color: var(--deep); font-weight: 700; }
.cal-cell.is-today::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(176, 106, 126, 0.5);
  border-radius: 9px;
}
.cal-cell.selected {
  background: var(--deep);
  color: #f8f4ea;
  box-shadow: 0 8px 18px -12px rgba(47, 74, 58, 0.8);
}
.cal-cell.selected::after { background: #e9d6a8; }
.cal-cell:disabled { color: #c3bfb2; cursor: default; }
.cal-cell:not(:disabled):not(.selected):hover { background: #f3ecdd; }

.legend { display: flex; gap: 14px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.has-report { background: var(--sage); }
.dot.is-today { background: transparent; border: 1px dashed var(--rose); }

.state-panel .garden-state { display: flex; align-items: flex-start; gap: 10px; }
.state-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--sage); flex: 0 0 auto; }
.state-dot.is-empty { background: #c8bfae; }
.state-dot.is-safety { background: var(--danger); }
.garden-state p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

/* ---------------- 内容区 ---------------- */

.content { min-width: 0; }
.date-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.date-head h1 { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(30px, 3.6vw, 46px); font-weight: 500; letter-spacing: 0.01em; }
.weekday { color: var(--muted); font-size: 12px; letter-spacing: 0.18em; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 12px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(420px 300px at 88% 10%, rgba(194, 161, 95, 0.14), transparent 66%),
    radial-gradient(320px 260px at 6% 100%, rgba(176, 106, 126, 0.1), transparent 62%),
    var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-copy { align-self: center; }
.chip {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(111, 143, 114, 0.14);
  color: #4e6b52;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.chip.is-safety { background: rgba(169, 81, 63, 0.13); color: #8d3f31; }
.chip.is-empty { background: rgba(125, 136, 125, 0.16); color: #6a7568; }
.hero h2 { margin: 14px 0 10px; font-family: var(--serif); font-size: clamp(24px, 2.6vw, 33px); font-weight: 500; line-height: 1.35; }
.hero-copy > p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.whisper { margin-top: 14px !important; padding-left: 14px; border-left: 2px solid var(--line); color: var(--muted) !important; font-size: 13px !important; }

.flower-wrap { display: grid; place-items: center; }
#flower { width: 100%; max-width: 320px; height: auto; }
.flower-ring { fill: none; stroke: rgba(47, 74, 58, 0.12); stroke-width: 1; }
.flower-axis { stroke: rgba(47, 74, 58, 0.16); stroke-width: 1; }
.flower-poly {
  fill: rgba(111, 143, 114, 0.28);
  stroke: rgba(47, 74, 58, 0.6);
  stroke-width: 1.4;
  transition: opacity 0.3s ease;
}
.flower-label { fill: var(--ink-soft); font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; }
.flower-value { fill: var(--muted); font-family: var(--sans); font-size: 10px; }
.flower-node { stroke: rgba(47, 74, 58, 0.55); stroke-width: 1.2; }
.flower-core-label { fill: var(--muted); font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; }
.flower-core-value { fill: var(--ink); font-family: var(--serif); font-size: 15px; }

.section { margin-top: clamp(26px, 3vw, 40px); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: clamp(20px, 2vw, 25px); font-weight: 500; }
.section-head > p { margin: 0; color: var(--muted); font-size: 12px; }

.dimension-list { display: grid; gap: 10px; }
.dimension {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.78);
}
.dimension-name { display: flex; flex-direction: column; gap: 1px; }
.dimension-name strong { font-size: 14px; white-space: nowrap; }
.dimension-name small { color: var(--muted); font-size: 9px; letter-spacing: 0.12em; }
.dimension-body { min-width: 0; }
.bar { height: 6px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; transition: width 0.8s cubic-bezier(0.2, 0.8, 0.3, 1); }
.bar-fill.emotion { background: #b06a7e; }
.bar-fill.expression { background: #7f9fb2; }
.bar-fill.creativity { background: #c2a15f; }
.bar-fill.courage { background: #a97f5a; }
.bar-fill.focus { background: #6f8f72; }
.dimension-basis { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.dimension-score { text-align: right; }
.dimension-score strong { display: block; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.dimension-score span { color: var(--sage); font-size: 11px; }

.report-card {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.story-summary { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.prose { color: var(--ink-soft); font-size: 15px; line-height: 2.05; }
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose p.quote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: #fbf6e9;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
}

.insight-card {
  position: relative;
  margin-top: 20px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(140deg, #f4eee0, #f8f3e7 60%, #f3ece0);
  overflow: hidden;
}
.insight-card::before {
  content: "❝";
  position: absolute;
  top: 10px;
  right: 24px;
  color: rgba(194, 161, 95, 0.28);
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
}
.insight-card p:last-child {
  position: relative;
  margin: 10px 0 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.95;
}

.safety-card {
  margin-top: 20px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(169, 81, 63, 0.28);
  border-radius: 24px;
  background: linear-gradient(150deg, #fbefe9, #fdf6f0);
  box-shadow: 0 16px 40px -30px rgba(169, 81, 63, 0.7);
}
.safety-level {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(169, 81, 63, 0.14);
  color: #8d3f31;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.safety-card h2 { margin: 12px 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.safety-card > p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.safety-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.safety-categories span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(169, 81, 63, 0.1);
  color: #8d3f31;
  font-size: 11px;
}
.action-plan { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(169, 81, 63, 0.18); }
.opener { margin: 8px 0 14px; color: var(--ink); font-family: var(--serif); font-size: 16px; }
.action-plan ul { margin: 6px 0 14px; padding-left: 20px; color: var(--ink-soft); font-size: 13px; }
.action-plan ul li { margin-bottom: 4px; }
.do-not li { color: #8d5b50; }
.resources { display: flex; flex-wrap: wrap; gap: 10px; }
.resources a, .resources span {
  padding: 7px 12px;
  border: 1px solid rgba(169, 81, 63, 0.24);
  border-radius: 12px;
  background: #fff;
  color: #8d3f31;
  font-size: 12px;
  text-decoration: none;
}

.error-card, .empty-card {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.error-card h2, .empty-card h2 { margin: 10px 0 8px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.error-card p:not(.eyebrow), .empty-card p { margin: 0 auto 18px; max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.empty-art { width: 150px; height: auto; }
.empty-stem { fill: none; stroke: rgba(47, 74, 58, 0.3); stroke-width: 1.6; }
.empty-leaf { fill: rgba(111, 143, 114, 0.28); }
.empty-bud { fill: rgba(176, 106, 126, 0.25); }

.loading { display: grid; gap: 16px; }
.skeleton {
  height: 84px;
  border-radius: 18px;
  background: linear-gradient(100deg, #f0eade 30%, #f8f4ea 50%, #f0eade 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite linear;
}
.skeleton-title { width: 42%; height: 40px; }
.skeleton-hero { height: 280px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------------- 账号管理 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(43, 58, 49, 0.34);
  backdrop-filter: blur(4px);
}
.modal-panel {
  width: min(760px, 100%);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 40px 90px -40px rgba(43, 58, 49, 0.6);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.modal-body { padding: 22px 26px 30px; overflow-y: auto; display: grid; gap: 28px; }
.admin-block h3 { margin: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--sage); }
.inline-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.inline-form label { display: grid; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.inline-form .primary-btn { justify-self: start; }

.user-list { display: grid; gap: 8px; }
.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 15px;
  background: #fdfaf2;
}
.user-row strong { display: block; font-size: 14px; }
.user-row small { color: var(--muted); font-size: 11px; }
.user-row .row-actions { display: flex; gap: 6px; }
.row-actions button {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11px;
}
.row-actions button:hover { border-color: #d3c9b4; }
.row-actions button.danger { color: var(--danger); border-color: rgba(169, 81, 63, 0.3); }
.audit-list { display: grid; gap: 6px; }
.audit-row { display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #fbf7ee; font-size: 11px; color: var(--muted); }
.audit-row time { flex: 0 0 auto; color: #a39a88; }
.form-msg { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: var(--danger); }
.form-msg.ok { color: var(--sage); }
.modal-panel.small { width: min(440px, 100%); }
.modal-body.single { gap: 12px; }
.inline-form.single { grid-template-columns: minmax(0, 1fr); }

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 90;
  transform: translateX(-50%);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 18px 40px -22px rgba(43, 58, 49, 0.75);
  animation: toast-in 0.18s ease-out;
}
.toast.danger { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fdfaf2; font-size: 12px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1020px) {
  .login-screen { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .login-visual { order: 2; }
  .botanical { width: min(72vw, 340px); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-panel { grid-column: span 2; }
}

@media (max-width: 760px) {
  .login-screen { padding: 28px 18px 56px; }
  .login-visual { display: none; }
  .login-card { padding: 26px 22px; border-radius: 22px; }
  .hero { grid-template-columns: 1fr; }
  .flower-wrap { order: -1; }
  #flower { max-width: 250px; }
  .sidebar { grid-template-columns: 1fr; }
  .state-panel { grid-column: auto; }
  .date-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .dimension { grid-template-columns: 78px minmax(0, 1fr) 52px; padding: 13px 14px; }
  .inline-form { grid-template-columns: 1fr; }
  .user-row { grid-template-columns: 1fr; }
  .user-row .row-actions { justify-content: flex-start; }
  .topbar { padding: 12px 16px; }
  .brand strong { font-size: 17px; }
  .topbar-right { gap: 6px; }
  .user-chip { display: none !important; }
  .modal { padding: 0; align-items: end; }
  .modal-panel { max-height: 92vh; border-radius: 22px 22px 0 0; }
  .prose { font-size: 14px; line-height: 1.95; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .bar-fill { transition: none; }
}
