/* 飞票通系统样式表 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏样式 */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h1.logo {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
}

.sidebar-header h1.logo i {
    color: #ffd700;
    margin-right: 10px;
}

.sidebar-header .subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 300;
    margin: 0;
}

.user-info {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

.user-info i {
    margin-right: 8px;
    color: #3498db;
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #c0392b;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

.user-logout-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #495057;
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
    min-height: 40px;
}

.sidebar-footer .user-info {
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    flex: 1;
    height: 100%;
}

.sidebar-footer .user-info i {
    margin-right: 8px;
    color: #3498db;
}

.sidebar-footer .logout-btn {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.8rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    height: 32px;
}

.sidebar-footer .logout-btn:hover {
    background: #c0392b;
}

.sidebar-footer .logout-btn i {
    margin-right: 8px;
}

.nav-items {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #ffd700;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: #ffd700;
}

.nav-item i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    overflow-x: hidden; /* 防止水平滚动条 */
    max-width: calc(100vw - 250px); /* 限制最大宽度 */
}

/* 统一页面内容宽度与留白 */
.page-content {
    max-width: none; /* 全宽展示 */
    width: 100%;
    margin: 0; /* 取消居中留白 */
}

/* 页面头部与按钮排版优化 */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.page-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

/* 表单与控件统一风格 */
input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-group label { font-weight: 600; color: #4a5568; }
.form-actions { gap: 10px; display: flex; flex-wrap: wrap; }

/* 详情信息可读性提升 */
.detail-item span { word-break: break-all; }
.detail-item strong { font-weight: 600; }

/* 卡片统一阴影与圆角 */
.page-content .order-detail,
.page-content .messages-container,
.page-content .orders-container,
.page-content .database-stats,
.page-content .broadcast-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(17, 24, 39, 0.06);
    padding: 20px;
}

/* 操作区域按钮间距 */
.database-actions, .orders-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.form-section h4 i {
    margin-right: 8px;
    color: #6c757d;
}

