/* 宣城零工平台 · 设计系统（腾讯云风格组件规范 + 紫色主色调） */
:root {
  /* 主色阶：紫色 TDesign 风格（7 为主色） */
  --brand-1: #F3EFFE;
  --brand-2: #E3D9FB;
  --brand-3: #C7B2F6;
  --brand-4: #A98BEF;
  --brand-5: #8E68E6;
  --brand-6: #7350D8;
  --brand-7: #5B32C4;   /* 主色 */
  --brand-8: #4926A6;
  --brand-9: #361B80;
  --navy-900: #1B1233;  /* 顶栏/页脚深色 */
  --navy-800: #2A1D4D;

  /* 辅助色：腾讯云青蓝 */
  --cyan-500: #00A7C4;
  --success: #2BA471;   --success-bg: #E3F9E9;
  --warning: #E37318;   --warning-bg: #FFF1E9;
  --danger:  #D54941;   --danger-bg:  #FFEEEE;
  --primary: var(--brand-7);

  /* 中性色 */
  --text-1: #0E1A2B;
  --text-2: #4B5565;
  --text-3: #8A94A6;
  --text-4: #B4BCC9;
  --line: #E7EAF0;
  --line-strong: #D5DAE3;
  --bg: #F5F7FA;
  --bg-soft: #FAFBFD;
  --white: #FFFFFF;

  /* 字体：腾讯云官网规范字体栈 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "Inter", "SF Pro Display", var(--font-sans);

  /* 圆角（腾讯云：克制、偏方） */
  --r-sm: 2px; --r-md: 4px; --r-lg: 8px; --r-xl: 12px;
  --shadow-1: 0 1px 2px rgba(27, 18, 51, .04), 0 4px 12px rgba(27, 18, 51, .05);
  --shadow-2: 0 4px 12px rgba(27, 18, 51, .08), 0 16px 40px rgba(27, 18, 51, .10);
  --shadow-brand: 0 8px 24px rgba(91, 50, 196, .24);

  --container: 1200px;
  --nav-h: 64px;
  --topbar-h: 36px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ============ 排版 ============ */
.h1 { font-size: 36px; line-height: 1.25; font-weight: 700; letter-spacing: -.5px; }
.h2 { font-size: 28px; line-height: 1.3; font-weight: 700; }
.h3 { font-size: 20px; line-height: 1.4; font-weight: 600; }
.h4 { font-size: 16px; line-height: 1.5; font-weight: 600; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.section-title { font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.3px; }
.section-sub { font-size: 15px; color: var(--text-2); margin: 0; }

/* ============ 布局 ============ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section--tight { padding: 40px 0; }
.row { display: flex; gap: 16px; }
.row--between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grid { display: grid; gap: 20px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.hidden { display: none !important; }
.text-center { text-align: center; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 20px; border-radius: var(--r-md);
  border: 1px solid transparent; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all .18s ease; white-space: nowrap; user-select: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--brand-7); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--brand-6); box-shadow: var(--shadow-brand); }
.btn--primary:active:not(:disabled) { background: var(--brand-8); box-shadow: none; }
.btn--secondary { background: var(--brand-1); color: var(--brand-7); border-color: var(--brand-2); }
.btn--secondary:hover:not(:disabled) { background: var(--brand-2); }
.btn--ghost { background: transparent; color: var(--text-2); border-color: var(--line-strong); }
.btn--ghost:hover:not(:disabled) { border-color: var(--brand-5); color: var(--brand-7); }
.btn--text { background: transparent; color: var(--brand-7); padding: 0 8px; }
.btn--text:hover:not(:disabled) { background: var(--brand-1); }
.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }

/* ============ 表单 ============ */
.field { margin-bottom: 18px; }
.field__label { display: block; font-size: 13px; font-weight: 500; color: var(--text-1); margin-bottom: 6px; }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.field__error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: #fff; color: var(--text-1); font-size: 14px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand-7);
  box-shadow: 0 0 0 2px rgba(91, 50, 196, .12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }

/* ============ 卡片 / 标签 ============ */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card--hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand-3); }
.card__body { padding: 20px; }
.tag {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: var(--r-sm); background: var(--bg); color: var(--text-2);
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
.tag--brand { background: var(--brand-1); color: var(--brand-7); }
.tag--success { background: var(--success-bg); color: var(--success); }
.tag--warning { background: var(--warning-bg); color: var(--warning); }
.tag--danger { background: var(--danger-bg); color: var(--danger); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; }

/* ============ 表格 / 分页 ============ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--text-2); font-weight: 500; background: var(--bg-soft); white-space: nowrap; }
.table tr:hover td { background: var(--bg-soft); }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.pager a, .pager span {
  min-width: 32px; height: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: #fff; color: var(--text-2); font-size: 13px;
}
.pager a:hover { border-color: var(--brand-5); color: var(--brand-7); }
.pager .is-active { background: var(--brand-7); border-color: var(--brand-7); color: #fff; }

/* ============ 反馈 ============ */
.toast-host { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); font-size: 14px; animation: toastIn .2s ease; }
.toast__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-7); }
.toast--success .toast__dot { background: var(--success); }
.toast--error .toast__dot { background: var(--danger); }
.toast--info .toast__dot { background: var(--cyan-500); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.empty { padding: 56px 20px; text-align: center; color: var(--text-3); }
.empty__icon { font-size: 40px; opacity: .5; margin-bottom: 12px; }
.skeleton { background: linear-gradient(90deg, #EEF0F4 25%, #F7F8FA 50%, #EEF0F4 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============ 弹窗 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(27,18,51,.5); z-index: 1500; display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.modal__head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 17px; font-weight: 600; }
.modal__body { padding: 24px; }
.modal__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
