:root {
  --page-bg: #f5f7fa;
  --surface: #fff;
  --surface-subtle: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #d4dce7;
  --text-primary: #172033;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --sidebar-bg: #102a52;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --shadow-subtle: 0 1px 2px rgba(16, 24, 40, .04);
}

body { background: var(--page-bg); color: var(--text-primary); }
.admin-shell { grid-template-columns: 224px minmax(0, 1fr); align-items: start; }
.sidebar { min-height: 100vh; background: var(--sidebar-bg); padding: 22px 12px; }
.brand { font-size: 19px; font-weight: 600; padding: 0 12px 26px; }
.nav { gap: 5px; }
.nav button { min-height: 43px; padding: 10px 14px; border-radius: 8px; color: #b9c9e5; }
.nav button.active { background: #244f8d; color: #fff; }
.nav button:hover { background: #1b3d70; color: #fff; }
.sidebar-footer { margin: 30px 4px 0; padding: 18px 8px 0; border-top-color: rgba(255,255,255,.14); color: #aebfdc; line-height: 1.55; }
.sidebar-footer strong { color: #dbe7ff; font-weight: 600; }
.main { max-width: 1600px; padding: 28px 32px 42px; margin: 0 auto; }
.topbar { align-items: center; margin-bottom: 24px; }
.topbar-title { display: grid; gap: 3px; }
.topbar h1 { font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.topbar-subtitle { margin: 0; color: var(--text-secondary); font-size: 14px; }
.top-actions { color: var(--text-secondary); }
.top-actions .btn { height: 36px; padding: 7px 12px; border: 1px solid var(--border); background: var(--surface); }
.top-actions .btn:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.two-col { align-items: start; grid-template-columns: minmax(0, 1.55fr) minmax(400px, 1fr); gap: 22px; }
.activity-config { display: grid; gap: 18px; min-width: 0; padding-bottom: 78px; }
.settings-card, .fields-panel { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-subtle); }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card-heading h2, .fields-heading h2 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 650; }
.card-heading p, .fields-heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 13px; }
.form-row { gap: 8px; margin: 0 0 18px; }
.activity-meta-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.activity-meta-row .form-row { margin-bottom: 18px; }
.settings-card .form-row:last-child { margin-bottom: 0; }
.form-row label { color: var(--text-primary); font-size: 14px; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea, .toolbar input, .toolbar select { border-color: var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; }
.form-row input, .form-row select { min-height: 43px; padding: 10px 12px; }
.form-row textarea { padding: 10px 12px; }
.form-row input:hover, .form-row select:hover, .form-row textarea:hover { border-color: #b8c3d2; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus, .field-card input:focus, .field-card select:focus { outline: 3px solid rgba(37, 99, 235, .12); border-color: var(--primary); }
.form-row input:disabled, .form-row select:disabled { background: #f2f4f7; color: var(--text-tertiary); cursor: not-allowed; }
.schedule-row { gap: 18px; }
.input-toggle { gap: 9px; }
.input-toggle .check { min-height: 24px; }
.check { color: var(--text-secondary); white-space: nowrap; }
.check input { appearance: none; width: 16px; height: 16px; margin: 0; border: 1px solid #b8c4d3; border-radius: 4px; background: var(--surface); display: inline-grid; place-content: center; }
.check input::after { content: ''; width: 8px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .12s ease-in-out; }
.check input:checked { border-color: var(--primary); background: var(--primary); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { outline: 3px solid rgba(37, 99, 235, .18); outline-offset: 1px; }
.form-row .check input, .field-card .check input { flex: 0 0 16px; width: 16px; min-width: 16px; height: 16px; min-height: 16px; padding: 0; }
.required-mark { color: var(--danger); margin-left: 2px; }
.rich-editor { overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); }
.rich-toolbar { min-height: 43px; align-items: center; padding: 5px 8px; margin: 0; border-bottom: 1px solid var(--border); background: var(--surface-subtle); }
.rich-toolbar .btn { min-width: 34px; height: 32px; padding: 5px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); }
.rich-toolbar .btn:hover, .rich-toolbar .btn:focus { background: var(--primary-soft); color: var(--primary); }
.content-editor { min-height: 240px; border: 0; border-radius: 0; padding: 15px 16px; font-size: 14px; line-height: 1.65; }
.content-editor:focus { outline: 0; box-shadow: inset 0 0 0 2px rgba(37,99,235,.12); }
.content-editor:empty::before { content: '填写活动介绍、时间、地点及注意事项等'; color: var(--text-tertiary); pointer-events: none; }
.help-text { margin: 8px 0 0; color: var(--text-tertiary); font-size: 12px; line-height: 1.5; }
.upload-zone { display: grid; justify-items: center; gap: 5px; padding: 22px 16px; border: 1px dashed #b8c7d9; border-radius: var(--radius-md); background: var(--surface-subtle); color: var(--text-secondary); text-align: center; cursor: pointer; transition: border-color .16s, background .16s; }
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone strong { color: var(--text-primary); font-size: 14px; }
.upload-zone span { color: var(--text-tertiary); font-size: 12px; }
.upload-zone input { display: none; }
.upload-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #e7effd; color: var(--primary); font-weight: 700; }
.customer-qr-config { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.customer-qr-upload { min-height: 112px; }
.customer-qr-preview { margin-top: 12px; }
.customer-qr-card { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-subtle); }
.customer-qr-card img { flex: 0 0 112px; width: 112px; height: 112px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.customer-qr-card > div { display: grid; gap: 5px; min-width: 0; }
.customer-qr-card strong { color: var(--text-primary); font-size: 13px; }
.customer-qr-card span { overflow: hidden; color: var(--text-tertiary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-qr-actions { display: flex; gap: 6px; margin-top: 4px; }
.customer-qr-actions .btn { min-height: 29px; padding: 5px 9px; font-size: 12px; }
.image-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.image-item { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.image-item img { display: block; width: 100%; height: 90px; object-fit: cover; background: var(--surface-subtle); }
.image-item-info { padding: 8px; }
.image-item-name { display: block; overflow: hidden; color: var(--text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.image-item-actions { display: flex; gap: 5px; margin-top: 7px; }
.image-item-actions .btn { flex: 1; min-height: 28px; padding: 4px 6px; font-size: 12px; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.prompt-grid .form-row { margin: 0; }
.fields-panel { position: sticky; top: 24px; min-width: 0; padding-bottom: 96px; }
.fields-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.fields-heading .btn { height: 37px; white-space: nowrap; }
.info-note { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; padding: 10px 12px; border-radius: 8px; background: var(--primary-soft); color: #4b6592; font-size: 12px; line-height: 1.5; }
.info-note-mark { flex: 0 0 auto; color: var(--primary); font-weight: 700; }
.fields-list { display: grid; gap: 12px; }
.fields-add-bottom { display: flex; justify-content: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.fields-add-bottom .btn { min-width: 132px; }
.field-card { margin: 0; padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); transition: border-color .16s, background .16s; }
.field-card:hover { border-color: #c7d3e1; background: #fcfdff; }
.field-card-head { display: flex; align-items: center; gap: 9px; min-width: 0; margin-bottom: 13px; }
.field-number { flex: 0 0 auto; color: var(--text-tertiary); font-size: 12px; font-weight: 600; }
.field-summary { overflow: hidden; color: var(--text-primary); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.field-enabled { margin-left: auto; }
.field-delete { flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border-radius: 6px; background: transparent; color: var(--text-tertiary); }
.field-delete:hover, .field-delete:focus { background: var(--danger-soft); color: var(--danger); }
.field-card .field-grid { grid-template-columns: minmax(0, 1.25fr) minmax(130px, .9fr); gap: 10px; }
.field-card input, .field-card select { min-height: 40px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-primary); background: var(--surface); }
.field-placeholder { margin-top: 10px; }
.field-placeholder input { width: 100%; }
.field-options { margin-top: 10px; }
.field-options[hidden] { display: none; }
.field-options-list { display: grid; gap: 8px; }
.field-option-row { display: flex; align-items: center; gap: 8px; }
.field-option-index { flex: 0 0 46px; color: var(--text-tertiary); font-size: 12px; }
.field-option-row input { flex: 1; min-width: 0; width: auto; }
.field-option-remove { flex: 0 0 auto; min-width: 56px; color: var(--danger); }
.field-option-add { margin-top: 8px; }
.field-phone-settings { margin-top: 12px; }
.field-phone-settings[hidden] { display: none; }
.field-phone-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #d7e2f1; border-radius: var(--radius-sm); background: #f7faff; cursor: pointer; }
.field-phone-toggle > span:first-child { display: grid; gap: 2px; min-width: 0; }
.field-phone-toggle strong { color: var(--text-primary); font-size: 13px; font-weight: 650; }
.field-phone-toggle small { color: var(--text-tertiary); font-size: 11px; line-height: 1.4; }
.toggle-switch { position: relative; flex: 0 0 42px; width: 42px; height: 24px; }
.toggle-switch input { position: absolute; width: 1px !important; height: 1px !important; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.toggle-switch > span { position: absolute; inset: 0; border-radius: 999px; background: #c7d2e1; transition: background .16s; }
.toggle-switch > span::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .2); content: ''; transition: transform .16s; }
.toggle-switch input:checked + span { background: var(--primary); }
.toggle-switch input:checked + span::after { transform: translateX(18px); }
.toggle-switch input:focus-visible + span { outline: 3px solid rgba(37, 99, 235, .18); outline-offset: 2px; }
.field-attrs { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 12px; }
.field-attrs .check { min-height: 24px; }
.empty-fields { padding: 28px 10px; color: var(--text-secondary); text-align: center; font-size: 13px; }
.empty-fields .btn { margin-top: 12px; }
.activity-actions-bar { grid-column: 1 / -1; position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 0; padding: 12px 0; border-top: 1px solid var(--border); background: var(--page-bg); }
.save-state { color: var(--text-secondary); font-size: 13px; }
.activity-actions { display: flex; gap: 8px; }
.activity-actions:empty { display: none; }
.activity-actions #save-activity { display: none; }
.activity-actions .btn { min-height: 41px; padding: 9px 19px; border-radius: var(--radius-sm); }
.activity-actions .btn.primary { background: var(--primary); }
.activity-actions .btn.primary:hover { background: var(--primary-hover); }
.activity-actions .btn[disabled] { cursor: wait; opacity: .68; }
.asset-total { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 56px; padding: 12px 18px; border-top: 1px solid var(--border); background: linear-gradient(180deg, rgba(248, 250, 252, .45), #fff); color: var(--text-secondary); font-size: 13px; }
.asset-total-label { color: var(--text-tertiary); }
.asset-total-value { display: inline-grid; min-width: 30px; height: 30px; place-items: center; padding: 0 8px; border: 1px solid #cfe0fa; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 15px; line-height: 1; }
.btn { border-radius: var(--radius-sm); }
.customer-service-result { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }
.customer-service-result p { margin: 0 0 12px; color: var(--text-secondary); font-size: 14px; }
.customer-service-result img { display: block; width: 168px; height: 168px; margin: 0 auto; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; object-fit: contain; }

/* 公开报名填写页 */
.public-page { padding: 34px 18px 18px; background: radial-gradient(circle at 50% 0, #edf4ff 0, var(--page-bg) 38%, #f8fafc 100%); }
.public-card { border: 1px solid rgba(210, 220, 234, .85); box-shadow: 0 18px 50px rgba(30, 61, 100, .09); }
.public-content { padding: 34px 38px 30px; }
.public-content > h1 { margin: 0; color: var(--text-primary); font-size: 28px; line-height: 1.3; letter-spacing: -.02em; }
.public-content > .rich-content { margin-top: 12px; color: var(--text-secondary); line-height: 1.75; }
.public-form { gap: 18px; margin-top: 28px; }
.public-field, .public-choice-field { display: grid; gap: 8px; margin: 0; }
.public-field-label, .public-field-heading { display: flex; align-items: center; gap: 8px; min-height: 24px; color: var(--text-primary); font-size: 15px; font-weight: 650; }
.public-field-title { min-width: 0; }
.public-required { color: var(--danger); font-size: 16px; line-height: 1; }
.public-choice-field { min-width: 0; padding: 0; border: 0; }
.public-choice-field legend { width: 100%; padding: 0; }
.public-choice-badge { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border: 1px solid #c9d9f6; border-radius: 999px; background: #f1f6ff; color: var(--primary); font-size: 12px; font-weight: 600; }
.public-choice-list { display: grid; gap: 9px; }
.public-choice-option { position: relative; display: flex; align-items: center; gap: 11px; min-height: 48px; margin: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: rgba(255,255,255,.78); color: var(--text-primary); font-size: 14px; font-weight: 400; cursor: pointer; transition: border-color .16s, background .16s, box-shadow .16s, transform .16s; }
.public-choice-option:hover { border-color: #b5c9eb; background: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .07); transform: translateY(-1px); }
.public-choice-option:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.public-choice-option input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.public-choice-control { display: grid; flex: 0 0 19px; place-items: center; width: 19px; height: 19px; border: 1.5px solid #b7c5d8; border-radius: 50%; background: #fff; transition: border-color .16s, background .16s, box-shadow .16s; }
.public-checkbox-field .public-choice-control { border-radius: 5px; }
.public-choice-control::after { width: 7px; height: 4px; content: ''; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .12s ease-in-out; }
.public-choice-option input:checked + .public-choice-control { border-color: var(--primary); background: var(--primary); box-shadow: 0 2px 5px rgba(37, 99, 235, .25); }
.public-choice-option input:checked + .public-choice-control::after { transform: rotate(-45deg) scale(1); }
.public-choice-option input:checked ~ .public-choice-text { color: #174ea6; font-weight: 600; }
.public-choice-text { min-width: 0; line-height: 1.45; }
.public-form > .public-field input, .public-form > .public-field textarea, .public-form > .public-field select { margin-top: 0; min-height: 46px; border-color: var(--border-strong); border-radius: var(--radius-md); background: rgba(255,255,255,.9); }
.public-form > .public-field textarea { min-height: 110px; }
.public-form > .public-field input:hover, .public-form > .public-field textarea:hover, .public-form > .public-field select:hover { border-color: #b8c9df; }
.public-form > .public-field input:focus, .public-form > .public-field textarea:focus, .public-form > .public-field select:focus { outline: 3px solid rgba(37, 99, 235, .12); border-color: var(--primary); }
.public-form > .btn.primary { min-height: 48px; margin-top: 4px; border-radius: var(--radius-md); font-weight: 650; box-shadow: 0 8px 16px rgba(37, 99, 235, .18); }

@media (max-width: 640px) {
  .public-page { padding: 12px 10px 10px; }
  .public-content { padding: 24px 18px 22px; }
  .public-content > h1 { font-size: 23px; }
  .public-choice-option { min-height: 46px; padding: 10px 12px; }
}

@media (max-width: 1180px) {
  .two-col { grid-template-columns: 1fr; }
  .fields-panel { position: static; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; }
  .main { padding: 20px 18px 32px; }
  .topbar { align-items: flex-start; }
  .activity-config { padding-bottom: 70px; }
}
@media (max-width: 640px) {
  .settings-card, .fields-panel { padding: 18px 16px; }
  .activity-meta-row { grid-template-columns: 1fr; gap: 0; }
  .schedule-row, .prompt-grid { grid-template-columns: 1fr; gap: 0; }
  .field-card .field-grid { grid-template-columns: 1fr; }
  .field-attrs { gap: 14px; }
  .activity-actions-bar { align-items: flex-start; flex-direction: column; }
  .activity-actions, .activity-actions .btn { width: 100%; }
  .registration-actionbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .registration-actionbar .actions { justify-content: flex-start; }
  .registration-actionbar .actions .btn { flex: 1 1 auto; }
  .registration-pagination { align-items: flex-start; flex-direction: column; }
  .registration-table-panel { padding: 0; }
}

/* 报名报表在手机端使用记录卡片，避免横向滚动 */
@media (max-width: 640px) {
  .registration-table, .asset-table { display: block; }
  .registration-table thead, .asset-table thead { display: none; }
  .registration-table tbody, .registration-table tr, .registration-table td,
  .asset-table tbody, .asset-table tr, .asset-table td { display: block; width: 100%; }
  .registration-table tr, .asset-table tr { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
  .registration-table td, .asset-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 34px; padding: 8px 0; white-space: normal; text-align: right; }
  .registration-table td::before, .asset-table td::before { flex: 0 0 auto; color: var(--text-secondary); font-size: 12px; font-weight: 600; text-align: left; content: attr(data-label); }
  .registration-table td .tag, .asset-table td .tag { margin-left: auto; }
  .registration-table td[data-label="操作"] { display: block; padding-top: 10px; border-top: 1px solid var(--border); text-align: left; }
  .registration-table td[data-label="操作"]::before { display: block; margin-bottom: 8px; }
  .registration-table td[data-label="操作"] .actions { justify-content: flex-start; }
  .registration-table td.empty, .asset-table td.empty { display: block; padding: 28px 10px; text-align: center; }
  .registration-table td.empty::before, .asset-table td.empty::before { display: none; }
  .asset-table td[data-label="后台备注"] { color: var(--text-secondary); }
  .asset-total { justify-content: flex-start; min-height: 50px; padding: 10px 14px; }
}

/* PC 管理后台视觉系统：清晰的工作区层级、稳定的表单密度和统一的操作优先级 */
@media (min-width: 901px) {
  :root {
    --sidebar-bg: #132b52;
    --sidebar-bg-deep: #0d2142;
    --surface-raised: #ffffff;
    --border-soft: #e8edf4;
    --shadow-card: 0 8px 24px rgba(25, 48, 84, .055);
    --shadow-hover: 0 12px 28px rgba(25, 48, 84, .10);
  }

  body { background: #f4f7fb; }

  .admin-shell {
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
    align-items: stretch;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 720px;
    padding: 28px 16px 20px;
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
    box-shadow: 8px 0 24px rgba(13, 33, 66, .08);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 12px 30px;
    color: #f8fbff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
  }

  .brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .brand-name {
    line-height: 1.2;
  }

  .brand-version {
    color: #91a7c8;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .04em;
    line-height: 1.2;
  }

  .brand::before {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(147, 197, 253, .45);
    border-radius: 9px;
    background: linear-gradient(145deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 13px;
    content: '19';
  }

  .nav { gap: 5px; }

  .nav button {
    position: relative;
    width: 100%;
    min-height: 46px;
    padding: 11px 14px 11px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #aebfdb;
    font-size: 14px;
    font-weight: 550;
    letter-spacing: .01em;
    transition: background .16s, color .16s, border-color .16s, transform .16s;
  }

  .nav button::before {
    position: absolute;
    left: 8px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    content: '';
    opacity: .7;
  }

  .nav button:hover {
    border-color: rgba(147, 197, 253, .13);
    background: rgba(59, 130, 246, .14);
    color: #f5f9ff;
    transform: translateX(2px);
  }

  .nav button.active {
    border-color: rgba(147, 197, 253, .18);
    background: linear-gradient(90deg, rgba(59, 130, 246, .48), rgba(37, 99, 235, .23));
    color: #fff;
    box-shadow: inset 3px 0 0 #70a7ff, 0 6px 14px rgba(5, 22, 53, .18);
  }

  .sidebar-footer {
    margin: auto 4px 0;
    padding: 15px 13px;
    border: 1px solid rgba(147, 197, 253, .14);
    border-radius: 11px;
    background: rgba(255, 255, 255, .055);
    color: #91a8ca;
    font-size: 12px;
    line-height: 1.65;
  }

  .sidebar-footer strong { display: block; margin-bottom: 2px; color: #f0f6ff; font-size: 14px; }

  .main {
    max-width: none;
    padding: 0 40px 48px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 88px;
    margin: 0 -40px 30px;
    padding: 20px 40px;
    border-bottom: 1px solid rgba(220, 228, 239, .88);
    background: rgba(244, 247, 251, .92);
    backdrop-filter: blur(14px);
  }

  .topbar-title { gap: 5px; }
  .topbar h1 { color: #14213a; font-size: 25px; letter-spacing: -.025em; }
  .topbar-subtitle { color: #7b8799; font-size: 13px; }
  .top-actions { gap: 10px; }
  .top-actions .muted { padding: 7px 11px; border: 1px solid #e0e7f0; border-radius: 8px; background: rgba(255,255,255,.72); color: #65748a; font-size: 13px; }
  .top-actions .btn { height: 34px; border-color: #dce4ef; border-radius: 8px; background: #fff; color: #4e5c71; }

  .cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
  }

  .card {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    padding: 20px 21px;
    border-color: var(--border-soft);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
    transition: transform .16s, box-shadow .16s, border-color .16s;
  }

  .card::after {
    position: absolute;
    right: -25px;
    bottom: -35px;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, .10), rgba(37, 99, 235, 0));
    content: '';
  }

  .card:hover { border-color: #d6e1f0; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
  .card .muted { position: relative; z-index: 1; color: #718096; font-size: 13px; font-weight: 600; }
  .metric { position: relative; z-index: 1; margin-top: 17px; color: #17233a; font-size: 32px; line-height: 1; letter-spacing: -.04em; }

  .panel {
    overflow: hidden;
    padding: 0;
    border-color: var(--border-soft);
    border-radius: 15px;
    box-shadow: var(--shadow-card);
  }

  .section-title { margin: 0; padding: 21px 24px 15px; color: #1d2a40; font-size: 16px; font-weight: 700; }
  .table-wrap { padding: 0 18px 10px; }
  .table { font-size: 13px; }
  .table th { padding: 12px 10px; border-bottom-color: #dfe6ef; background: #f9fbfd; color: #718096; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
  .table td { padding: 15px 10px; border-bottom-color: #edf1f6; color: #4c5b70; vertical-align: middle; }
  .table tbody tr:last-child td { border-bottom: 0; }
  .table tbody tr { transition: background .14s; }
  .table tbody tr:hover { background: #f8fbff; }
  .table td:first-child { color: #1d2a40; }
  .table td:first-child b { font-weight: 650; }

  .toolbar {
    min-height: 68px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow-card);
  }

  .toolbar input { min-width: 280px; height: 42px; padding: 10px 13px; border-color: #d9e2ee; border-radius: 9px; }
  .toolbar select { min-width: 150px; height: 42px; padding: 9px 12px; border-color: #d9e2ee; border-radius: 9px; background: #fff; }
  .toolbar .btn { min-height: 42px; padding: 10px 16px; border-radius: 9px; font-weight: 600; }
  .toolbar .btn.primary { margin-left: auto; box-shadow: 0 5px 12px rgba(37, 99, 235, .16); }

  .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(470px, .92fr); gap: 24px; }
  .activity-config { gap: 20px; }
  .settings-card, .fields-panel { padding: 28px; border-color: var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-card); }
  .settings-card:hover, .fields-panel:hover { border-color: #dbe5f1; }
  .card-heading { margin-bottom: 23px; }
  .card-heading h2, .fields-heading h2 { color: #1c2a40; font-size: 19px; }
  .card-heading h2::before, .fields-heading h2::before { display: inline-block; width: 4px; height: 18px; margin-right: 9px; border-radius: 4px; background: #3b82f6; vertical-align: -2px; content: ''; }
  .card-heading p, .fields-heading p { color: #8692a5; }
  .form-row { margin-bottom: 20px; }
  .form-row label { color: #344054; font-size: 13px; font-weight: 650; }
  .form-row input, .form-row select, .form-row textarea { border-color: #d9e2ee; border-radius: 9px; background: #fcfdff; }
  .form-row input, .form-row select { min-height: 45px; }
  .form-row input:focus, .form-row select:focus, .form-row textarea:focus, .field-card input:focus, .field-card select:focus { box-shadow: 0 0 0 4px rgba(37, 99, 235, .09); }
  .help-text { color: #8a96a8; }
  .upload-zone { padding: 28px 18px; border-color: #b9cae2; border-radius: 12px; background: #f8fbff; }
  .upload-zone:hover, .upload-zone:focus-within { box-shadow: inset 0 0 0 1px rgba(37,99,235,.20); }
  .content-editor { min-height: 260px; }
  .fields-panel { position: sticky; top: 104px; max-height: calc(100vh - 188px); overflow: auto; scrollbar-width: thin; scroll-padding-bottom: 64px; }
  .fields-panel::-webkit-scrollbar { width: 7px; }
  .fields-panel::-webkit-scrollbar-thumb { border-radius: 99px; background: #cbd6e5; }
  .info-note { border: 1px solid #d9e8ff; border-radius: 10px; background: #f4f8ff; color: #536b91; }
  .field-card { padding: 17px 18px; border-color: #dfe7f1; border-radius: 12px; background: #fbfcfe; }
  .field-card:hover { border-color: #b9cce7; background: #fff; box-shadow: 0 6px 16px rgba(40, 75, 120, .06); }
  .field-card-head { margin-bottom: 15px; }
  .field-number { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 6px; background: #edf3fc; color: #53709c; font-size: 11px; }
  .field-summary { color: #22314a; }
  .field-card input, .field-card select { border-color: #d9e2ee; border-radius: 8px; background: #fff; }
  .activity-meta-row { align-items: start; }
  .activity-meta-row .form-row { display: grid; grid-template-rows: 24px 50px minmax(36px, auto); align-content: start; gap: 8px; margin: 0; }
  .activity-meta-row .form-row > label:first-child { min-height: 24px; line-height: 24px; }
  .activity-meta-row .form-row > .help-text { min-height: 36px; margin: 0; }
  .activity-meta-row .form-row > select,
  .schedule-row .form-row > .input-toggle > input[type="datetime-local"] { height: 50px; min-height: 50px; }
  .schedule-row { align-items: start; }
  .schedule-row > .form-row { display: grid; grid-template-rows: 24px 50px 24px; align-content: start; gap: 8px; margin: 0; }
  .schedule-row > .form-row > label:first-child { min-height: 24px; line-height: 24px; }
  .schedule-row .input-toggle { grid-template-rows: 50px 24px; gap: 8px; }
  .schedule-row .input-toggle .check { min-height: 24px; line-height: 24px; }
  .field-attrs { gap: 18px; padding-top: 3px; }
  .field-phone-toggle { border-color: #d6e4f5; background: #f5f9ff; }
  .fields-add-bottom { margin-top: 18px; padding-top: 18px; border-top-color: #e7edf4; }
  .fields-add-bottom .btn { min-width: 144px; min-height: 42px; border: 1px solid #bdd0ec; background: #f3f7fd; color: #2563eb; font-weight: 650; }
  .fields-add-bottom .btn:hover { border-color: #91afe0; background: #eaf2ff; }
  .activity-actions-bar { margin: 0 -40px; padding: 14px 40px; border-top-color: #dce5ef; background: rgba(244, 247, 251, .94); box-shadow: 0 -8px 20px rgba(28, 54, 92, .05); backdrop-filter: blur(12px); }
  .save-state { color: #6f7e93; }
  .save-state::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #42a66a; content: ''; vertical-align: 1px; }
  .activity-actions .btn { min-height: 43px; padding: 10px 20px; border-radius: 9px; font-weight: 650; }

  .asset-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; padding: 16px 20px; color: #64748b; font-size: 13px; }
  .asset-summary b { color: #1e2d45; font-size: 14px; }

  .registration-actionbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--border-soft); border-radius: 12px; background: #fff; box-shadow: var(--shadow-card); }
  .registration-selection-status { display: flex; align-items: baseline; gap: 12px; color: var(--text-secondary); font-size: 12px; }
  .registration-selection-status strong { color: var(--text-primary); font-size: 14px; }
  .registration-actionbar .actions { justify-content: flex-end; }
  .registration-actionbar .btn[disabled] { cursor: not-allowed; opacity: .45; }
  .registration-table-panel { overflow: hidden; padding: 0; }
  .registration-table-panel .table-wrap { max-height: calc(100vh - 360px); overflow: auto; }
  .registration-table thead th { position: sticky; top: 0; z-index: 1; background: #f8fafc; box-shadow: 0 1px 0 #e7edf4; }
  .registration-table .selection-col { width: 48px; min-width: 48px; text-align: center; }
  .registration-table .selection-cell { width: 48px; min-width: 48px; text-align: center; }
  .registration-table .selection-col input, .registration-table .selection-cell input { width: 16px; height: 16px; accent-color: var(--primary); }
  .registration-table .sequence-cell { color: #35527b; font-weight: 650; }
  .registration-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--border-soft); color: var(--text-secondary); font-size: 12px; }

  .password-page { display: flex; justify-content: center; padding: 8px 0 48px; }
  .password-card { width: min(640px, 100%); padding: 32px 36px 30px; border-color: var(--border-soft); border-radius: 16px; box-shadow: var(--shadow-card); }
  .password-card-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 28px; }
  .password-card-icon { display: grid; flex: 0 0 38px; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); font-size: 17px; }
  .password-card-heading h2 { margin: 0; color: var(--text-primary); font-size: 19px; line-height: 1.35; }
  .password-card-heading p { margin: 5px 0 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
  .password-card form { display: grid; gap: 20px; }
  .password-card form .form-row { margin: 0; }
  .password-card form input { min-height: 48px; background: #fcfdff; }
  .password-rule { color: var(--text-tertiary); font-size: 12px; font-weight: 500; }
  .password-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
  .password-actions .btn { min-width: 112px; min-height: 44px; font-weight: 650; }
  .registration-table .actions .btn { min-height: 31px; padding: 6px 10px; border-radius: 7px; }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .main { padding-right: 28px; padding-left: 28px; }
  .topbar { margin-right: -28px; margin-left: -28px; padding-right: 28px; padding-left: 28px; }
  .activity-actions-bar { margin-right: -28px; margin-left: -28px; padding-right: 28px; padding-left: 28px; }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1.45fr) minmax(390px, 1fr); }
}
