:root {
  --navy: #1F3A5F;
  --navy-deep: #16283F;
  --ink: #262B33;
  --muted: #66707D;
  --muted-light: #9AA3AF;
  --bg: #F3F5F8;
  --card-bg: #FFFFFF;
  --border: #E7EAEF;
  --success: #1BA94C;
  --error: #E0392A;
  --warn: #E0A741;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
}

button, input, textarea, select {
  font-family: inherit;
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: 18px;
  padding: 36px 28px;
  box-shadow: 0 10px 30px rgba(31, 58, 95, 0.12);
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-sub {
  font-size: 12px;
  color: var(--muted-light);
  margin-bottom: 24px;
}

.login-form input {
  width: 100%;
  font-size: 15px;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-bottom: 14px;
}

.login-form input:focus {
  outline: none;
  border-color: var(--navy);
  background: #FFFFFF;
}

.login-btn {
  width: 100%;
  border: none;
  background: linear-gradient(90deg, var(--navy), var(--navy-deep));
  color: #FFFFFF;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 46px;
  height: 46px;
  cursor: pointer;
  margin-top: 4px;
}

.login-hint {
  font-size: 11px;
  color: var(--muted-light);
  margin-top: 16px;
  line-height: 1.6;
}

.login-error {
  font-size: 12px;
  color: var(--error);
  min-height: 16px;
  margin-bottom: 8px;
}

/* ---------- 后台主界面 ---------- */
.admin-shell {
  min-height: 100vh;
  padding-bottom: 70px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header-title {
  font-size: 16px;
  font-weight: 700;
}

.admin-header-user {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-link {
  text-decoration: underline;
  cursor: pointer;
}

.admin-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 4px 0 14px;
}

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(31, 58, 95, 0.04);
}

/* 订单筛选 tab */
.sub-tab-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sub-tab {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}

.sub-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.order-row {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.order-row:last-child {
  border-bottom: none;
}

.order-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.order-name {
  font-weight: 700;
  font-size: 14px;
}

.order-time {
  font-size: 11px;
  color: var(--muted-light);
}

.order-field {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.order-field b {
  color: var(--ink);
  font-weight: 600;
}

.status-select {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: var(--bg);
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  background: #EAF0F7;
  color: var(--navy);
}

.status-badge.进行中 {
  background: #FFF4E0;
  color: var(--warn);
}

.status-badge.已完成 {
  background: #E9F9EE;
  color: var(--success);
}

/* 通用表单元素 */
.field-row {
  margin-bottom: 14px;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.field-input, .field-textarea {
  width: 100%;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.field-textarea {
  min-height: 70px;
  resize: vertical;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  padding: 9px 18px;
  cursor: pointer;
}

.btn-primary {
  background: var(--navy);
  color: #FFFFFF;
}

.btn-danger {
  background: #FBEAE8;
  color: var(--error);
}

.btn-outline {
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--ink);
}

.repeat-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  position: relative;
}

.repeat-item-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 12px;
  color: var(--error);
  cursor: pointer;
}

.image-preview {
  width: 100%;
  max-width: 200px;
  height: 90px;
  border-radius: 10px;
  background: var(--bg);
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 24px;
  color: var(--muted-light);
  margin-bottom: 10px;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.bottom-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  z-index: 100;
}

.bottom-tab-item {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 11px;
  color: var(--muted-light);
  cursor: pointer;
}

.bottom-tab-item .tab-icon {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.bottom-tab-item.active {
  color: var(--navy);
  font-weight: 700;
}

.moments-admin-item {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.moments-admin-thumbs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.moments-admin-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted-light);
}

.moments-admin-thumb img, .moments-admin-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moments-admin-info {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}

.hint-text {
  font-size: 12px;
  color: var(--muted-light);
  line-height: 1.6;
  margin-bottom: 12px;
}

.field-section-badge {
  display: inline-block;
  background: var(--navy);
  color: #FFFFFF;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  margin-right: 6px;
  vertical-align: 1px;
}

.price-col-header {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.price-col-header span {
  flex: 1;
  font-size: 11px;
  color: var(--muted-light);
  text-align: center;
}

.stats-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stats-month-input {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  margin: 0;
}

.stats-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 100px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.stats-bar-col {
  flex: 1;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.stats-bar {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  border-radius: 3px 3px 0 0;
}

.stats-bar-label {
  font-size: 9px;
  color: var(--muted-light);
  margin-top: 4px;
  height: 12px;
}

.completed-date-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.completed-date-filter-row .field-input {
  flex: 1;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.checkbox-toggle {
  width: 44px;
  height: 24px;
}
