:root {
    --brand: #4f46e5;
    --brand-600: #4338ca;
    --brand-soft: #eef2ff;
    --cyan: #0ea5e9;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e8ecf5;
    --green: #10b981;
    --green-soft: #ecfdf5;
    --amber: #f59e0b;
    --amber-soft: #fffbeb;
    --red: #ef4444;
    --red-soft: #fef2f2;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }

code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 6px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
}

/* ---------------- 顶部导航（用户端） ---------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    color: #fff; font-weight: 700; font-size: 17px;
    box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}

.brand-logo {
    width: 40px; height: 40px;
    border-radius: 11px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .22);
}

.brand-text b { white-space: nowrap; font-size: 15px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text b { font-size: 16px; }
.brand-text i { font-style: normal; font-size: 12px; color: var(--muted); }

.nav { display: flex; gap: 4px; margin-left: 8px; }

.nav-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px;
    border-radius: 11px;
    color: var(--muted);
    font-weight: 600;
    transition: .18s;
}

.nav-link:hover { background: #f1f5f9; color: var(--text); }

.nav-link.is-active {
    background: var(--brand-soft);
    color: var(--brand);
}

.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar-name { font-weight: 600; }
.topbar-name em { font-style: normal; font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 1px 7px; border-radius: 20px; }

.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #8b5cf6);
    color: #fff; font-weight: 700; font-size: 14px;
}

.avatar-sm { width: 28px; height: 28px; font-size: 12px; }

.page { max-width: 1240px; margin: 0 auto; padding: 26px 24px 60px; }

.footer { text-align: center; color: #94a3b8; font-size: 12px; padding: 18px 0 34px; }

.footer-admin { padding: 6px 0 26px; }

/* 备案信息 */
.beian { margin-top: 6px; }
.beian a { color: #94a3b8; transition: .15s; }
.beian a:hover { color: var(--brand); }
.beian-sep { margin: 0 8px; color: #cbd5e1; }

.login-beian {
    position: fixed;
    bottom: 14px; left: 0; right: 0;
    text-align: center;
    font-size: 12px;
    pointer-events: none;
}
.login-beian a, .login-beian span { pointer-events: auto; }

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 0; cursor: pointer;
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 14px; font-weight: 600;
    font-family: inherit;
    background: var(--brand);
    color: #fff;
    transition: .18s;
    box-shadow: 0 4px 12px rgba(79, 70, 229, .22);
}

.btn:hover { background: var(--brand-600); transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; box-shadow: none; }

.btn-ghost {
    background: #fff; color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn-ghost:hover { background: #f8fafc; color: var(--text); border-color: #dbe2ee; }

.btn-danger { background: var(--red); box-shadow: 0 4px 12px rgba(239, 68, 68, .22); }
.btn-danger:hover { background: #dc2626; }

.btn-ok { background: var(--green); box-shadow: 0 4px 12px rgba(16, 185, 129, .22); }
.btn-ok:hover { background: #059669; }

.btn-warn { background: var(--amber); box-shadow: 0 4px 12px rgba(245, 158, 11, .22); }
.btn-warn:hover { background: #d97706; }

.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-block { width: 100%; }

/* ---------------- 卡片 ---------------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

.card-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.card-title { font-size: 15px; }
.card-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.card-extra { display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 10px 20px 18px; }

/* ---------------- 提示条 ---------------- */
.toast-wrap {
    position: fixed; top: 76px; right: 24px; z-index: 999;
    display: flex; flex-direction: column; gap: 10px;
}

.toast {
    min-width: 220px; max-width: 380px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
    border-left: 4px solid var(--green);
    box-shadow: var(--shadow-lg);
    font-weight: 600;
    animation: slideIn .25s ease;
}

.toast.is-error { border-left-color: var(--red); color: #b91c1c; }
.toast.is-warn { border-left-color: var(--amber); color: #b45309; }
.toast.is-success { border-left-color: var(--green); color: #047857; }

@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 12.5px; font-weight: 600; color: #475569; }
.hint { font-size: 12px; color: var(--muted); }

.input, .select, .textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dfe4ef;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: .15s;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}

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

.filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    padding: 14px 20px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
}

.filter-bar .field { min-width: 140px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th, .table td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.table th {
    background: #fafbfe;
    color: #475569;
    font-weight: 700;
    font-size: 12.5px;
    position: sticky; top: 0;
}

.table tbody tr:hover { background: #fbfcff; }
.table td.wrap { white-space: normal; }

.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.badge-green { background: var(--green-soft); color: #047857; }
.badge-blue { background: var(--brand-soft); color: var(--brand); }
.badge-amber { background: var(--amber-soft); color: #b45309; }
.badge-red { background: var(--red-soft); color: #b91c1c; }
.badge-gray { background: #f1f5f9; color: #64748b; }

.pager { display: flex; gap: 6px; padding: 14px 20px; flex-wrap: wrap; }

.pager-item {
    min-width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 600; font-size: 13px;
}

.pager-item.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty-icon { font-size: 34px; opacity: .5; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute; right: -30px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: var(--brand-soft);
}

.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.stat-num small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 2px; }

.stat-card.is-green::after { background: var(--green-soft); }
.stat-card.is-green .stat-num { color: #047857; }
.stat-card.is-amber::after { background: var(--amber-soft); }
.stat-card.is-amber .stat-num { color: #b45309; }
.stat-card.is-cyan::after { background: #e0f2fe; }
.stat-card.is-cyan .stat-num { color: #0369a1; }

/* ---------------- 后台两栏 ---------------- */
.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }

@media (max-width: 1100px) {
    .dash-grid { grid-template-columns: 1fr; }
}

/* ---------------- 柱状图 ---------------- */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar {
    width: 100%;
    max-width: 46px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #6366f1, #4f46e5);
    min-height: 4px;
    transition: height .4s ease;
}
.chart-bar.empty-bar { background: #eef2f7; }
.chart-label { font-size: 11.5px; color: var(--muted); }
.chart-val { font-size: 12px; font-weight: 700; color: #475569; }

/* ---------------- 工位地图 ---------------- */
.seat-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    padding: 14px 18px;
    background: #fbfcfe;
    border-bottom: 1px solid var(--line);
}

.chip {
    padding: 7px 14px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 13px; font-weight: 600; color: var(--muted);
    cursor: pointer;
    transition: .15s;
}

.chip:hover { border-color: #cbd5e1; color: var(--text); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-count { opacity: .7; font-weight: 500; margin-left: 4px; }

.seat-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 20px; font-size: 12.5px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 4px; }

.zone-block { margin-bottom: 22px; }
.zone-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 700;
    margin: 0 0 10px;
}
.zone-title span { font-weight: 500; color: var(--muted); font-size: 12.5px; }

.seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
}

.seat {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 12px 10px 10px;
    cursor: pointer;
    transition: .18s;
    min-height: 92px;
    display: flex; flex-direction: column; gap: 3px;
    overflow: hidden;
}

.seat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.seat-code { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.seat-sub { font-size: 11.5px; color: var(--muted); line-height: 1.35; word-break: break-all; }
.seat-tag {
    position: absolute; top: 8px; right: 8px;
    font-size: 10.5px; font-weight: 700;
    padding: 1px 6px; border-radius: 6px;
    background: #f1f5f9; color: #64748b;
}

.seat.free { background: var(--green-soft); border-color: #a7f3d0; }
.seat.free .seat-code { color: #047857; }
.seat.free .seat-tag { background: #d1fae5; color: #047857; }

.seat.using { background: var(--brand-soft); border-color: #c7d2fe; }
.seat.using .seat-code { color: var(--brand); }
.seat.using .seat-tag { background: #e0e7ff; color: var(--brand); }

.seat.mine {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #4338ca;
    box-shadow: 0 8px 20px rgba(79, 70, 229, .3);
}
.seat.mine .seat-code, .seat.mine .seat-sub { color: #fff; }
.seat.mine .seat-tag { background: rgba(255, 255, 255, .25); color: #fff; }

.seat.reserved { background: var(--amber-soft); border-color: #fde68a; }
.seat.reserved .seat-code { color: #b45309; }
.seat.reserved .seat-tag { background: #fef3c7; color: #b45309; }

.seat.disabled { background: #f3f4f6; border-color: #e5e7eb; cursor: not-allowed; opacity: .8; }
.seat.disabled .seat-code { color: #9ca3af; }
.seat.disabled:hover { transform: none; box-shadow: none; }

.seat.type-fixed::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: #8b5cf6;
}

.pulse {
    display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--brand); margin-right: 5px;
    box-shadow: 0 0 0 0 rgba(79, 70, 229, .5);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, .45); }
    70% { box-shadow: 0 0 0 8px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

/* ---------------- 当前工位大卡 ---------------- */
.hero {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #0ea5e9 100%);
    color: #fff;
    box-shadow: 0 14px 34px rgba(79, 70, 229, .28);
    margin-bottom: 18px;
}

.hero h2 { font-size: 19px; }
.hero .hero-meta { font-size: 13px; opacity: .92; margin-top: 4px; }
.hero-num { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.hero-actions { display: flex; gap: 10px; }
.hero .btn { background: rgba(255, 255, 255, .92); color: var(--brand-600); box-shadow: none; }
.hero .btn:hover { background: #fff; }

.hero.ghost-hero {
    background: #fff; color: var(--text);
    border: 1px dashed #cbd5e1; box-shadow: none;
}
.hero.ghost-hero .btn { background: var(--brand); color: #fff; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center; justify-content: center;
    padding: 20px;
}

.modal-mask.is-open { display: flex; }

.modal {
    width: 100%; max-width: 520px;
    max-height: 88vh; overflow: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    animation: pop .18s ease;
}

.modal.wide { max-width: 860px; }

@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.modal-head h3 { font-size: 16px; }
.modal-close { border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 16px; color: #64748b; }
.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fbfcfe; }

.kv-list { display: grid; grid-template-columns: 88px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv-list dt { color: var(--muted); }
.kv-list dd { margin: 0; font-weight: 600; }

.history-item {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed var(--line);
    font-size: 13px;
}
.history-item:last-child { border-bottom: 0; }
.history-item .who { font-weight: 600; }
.history-item .when { color: var(--muted); font-size: 12.5px; }

/* ---------------- 管理后台布局 ---------------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px; flex: 0 0 232px;
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    padding: 18px 14px;
    position: sticky; top: 0; height: 100vh;
}

.brand-side { margin-bottom: 20px; padding: 0 6px; }
.side-menu { display: flex; flex-direction: column; gap: 3px; }
.side-menu .nav-link { padding: 10px 12px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 28px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}

.admin-title { font-size: 18px; }
.admin-user { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #475569; }
.admin-content { padding: 22px 28px 60px; }

/* ---------------- 排班工位选择 ---------------- */
.seat-picker { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.picker-zone { margin-bottom: 10px; }
.picker-zone-title { font-size: 12.5px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.picker-list { display: flex; flex-wrap: wrap; gap: 6px; }

.picker-item {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: .15s;
}

.picker-item input { margin: 0; accent-color: var(--brand); }
.picker-item:hover { border-color: #c7d2fe; background: #fafbff; }
.picker-item.checked { background: var(--brand-soft); border-color: #c7d2fe; color: var(--brand); }

.check-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.check-line input { accent-color: var(--brand); width: 15px; height: 15px; }

/* ---------------- 登录页 ---------------- */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    background: #fff;
}

.login-side {
    position: relative;
    background: linear-gradient(160deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
    color: #fff;
    padding: 60px 54px;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;
}

.login-side::before, .login-side::after {
    content: ""; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.login-side::before { width: 320px; height: 320px; right: -100px; top: -80px; }
.login-side::after { width: 220px; height: 220px; left: -80px; bottom: -60px; }

.login-side h1 { font-size: 34px; line-height: 1.35; position: relative; }
.login-side p { font-size: 15px; opacity: .9; max-width: 420px; position: relative; }

.login-feature { margin-top: 34px; display: grid; gap: 14px; position: relative; }
.login-feature div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; opacity: .95; }
.login-feature b { display: block; font-size: 14.5px; }
.login-feature span { display: block; font-size: 12.5px; opacity: .8; font-weight: 400; }

.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 360px; }
.login-box h2 { font-size: 24px; margin-bottom: 6px; }
.login-box .sub { color: var(--muted); margin: 0 0 26px; font-size: 13.5px; }
.login-box .field { margin-bottom: 16px; }

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-tip { margin-top: 18px; font-size: 12.5px; color: var(--muted); background: #f8fafc; border: 1px dashed var(--line); padding: 10px 12px; border-radius: 10px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
    .login-page { grid-template-columns: 1fr; }
    .login-side { display: none; }
    .form-grid, .form-grid.three { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
    .topbar { flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
    .nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
    .topbar-user { margin-left: auto; }
    .page { padding: 16px 14px 40px; }
    .admin-shell { flex-direction: column; }
    .sidebar { width: 100%; flex: none; height: auto; position: static; }
    .side-menu { flex-direction: row; overflow-x: auto; }
    .side-foot { flex-direction: row; margin-top: 12px; }
    .admin-content { padding: 16px 14px 40px; }
    .admin-top { padding: 14px 16px; }
    .seat-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ---------------- 工位平面图 ---------------- */
.plan-wrap { overflow-x: auto; padding: 4px 2px 12px; }

.plan-grid { display: grid; gap: 5px; min-width: 640px; }

.plan-cell {
    display: flex; align-items: center; justify-content: center;
    min-height: 54px; padding: 4px 6px;
    border-radius: 9px; font-size: 12.5px; font-weight: 600;
    text-align: center; word-break: break-all;
}

.plan-aisle { background: #f1f5f9; color: #94a3b8; font-weight: 500; letter-spacing: 3px; min-height: 30px; }
.plan-door  { background: #ecfeff; border: 1px dashed #67e8f9; color: #0e7490; }
.plan-lift  { background: #fdf4ff; border: 1px solid #f0abfc; color: #a21caf; }
.plan-room  { background: #fff7ed; border: 1px solid #fdba74; color: #c2410c; }
.plan-label { background: transparent; color: #64748b; }
.plan-empty { background: transparent; min-height: 14px; }
.plan-unbound { background: #f8fafc; border: 1px dashed #cbd5e1; color: #94a3b8; font-weight: 500; }

.plan-grid .seat { min-height: 54px; padding: 8px 6px 6px; border-radius: 9px; }
.plan-grid .seat .seat-code { font-size: 13.5px; }
.plan-grid .seat .seat-sub { font-size: 11px; }

/* ---------------- 平面图编辑器 ---------------- */
.map-zone-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.map-zone-new { display: flex; gap: 8px; margin-left: auto; align-items: center; }

.map-tools {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding: 10px 12px; margin-bottom: 10px;
    background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
}

.map-tools-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.map-tools-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.map-size { width: 64px !important; padding: 7px 8px !important; text-align: center; }

.tool-btn {
    border: 1px solid var(--line); background: #fff;
    padding: 7px 13px; border-radius: 20px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    cursor: pointer; font-family: inherit;
    transition: all .15s ease;
}

.tool-btn:hover { border-color: var(--brand); color: var(--brand); }
.tool-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, .25); }

.map-editor { display: grid; gap: 4px; min-width: 620px; }

.mcell {
    display: flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 3px 4px;
    border: 1px solid #e2e8f0; border-radius: 7px;
    background: #fff; font-size: 12px; font-weight: 600; color: var(--text);
    cursor: pointer; text-align: center; word-break: break-all;
    transition: border-color .12s ease, transform .12s ease;
}

.mcell:hover { border-color: var(--brand); transform: scale(1.03); z-index: 1; }
.mcell-seat { background: var(--green-soft); border-color: #6ee7b7; color: #047857; }
.mcell-aisle { background: #f1f5f9; color: #94a3b8; font-weight: 500; min-height: 24px; }
.mcell-door { background: #ecfeff; border-color: #67e8f9; color: #0e7490; }
.mcell-lift { background: #fdf4ff; border-color: #f0abfc; color: #a21caf; }
.mcell-room { background: #fff7ed; border-color: #fdba74; color: #c2410c; }
.mcell-label { background: #fff; color: #64748b; border-style: dashed; }
.mcell-empty { background: #fff; }
.mcell-missing { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

.map-newseat { margin-top: 16px; padding: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; }
.map-newseat-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }

.badge-amber { background: #fef3c7; color: #b45309; }

@media (max-width: 780px) {
    .map-zone-new { margin-left: 0; }
    .plan-grid { min-width: 520px; }
}
