* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #1a1d29;
    color: #e0e0e0;
    overflow-x: hidden;
}

.container-fluid {
    padding: 0;
    max-width: 100%;
}

/* 顶部控制栏 */
.top-controls {
    background-color: #2a2f3f;
    padding: 12px 20px;
    border-bottom: 1px solid #3a3f4f;
}

.system-title {
    font-size: 22px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.system-title i {
    color: #ffcc00;
}

.time-display {
    font-size: 16px;
    color: #8bc34a;
    text-align: center;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    background-color: #3a3f4f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background-color: #4a4f5f;
}

.btn-room-manage {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6);
}

.btn-room-manage:hover {
    background: linear-gradient(135deg, #29b6f6, #039be5);
}

/* 搜索过滤器 */
.filter-section {
    background-color: #252a38;
    padding: 16px 20px;
    border-bottom: 1px solid #3a3f4f;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-label {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 0;
}

.filter-input {
    padding: 8px 12px;
    background-color: #3a3f4f;
    border: 1px solid #4a4f5f;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: #4fc3f7;
}

.btn-search {
    background: linear-gradient(135deg, #8bc34a, #7cb342);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-search:hover {
    background: linear-gradient(135deg, #7cb342, #689f38);
}

/* 订单列表 */
.orders-section {
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.orders-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.orders-count {
    background-color: #3a3f4f;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: fit-content;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-size-selector .filter-input {
    min-width: 100px;
}

.orders-table {
    background-color: #2a2f3f;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3a3f4f;
}

.table-header {
    background-color: #252a38;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 120px;
    gap: 15px;
    font-weight: 600;
    border-bottom: 1px solid #3a3f4f;
}

.sortable-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.sortable-header:hover {
    color: #4fc3f7;
}

.sortable-header.active {
    color: #4fc3f7;
}

.sort-icon {
    font-size: 12px;
    opacity: 0.6;
}

.sortable-header.active .sort-icon {
    opacity: 1;
}

.order-row {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 120px;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #3a3f4f;
    transition: background-color 0.2s;
}

.order-row:hover {
    background-color: #3a3f4f;
}

.order-row:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-pending { background-color: #ff9800; color: white; }
.status-confirmed { background-color: #4caf50; color: white; }
.status-preparing { background-color: #2196f3; color: white; }
.status-ready { background-color: #8bc34a; color: white; }
.status-served { background-color: #9c27b0; color: white; }
.status-cancelled { background-color: #f44336; color: white; }
.status-leaving_soon { background-color: #ff9800; color: white; }
.status-completed { background-color: #4caf50; color: white; }

/* 已完成订单指示器 */
.completed-indicator {
    margin-left: 8px;
    color: #4caf50;
    font-size: 14px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(76, 175, 80, 0.1);
    border: 1px solid #4caf50;
    transition: all 0.3s ease;
}

.completed-indicator:hover {
    background-color: rgba(76, 175, 80, 0.2);
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-edit {
    background-color: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background-color: #ffb300;
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.btn-status {
    background-color: #2196f3;
    color: white;
}

.btn-status:hover {
    background-color: #1976d2;
}

.btn-dishes {
    background-color: #4caf50;
    color: white;
}

.btn-dishes:hover {
    background-color: #388e3c;
}

.btn-quick-add {
    background-color: #ff9800;
    color: white;
}

.btn-quick-add:hover {
    background-color: #f57c00;
}

.no-orders {
    text-align: center;
    padding: 40px 20px;
    color: #a0a0a0;
    font-size: 16px;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #252a38;
    border-top: 1px solid #3a3f4f;
}

.pagination-info {
    color: #a0a0a0;
    font-size: 14px;
}

.pagination {
    margin: 0;
}

.page-item .page-link {
    background-color: #3a3f4f;
    border: 1px solid #4a4f5f;
    color: #e0e0e0;
    padding: 6px 12px;
}

.page-item.active .page-link {
    background-color: #4fc3f7;
    border-color: #4fc3f7;
    color: white;
}

.page-item.disabled .page-link {
    background-color: #2a2f3f;
    border-color: #3a3f4f;
    color: #666;
}

.page-item .page-link:hover {
    background-color: #4a4f5f;
    border-color: #5a5f6f;
    color: white;
}

/* 模态框样式 */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

#globalAlertModal {
    z-index: 1060 !important;
}

.modal-content {
    background-color: #2a2f3f;
    border: 1px solid #3a3f4f;
    border-radius: 8px;
}

.modal-header {
    background-color: #252a38;
    border-bottom: 1px solid #3a3f4f;
    color: white;
}

.modal-body {
    background-color: #2a2f3f;
    color: #e0e0e0;
}

.modal-footer {
    background-color: #252a38;
    border-top: 1px solid #3a3f4f;
}

.form-control {
    background-color: #3a3f4f;
    border: 1px solid #4a4f5f;
    color: white;
}

.form-control:focus {
    background-color: #3a3f4f;
    border-color: #4fc3f7;
    color: white;
    box-shadow: none;
}

.form-label {
    color: #a0a0a0;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .table-header,
    .order-row {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 100px;
    }
}

@media (max-width: 992px) {
    .table-header,
    .order-row {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 10px;
    }
    
    .table-header div:nth-child(4),
    .order-row div:nth-child(4) {
        display: none;
    }
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .table-header,
    .order-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .table-header div:nth-child(3),
    .order-row div:nth-child(3) {
        display: none;
    }
}

/* 房间管理样式 */
.room-list-section {
    margin-bottom: 20px;
}

.section-title {
    color: #8bc34a;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rooms-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #3a3f4f;
    border-radius: 6px;
    background-color: #252a38;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #3a3f4f;
    transition: background-color 0.2s;
}

.room-item:last-child {
    border-bottom: none;
}

.room-item:hover {
    background-color: #2a2f3f;
}

.room-item.empty {
    justify-content: center;
    color: #a0a0a0;
    font-style: italic;
}

.room-name {
    font-weight: 500;
    color: #e0e0e0;
}

.room-actions {
    display: flex;
    gap: 8px;
}

.btn-room-edit {
    padding: 4px 8px;
    background-color: #ffa726;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-room-edit:hover {
    background-color: #ff9800;
}

.btn-room-delete {
    padding: 4px 8px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-room-delete:hover {
    background-color: #d32f2f;
}

.room-form-section {
    margin-top: 20px;
}

.room-form .input-group {
    display: flex;
    gap: 10px;
}

.room-form .form-control {
    flex: 1;
    background-color: #2a2f3f;
    border: 1px solid #3a3f4f;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 4px;
}

.room-form .form-control:focus {
    border-color: #4fc3f7;
    box-shadow: 0 0 0 0.2rem rgba(79, 195, 247, 0.25);
}

.room-form .btn {
    white-space: nowrap;
}

#roomDeleteConfirmModal .modal-content,
#globalAlertModal .modal-content {
    background-color: #2a2f3f;
    color: #e0e0e0;
}

#roomDeleteConfirmModal .modal-header,
#globalAlertModal .modal-header {
    border-bottom: 1px solid #3a3f4f;
}

#roomDeleteConfirmModal .modal-footer,
#globalAlertModal .modal-footer {
    border-top: 1px solid #3a3f4f;
}