:root {
    --primary-blue: #1e88e5;
    --primary-blue-dark: #1565c0;
    --primary-blue-light: #42a5f5;
    --secondary-green: #43a047;
    --secondary-green-dark: #2e7d32;
    --secondary-green-light: #66bb6a;
    --accent-cyan: #00acc1;
    --accent-teal: #00897b;
    --bg-gradient-start: #0d47a1;
    --bg-gradient-end: #1565c0;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --text-primary: #1a237e;
    --text-secondary: #455a64;
    --text-muted: #90a4ae;
    --border-color: #e0e0e0;
    --success-color: #43a047;
    --save-color: #2e7d32;
    --warning-color: #ff9800;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --market-color: #1e88e5;
    --proxy-color: #78909c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.logo svg {
    width: 1.5rem;
    height: 1.5rem;
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section {
    display: block;
    opacity: 1;
    transition: all var(--transition-normal);
}

.section.hidden {
    display: none;
    opacity: 0;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.upload-modes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.upload-mode-card {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: all var(--transition-fast);
}

.upload-mode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.upload-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--primary-blue-light) 0%, var(--secondary-green-light) 100%);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(30, 136, 229, 0.3);
}

.upload-icon.group-icon {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-teal) 100%);
    box-shadow: 0 6px 24px rgba(0, 172, 193, 0.3);
}

.upload-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.upload-area {
    margin-bottom: 1.25rem;
}

.upload-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: #ffffff;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    min-width: 180px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5);
}

.upload-btn:active {
    transform: translateY(0);
}

.upload-btn.group-btn {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-teal) 100%);
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.4);
}

.upload-btn.group-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 172, 193, 0.5);
}

.btn-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.btn-hint {
    font-size: 0.75rem;
    opacity: 0.85;
}

.upload-hints {
    text-align: left;
    padding-left: 0.5rem;
}

.upload-hints p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.progress-container {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.progress-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.back-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.back-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.progress-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.progress-ring {
    position: relative;
    width: 12rem;
    height: 12rem;
    margin-bottom: 2rem;
}

.ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    stroke: #e8eaf6;
}

.ring-progress {
    stroke: var(--primary-blue);
    transition: stroke-dashoffset var(--transition-normal);
}

.progress-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-files {
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
}

.progress-file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.progress-file-item.success {
    background: rgba(67, 160, 71, 0.1);
    color: var(--secondary-green);
}

.progress-file-item.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.progress-file-item.pending {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
}

.progress-file-item .file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-file-item .file-status {
    flex-shrink: 0;
}

.progress-status {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
}

.result-container {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    width: 100%;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.result-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.customer-info {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.05) 0%, rgba(67, 160, 71, 0.05) 100%);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(30, 136, 229, 0.1);
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary-blue);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.monthly-details {
    margin-bottom: 2rem;
}

.details-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary-blue);
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: rgba(30, 136, 229, 0.3) transparent;
}

.table-wrapper::-webkit-scrollbar {
    height: 6px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(30, 136, 229, 0.3);
    border-radius: 3px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 136, 229, 0.5);
}

.monthly-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.monthly-table th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.monthly-table th:first-child {
    border-radius: 1rem 0 0 0;
}

.monthly-table th:last-child {
    border-radius: 0 1rem 0 0;
}

.monthly-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.monthly-table tbody tr:hover {
    background: rgba(30, 136, 229, 0.03);
}

.monthly-table tbody tr:last-child td {
    border-bottom: none;
}

.monthly-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 1rem;
}

.monthly-table tbody tr:last-child td:last-child {
    border-radius: 0 0 1rem 0;
}

.summary-section {
    margin-bottom: 2rem;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary-blue);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.summary-item {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
}

.summary-item.highlight {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 1px solid rgba(67, 160, 71, 0.2);
}

.summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-item.highlight .summary-value {
    color: var(--secondary-green);
}

.summary-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.result-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.export {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--secondary-green-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.4);
}

.action-btn.export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.5);
}

.action-btn.export svg {
    width: 1.1rem;
    height: 1.1rem;
}

.action-btn.secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

.bill-card {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.bill-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bill-card-number {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.bill-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.group-summary-header {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.05) 0%, rgba(0, 172, 193, 0.05) 100%);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(30, 136, 229, 0.1);
}

.group-main-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.group-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.group-info-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.group-info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.group-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.group-section {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.group-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
}

.group-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.group-section-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-section-icon.market-icon {
    background: rgba(30, 136, 229, 0.15);
    color: var(--market-color);
}

.group-section-icon.proxy-icon {
    background: rgba(120, 144, 156, 0.15);
    color: var(--proxy-color);
}

.group-section-content {
    padding: 1.5rem;
}

.group-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.group-summary-item {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
}

.group-summary-item.highlight {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 1px solid rgba(67, 160, 71, 0.2);
}

.group-summary-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.group-summary-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.group-summary-item.highlight .group-summary-value {
    color: var(--secondary-green);
}

.customer-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.customer-number-tag {
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    cursor: default;
}

