:root {
  --primary: #0052d9;
  --primary-hover: #366ef4;
  --primary-active: #003cab;
  --primary-light: #e8f0ff;
  --bg: #f3f6f9;
  --card: #fff;
  --text: #1f2d3d;
  --text-secondary: #5f6b7a;
  --text-placeholder: #8a97a6;
  --border: #e4e9ef;
  --border-dark: #d3dbe4;
  --success: #00a870;
  --success-light: #e6f7f1;
  --warning: #ed7b2f;
  --warning-light: #fff3e9;
  --danger: #d54941;
  --danger-light: #fff0ef;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(31, 45, 61, .04);
  --shadow-hover: 0 8px 24px rgba(31, 45, 61, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: var(--bg); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid rgba(0, 82, 217, .35); outline-offset: 2px; }
[x-cloak] { display: none !important; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--primary); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { color: #17243a; font-size: 23px; font-weight: 700; letter-spacing: -.8px; line-height: 1; }
.brand-name span { color: var(--primary); }

.site-header { height: 64px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--border); }
.site-nav { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-caption { color: var(--text-secondary); font-size: 14px; }

.btn { min-height: 36px; padding: 7px 16px; border: 1px solid transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-weight: 500; line-height: 20px; transition: background .18s, border-color .18s, color .18s, box-shadow .18s; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary:active:not(:disabled) { background: var(--primary-active); border-color: var(--primary-active); }
.btn-outline { color: var(--text); background: #fff; border-color: var(--border-dark); }
.btn-outline:hover:not(:disabled) { color: var(--primary); border-color: var(--primary); }
.btn-text { min-height: 32px; padding: 5px 8px; color: var(--text-secondary); background: transparent; }
.btn-text:hover:not(:disabled) { color: var(--primary); background: var(--primary-light); }
.btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #e6655e; border-color: #e6655e; }
.btn-danger-text { color: var(--danger); background: transparent; }
.btn-danger-text:hover { background: var(--danger-light); }
.btn-block { width: 100%; }
.btn-lg { min-height: 42px; padding-block: 9px; }

.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { font-size: 26px; line-height: 1.4; letter-spacing: -.4px; }
.page-heading p { margin-top: 5px; color: var(--text-secondary); }
.portal-main { min-height: calc(100vh - 145px); padding-block: 36px 56px; }
.status-badge { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; font-size: 12px; line-height: 18px; white-space: nowrap; }
.status-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--success); background: var(--success-light); }
.status-upcoming { color: var(--primary); background: var(--primary-light); }
.status-ended { color: var(--text-secondary); background: #edf1f5; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.event-card { min-width: 0; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.event-card:hover { transform: translateY(-2px); border-color: #cfd9e5; box-shadow: var(--shadow-hover); }
.event-card-media { position: relative; aspect-ratio: 16 / 8.5; overflow: hidden; background: #edf3fb; }
.event-card-media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.event-card:hover .event-card-media > img { transform: scale(1.025); }
.event-card-media .status-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.cover-letter { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: #7b9fca; background: linear-gradient(135deg, #f0f5fc, #e8f0fa); }
.cover-letter svg { width: 38px; height: 38px; }
.cover-letter span { font-size: 11px; font-weight: 600; letter-spacing: 2.2px; }
.event-card-body { min-height: 155px; padding: 18px 20px 16px; }
.event-date { margin-bottom: 5px; color: var(--primary); font-size: 12px; font-weight: 500; }
.event-card-body h2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 17px; line-height: 1.55; }
.event-subtitle { margin-top: 4px; overflow: hidden; color: var(--text-secondary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.event-card-meta { display: flex; align-items: center; gap: 14px; margin-top: 16px; color: var(--text-secondary); font-size: 12px; }
.event-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-card-meta span + span { position: relative; flex: 0 0 auto; padding-left: 13px; }
.event-card-meta span + span::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #a6b0bc; transform: translateY(-50%); }
.event-card-footer { min-height: 46px; padding: 11px 20px; border-top: 1px solid #edf0f4; display: flex; align-items: center; justify-content: space-between; color: var(--text-secondary); font-size: 13px; transition: color .18s, background .18s; }
.event-card:hover .event-card-footer { color: var(--primary); background: #fbfcff; }

.empty-state { min-height: 330px; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state.compact { min-height: 270px; border: 0; box-shadow: none; }
.empty-icon { width: 58px; height: 58px; margin-bottom: 18px; display: grid; place-items: center; color: var(--primary); background: var(--primary-light); border-radius: 50%; }
.empty-icon svg { width: 28px; height: 28px; }
.empty-state h1, .empty-state h2 { font-size: 20px; }
.empty-state h3 { font-size: 17px; }
.empty-state p { max-width: 440px; margin: 8px 0 22px; color: var(--text-secondary); }
.site-footer { padding: 22px 0 26px; color: var(--text-placeholder); font-size: 12px; text-align: center; }
.site-footer strong { color: var(--text-secondary); font-weight: 500; }
.site-footer span { margin-inline: 8px; }
.not-found { min-height: calc(100vh - 64px); display: grid; place-items: center; padding-block: 40px; }
.not-found .empty-state { width: min(620px, 100%); }
.error-code { margin-bottom: 8px; color: #c1ccda; font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -3px; }

/* 活动页：无页头，手机优先窄栏 */
.event-view { background: #eef1f5; }
.ev-shell { width: min(100%, 560px); min-height: 100vh; margin-inline: auto; display: flex; flex-direction: column; background: #fff; }
.ev-draft { padding: 8px 14px; color: #9a5a18; background: var(--warning-light); font-size: 12px; text-align: center; }
.ev-hero { position: relative; min-height: 288px; display: flex; align-items: flex-end; overflow: hidden; background: linear-gradient(135deg, #e9f1ff 0%, #f4f8ff 55%, #eef6f4 100%); }
.ev-hero.ev-hero-plain { min-height: 220px; }
.ev-hero-plain .ev-hero-inner { padding-top: 42px; }
.ev-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-hero.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 20, 34, .04) 0%, rgba(11, 20, 34, .18) 42%, rgba(11, 20, 34, .76) 100%); }
.ev-hero-inner { position: relative; z-index: 1; width: 100%; padding: 64px 22px 24px; }
.ev-hero h1 { margin-top: 12px; font-size: 25px; line-height: 1.42; letter-spacing: -.3px; }
.ev-hero-sub { margin-top: 4px; color: var(--text-secondary); font-size: 14px; }
.ev-hero-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--text-secondary); font-size: 12px; }
.ev-hero-meta span + span { position: relative; padding-left: 13px; }
.ev-hero-meta span + span::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .55; transform: translateY(-50%); }
.ev-hero.has-cover h1, .ev-hero.has-cover .ev-hero-sub { color: #fff; }
.ev-hero.has-cover .ev-hero-sub { opacity: .88; }
.ev-hero.has-cover .ev-hero-meta { color: rgba(255, 255, 255, .84); }
.ev-main { flex: 1; padding: 26px 20px 36px; }
.ev-intro { margin-bottom: 22px; color: var(--text-secondary); font-size: 13px; line-height: 1.75; text-align: center; }
.ev-section-title { margin: 2px 0 18px; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--primary); }
.ev-section-title::before, .ev-section-title::after { content: ""; width: 26px; height: 1px; background: #d5dfec; }
.ev-section-title h2 { font-size: 19px; letter-spacing: 3px; text-indent: 3px; }
.ev-section-title span { display: block; margin-top: 2px; color: var(--text-placeholder); font-size: 10px; font-weight: 500; letter-spacing: 4px; text-indent: 4px; }
.ev-group + .ev-group { margin-top: 10px; }
.ev-group-head { width: 100%; min-height: 48px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; text-align: left; color: var(--primary); background: var(--primary-light); border: 1px solid #d9e6ff; border-radius: 8px; cursor: pointer; }
.ev-group-head > span { min-width: 0; flex: 1; overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ev-group-head em { flex: 0 0 auto; color: #5b7bb0; font-style: normal; font-size: 12px; }
.ev-group-head .ev-chevron { color: #5b7bb0; }
.ev-group.collapsed .ev-group-head .ev-chevron { transform: rotate(-90deg); }
.ev-group-body { padding-top: 8px; }
.ev-row { width: 100%; min-height: 54px; margin-bottom: 8px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; text-align: left; background: #f7f9fc; border: 1px solid #edf1f6; border-radius: 8px; cursor: pointer; transition: background .16s, border-color .16s; }
.ev-group-body .ev-row:last-child { margin-bottom: 0; }
.ev-row:hover, .ev-row:active { background: #f1f7ff; border-color: #d9e6ff; }
.ev-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ev-row-main strong { overflow-wrap: anywhere; font-size: 15px; font-weight: 500; line-height: 1.45; }
.ev-row-main small { color: var(--text-placeholder); font-size: 12px; }
.ev-row .ev-chevron { flex: 0 0 auto; width: 16px; height: 16px; color: #9aa8b7; }
.ev-row:hover .ev-chevron { color: var(--primary); }
.ev-chevron { transition: transform .2s, color .16s; }
.ev-empty { min-height: 320px; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ev-empty h2 { font-size: 17px; }
.ev-empty p { max-width: 300px; margin-top: 6px; color: var(--text-secondary); font-size: 13px; }
.ev-footer { padding: 18px 20px 26px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-placeholder); font-size: 12px; }
.ev-footer a { color: var(--text-secondary); font-weight: 600; }
.ev-footer span { padding-left: 8px; border-left: 1px solid #dfe5ec; }
@media (min-width: 600px) {
  .ev-shell { box-shadow: 0 0 0 1px rgba(31, 45, 61, .05), 0 12px 44px rgba(31, 45, 61, .07); }
  .ev-main { padding-inline: 26px; }
  .ev-hero-inner { padding-inline: 26px; }
}

/* 全屏直播 */
.viewer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #111318; }
.viewer-bar { height: 60px; flex: 0 0 60px; padding: 0 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #fff; background: #202229; border-bottom: 1px solid #34363f; }
.viewer-back, .viewer-icon, .viewer-open { display: inline-flex; align-items: center; gap: 6px; color: #e5e7eb; background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.viewer-back { justify-self: start; padding: 7px 9px 7px 5px; }
.viewer-back:hover, .viewer-icon:hover, .viewer-open:hover { color: #fff; background: #34363f; }
.viewer-title { max-width: 50vw; display: flex; flex-direction: column; align-items: center; line-height: 1.35; }
.viewer-title strong { overflow: hidden; max-width: 100%; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title span { color: #9ca3af; font-size: 11px; }
.viewer-tools { justify-self: end; display: flex; align-items: center; gap: 5px; }
.viewer-icon { padding: 8px; }
.viewer-open { padding: 7px 9px; font-size: 13px; }
.viewer-body { position: relative; flex: 1; min-height: 0; }
.viewer-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; background: #fff; border: 0; }
.viewer-loading { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #d5d8de; background: #17191f; }
.viewer-loading p { margin-top: 16px; }
.spinner { width: 30px; height: 30px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.dark { border-color: #d9e1eb; border-top-color: var(--primary); }
.spinner.small { width: 16px; height: 16px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.viewer-loading .viewer-slow { margin-top: 8px; color: #8f96a3; font-size: 12px; }
.viewer-slow a { margin-left: 5px; color: #8db4ff; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 登录与后台骨架 */
.page-loading { min-height: 100vh; display: grid; place-items: center; }
.login-page { min-height: 100vh; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.login-card { width: min(400px, 100%); padding: 36px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 35px rgba(31, 45, 61, .06); }
.login-card .brand { margin-bottom: 32px; }
.login-card h1 { font-size: 23px; }
.login-desc { margin: 4px 0 26px; color: var(--text-secondary); }
.login-card .btn { margin-top: 20px; }
.login-foot { margin-top: 26px; color: var(--text-placeholder); font-size: 12px; letter-spacing: 1px; }
.form-error { margin-top: 10px; padding: 8px 11px; color: var(--danger); background: var(--danger-light); border-radius: 5px; font-size: 13px; }
.admin-header { position: sticky; top: 0; z-index: 30; height: 60px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--border); }
.admin-header-left, .admin-header-actions { display: flex; align-items: center; }
.admin-header-left { gap: 16px; }
.admin-header .brand-mark { width: 30px; height: 30px; }
.admin-header .brand-name { font-size: 21px; }
.console-label { padding-left: 16px; border-left: 1px solid var(--border-dark); color: var(--text-secondary); }
.admin-header-actions { gap: 8px; }
.admin-layout { min-height: calc(100vh - 60px); display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); padding: 20px 14px; overflow-y: auto; background: #fff; border-right: 1px solid var(--border); }
.sidebar-heading { padding: 0 6px; display: flex; align-items: center; justify-content: space-between; }
.sidebar-heading h2 { font-size: 15px; }
.sidebar-heading span { color: var(--text-placeholder); font-size: 12px; }
.admin-sidebar > .btn { margin: 15px 0 18px; }
.admin-event-list { display: flex; flex-direction: column; gap: 4px; }
.admin-event-item { width: 100%; padding: 11px 12px; text-align: left; background: transparent; border: 0; border-radius: 6px; cursor: pointer; }
.admin-event-item:hover { background: #f4f7fb; }
.admin-event-item.active { background: var(--primary-light); }
.admin-event-item strong { display: block; overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.admin-event-item.active strong { color: var(--primary); }
.admin-event-item small { display: block; overflow: hidden; margin-top: 2px; color: var(--text-placeholder); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-event-meta { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; color: var(--text-placeholder); font-size: 11px; }
.publish-state { display: inline-flex; align-items: center; gap: 4px; }
.publish-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #a6b0bc; }
.publish-state.live { color: var(--success); }
.publish-state.live::before { background: var(--success); }
.sidebar-empty { padding: 24px 8px; color: var(--text-placeholder); font-size: 13px; text-align: center; }
.admin-workspace { min-width: 0; padding: 24px 28px 94px; }
.workspace-inner { width: min(1120px, 100%); margin-inline: auto; }
.workspace-heading { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.breadcrumb { margin-bottom: 6px; color: var(--text-placeholder); font-size: 12px; }
.breadcrumb span { margin-inline: 6px; }
.workspace-heading h1 { max-width: 700px; overflow: hidden; font-size: 23px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.event-domain { margin-top: 5px; padding: 0; display: inline-flex; align-items: center; gap: 5px; color: var(--primary); background: none; border: 0; cursor: pointer; font-size: 12px; }
.event-domain .icon { width: 14px; height: 14px; }
.publish-control { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding-top: 23px; color: var(--text-secondary); font-size: 13px; }
.switch { position: relative; width: 36px; height: 20px; padding: 0; background: #c4ccd6; border: 0; border-radius: 10px; cursor: pointer; transition: background .2s; }
.switch span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transition: transform .2s; }
.switch.on { background: var(--success); }
.switch.on span { transform: translateX(16px); }
.editor-grid { margin-bottom: 20px; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr); gap: 20px; align-items: start; }
.panel-heading { margin-bottom: 20px; }
.panel-heading h2 { font-size: 16px; }
.panel-heading p { margin-top: 3px; color: var(--text-placeholder); font-size: 12px; }
.form-panel, .cover-panel { padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field-label { color: #364152; font-size: 13px; font-weight: 500; }
.required::before { content: "*"; margin-right: 4px; color: var(--danger); }
.field-hint { color: var(--text-placeholder); font-size: 11px; }
.field-control { width: 100%; min-width: 0; height: 36px; padding: 7px 11px; color: var(--text); background: #fff; border: 1px solid var(--border-dark); border-radius: 5px; outline: 0; transition: border-color .18s, box-shadow .18s; }
.field-control::placeholder { color: #a2adba; }
.field-control:hover { border-color: #9eacbd; }
.field-control:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0, 82, 217, .1); }
textarea.field-control { height: auto; min-height: 74px; resize: vertical; line-height: 1.6; }
.slug-control { display: flex; align-items: stretch; }
.slug-control .field-control { border-radius: 5px 0 0 5px; }
.slug-suffix { min-width: 0; padding: 7px 10px; display: flex; align-items: center; overflow: hidden; color: var(--text-secondary); background: #f5f7fa; border: 1px solid var(--border-dark); border-left: 0; border-radius: 0 5px 5px 0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cover-uploader { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--text-secondary); background: #f7f9fc; border: 1px dashed #b8c5d4; border-radius: 6px; cursor: pointer; text-align: center; }
.cover-uploader:hover { color: var(--primary); background: #f5f8ff; border-color: var(--primary); }
.cover-uploader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-uploader .upload-placeholder { display: flex; flex-direction: column; align-items: center; }
.upload-placeholder .icon { width: 30px; height: 30px; margin-bottom: 10px; color: #8ca0b8; }
.upload-placeholder strong { font-size: 13px; font-weight: 500; }
.upload-placeholder small { margin-top: 3px; color: var(--text-placeholder); font-size: 11px; }
.cover-mask { position: absolute; inset: auto 0 0; padding: 8px; color: #fff; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .18s; }
.cover-uploader:hover .cover-mask { opacity: 1; }
.cover-url-row { margin-top: 12px; display: flex; gap: 6px; }
.cover-url-row .field-control { font-size: 12px; }
.cover-url-row .btn { flex: 0 0 auto; padding-inline: 9px; }
.venues-editor { overflow: hidden; }
.venues-editor .panel-heading { margin: 0; }
.venues-editor-head { padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.panel-actions { display: flex; gap: 8px; }
.venue-edit-head, .venue-edit-row { display: grid; grid-template-columns: 150px minmax(160px, .85fr) minmax(250px, 1.6fr) 92px; gap: 10px; align-items: center; }
.venue-edit-head { padding: 10px 18px; color: var(--text-placeholder); background: #f7f9fb; border-bottom: 1px solid var(--border); font-size: 12px; }
.venue-edit-row { padding: 12px 18px; border-bottom: 1px solid #edf0f4; }
.venue-edit-row:last-child { border-bottom: 0; }
.venue-edit-row .field-control { height: 34px; padding: 6px 9px; font-size: 13px; }
.venue-ops { display: flex; justify-content: flex-end; gap: 2px; }
.icon-btn { width: 28px; height: 28px; padding: 5px; display: inline-grid; place-items: center; color: var(--text-secondary); background: transparent; border: 0; border-radius: 4px; cursor: pointer; }
.icon-btn:hover:not(:disabled) { color: var(--primary); background: var(--primary-light); }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-light); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.icon-btn .icon { width: 16px; height: 16px; }
.venues-empty { padding: 38px 20px; color: var(--text-secondary); text-align: center; }
.venues-empty p { margin-bottom: 14px; }
.venues-empty .panel-actions { justify-content: center; }
.save-bar { position: fixed; z-index: 20; right: 0; bottom: 0; left: 248px; min-height: 66px; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--border); box-shadow: 0 -3px 12px rgba(31, 45, 61, .035); backdrop-filter: blur(10px); }
.save-status { display: flex; align-items: center; gap: 14px; }
.dirty-status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-placeholder); font-size: 12px; }
.dirty-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.dirty-status.is-dirty { color: var(--warning); }
.dirty-status.is-dirty::before { background: var(--warning); }
.save-actions { display: flex; align-items: center; gap: 8px; }
.admin-blank { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.admin-blank .empty-state { width: min(560px, 100%); }

/* 弹层与反馈 */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 24px; display: grid; place-items: center; background: rgba(15, 23, 42, .48); }
.modal { width: min(590px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 9px; box-shadow: 0 18px 60px rgba(15, 23, 42, .2); }
.modal.small { width: min(430px, 100%); }
.modal-header { padding: 19px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 17px; }
.modal-body { padding: 22px; }
.modal-body > p { margin-bottom: 12px; color: var(--text-secondary); }
.modal-body code { padding: 2px 5px; color: var(--primary); background: var(--primary-light); border-radius: 3px; font-size: 12px; }
.modal-body textarea { min-height: 220px; }
.import-count { display: block; margin-top: 8px; color: var(--text-placeholder); font-size: 12px; }
.modal-footer { padding: 14px 22px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.delete-warning { color: var(--text-secondary); line-height: 1.8; }
.delete-warning strong { color: var(--text); }
.toast { position: fixed; z-index: 200; top: 76px; left: 50%; max-width: min(440px, calc(100% - 32px)); padding: 10px 16px; display: flex; align-items: center; gap: 8px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 30px rgba(31, 45, 61, .14); transform: translateX(-50%); }
.toast::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--primary); }
.toast.success::before { background: var(--success); }
.toast.error::before { background: var(--danger); }

@media (max-width: 1000px) {
  .event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-grid { grid-template-columns: 1fr; }
  .cover-panel { display: grid; grid-template-columns: minmax(240px, .8fr) 1fr; gap: 16px; align-items: center; }
  .cover-panel .panel-heading { grid-column: 1 / -1; margin-bottom: 0; }
  .cover-url-row { margin-top: 0; }
  .venue-edit-head, .venue-edit-row { grid-template-columns: 125px minmax(130px, .8fr) minmax(200px, 1.4fr) 88px; gap: 7px; }
}

@media (max-width: 800px) {
  .admin-layout { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar-heading { display: none; }
  .admin-sidebar > .btn { width: auto; margin: 0 0 12px; }
  .admin-event-list { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .admin-event-item { min-width: 205px; }
  .sidebar-empty { width: 100%; padding: 10px; }
  .admin-workspace { padding: 20px 20px 94px; }
  .save-bar { left: 0; padding-inline: 20px; }
  .venue-edit-head { display: none; }
  .venue-edit-row { position: relative; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 16px; }
  .venue-edit-row .venue-url-field { grid-column: 1 / -1; }
  .venue-ops { position: absolute; top: 7px; right: 10px; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 32px, 1160px); }
  .site-header { height: 58px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 21px; }
  .portal-main { min-height: calc(100vh - 139px); padding-block: 24px 36px; }
  .page-heading { align-items: flex-start; margin-bottom: 20px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading > .status-badge { margin-top: 4px; }
  .event-grid { grid-template-columns: 1fr; gap: 16px; }
  .event-card-body { min-height: 140px; }
  .ev-hero { min-height: 260px; }
  .ev-hero-inner { padding: 56px 18px 20px; }
  .ev-hero h1 { font-size: 23px; }
  .ev-main { padding: 22px 14px 32px; }
  .viewer-bar { height: 56px; flex-basis: 56px; padding: 0 8px; grid-template-columns: 1fr minmax(0, 1.5fr) 1fr; }
  .viewer-title { max-width: none; }
  .viewer-title span, .viewer-open { font-size: 0; }
  .viewer-open { padding: 8px; }
  .viewer-open .icon { width: 19px; height: 19px; }
  .viewer-back span { display: none; }
  .admin-header { height: 56px; padding-inline: 14px; }
  .admin-header-left { gap: 9px; }
  .console-label { padding-left: 9px; font-size: 12px; }
  .admin-header-actions .homepage-link { display: none; }
  .admin-sidebar { padding: 12px 14px; }
  .admin-workspace { padding: 18px 14px 146px; }
  .workspace-heading { align-items: flex-start; margin-bottom: 16px; }
  .workspace-heading h1 { max-width: 58vw; font-size: 20px; }
  .publish-control { flex-direction: column; gap: 4px; padding-top: 20px; font-size: 11px; }
  .form-panel, .cover-panel { padding: 18px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .cover-panel { display: block; }
  .cover-panel .panel-heading { margin-bottom: 16px; }
  .cover-url-row { margin-top: 10px; }
  .venues-editor-head { align-items: flex-start; flex-direction: column; padding: 18px 16px; }
  .panel-actions { width: 100%; }
  .panel-actions .btn { flex: 1; }
  .venue-edit-row { grid-template-columns: 1fr; padding: 16px; }
  .venue-edit-row .venue-url-field { grid-column: auto; }
  .venue-edit-row .field-control { padding-right: 9px; }
  .venue-ops { top: 9px; right: 9px; padding: 2px; background: #f5f7fa; border-radius: 5px; }
  .save-bar { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .save-status { width: 100%; justify-content: space-between; }
  .save-actions { width: 100%; }
  .save-actions .btn { flex: 1; padding-inline: 10px; }
  .save-actions .btn-text { display: none; }
  .login-card { padding: 28px 24px; }
  .modal-backdrop { padding: 14px; }
  .modal-body { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
