/* 宴会系统 - 全局样式 蓝白高级配色 */
:root {
  --primary: #1677ff;
  --primary-light: #4096ff;
  --primary-dark: #0958d9;
  --primary-bg: #e6f4ff;
  --success: #52c41a;
  --warning: #faad14;
  --danger: #ff4d4f;
  --info: #1677ff;
  --text-primary: #1f1f1f;
  --text-secondary: #595959;
  --text-tertiary: #8c8c8c;
  --text-placeholder: #bfbfbf;
  --bg-page: #f5f7fa;
  --bg-card: #ffffff;
  --bg-gray: #fafafa;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --big-day: #fff1f0;
  --big-day-border: #ff4d4f;
  --normal-day: #ffffff;
  --slack-day: #f5f5f5;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-num: 'DIN Alternate', 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; font-size: 14px; color: var(--text-primary); background: var(--bg-page); overflow: hidden; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; width: 100%; background: #fff; transition: border-color .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
ul, li { list-style: none; }

/* ===== 骨架屏 ===== */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 4px; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 18px; width: 60%; margin-bottom: 12px; }
.skeleton-card { height: 80px; border-radius: var(--radius-md); margin-bottom: 12px; }

/* ===== Toast ===== */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 10px 20px; border-radius: var(--radius-md); color: #fff; font-size: 14px; box-shadow: var(--shadow-lg); animation: toast-in .3s ease, toast-out .3s ease 1.7s forwards; max-width: 80vw; text-align: center; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
.toast.warning { background: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-20px); } }

/* ===== 空状态 ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-tertiary); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: .3; }
.empty-state .text { font-size: 15px; margin-bottom: 16px; }
.empty-state .btn { padding: 8px 24px; }

/* ===== 错误态 ===== */
.error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-tertiary); }
.error-state .icon { font-size: 48px; margin-bottom: 16px; }
.error-state .text { font-size: 15px; margin-bottom: 16px; }

/* ===== 离线提示条 ===== */
.offline-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--warning); color: #fff; text-align: center; padding: 6px; font-size: 12px; z-index: 1000; transform: translateY(-100%); transition: transform .3s; }
.offline-bar.show { transform: translateY(0); }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; transition: all .2s; cursor: pointer; border: none; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); transform: scale(.97); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:active { background: var(--primary-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 卡片 ===== */
.card { background: var(--bg-card); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.card:active { box-shadow: var(--shadow-md); }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tag-blue { background: var(--primary-bg); color: var(--primary); }
.tag-green { background: #f6ffed; color: var(--success); }
.tag-orange { background: #fff7e6; color: var(--warning); }
.tag-red { background: #fff1f0; color: var(--danger); }
.tag-gray { background: #f5f5f5; color: var(--text-tertiary); }

/* ===== 数字字体 ===== */
.num { font-family: var(--font-num); font-weight: 600; }

/* ===== 底部弹窗 ===== */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 16px 16px 0 0; z-index: 101; transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); max-height: 85vh; overflow-y: auto; }
.drawer.show { transform: translateY(0); }
.drawer-header { padding: 16px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff; z-index: 1; }
.drawer-title { font-size: 16px; font-weight: 600; }
.drawer-body { padding: 16px; }
.drawer-close { font-size: 20px; color: var(--text-tertiary); cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.drawer-close:active { background: var(--bg-gray); }

/* ===== 确认弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 80%; max-width: 320px; overflow: hidden; transform: scale(.9); transition: transform .2s; }
.modal-mask.show .modal { transform: scale(1); }
.modal-body { padding: 24px 20px; text-align: center; }
.modal-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.modal-content { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.modal-footer { display: flex; border-top: 1px solid var(--border-light); }
.modal-footer button { flex: 1; padding: 14px; font-size: 15px; font-weight: 500; }
.modal-footer .cancel { color: var(--text-secondary); border-right: 1px solid var(--border-light); }
.modal-footer .confirm { color: var(--danger); font-weight: 600; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; font-weight: 500; }
.form-label .required { color: var(--danger); margin-right: 2px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ===== Tab ===== */
.tabs { display: flex; border-bottom: 1px solid var(--border-light); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 12px 16px; font-size: 14px; color: var(--text-secondary); white-space: nowrap; position: relative; cursor: pointer; transition: color .2s; }
.tab.active { color: var(--primary); font-weight: 600; }
.tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 3px; background: var(--primary); border-radius: 2px; }

/* ===== 步骤条 ===== */
.steps { display: flex; align-items: center; padding: 16px; background: #fff; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--border); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; z-index: 1; }
.step.active .step-num { background: var(--primary); }
.step.done .step-num { background: var(--success); }
.step-label { font-size: 11px; color: var(--text-tertiary); margin-top: 4px; }
.step.active .step-label { color: var(--primary); font-weight: 500; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 14px; left: 60%; right: -40%; height: 2px; background: var(--border); }
.step.done:not(:last-child)::after { background: var(--success); }

/* ===== 过渡动画 ===== */
.fade-enter { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
.fade-in { animation: fadeInOnly .2s ease; }
@keyframes fadeInOnly { from { opacity: 0; } to { opacity: 1; } }

/* ===== 吉日等级颜色 ===== */
.day-big { background: var(--big-day) !important; }
.day-big .day-num { color: var(--danger); font-weight: 700; }
.day-normal { background: var(--normal-day); }
.day-slack { background: var(--slack-day) !important; }
.day-slack .day-num { color: var(--text-tertiary); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 2px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 优先级标签 ===== */
.priority-high { color: var(--danger); }
.priority-medium { color: var(--warning); }
.priority-low { color: var(--primary); }