.group-compare-section {
    margin-bottom: 2rem;
}

.group-compare-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--primary-blue);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.compare-table th {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
}

.compare-table th:first-child {
    border-radius: 1rem 0 0 0;
}

.compare-table th:last-child {
    border-radius: 0 1rem 0 0;
}

.compare-table th:nth-child(4) {
    border-right: 2px solid #165DFF;
}

.compare-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    position: relative;
}

.compare-table td:nth-child(4) {
    border-right: 2px solid #165DFF;
}

.compare-table tbody tr:hover {
    background: rgba(30, 136, 229, 0.03);
}

.error-container {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 3rem 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
    background: rgba(244, 67, 54, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f44336;
}

.error-icon svg {
    width: 3rem;
    height: 3rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.error-details {
    text-align: left;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 2rem;
    max-height: 200px;
    overflow-y: auto;
}

.error-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.error-details p:last-child {
    margin-bottom: 0;
}

.footer {
    padding: 1.5rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    .title {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 1.5rem 1rem;
    }

    .upload-modes {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .upload-mode-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .upload-icon {
        width: 4.5rem;
        height: 4.5rem;
        margin-bottom: 1rem;
    }

    .upload-icon svg {
        width: 2.2rem;
        height: 2.2rem;
    }

    .upload-title {
        font-size: 1.35rem;
    }

    .upload-btn {
        padding: 1.1rem 2rem;
        min-width: 160px;
    }

    .progress-container {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .progress-ring {
        width: 10rem;
        height: 10rem;
    }

    .progress-percent {
        font-size: 1.75rem;
    }

    .result-container {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .info-item {
        gap: 0.15rem;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    .monthly-table {
        min-width: 500px;
    }

    .monthly-table th,
    .monthly-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .compare-table {
        min-width: 600px;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .summary-item {
        padding: 0.75rem 0.5rem;
    }

    .summary-value {
        font-size: 1.1rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .action-btn {
        padding: 1rem;
    }

    .group-sections {
        grid-template-columns: 1fr;
    }

    .group-main-info {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 0.75rem;
    }

    .logo {
        width: 2rem;
        height: 2rem;
    }

    .logo svg {
        width: 1.2rem;
        height: 1.2rem;
    }

    .title {
        font-size: 1.1rem;
    }

    .main-content {
        padding: 1rem 0.75rem;
    }

    .upload-mode-card {
        padding: 1.5rem 1rem;
    }

    .upload-icon {
        width: 4rem;
        height: 4rem;
    }

    .upload-icon svg {
        width: 2rem;
        height: 2rem;
    }

    .upload-title {
        font-size: 1.2rem;
    }

    .upload-desc {
        font-size: 0.8rem;
    }

    .upload-btn {
        padding: 0.9rem 1.5rem;
        min-width: 140px;
    }

    .btn-text {
        font-size: 0.95rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .summary-value {
        font-size: 1rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section:not(.hidden) {
    animation: fadeIn 0.3s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.progress-percent {
    animation: pulse 2s infinite;
}

.tab-container {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: 0.75rem;
    margin: 0 0.25rem;
}

.tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.tab.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.plan-upload-card {
    background: var(--card-bg);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.plan-customer-info {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.05) 0%, rgba(30, 136, 229, 0.05) 100%);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(67, 160, 71, 0.1);
}

.plan-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.plan-info-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.plan-info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.electricity-type-switch {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.type-btn {
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.type-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.type-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border-color: transparent;
}

.plan-report {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.report-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-blue);
}

.report-greeting {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.report-greeting span {
    color: var(--primary-blue);
    font-weight: 700;
}

.report-intro {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
}

.report-table-section {
    margin-bottom: 2rem;
}

.report-table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    border-left: 4px solid var(--secondary-green);
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.plan-table th {
    background: linear-gradient(135deg, var(--secondary-green) 0%, var(--secondary-green-dark) 100%);
    color: #ffffff;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.plan-table th:first-child {
    border-radius: 1rem 0 0 0;
}

.plan-table th:last-child {
    border-radius: 0 1rem 0 0;
}

.plan-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.plan-table tbody tr:hover {
    background: rgba(67, 160, 71, 0.03);
}

.plan-table tbody tr.total-row {
    background: #f5f5f5;
    font-weight: 700;
}

.plan-table tbody tr.total-row td {
    color: var(--text-primary);
}

.plan-table .savings-cell {
    color: #d32f2f;
    font-weight: 700;
}

.report-summary {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.05) 0%, rgba(30, 136, 229, 0.05) 100%);
    border-radius: 1rem;
    padding: 1.5rem;
}

.report-summary p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: justify;
}

.report-summary span {
    color: var(--secondary-green);
    font-weight: 700;
}

@media (max-width: 768px) {
    .tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .plan-upload-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }

    .plan-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .electricity-type-switch {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .plan-report {
        padding: 1.5rem;
    }

    .report-title {
        font-size: 1.1rem;
    }

    .plan-table {
        min-width: 600px;
    }

    .plan-table th,
    .plan-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}