/* 更紧凑的移动端留白 */
@media (max-width: 768px) {
    .page-content { padding: 0 8px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .form-row { grid-template-columns: 1fr; }
    .modal-content { width: 95%; margin: 10px; }
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 页面内容卡片 */
.page-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h2 {
    color: #333;
    font-size: 1.8rem;
}

.page-header h2 i {
    color: #667eea;
    margin-right: 10px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-warning {
    background: #f39c12;
    border: 2px solid #e67e22;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    border-color: #d35400;
}

/* 欢迎页面 */
.welcome-section {
    text-align: center;
}

.welcome-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 消息列表样式 */
.messages-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    height: calc(100vh - 200px); /* 适应屏幕高度，减去头部和边距 */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 防止容器溢出 */
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px; /* 为滚动条留出空间 */
    max-height: 100%; /* 确保不超过容器高度 */
}

.message-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.message-item:hover {
    transform: translateY(-2px);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.message-type {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.message-time {
    color: #666;
    font-size: 0.9rem;
}

.message-content {
    color: #333;
}

.message-user {
    font-weight: 500;
    color: #667eea;
    margin-bottom: 10px;
}

/* 群发表单样式 */
.broadcast-form {
    max-width: none; /* 全宽 */
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 健康检查样式 */
#health-status {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.health-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.health-status.healthy {
    background: #d4edda;
    color: #155724;
}

.health-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

/* 移动端样式 */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1001;
}

@media (max-width: 768px) {
    .sidebar {
        left: -250px;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .page-content {
        padding: 20px;
    }
}

/* 订单列表样式 */
.orders-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
}

.orders-list {
    max-height: 600px;
    overflow-y: auto;
}

.order-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.order-item:hover {
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-id {
    font-weight: 500;
    color: #667eea;
}

.order-status {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.order-info {
    color: #333;
    line-height: 1.6;
}

.order-info div {
    margin-bottom: 8px;
}

/* 订单详情样式 */
.order-detail-form {
    max-width: none; /* 全宽 */
    width: 100%;
}

.order-detail-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.order-detail-form input:focus {
    outline: none;
    border-color: #667eea;
}

.order-detail-result {
    margin-top: 20px;
}

.order-detail {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.order-detail h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.detail-content {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-label {
    font-weight: 500;
    color: #333;
}

.detail-value {
    color: #666;
    word-break: break-all;
}

/* 数据库统计样式 */
.database-stats {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.stats-container {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.database-actions {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.database-actions h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.data-management {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-management h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.management-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.result-area {
    margin-top: 20px;
}

.data-display {
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
}

.result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* 机票信息列表容器 */
.flight-info-container {
    max-height: 70vh; /* 限制最大高度为视窗高度的70% */
    overflow: auto; /* 添加滚动条 */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 20px;
    background: white;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0; /* 移除顶部边距 */
    table-layout: auto; /* 自动调整列宽 */
}

.table th, .table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap; /* 防止文本换行 */
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky; /* 固定表头 */
    top: 0;
    z-index: 10;
}

/* 滚动条样式 */
.flight-info-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.flight-info-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.flight-info-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.flight-info-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 错误和空状态样式 */
.error, .no-messages, .no-orders {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error i, .no-messages i, .no-orders i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
}

.no-messages i, .no-orders i {
    color: #6c757d;
}

/* 数据表显示样式 */
.tables-display {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.tables-display h3 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.tables-content {
    max-height: 600px;
    overflow-y: auto;
}

/* 数据库管理页面表格容器 */
.database-table-container {
    max-height: 70vh;
    overflow: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-top: 20px;
    background: white;
}

.database-table-container .table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: auto;
    min-width: 100%; /* 确保表格填满容器 */
}

.database-table-container .table th,
.database-table-container .table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    white-space: nowrap;
    font-size: 0.9rem;
}

.database-table-container .table th {
    background-color: #f8f9fa;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 数据库管理页面滚动条样式 */
.database-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.database-table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.database-table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.database-table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 机票信息核对页面样式 */
.form-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.verification-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.verification-stats h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* 机票信息核对统计页面样式 */
.text-success {
    color: #28a745 !important;
    font-weight: bold;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}

.stats-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.stats-summary h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.table-info {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.table-info h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.table-structure {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.table-data {
    margin-top: 10px;
}

.table-data table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-data th,
.table-data td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9rem;
}

.table-data th {
    background: #f5f5f5;
    font-weight: bold;
}

.table-data tr:nth-child(even) {
    background: #f9f9f9;
}

.table-count {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* 订单详情样式 */
.formatted-info-section {
    background: #f8f9fa;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.formatted-info-section h3 {
    color: #007bff;
    margin-bottom: 15px;
    text-align: center;
}

.formatted-info-box {
    position: relative;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
}

.formatted-info-box pre {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn:active {
    background: #1e7e34;
}

.section {
    margin-bottom: 25px;
}

.section h4 {
    color: #007bff;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.flight-item, .passenger-item, .payment-item, .log-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid #007bff;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item strong {
    color: #495057;
    min-width: 120px;
}

.detail-item span {
    color: #6c757d;
    text-align: left;
    flex: 1;
}


/* 响应式设计 */
@media (max-width: 480px) {
    .header-content h1.logo {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .database-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 自动查询控制面板样式 */
.auto-query-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.auto-query-panel h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auto-query-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.1rem;
}

.query-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
}

/* 已移除测试订单区域样式 */
    font-size: 0.95rem;
}

.info-item i {
    color: #6c757d;
    width: 16px;
}

.manual-query {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manual-query input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 200px;
}

.home-orders-list {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.home-orders-list h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.orders-content {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    background: white;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-id {
    font-weight: bold;
    color: #2c3e50;
}

.order-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

/* 消息卡片样式 */
.message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px 0;
}

.message-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.message-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.message-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.message-type.blue {
    background: #e3f2fd;
    color: #1976d2;
}

.message-type.green {
    background: #e8f5e8;
    color: #2e7d32;
}

.message-sender {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.message-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
    word-break: break-word;
}

.message-image {
    margin: 10px 0;
    text-align: center;
}

.message-image img {
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.message-image img:hover {
    border-color: #3498db;
    transform: scale(1.05);
}

.message-ocr {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.message-ocr strong {
    color: #495057;
    font-size: 0.9rem;
}

.ocr-text {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #6c757d;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.message-status {
    font-size: 0.85rem;
    font-weight: 500;
}

.message-time {
    font-size: 0.8rem;
    color: #6c757d;
}

.order-details {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #adb5bd;
}

/* 表单区域样式 */
.form-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3 i {
    color: #3498db;
}

.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 5px;
}

/* 表单操作按钮样式 */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-actions .btn {
    margin: 0;
}

/* 结果显示区域样式 */
.result-area {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.result-area .success {
    color: #28a745;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.result-area .error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.result-area .loading {
    color: #007bff;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.result-area .section {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.result-area .section h4 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.result-area .detail-item {
    margin-bottom: 8px;
    padding: 5px 0;
}

.result-area .detail-item strong {
    color: #495057;
    margin-right: 8px;
}

.result-area pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-data h3 {
    margin-bottom: 10px;
    color: #495057;
    font-size: 1.2rem;
}

.no-data p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}