* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}
h1 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a3c8b;  /* 改为深蓝色，与按钮颜色协�?*/
}
h2 {
    font-size: 18px;
    margin-bottom: 16px;
}
/* 工具�?*/
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
button {
    padding: 10px 20px;
    background: #1a3c8b;  /* 深蓝�?- 庄重正式 */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
button:hover {
    background: #2a4c9b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
button:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: #ddd;
}
input[type="file"] {
    padding: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
}
input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}
.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}
.hidden {
    display: none !important;
}
/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}
.modal.show {
    display: block;
}
.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}
.close:hover {
    color: #333;
}
/* 数据预览 */
.preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.preview-tab {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    font-size: 14px;
}
.preview-tab.active {
    background: #1a3c8b;
    color: white;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
th, td {
    padding: 8px;
    border: 1px solid #e8e8e8;
    text-align: left;
}
th {
    background: #fafafa;
    font-weight: 600;
}
/* 区域管理 */
.config-panel label {
    display: block;
    margin: 12px 0 6px;
}
.area-item {
    padding: 16px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.area-info {
    flex: 1;
}
.area-name {
    font-weight: 600;
    margin-bottom: 4px;
}
.area-detail {
    font-size: 13px;
    color: #666;
}
.area-actions {
    display: flex;
    gap: 8px;
}
.area-actions button {
    padding: 6px 12px;
    font-size: 13px;
}
.btn-edit {
    background: #1a3c8b;
}
.btn-edit:hover {
    background: #2a4c9b;
}
.btn-delete {
    background: #8b1a1a;
}
.btn-delete:hover {
    background: #9b2a2a;
}
/* 座位布局 */
.seat-controls {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}
#seatLayout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    overflow: auto;
}
.area-section {
    border: 2px dashed #d9d9d9;
    border-radius: 12px;
    padding: 20px;
    overflow: visible;
    transform-origin: top left;
}
.area-title {
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a3c8b;  /* 改为深蓝色，与主标题和按钮颜色协�?*/
    font-size: 16px;
}
.seat-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
}
.seat-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}
.seat {
    width: 120px;
    height: 90px;
    border: 2px solid #1a3c8b;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    user-select: none;
    flex-shrink: 0;
    box-sizing: border-box;
}
.seat:hover {
    box-shadow: 0 4px 12px rgba(26, 60, 139, 0.3);
    transform: translateY(-2px);
}
.seat.selected {
    background: #e6f0ff;
    border-color: #2a4c9b;
    border-width: 3px;
}
.seat.empty {
    border-style: dashed;
    border-color: #d9d9d9;
    background: #fafafa;
    cursor: default;
}
.seat.empty:hover {
    box-shadow: none;
    transform: none;
}
.seat-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    text-align: center;
    line-height: 1.2;
}
.seat-position {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    text-align: center;
    line-height: 1.2;
}
.seat-unit {
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.2;
}
/* 回型布局 */
.hollow-layout {
    display: grid;
    gap: 10px;
    position: relative;
    width: fit-content;
    margin: 0 auto;
}
/* 回型中间的会议桌(线条) */
.hollow-table {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    height: 40%;
    border: 3px solid #666;
    border-radius: 8px;
    z-index: 0;
}
.hollow-top, .hollow-bottom {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.hollow-middle {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.hollow-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hollow-side .seat {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}
/* 面对面布局 */
.face-layout {
    display: flex;
    gap: 240px;  /* 增加间隙，从180px增加�?40px，为加宽的桌子留出空�?*/
    justify-content: center;
    position: relative;
    width: fit-content;
    margin: 0 auto;
    min-width: 600px;  /* 确保最小宽度，避免桌子太挤 */
}
/* 面对面中间的会议�?圆角矩形线条) - 加宽版本 */
.face-table {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;  /* 加宽1倍，�?00px增加�?00px */
    height: 70%;
    border: 4px solid #666;  /* 线条加粗，从3px增加�?px */
    border-radius: 60px;  /* 圆角稍微增大，保持比�?*/
    z-index: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);  /* 添加轻微阴影增强立体�?*/
}
.face-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
    margin: 0 20px;  /* 增加外边距，确保座位离桌子有足够距离 */
}
.face-side .seat {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
}

/* 响应式调整面对面布局 */
@media (max-width: 768px) {
    .face-layout {
        gap: 180px;  /* 中等屏幕减少间隙 */
        min-width: 500px;
    }
    
    .face-table {
        width: 160px;  /* 中等屏幕稍微缩小桌子 */
    }
    
    .face-side {
        margin: 0 15px;
    }
}

