* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #764ba2;
    transform: translateX(-5px);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 5px 0 0 0;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.method-tabs {
    display: flex;
    gap: 15px;
}

.tab-btn {
    flex: 1;
    padding: 15px 30px;
    background: #f8f9fa;
    color: #7f8c8d;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.balance-sheet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.sheet-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.income-statement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.supplementary-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.input-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-top: 10px;
    font-weight: 700;
}

.total-row.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.total-row label {
    font-size: 1.1rem;
}

.total-row span {
    font-size: 1.3rem;
    font-weight: 700;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area.dragover {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.upload-text {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.btn-upload {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.imported-data-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
}

.summary-label {
    font-weight: 600;
    color: #7f8c8d;
}

.summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn-generate {
    padding: 15px 40px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-generate:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.btn-clear {
    padding: 15px 40px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-clear:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.4);
}

.cash-flow-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.btn-export {
    padding: 12px 25px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

.btn-print {
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.cash-flow-table {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
}

.data-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s ease;
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.data-table td {
    padding: 12px 20px;
    color: #2c3e50;
}

.data-table .section-header {
    background: #f8f9fa;
    font-weight: 700;
    color: #2c3e50;
}

.data-table .subtotal {
    background: #e9ecef;
    font-weight: 600;
}

.data-table .total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.data-table .positive {
    color: #27ae60;
    font-weight: 600;
}

.data-table .negative {
    color: #e74c3c;
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 0.95rem;
    margin-top: 30px;
}

.footer p {
    margin: 0;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 1.4rem;
    }

    .balance-sheet-grid {
        grid-template-columns: 1fr;
    }

    .income-statement-grid {
        grid-template-columns: 1fr;
    }

    .supplementary-info-grid {
        grid-template-columns: 1fr;
    }

    .method-tabs {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-generate,
    .btn-clear {
        width: 100%;
    }

    .cash-flow-actions {
        flex-direction: column;
    }

    .btn-export,
    .btn-print {
        width: 100%;
    }
}

/* 资产负债表样式 */
.balance-sheet-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.balance-sheet-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.balance-sheet {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.balance-sheet-section {
    flex: 1;
    min-width: 400px;
}

.balance-sheet-section h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #555;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.balance-sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.balance-sheet-table th,
.balance-sheet-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.balance-sheet-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.balance-sheet-table tr:hover {
    background-color: #f8f9fa;
}

.balance-sheet-table td:nth-child(3) {
    text-align: right;
    font-weight: 500;
}

.balance-sheet-table tr:last-child {
    font-weight: bold;
    background-color: #f0f4ff;
}

@media (max-width: 768px) {
    .balance-sheet {
        flex-direction: column;
    }

    .balance-sheet-section {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 3rem;
    }

    .imported-data-summary {
        grid-template-columns: 1fr;
    }

    .balance-sheet-table {
        font-size: 12px;
    }

    .balance-sheet-table th,
    .balance-sheet-table td {
        padding: 8px;
    }
}

/* 利润表样式 */
.income-statement-container {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.income-statement-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.income-statement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.income-statement-table th,
.income-statement-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.income-statement-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.income-statement-table tr:hover {
    background-color: #f8f9fa;
}

.income-statement-table td:nth-child(3),
.income-statement-table td:nth-child(4) {
    text-align: right;
    font-weight: 500;
}

.income-statement-table tr:last-child {
    font-weight: bold;
    background-color: #f0f4ff;
}

@media (max-width: 768px) {
    .income-statement-table {
        font-size: 13px;
    }

    .income-statement-table th,
    .income-statement-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .income-statement-table {
        font-size: 12px;
    }

    .income-statement-table th,
    .income-statement-table td {
        padding: 6px;
    }
}