/* 航班账单管理系统 - 样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007acc;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #dddddd;
    --text-primary: #333333;
    --text-secondary: #555555;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: var(--bg-color);
    padding: 20px;
    font-size: 12px;
    color: var(--text-primary);
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #999;
    font-size: 12px;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #007acc;
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.form-group input:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
}

.btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: #007acc;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:hover {
    background: #0066bb;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.app-page {
    display: none;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar:hover::after {
    content: '更换';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.avatar-upload {
    display: none;
}

.nav-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    background: #f8f9fa;
}

.nav-tab {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-tab:hover {
    color: var(--primary-color);
}

.nav-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.app-content {
    padding: 0;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    padding-bottom: 0;
}

.toolbar-left, .toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-small {
    padding: 8px 15px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-small:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-small:active {
    transform: translateY(0);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-primary {
    background: #007acc;
    color: white;
    border: 1px solid #007acc;
}

.btn-primary:hover {
    background: #0066bb;
}

.btn-success {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.input-field {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 20px;
    padding: 0 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1800px;
}

thead {
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
}

th {
    padding: 12px 8px;
    text-align: left;
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
    font-size: 12px;
    white-space: nowrap;
}

td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}

tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

tr:active {
    background-color: #e9ecef;
}

.parse-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
    border: 2px dashed #2196f3;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    margin-left: 20px;
    margin-right: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.parse-title {
    font-size: 16px;
    font-weight: bold;
    color: #007acc;
    margin-bottom: 15px;
}

.parse-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #007acc;
    border-radius: 5px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

.parse-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px 20px 0 20px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.profit {
    color: var(--success-color);
}

.loss {
    color: var(--danger-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 25px;
    border-radius: 8px;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 15px;
}

.modal-header h2 {
    font-size: 18px;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.number-cell {
    text-align: right;
    font-family: 'Courier New', monospace;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.user-center-section {
    max-width: 600px;
    margin: 0 auto;
}

.user-center-card {
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.user-center-card h3 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

/* 加载动画 */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007acc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .app-container {
        max-width: 100%;
        margin: 0;
    }
    
    .stats-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-right {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
