/* Base Styles */
body {
    background-color: #f5f5f7;
    color: #1d1d1f;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Card */
.card {
    background-color: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.07);
    height: 100%;
}

/* Form Styles */
.form-label {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: #6e6e73;
    margin-bottom: 0.5rem; /* 8px */
    display: block;
}

.form-input {
    background-color: #f5f5f7;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-input::placeholder {
    color: #86868b;
}

.form-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.25);
}

/* Button Styles */
.calculate-btn {
    background-color: #007aff;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 24px;
    border-radius: 10px;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.calculate-btn:hover {
    background-color: #005fcc;
}

.calculate-btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

.calculate-btn:disabled {
    background-color: #86868b;
    cursor: not-allowed;
    box-shadow: none;
}

.export-btn {
    background-color: #f0f0f5;
    color: #007aff;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.export-btn:hover {
    background-color: #e5e5ea;
}

.export-btn:active {
    transform: scale(0.98);
}


/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Summary Card Styles */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.summary-item {
    background-color: rgba(245, 245, 247, 0.8);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.summary-item-label {
    font-size: 0.875rem;
    color: #6e6e73;
    font-weight: 500;
}

.summary-item-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d1d1f;
    margin-top: 0.25rem;
    letter-spacing: -0.02em;
}

.summary-item-value.positive {
    color: #34c759;
}

.summary-item-value.negative {
    color: #ff3b30;
}

/* Table Styles */
.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.results-table th, .results-table td {
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #f0f0f0;
}

.results-table thead {
    border-bottom: 2px solid #e5e5e5;
}

.results-table th {
    font-size: 0.75rem; /* 12px */
    font-weight: 600;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.results-table td {
    font-size: 0.9rem;
    color: #1d1d1f;
}

.results-table tbody tr:hover {
    background-color: #f5f5f7;
}
