/* AISeat - 浅色企业后台风 主色#1677ff 背景#f5f7fa */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; background:#f5f7fa; color:#333; font-size:14px; line-height:1.5; }
a { text-decoration:none; color:inherit; }
button { cursor:pointer; border:none; outline:none; font-size:13px; }
input, select, textarea { font-size:13px; outline:none; border:1px solid #d9d9d9; border-radius:4px; padding:4px 8px; }
input:focus, select:focus, textarea:focus { border-color:#1677ff; box-shadow:0 0 0 2px rgba(22,119,255,.1); }

/* Top Nav */
.top-nav { display:flex; align-items:center; height:48px; background:#fff; border-bottom:1px solid #e8e8e8; padding:0 20px; box-shadow:0 1px 4px rgba(0,0,0,.04); position:sticky; top:0; z-index:100; }
.nav-logo { font-size:16px; font-weight:700; color:#1677ff; margin-right:32px; white-space:nowrap; }
.nav-menu { display:flex; gap:4px; flex:1; }
.nav-item { padding:6px 12px; border-radius:4px; color:#666; font-size:13px; transition:all .2s; }
.nav-item:hover { background:#f0f5ff; color:#1677ff; }
.nav-item.active { background:#e6f4ff; color:#1677ff; font-weight:500; }
.nav-right { display:flex; align-items:center; gap:12px; }
.lang-switch { font-size:12px; color:#999; cursor:pointer; }
.user-avatar { width:28px; height:28px; border-radius:50%; background:#1677ff; color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; }

/* Breadcrumb */
.breadcrumb-bar { padding:8px 20px; background:#fff; border-bottom:1px solid #f0f0f0; font-size:12px; color:#999; }
.breadcrumb-bar .sep { margin:0 6px; }
.breadcrumb-bar .current { color:#333; }

/* Layout */
.main-layout { display:flex; min-height:calc(100vh - 90px); }
.side-menu { width:180px; background:#fff; border-right:1px solid #f0f0f0; padding:12px 0; flex-shrink:0; }
.menu-item { display:block; padding:10px 20px; color:#666; font-size:13px; transition:all .2s; border-left:3px solid transparent; }
.menu-item:hover { background:#f0f5ff; color:#1677ff; }
.menu-item.active { background:#e6f4ff; color:#1677ff; border-left-color:#1677ff; font-weight:500; }
.content-area { flex:1; padding:16px; overflow-x:auto; min-width:0; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; padding:6px 14px; border-radius:4px; font-size:13px; transition:all .2s; gap:4px; }
.btn-primary { background:#1677ff; color:#fff; }
.btn-primary:hover { background:#4096ff; }
.btn-default { background:#fff; color:#333; border:1px solid #d9d9d9; }
.btn-default:hover { border-color:#1677ff; color:#1677ff; }
.btn-danger { background:#fff; color:#f5222d; border:1px solid #ffa39e; }
.btn-danger:hover { background:#fff1f0; }
.btn-sm { padding:3px 8px; font-size:12px; }
.btn-icon { background:none; border:none; color:#999; font-size:16px; padding:2px 6px; cursor:pointer; }
.btn-icon:hover { color:#f5222d; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* Panel Card */
.panel-card { background:#fff; border-radius:8px; padding:16px; margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.panel-row { margin-bottom:12px; display:flex; align-items:flex-start; gap:8px; }
.panel-row label { min-width:100px; font-weight:500; color:#666; padding-top:4px; flex-shrink:0; }
.panel-textarea { flex:1; resize:vertical; min-height:60px; }
.radio-label { display:inline-flex; align-items:center; gap:4px; margin-right:16px; cursor:pointer; font-weight:normal; min-width:auto; }

/* Toolbar */
.toolbar { display:flex; align-items:center; justify-content:space-between; background:#fff; border-radius:8px; padding:10px 16px; margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); flex-wrap:wrap; gap:8px; }
.toolbar-tabs { display:flex; gap:4px; }
.tab-btn { padding:6px 16px; border-radius:4px; background:#f5f5f5; color:#666; font-size:13px; }
.tab-btn.active { background:#1677ff; color:#fff; }
.toolbar-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* Scheme Cards */
.scheme-cards { display:flex; gap:8px; flex-wrap:wrap; }
.scheme-card { padding:8px 16px; border:2px solid #e8e8e8; border-radius:6px; cursor:pointer; transition:all .2s; font-size:13px; }
.scheme-card:hover { border-color:#91caff; }
.scheme-card.active { border-color:#1677ff; background:#e6f4ff; color:#1677ff; font-weight:500; }

/* Seat Map */
.seating-body { display:flex; gap:12px; }
.seat-map-area { flex:1; min-width:0; background:#fff; border-radius:8px; padding:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); overflow-x:auto; }
.map-title { font-size:15px; font-weight:600; margin-bottom:8px; }
.legend-bar { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:12px; font-size:12px; color:#666; }
.legend-item { display:flex; align-items:center; gap:4px; }
.dot { width:10px; height:10px; border-radius:50%; display:inline-block; }
.dot-empty { border:1px dashed #bfbfbf; background:#fff; }

/* Seat Grid */
.seat-grid-wrapper { overflow-x:auto; }
.seat-grid { display:inline-block; min-width:600px; }
.grid-header-row { display:flex; align-items:center; margin-bottom:4px; padding-left:24px; }
.grid-col-label { width:52px; text-align:center; font-size:11px; color:#999; font-weight:600; }
.stage-label { margin-left:12px; font-size:11px; color:#f5222d; font-weight:600; writing-mode:vertical-lr; letter-spacing:2px; }
.grid-row { display:flex; align-items:center; margin-bottom:2px; }
.grid-row.block-gap { margin-top:8px; border-top:1px dashed #e8e8e8; padding-top:6px; }
.row-label { width:24px; text-align:center; font-size:10px; color:#999; flex-shrink:0; }
.seat-cell { width:50px; height:32px; border:1px solid #e8e8e8; border-radius:3px; margin:1px; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; transition:all .15s; position:relative; font-size:10px; overflow:hidden; flex-shrink:0; }
.seat-cell:hover { border-color:#1677ff; box-shadow:0 0 0 2px rgba(22,119,255,.15); z-index:2; }
.seat-cell.occupied { border-color:transparent; color:#fff; }
.seat-cell.occupied .seat-id { color:rgba(255,255,255,.7); }
.seat-cell.preset-seat { border:2px solid #fa8c16; }
.seat-cell.drag-over { border-color:#1677ff; background:#e6f4ff !important; transform:scale(1.05); }
.seat-cell:not(.occupied) { background:#fff; border-style:dashed; }
.seat-id { font-size:9px; color:#bbb; line-height:1; }
.seat-name { font-size:10px; font-weight:500; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:46px; }
.aisle-cell { width:20px; display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative; border-left:2px solid #e8e8e8; border-right:2px solid #e8e8e8; margin:0 2px; min-height:32px; }
.aisle-label { font-size:9px; color:#999; writing-mode:vertical-lr; letter-spacing:1px; position:absolute; }
.stage-bar { width:16px; background:linear-gradient(180deg,#f5222d,#ff7875); border-radius:3px; margin-left:4px; position:absolute; right:-20px; top:0; bottom:0; }

/* Unseated Panel */
.unseated-panel { width:220px; flex-shrink:0; background:#fff; border-radius:8px; padding:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); max-height:calc(100vh - 200px); overflow-y:auto; display:flex; flex-direction:column; }
.unseated-panel h4 { font-size:14px; margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.badge { background:#1677ff; color:#fff; border-radius:10px; padding:1px 7px; font-size:11px; }
.filter-input { width:100%; margin-bottom:6px; }
.filter-row { display:flex; gap:4px; margin-bottom:8px; }
.filter-select { flex:1; min-width:0; }
.unseated-list { flex:1; overflow-y:auto; }
.guest-chip { padding:6px 8px; border:1px solid #f0f0f0; border-radius:4px; margin-bottom:4px; cursor:grab; transition:all .15s; display:flex; flex-wrap:wrap; gap:2px; align-items:center; }
.guest-chip:hover { border-color:#1677ff; background:#f0f5ff; }
.guest-chip.selected { border-color:#1677ff; background:#e6f4ff; box-shadow:0 0 0 2px rgba(22,119,255,.2); }
.chip-name { font-size:12px; font-weight:500; }
.chip-company { font-size:10px; color:#999; }
.chip-rank { font-size:10px; margin-left:auto; }
.empty-hint { text-align:center; color:#bbb; padding:20px; font-size:13px; }

/* Preset */
.preset-header { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.preset-row { display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.preset-select { width:180px; }
.preset-input { width:100px; }

/* Config Page */
.config-page h2, .guest-page h2, .rules-page h2 { font-size:18px; margin-bottom:16px; }
.config-grid { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:12px; }
.config-grid label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:#666; }
.config-input { width:80px; }
.cell-input { width:100%; max-width:160px; }
.color-input { width:40px; height:28px; padding:0; border:none; cursor:pointer; }

/* Data Table */
.data-table { width:100%; border-collapse:collapse; font-size:12px; }
.data-table th { background:#fafafa; padding:8px 6px; text-align:left; font-weight:500; color:#666; border-bottom:1px solid #f0f0f0; white-space:nowrap; }
.data-table td { padding:7px 6px; border-bottom:1px solid #f5f5f5; }
.data-table tr:hover td { background:#f0f5ff; }
.table-wrap { overflow-x:auto; background:#fff; border-radius:8px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.empty-cell { text-align:center; color:#bbb; padding:40px !important; }

/* Filter Bar */
.filter-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; background:#fff; padding:12px; border-radius:8px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.import-btn { position:relative; overflow:hidden; }

/* Pagination */
.pagination { display:flex; align-items:center; gap:12px; padding:12px; font-size:13px; color:#666; }
.pagination button { padding:4px 10px; border:1px solid #d9d9d9; border-radius:4px; background:#fff; }
.pagination button:hover:not(:disabled) { border-color:#1677ff; color:#1677ff; }

/* Rank Tag */
.rank-tag { display:inline-block; padding:1px 6px; border:1px solid; border-radius:3px; font-size:11px; }

/* Rules Page */
.rules-desc { color:#666; margin-bottom:12px; font-size:13px; }
.rules-actions { display:flex; gap:8px; margin-bottom:16px; }
.rules-list { display:grid; gap:12px; }
.rule-card { background:#fff; border-radius:8px; padding:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.rule-header { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.rule-id { background:#1677ff; color:#fff; padding:2px 8px; border-radius:3px; font-size:11px; font-weight:600; }
.rule-name { font-size:14px; font-weight:600; flex:1; }
.rule-desc { font-size:12px; color:#666; margin-bottom:8px; line-height:1.6; }
.rule-evidence { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.evidence-tag { background:#f6f6f6; padding:2px 8px; border-radius:3px; font-size:11px; color:#555; }
.evidence-empty { color:#bbb; font-size:12px; font-style:italic; }
.rule-weight { display:flex; align-items:center; gap:8px; }
.rule-weight label { font-size:12px; color:#666; }
.rule-weight input[type=range] { flex:1; max-width:200px; }
.weight-val { font-size:13px; font-weight:600; color:#1677ff; min-width:28px; }

/* Switch */
.switch { position:relative; width:36px; height:20px; flex-shrink:0; }
.switch input { opacity:0; width:0; height:0; }
.slider { position:absolute; inset:0; background:#ccc; border-radius:20px; transition:.2s; cursor:pointer; }
.slider:before { content:''; position:absolute; width:16px; height:16px; left:2px; top:2px; background:#fff; border-radius:50%; transition:.2s; }
.switch input:checked + .slider { background:#1677ff; }
.switch input:checked + .slider:before { transform:translateX(16px); }

/* Drawer */
.drawer-mask { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:1000; display:flex; justify-content:flex-end; }
.drawer-panel { width:380px; max-width:90vw; background:#fff; height:100%; overflow-y:auto; box-shadow:-4px 0 16px rgba(0,0,0,.1); animation:slideIn .2s; }
@keyframes slideIn { from{transform:translateX(100%)} to{transform:translateX(0)} }
.drawer-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #f0f0f0; }
.drawer-header h3 { font-size:16px; }
.btn-close { background:none; font-size:22px; color:#999; padding:4px 8px; }
.btn-close:hover { color:#333; }
.drawer-body { padding:16px 20px; }
.drawer-section { margin-bottom:16px; }
.drawer-section h4 { font-size:13px; color:#1677ff; margin-bottom:8px; padding-bottom:4px; border-bottom:1px solid #f0f0f0; }
.drawer-section p { font-size:13px; color:#555; margin-bottom:4px; }
.drawer-section label { display:block; font-size:12px; color:#666; margin-bottom:8px; }
.drawer-input { width:100%; margin-top:2px; }
.drawer-footer { padding:12px 0; border-top:1px solid #f0f0f0; display:flex; gap:8px; }

/* Toast */
.toast-container { position:fixed; top:60px; right:20px; z-index:2000; display:flex; flex-direction:column; gap:8px; }
.toast-item { padding:10px 16px; border-radius:6px; font-size:13px; box-shadow:0 4px 12px rgba(0,0,0,.12); animation:fadeIn .2s; max-width:360px; }
@keyframes fadeIn { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }
.toast-info { background:#e6f4ff; color:#0958d9; border:1px solid #91caff; }
.toast-success { background:#f6ffed; color:#389e0d; border:1px solid #b7eb8f; }
.toast-warn { background:#fffbe6; color:#d48806; border:1px solid #ffe58f; }
.toast-error { background:#fff2f0; color:#cf1322; border:1px solid #ffccc7; }

/* Dinner View */
.dinner-view { background:#fff; border-radius:8px; padding:16px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.dinner-view h3 { margin-bottom:12px; }
.table-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; margin-bottom:12px; }
.table-card { border:1px solid #f0f0f0; border-radius:8px; padding:12px; }
.table-card-header { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.table-name-input { font-weight:600; border:none; border-bottom:1px solid #e8e8e8; padding:2px 4px; width:120px; }
.table-seats { font-size:12px; color:#999; }
.table-slots { display:flex; flex-wrap:wrap; gap:4px; }
.table-slot { padding:4px 8px; background:#f6f6f6; border-radius:4px; font-size:12px; display:flex; align-items:center; gap:4px; }
.table-slot.empty { color:#bbb; border:1px dashed #e8e8e8; background:#fff; }

/* Table Config */
.table-config-list { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.table-config-card { display:flex; align-items:center; gap:12px; padding:8px; border:1px solid #f0f0f0; border-radius:6px; }
.table-config-card label { display:flex; align-items:center; gap:4px; font-size:12px; color:#666; }

/* Empty State */
.empty-state { display:flex; align-items:center; justify-content:center; min-height:300px; color:#bbb; font-size:15px; }

/* Responsive */
@media(max-width:1200px) { .seating-body { flex-direction:column; } .unseated-panel { width:100%; max-height:300px; } }
@media(max-width:768px) { .side-menu { width:140px; } .toolbar { flex-direction:column; align-items:flex-start; } }

/* Loading Overlay (D4) */
.loading-overlay { position:fixed; inset:0; background:rgba(255,255,255,.75); z-index:900; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; }
.loading-overlay p { font-size:14px; color:#333; }
.loading-spinner { width:36px; height:36px; border:3px solid #e8e8e8; border-top-color:#1677ff; border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .6s linear infinite; margin-right:4px; }

/* Sofa Section (D3) */
.sofa-section { background:#fff; border-radius:8px; padding:12px 16px; margin-top:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.sofa-toggle { cursor:pointer; font-size:13px; font-weight:500; color:#666; padding:4px 0; user-select:none; }
.sofa-toggle:hover { color:#1677ff; }
.sofa-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:6px; margin-top:8px; max-height:200px; overflow-y:auto; }
.sofa-item { display:flex; gap:8px; align-items:center; padding:4px 8px; background:#fafafa; border-radius:4px; font-size:12px; }
.sofa-seat { color:#fa8c16; font-weight:600; min-width:40px; }
.sofa-name { color:#333; }
.sofa-comp { color:#999; margin-left:auto; font-size:11px; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Dinner Body Layout (D8) */
.dinner-body { display:flex; gap:12px; }
.dinner-body .table-cards { flex:1; }
.dinner-unseated { width:220px; flex-shrink:0; background:#fafafa; border-radius:8px; padding:12px; max-height:calc(100vh - 280px); overflow-y:auto; }
.dinner-unseated h4 { font-size:14px; margin-bottom:8px; display:flex; align-items:center; gap:6px; }
.table-slot.filled { background:#e6f4ff; border:1px solid #91caff; cursor:grab; }
.table-slot.filled:hover { background:#bae0ff; }

/* Grid header fixes */
.row-label-hdr { width:24px; flex-shrink:0; }
.aisle-hdr { width:20px; flex-shrink:0; margin:0 2px; }
