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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 64px 72px;
    width: 640px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 48px;
}

.login-header h1 {
    font-size: 48px;
    color: #2c3e50;
    margin-bottom: 16px;
    line-height: 1.3;
}

.login-header p {
    color: #999;
    font-size: 22px;
    line-height: 1.6;
}

.login-form .form-item {
    margin-bottom: 36px;
    position: relative;
}

.login-form input {
    width: 100%;
    padding: 22px 24px;
    font-size: 22px;
    line-height: 1.5;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.login-form .password-wrapper {
    position: relative;
}

.login-form .password-wrapper input {
    padding-right: 44px;
}

.login-form .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.login-form .password-toggle:hover {
    color: #667eea;
}

.login-form .password-toggle svg {
    width: 28px;
    height: 28px;
}

.login-form input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.error-msg {
    color: #f56c6c;
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    width: 100%;
    padding: 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 56px;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 18px;
    color: #2c3e50;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav-item {
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.nav-item:hover {
    color: #667eea;
    background: #f5f7ff;
}

.nav-item.active {
    color: #667eea;
    background: #eef0ff;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    font-size: 14px;
    color: #666;
}

.btn-logout {
    padding: 6px 16px;
    background: #f5f5f5;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-logout:hover {
    color: #f56c6c;
    border-color: #f56c6c;
}

.main-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 80px;
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
    z-index: 100;
    justify-content: space-around;
    padding: 6px 0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #999;
    font-size: 11px;
    padding: 4px 0;
}

.mobile-nav-item .icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-item.active {
    color: #667eea;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 22px;
    color: #2c3e50;
}

.date-picker input,
.date-range-picker input {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-range-picker .btn-primary {
    width: auto;
    padding: 10px 28px;
    font-size: 16px;
    border-radius: 6px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.summary-card.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.summary-card.highlight .card-label {
    color: rgba(255, 255, 255, 0.8);
}

.card-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
}

.detail-section {
    margin-bottom: 24px;
}

.scenic-block {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.scenic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.scenic-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.scenic-amount {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

.project-list {
    padding-left: 12px;
}

.project-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.project-name {
    color: #666;
}

.project-detail {
    color: #333;
    font-weight: 500;
}

.chart-section {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.input-card,
.records-card {
    background: white;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.input-card .form-item {
    margin-bottom: 16px;
}

.input-card label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.input-card input,
.input-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.input-card input:focus,
.input-card select:focus {
    border-color: #667eea;
}

.form-actions {
    margin-top: 20px;
}

.form-actions .btn-primary {
    width: 100%;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.record-item:last-child {
    border-bottom: none;
}

.record-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.record-scenic {
    font-weight: 600;
    color: #2c3e50;
}

.record-project {
    color: #666;
}

.record-detail {
    color: #667eea;
    font-weight: 500;
}

.record-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-sm.btn-edit {
    background: #e6f7ff;
    color: #1890ff;
}

.btn-sm.btn-danger {
    background: #fff1f0;
    color: #f5222d;
}

.btn-sm.btn-primary {
    background: #eef0ff;
    color: #667eea;
}

.btn-sm:hover {
    opacity: 0.8;
}

.add-scenic-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 12px;
    align-items: center;
}

.add-scenic-card input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.add-scenic-card .btn-primary {
    width: auto;
    padding: 10px 24px;
    white-space: nowrap;
}

.scenic-manage-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.scenic-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.scenic-manage-header h3 {
    font-size: 18px;
    color: #2c3e50;
}

.add-project-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.add-project-row input {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.projects-manage-list {
    padding-left: 8px;
}

.project-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    flex-wrap: wrap;
}

.project-manage-item:last-child {
    border-bottom: none;
}

.proj-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.proj-actions {
    display: flex;
    gap: 6px;
}

.proj-edit-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.proj-edit-form input {
    padding: 4px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
}

.proj-edit-form input:focus {
    border-color: #667eea;
}

.empty-state {
    text-align: center;
    color: #ccc;
    padding: 40px 0;
    font-size: 14px;
}

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.confirm-modal {
    background: white;
    border-radius: 10px;
    width: 360px;
    max-width: 90vw;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.2s ease;
    overflow: hidden;
}

.confirm-body {
    padding: 28px 24px 20px;
    text-align: center;
}

.confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff1f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.confirm-icon svg {
    width: 24px;
    height: 24px;
    color: #f5222d;
}

.confirm-msg {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.confirm-footer {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.confirm-footer button {
    flex: 1;
    padding: 14px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-btn-cancel {
    background: white;
    color: #666;
}

.confirm-btn-cancel:hover {
    background: #f5f5f5;
}

.confirm-btn-ok {
    background: white;
    color: #f5222d;
    border-left: 1px solid #f0f0f0 !important;
}

.confirm-btn-ok:hover {
    background: #fff1f0;
}

.empty-hint {
    color: #ccc;
    font-size: 13px;
    padding: 8px 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.chart-card h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.data-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.data-action-card {
    background: white;
    border-radius: 6px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.data-action-card h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.data-action-card p {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.data-action-card .btn-primary {
    width: auto;
    padding: 10px 32px;
}

.compare-section {
    margin-bottom: 24px;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.compare-header h3 {
    font-size: 18px;
    color: #2c3e50;
}

.compare-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.compare-controls select {
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.compare-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.compare-card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.compare-card.current-period {
    border-left: 4px solid #5470c6;
}

.compare-card.compare-period-card {
    border-left: 4px solid #ee6666;
}

.compare-card.change-card {
    border-left: 4px solid #fac858;
}

.compare-period {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.compare-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.compare-label {
    color: #666;
    font-size: 14px;
}

.compare-value {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.change-up {
    color: #f5222d;
    font-weight: 600;
    font-size: 13px;
    margin-left: 4px;
}

.change-down {
    color: #52c41a;
    font-weight: 600;
    font-size: 13px;
    margin-left: 4px;
}

.change-flat {
    color: #999;
    font-weight: 600;
    font-size: 13px;
    margin-left: 4px;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.compare-table th,
.compare-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.compare-table th {
    background: #fafafa;
    font-weight: 600;
    color: #333;
}

.compare-table td {
    color: #666;
}

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

.compare-table .amount {
    font-weight: 600;
}

.compare-table .positive {
    color: #f5222d;
}

.compare-table .negative {
    color: #52c41a;
}

.share-action-bar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.btn-share-image {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-share-image:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

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

.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.image-preview-modal {
    background: white;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.25s ease;
}

.image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.image-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.image-preview-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.image-preview-close:hover {
    color: #333;
}

.image-preview-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.image-preview-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
}

.image-preview-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.image-preview-btn:hover {
    opacity: 0.85;
}

.image-preview-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.image-preview-btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .mobile-nav {
        display: flex;
    }

    .main-content {
        padding: 16px;
        padding-bottom: 80px;
    }

    .header {
        padding: 0 16px;
    }

    .logo {
        font-size: 15px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .data-actions {
        grid-template-columns: 1fr;
    }

    .compare-cards {
        grid-template-columns: 1fr;
    }

    .compare-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-range-picker {
        width: 100%;
    }

    .date-range-picker input {
        flex: 1;
    }

    .add-scenic-card {
        flex-direction: column;
    }

    .add-project-row {
        flex-wrap: wrap;
    }

    .add-project-row input {
        width: 100% !important;
    }

    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .compare-table {
        font-size: 12px;
    }

    .compare-table th,
    .compare-table td {
        padding: 8px 6px;
    }

    .image-preview-modal {
        max-width: 95vw;
        max-height: 85vh;
    }

    .btn-share-image {
        width: 100%;
        justify-content: center;
    }
}
