:root {
  --ink: #263238;
  --muted: #77828a;
  --line: #e1e7e4;
  --canvas: #f4f6f5;
  --panel: #ffffff;
  --green: #1f7a5b;
  --green-dark: #146246;
  --green-soft: #e7f4ed;
  --coral: #cb5b4e;
  --gold: #bb7a20;
  --purple: #7161a7;
  --shadow: 0 8px 24px rgba(32, 48, 43, .07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 16px/1.55 "Microsoft YaHei", "PingFang SC", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.admin-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 30; top: 0; bottom: 0; width: 236px; overflow-y: auto; color: #dfece5; background: #173c32; padding: 28px 16px 22px; display: flex; flex-direction: column; transition: transform .2s ease; }
.brand, .login-brand { display: flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 800; color: #fff; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; justify-content: center; align-items: center; border-radius: 10px; color: #173c32; background: #f8d88d; font-weight: 800; }
.brand-subtitle { margin: 10px 0 28px 49px; color: #a9c3b7; font-size: 14px; }
.menu { display: grid; gap: 7px; }
.menu a { min-height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 7px; color: #d0e2d8; font-size: 16px; font-weight: 700; }
.menu a > span { width: 22px; text-align: center; color: #a9cbbb; font-size: 21px; }
.menu a:hover, .menu a.active { color: #fff; background: #28654f; }
.menu a.active > span { color: #ffe39a; }
.menu-group { display: block; }
.menu-group > summary { min-height: 48px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 7px; color: #d0e2d8; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.menu-group > summary::-webkit-details-marker, .menu-group > summary::marker { display: none; }
.menu-group > summary:hover, .menu-group > summary.active { color: #fff; background: #28654f; }
.menu-group > summary > span { width: 22px; text-align: center; color: #a9cbbb; font-size: 21px; }
.menu-group > summary.active > span { color: #ffe39a; }
.menu-chevron { margin-left: auto; color: #a9cbbb; font-size: 18px; line-height: 1; transform: rotate(0deg); transition: transform .18s ease; }
.menu-group[open] .menu-chevron { transform: rotate(180deg); }
.menu-submenu { display: grid; gap: 4px; margin: 3px 0 2px 36px; padding-left: 12px; border-left: 1px solid rgba(212, 233, 221, .2); }
.menu-submenu a { min-height: 40px; padding: 0 12px; border-radius: 6px; color: #bcd3c7; font-size: 14px; font-weight: 700; }
.menu-submenu a:hover, .menu-submenu a.active { color: #fff; background: rgba(74, 143, 112, .62); }
.sidebar-footer { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(212, 233, 221, .15); font-size: 13px; line-height: 1.7; color: #9cb9ab; }

.main { min-width: 0; flex: 1; margin-left: 236px; }
.topbar { height: 72px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-title { display: flex; align-items: baseline; gap: 13px; }
.topbar-title strong { font-size: 20px; }
.topbar-title span { color: var(--muted); font-size: 14px; }
.admin-user { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.admin-user .avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); }
.admin-user a { margin-left: 8px; color: var(--green); font-size: 14px; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); font-size: 24px; cursor: pointer; }
.content { max-width: 1530px; margin: 0 auto; padding: 30px 34px 50px; }

.page-heading { margin-bottom: 23px; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.page-heading h1 { margin: 0; font-size: 28px; line-height: 1.25; }
.page-heading p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 24px; }
.panel + .panel { margin-top: 22px; }
.panel h2 { margin: 0; color: #273631; font-size: 18px; }
.panel-head { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.panel-head p, .panel-head span { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.panel-head a, .text-action { color: var(--green); font-weight: 800; font-size: 15px; }
.table-panel { padding-bottom: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card { min-height: 142px; padding: 23px 24px; border: 1px solid var(--line); border-top: 4px solid #94c8af; border-radius: 8px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-card:nth-child(2) { border-top-color: #e7b65f; }
.stat-card:nth-child(3) { border-top-color: #d47a68; }
.stat-card:nth-child(4) { border-top-color: #9287bd; }
.stat-card span { color: var(--muted); font-weight: 700; }
.stat-card strong { margin-top: 4px; color: #1c4335; font-size: 34px; line-height: 1.2; }
.stat-card small { margin-top: auto; padding-top: 10px; color: var(--green); font-size: 14px; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(310px, .7fr); gap: 22px; margin-bottom: 22px; }
.metric-bars { display: grid; gap: 17px; }
.metric-bars > div { display: grid; grid-template-columns: 78px 1fr 32px; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.metric-bars b { height: 12px; overflow: hidden; border-radius: 99px; background: #e7eeea; }
.metric-bars i { display: block; height: 100%; border-radius: inherit; background: #4aa27b; }
.metric-bars > div:nth-child(2) i { background: #d49a42; }
.metric-bars > div:nth-child(3) i { background: #8475b5; }
.metric-bars > div:nth-child(4) i { background: #c86b61; }
.metric-bars em { color: var(--muted); font-style: normal; text-align: right; }
.notice-list { display: grid; gap: 16px; }
.notice-list > div { display: flex; align-items: center; gap: 10px; }
.notice-list p { margin: 0; font-size: 15px; }
.notice-list strong { color: var(--coral); font-size: 19px; }
.notice-dot { width: 10px; height: 10px; border-radius: 50%; }
.notice-dot.coral { background: var(--coral); }.notice-dot.gold { background: var(--gold); }.notice-dot.purple { background: var(--purple); }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 0 12px 13px; text-align: left; border-bottom: 1px solid var(--line); color: #68746e; font-size: 14px; font-weight: 800; white-space: nowrap; }
td { padding: 15px 12px; vertical-align: middle; border-bottom: 1px solid #edf1ef; font-size: 15px; }
tr:last-child td { border-bottom: 0; }
td strong, td span { display: block; }
td span, td small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.amount { color: var(--coral); font-weight: 800; }.truncate { max-width: 310px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge, .interaction-tag { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 28px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.badge.success { color: #187150; background: #e5f4eb; }.badge.warning { color: #9a5d08; background: #fff3d9; }.badge.danger { color: #a64339; background: #fce8e4; }.badge.muted { color: #5f6b68; background: #edf0ef; }
.interaction-tag.view { color: #37749b; background: #e7f2fb; }.interaction-tag.favorite { color: #b45c37; background: #fff0e5; }.interaction-tag.unlock { color: #6c57a5; background: #eeeafd; }.interaction-tag.greeting { color: #1f7a5b; background: #e5f4eb; }
.mini-progress { width: 92px; height: 8px; display: inline-block; overflow: hidden; margin-right: 6px; border-radius: 99px; background: #e6edeb; vertical-align: middle; }.mini-progress i { display: block; height: 100%; border-radius: inherit; background: #51a980; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-bottom: 20px; }
.filters > label { min-width: 150px; }
.filters > label input, .filters > label select { min-width: 150px; }
.activity-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 18px; margin-top: 5px; padding-top: 17px; border-top: 1px solid var(--line); }
.activity-summary strong { color: #1c4335; font-size: 18px; }
.activity-summary span { color: var(--muted); font-size: 14px; }
.activity-picker { min-width: min(560px, 100%); }
input, select, textarea { width: 100%; min-height: 42px; padding: 8px 11px; color: var(--ink); border: 1px solid #cdd8d3; border-radius: 6px; outline: none; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: #4ba37b; box-shadow: 0 0 0 3px rgba(75, 163, 123, .14); }
textarea { min-height: 88px; resize: vertical; }
.filters input { width: min(300px, 100%); }.filters select { width: 160px; }
label { display: grid; gap: 7px; color: #485650; font-size: 15px; font-weight: 800; }
.primary-button, .secondary-button, .danger-button, .primary-link, .login-form button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 17px; border: 1px solid transparent; border-radius: 6px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.primary-button, .primary-link, .login-form button { color: #fff; background: var(--green); }.primary-button:hover, .primary-link:hover, .login-form button:hover { background: var(--green-dark); }
.secondary-button { color: #355247; border-color: #cbd9d2; background: #fff; }.secondary-button:hover { background: #eff5f2; }
.danger-button { color: #fff; background: var(--coral); }.danger-button:hover { background: #ae483e; }
.text-action { border: 0; background: transparent; padding: 5px 3px; cursor: pointer; }
.inline-form { display: flex; align-items: center; gap: 5px; }.inline-form select { min-height: 35px; padding: 3px 5px; font-size: 14px; }

.profile-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 22px; }
.detail-value { margin: 7px 0 0; color: var(--ink); font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.detail-actions { display: flex; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-list { display: grid; gap: 14px; margin-top: 18px; }
.detail-list > div { display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding-bottom: 13px; border-bottom: 1px solid #edf1ef; }
.detail-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.detail-list strong, .detail-list span { grid-column: 1; }
.detail-list a { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.full-field { grid-column: 1 / -1; }.settings-subheading { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }.settings-subheading strong { color: var(--ink); font-size: 16px; }.settings-subheading span { color: var(--muted); font-size: 13px; }
.form-panel { padding: 25px; }.form-actions { display: flex; justify-content: flex-end; padding-top: 5px; }
.home-content-panel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }.home-content-preview { padding-left: 28px; border-left: 1px solid var(--line); }.home-content-preview p { margin: 0 0 10px; color: var(--muted); font-weight: 800; }.home-content-preview-grid { display: grid; gap: 14px; }.home-content-preview figure { margin: 0; }.home-content-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 7px; background: #eef2ef; }.home-content-preview figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
.checkbox-field { display: flex; align-items: center; gap: 9px; padding-top: 27px; }.checkbox-field input { width: 18px; min-height: 18px; }
.stack { display: grid; gap: 22px; }.stack .panel { margin: 0; }
.completion-ring { width: 188px; height: 188px; margin: 19px auto 4px; padding: 42px 18px; border: 12px solid #dceee5; border-right-color: #4da479; border-radius: 50%; text-align: center; }.completion-ring strong { display: block; color: var(--green-dark); font-size: 32px; line-height: 1.1; }.completion-ring span { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }.empty-photo { grid-column: 1 / -1; min-height: 92px; display: grid; place-items: center; color: var(--muted); background: #f2f5f3; border-radius: 6px; font-size: 14px; }
.album-layout { display: grid; grid-template-columns: minmax(330px, .38fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.album-filters input { width: 100%; }.album-filters select { width: 150px; }
.album-profile-list { display: grid; gap: 10px; max-height: calc(100vh - 315px); min-height: 360px; overflow-y: auto; padding-right: 4px; }
.album-profile-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 58px; gap: 11px; align-items: center; min-height: 78px; padding: 12px; border: 1px solid #e4ebe7; border-radius: 8px; background: #fbfcfb; }
.album-profile-item:hover, .album-profile-item.active { border-color: #98c8b0; background: #edf7f1; }
.album-profile-avatar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 18px; font-weight: 800; }
.album-profile-main { min-width: 0; }
.album-profile-main strong, .album-profile-main small, .album-profile-meta b, .album-profile-meta small { display: block; }
.album-profile-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #263832; font-size: 16px; }
.album-profile-main small { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.album-profile-meta { text-align: center; color: var(--green-dark); }
.album-profile-meta b { font-size: 22px; line-height: 1.1; }
.album-profile-meta small { margin-top: 2px; color: var(--muted); font-size: 12px; }
.album-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.album-photo-card { margin: 0; padding: 10px; border: 1px solid #e2e9e5; border-radius: 8px; background: #fbfcfb; }
.album-photo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eef2ef; }
.album-photo-card figcaption { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 10px 0; }
.album-photo-card figcaption span { color: #3d4d47; font-size: 14px; font-weight: 800; }
.album-photo-card label { width: 88px; gap: 4px; color: var(--muted); font-size: 12px; }
.album-photo-card input { min-height: 34px; padding: 5px 8px; }
.album-delete-button { width: 100%; min-height: 38px; }
.album-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.album-empty { min-height: 260px; }
.review-panel form > div { display: flex; gap: 10px; margin-top: 14px; }.review-panel button { flex: 1; padding-inline: 8px; }

.modal { position: fixed; z-index: 100; inset: 0; display: none; align-items: center; justify-content: center; padding: 22px; }.modal.open { display: flex; }.modal-mask { position: absolute; inset: 0; background: rgba(20, 37, 31, .5); }.modal-card { position: relative; width: min(540px, 100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 24px; border-radius: 8px; background: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .2); display: grid; gap: 16px; }.modal-card.wide { width: min(760px, 100%); }.modal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 15px; border-bottom: 1px solid var(--line); }.modal-head h2 { margin: 0; font-size: 20px; }.modal-head button { width: 34px; height: 34px; border: 0; border-radius: 5px; color: #60706a; background: #f1f4f2; font-size: 26px; line-height: 1; cursor: pointer; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 5px; }

.flash { margin-bottom: 20px; padding: 12px 15px; border: 1px solid; border-radius: 6px; font-weight: 700; }.flash.success { color: #176543; border-color: #b9dfc8; background: #eaf7ef; }.flash.danger { color: #a23e35; border-color: #efc1ba; background: #fff0ed; }.flash.warning { color: #8b550a; border-color: #eed5a5; background: #fff7e7; }.flash a { text-decoration: underline; }.muted-copy { color: #75807c; font-size: 13px; overflow-wrap: anywhere; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 26px; background: #e8efeb; }.login-card, .install-card { width: min(455px, 100%); padding: 38px; border: 1px solid #d8e2dc; border-radius: 9px; background: #fff; box-shadow: 0 15px 42px rgba(27, 65, 50, .13); }.login-brand { color: #1d4c3d; }.login-brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 700; }.login-card h1 { margin: 28px 0 3px; font-size: 27px; }.login-card > p, .install-copy { margin: 0 0 23px; color: var(--muted); font-size: 15px; }.login-form { display: grid; gap: 18px; }.login-form button { min-height: 48px; margin-top: 4px; font-size: 17px; }.setup-link { display: block; margin-top: 20px; text-align: center; color: var(--green); font-size: 14px; font-weight: 700; }.primary-link { margin-top: 7px; }.install-card .flash { margin-top: 24px; margin-bottom: 0; }

@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.profile-detail-grid, .album-layout { grid-template-columns: 1fr; }.album-profile-list { max-height: none; min-height: 0; }.stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }.completion-ring { width: 140px; height: 140px; padding: 29px 10px; }.review-panel form > div { flex-wrap: wrap; }.home-content-panel { grid-template-columns: 1fr; }.home-content-preview { padding: 0; border: 0; }.home-content-preview img { max-width: 240px; } }
@media (max-width: 780px) { .sidebar { transform: translateX(-100%); box-shadow: 10px 0 30px rgba(0,0,0,.18); }.admin-shell.sidebar-open .sidebar { transform: translateX(0); }.main { margin-left: 0; }.menu-toggle { display: block; }.topbar { height: 64px; padding: 0 16px; }.topbar-title { gap: 0; }.topbar-title span, .admin-user > span:not(.avatar), .admin-user a { display: none; }.content { padding: 22px 15px 35px; }.page-heading { align-items: flex-start; }.page-heading h1 { font-size: 24px; }.page-heading p { font-size: 14px; }.panel { padding: 18px 15px; }.stat-grid, .dashboard-grid, .stack { grid-template-columns: 1fr; gap: 14px; }.stat-grid { margin-bottom: 14px; }.stat-card { min-height: 112px; padding: 17px; }.stat-card strong { font-size: 29px; }.field-grid { grid-template-columns: 1fr; }.full-field { grid-column: auto; }.filters > label, .filters > label input, .filters > label select, .filters input, .filters select { width: 100%; min-width: 0; }.filters button, .filters a { width: 100%; }.album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }.album-profile-item { grid-template-columns: 40px minmax(0, 1fr) 52px; padding: 10px; }.album-profile-avatar { width: 40px; height: 40px; }.album-photo-card { padding: 8px; }.album-photo-card figcaption { align-items: stretch; flex-direction: column; }.album-photo-card label { width: 100%; }.page-heading .primary-button { min-height: 39px; padding-inline: 12px; }.completion-ring { width: 166px; height: 166px; padding-top: 36px; }.modal { align-items: flex-end; padding: 0; }.modal-card { width: 100%; max-height: 89vh; border-radius: 12px 12px 0 0; }.review-panel form > div { flex-wrap: nowrap; } }