@media (max-width: 480px) {
    .face-layout {
        gap: 140px;  /* 小屏幕进一步减少间�?*/
        min-width: 400px;
        flex-direction: column;
        gap: 20px;
    }
    
    .face-table {
        width: 120px;  /* 小屏幕缩小桌�?*/
        height: 50%;
    }
    
    .face-side {
        margin: 0 10px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .face-side .seat {
        width: 100px;
        height: 75px;
    }
}

/* 响应式调整回型和面对面布局 */
@media (max-width: 768px) {
    .hollow-top, .hollow-bottom {
        gap: 6px;
        padding: 0 5px;
    }
    
    .hollow-middle {
        gap: 6px;
        padding: 0 5px;
    }
    
    .hollow-side {
        gap: 6px;
    }
    
    .face-layout {
        gap: 15px;
    }
    
    .face-side {
        gap: 6px;
        max-width: 45%;
    }
    
    .face-table {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .hollow-top, .hollow-bottom {
        gap: 4px;
        padding: 0 3px;
    }
    
    .hollow-middle {
        gap: 4px;
        padding: 0 3px;
    }
    
    .hollow-side {
        gap: 4px;
    }
    
    .face-layout {
        gap: 10px;
        flex-direction: column;
    }
    
    .face-side {
        gap: 4px;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .face-side .seat {
        width: auto;
        flex: 1 0 auto;
        min-width: 60px;
    }
    
    .face-table {
        width: 60px;
        height: 50%;
    }
}
/* 响应�?*/
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
   
    .toolbar {
        gap: 5px;
    }
   
    button {
        padding: 8px 12px;
        font-size: 13px;
    }
   
    .card {
        padding: 16px;
    }
   
    .modal-content {
        width: 95%;
        padding: 20px;
    }
   
    .seat {
        min-width: 70px;
        height: 60px;
        padding: 4px;
        font-size: 12px;
    }
   
    .seat-name {
        font-size: 12px;
        margin-bottom: 1px;
    }
   
    .seat-position {
        font-size: 10px;
    }
   
    .seat-unit {
        font-size: 9px;
    }
    
    .seat-row {
        gap: 6px;
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }
   
    .seat {
        min-width: 60px;
        height: 50px;
        padding: 3px;
        font-size: 11px;
    }
   
    .seat-name {
        font-size: 11px;
    }
   
    .seat-position {
        font-size: 9px;
    }
   
    .seat-unit {
        font-size: 8px;
    }
    
    .seat-row {
        gap: 4px;
    }
    
    .area-section {
        padding: 12px;
    }
}

/* 超大屏幕适配 */
@media (min-width: 1600px) {
    .seat {
        min-width: 100px;
        height: 80px;
        padding: 8px;
    }
    
    .seat-name {
        font-size: 16px;
    }
    
    .seat-position {
        font-size: 13px;
    }
    
    .seat-unit {
        font-size: 12px;
    }
}

/* 人员选择弹窗 */
.person-select-modal {
    max-width: 800px;
    width: 90%;
    padding: 20px;
}

.person-select-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f5ff;
    border: 1px solid #d6e4ff;
    border-radius: 8px;
}

.person-select-info p {
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

.selected-seat-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.selected-seat-info span {
    font-weight: 500;
    color: #1a3c8b;
}

.person-list-container {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.person-list-header {
    padding: 15px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.person-list-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.person-search {
    width: 300px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
}

.person-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.person-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.person-item:hover {
    background: #f5f5f5;
}

.person-item.selected {
    background: #e6f0ff;
    border-left: 4px solid #1a3c8b;
}

.person-item:last-child {
    border-bottom: none;
}

.person-info {
    flex: 1;
}

.person-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.person-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.person-detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.person-detail-label {
    color: #999;
}

.person-priority {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.person-select-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e8e8e8;
}

.person-select-actions button {
    padding: 10px 20px;
    min-width: 100px;
}

#cancelPersonSelect {
    background: #f0f0f0;
    color: #333;
}

#cancelPersonSelect:hover {
    background: #d9d9d9;
}

#clearSeatPerson {
    background: #8b1a1a;
}

#clearSeatPerson:hover {
    background: #9b2a2a;
}

/* 空座位点击效�?*/
.seat.empty.clickable {
    cursor: pointer;
    border-color: #1a3c8b;
    background: #f0f5ff;
}

.seat.empty.clickable:hover {
    box-shadow: 0 4px 12px rgba(26, 60, 139, 0.2);
    transform: translateY(-2px);
}

/* 区域头部 */
.area-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

/* 悬浮控制按钮 - 现代化圆形设�?*/
.floating-controls {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
    padding: 0;
    background: transparent;
    border: none;
    min-width: auto;
}

.floating-controls button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #1a3c8b 0%, #2a4c9b 100%);
}

.floating-controls button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-radius: 50%;
    z-index: 1;
}

.floating-controls button span {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.floating-controls button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.floating-controls button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 交换座位按钮 - 庄重深蓝�?*/
#swapSeats {
    background: #1a3c8b;  /* 与主按钮颜色一�?*/
}

#swapSeats:hover {
    background: #2a4c9b;
}

/* 清空座位按钮 - 暗红色，用于重要操作 */
#clearSeat {
    background: #8b1a1a;  /* 暗红色，庄重 */
}

#clearSeat:hover {
    background: #9b2a2a;
}

.floating-controls button:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

.floating-controls button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #cccccc;
}

/* 按钮图标效果 */
.floating-controls button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.floating-controls button:hover::after {
    width: 100%;
    height: 100%;
}

/* 响应式调�?*/
@media (max-width: 768px) {
    .floating-controls {
        right: 10px;
        gap: 12px;
    }
    
    .floating-controls button {
        width: 55px;
        height: 55px;
        font-size: 12px;
    }
}

/* 响应式调�?*/
@media (max-width: 768px) {
    .floating-controls {
        right: 10px;
        padding: 10px;
        min-width: 100px;
    }
    
    .floating-controls button {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* 响应式调�?*/
@media (max-width: 768px) {
    .person-select-modal {
        width: 95%;
        padding: 15px;
    }
    
    .person-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .person-search {
        width: 100%;
    }
    
    .person-details {
        flex-direction: column;
        gap: 4px;
    }
    
    .person-select-actions {
        flex-direction: column;
    }
    
    .person-select-actions button {
        width: 100%;
    }
    
    .area-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .area-section .seat-controls {
        flex-direction: column;
    }
    
    .area-section .swap-seats-btn,
    .area-section .clear-seat-btn {
        width: 100%;
        min-width: auto;
    }
}
