/* 发票管理系统样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    color: #667eea;
    font-size: 28px;
}

.user-info {
    color: #666;
    font-size: 14px;
}

.user-info a {
    color: #667eea;
    text-decoration: none;
    margin-left: 10px;
}

.user-info a:hover {
    text-decoration: underline;
}

/* 登录框样式 */
.login-box {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
}

.login-box h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 消息提示 */
.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #e74c3c;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

/* 信息框 */
.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.info-box p {
    margin: 8px 0;
    color: #666;
}

.info-box .highlight {
    color: #667eea;
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

/* 发票表单 */
.invoice-form {
    margin-top: 30px;
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 6px;
}

.form-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.form-actions .btn {
    margin: 0 10px;
}

/* 标签页 */
.tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab {
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab:hover {
    color: #667eea;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* 统计框 */
.stats-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

.stat-value.pending {
    color: #f39c12;
}

.stat-value.approved {
    color: #27ae60;
}

.stat-value.rejected {
    color: #e74c3c;
}

.stat-value.cancelled {
    color: #6c757d;
}

/* 筛选框 */
.filter-box {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form select,
.filter-form input[type="text"] {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.filter-form input[type="text"] {
    flex: 1;
    min-width: 200px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: #667eea;
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.text-center {
    text-align: center;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

/* 详情页样式 */
.detail-box {
    margin-top: 20px;
}

.detail-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 6px;
}

.detail-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.detail-table th {
    width: 150px;
    padding: 12px;
    text-align: right;
    color: #666;
    font-weight: 500;
    vertical-align: top;
}

.detail-table td {
    padding: 12px;
    color: #333;
}

.notes-box {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    color: #666;
    line-height: 1.6;
}

.approve-form {
    margin-top: 20px;
}

.approve-form .form-actions {
    margin-top: 20px;
    text-align: left;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-box {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form input[type="text"] {
        width: 100%;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

