body[data-theme="candy"] {
  --sky: #65c7dd; --sky-strong: #f06f9b; --sky-deep: #b43f6a;
  --sky-soft: #fff0f6; --sky-pale: #fff8fb; --line: #f0dbe5;
  --pink: #49bccc; --pink-soft: #e9fbfd; --yellow: #ffd166;
  --ink: #493141; --muted: #866a7c; --shadow: 0 10px 28px rgba(216,98,141,.11);
}
html.has-session #login { display: none !important; }
html.has-session #app { display: grid !important; }
html.has-session #content:empty::before { content: "正在恢复登录状态…"; display: block; padding: 80px 20px; text-align: center; color: var(--muted); font-size: 13px; }
body[data-theme="mint"] {
  --sky: #63cdb3; --sky-strong: #35b995; --sky-deep: #187b67;
  --sky-soft: #e7f9f4; --sky-pale: #f5fcfa; --line: #d3ebe4;
  --pink: #ff8c82; --pink-soft: #fff0ee; --yellow: #f4c95d;
  --ink: #23453e; --muted: #67857e; --shadow: 0 10px 28px rgba(53,185,149,.10);
}
body[data-theme="peach"] {
  --sky: #54bdb5; --sky-strong: #f28a78; --sky-deep: #b45143;
  --sky-soft: #fff0ed; --sky-pale: #fff9f7; --line: #f0ddd8;
  --pink: #36a9a2; --pink-soft: #e8f8f7; --yellow: #f3c969;
  --ink: #4b3733; --muted: #876e68; --shadow: 0 10px 28px rgba(221,120,103,.11);
}
body[data-theme="lavender"] {
  --sky: #69c5bd; --sky-strong: #8d78d6; --sky-deep: #5d4cab;
  --sky-soft: #f0edff; --sky-pale: #faf9ff; --line: #e2def3;
  --pink: #ff9eb5; --pink-soft: #fff0f4; --yellow: #f4cc67;
  --ink: #39334f; --muted: #756f8c; --shadow: 0 10px 28px rgba(116,94,190,.11);
}
body[data-theme] { background: var(--sky-pale); }
body[data-theme] .login-page { background: var(--sky-pale); }
body[data-theme] .login-panel { background: var(--sky-strong); }
body[data-theme] .sidebar { background: var(--sky-soft); border-right-color: var(--line); }
body[data-theme] .side-brand, body[data-theme] .side-user { border-color: var(--line); }
body[data-theme] nav button:hover { background: var(--sky-pale); }
body[data-theme] .data-table th { background: var(--sky-pale); color: var(--sky-deep); }
body[data-theme] .data-table tr:hover td { background: var(--sky-pale); }
.order-click-row { cursor: pointer; }
.order-click-row:focus { outline: 2px solid var(--sky-strong); outline-offset: -2px; }
.theme-picker { display: grid; grid-template-columns: repeat(5,minmax(105px,1fr)); gap: 10px; }
.theme-choice { min-height: 116px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 12px 9px; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; }
.theme-choice:hover, .theme-choice.active { border-color: var(--sky-strong); background: var(--sky-pale); box-shadow: 0 0 0 2px var(--sky-soft); }
.theme-choice.active { color: var(--sky-deep); }
.theme-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky-strong); }
.theme-choice b { font-size: 12px; }
.theme-choice small { font-size: 10px; color: var(--muted); }
.theme-colors { display: flex; gap: 4px; }
.theme-colors i { display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.target-period-label { display: flex; align-items: center; gap: 8px; margin: 4px 0 13px; color: var(--sky-deep); font-size: 12px; }
.target-period-label svg { width: 17px; }
.target-period-label span { color: var(--muted); }
.target-report-stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.target-report-stats .stat { min-height: 94px; padding: 14px; }
.target-report-stats .stat strong { font-size: 20px; }
@media (max-width: 1200px) {
  .theme-picker { grid-template-columns: repeat(3,1fr); }
  .target-report-stats { grid-template-columns: repeat(3,1fr); }
}

body[data-font="rounded"] { font-family: "YouYuan", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
body[data-font="standard"] { font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
body[data-font="modern"] { font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }

body[data-ui="compact"] .topbar { height: 72px; }
body[data-ui="compact"] .content { padding-top: 17px; padding-bottom: 28px; }
body[data-ui="compact"] .panel { padding: 13px; }
body[data-ui="compact"] .panel-head { margin-bottom: 10px; }
body[data-ui="compact"] .stat { min-height: 88px; padding: 13px; }
body[data-ui="compact"] .stat strong { font-size: 21px; }
body[data-ui="compact"] .data-table th,
body[data-ui="compact"] .data-table td { padding: 8px 10px; }
body[data-ui="compact"] nav button { height: 37px; margin: 1px 0; }
body[data-ui="clean"] { --shadow: none; }
body[data-ui="clean"] .panel,
body[data-ui="clean"] .stat,
body[data-ui="clean"] .table-wrap { box-shadow: none; }
body[data-ui="clean"] .sidebar { background: #fff; }
body[data-ui="clean"] .panel { border-color: transparent; }

.appearance-form { display: grid; grid-template-columns: repeat(3,minmax(120px,1fr)); gap: 10px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.appearance-form label { color: var(--muted); font-size: 11px; font-weight: 700; }
.appearance-form select { width: 100%; height: 38px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
.appearance-form .btn { grid-column: 1/-1; min-width: 150px; justify-self: end; white-space: nowrap; }

body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
body[data-motion="gentle"] button,
body[data-motion="gentle"] .panel,
body[data-motion="gentle"] .stat,
body[data-motion="gentle"] .notice { transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease; }
body[data-motion="playful"] #content > * { animation: appearance-in .28s ease both; }
body[data-motion="playful"] #content > *:nth-child(2) { animation-delay: .04s; }
body[data-motion="playful"] #content > *:nth-child(3) { animation-delay: .08s; }
body[data-motion="playful"] button,
body[data-motion="playful"] .stat,
body[data-motion="playful"] .theme-choice { transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
body[data-motion="playful"] button:hover,
body[data-motion="playful"] .stat:hover,
body[data-motion="playful"] .theme-choice:hover { transform: translateY(-2px); }
body[data-motion="playful"] .stat-icon svg,
body[data-motion="playful"] .theme-icon svg { animation: icon-breathe 2.4s ease-in-out infinite; }
@keyframes appearance-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes icon-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  body[data-motion] *, body[data-motion] *::before, body[data-motion] *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1050px) { .appearance-form { grid-template-columns: 1fr 1fr; } }
