* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
}

.tab-button:hover {
    color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background: var(--card-bg);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.info-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-field-single {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field-single label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-field-single input[readonly],
.form-field-single .calculated-field {
    background-color: #f1f5f9;
    color: var(--text-color);
    cursor: not-allowed;
    border-color: #cbd5e1;
}

.form-field-single .field-explanation {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-style: italic;
}

.parameter-display {
    font-weight: 600;
    color: var(--primary-color);
    font-style: normal;
}

.tax-computation-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tax-computation-container h3:first-child {
    margin-top: 0;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    height: auto;
    min-height: 2.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="file"] {
    padding: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.375rem;
    display: none;
}

.message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
    display: block;
}

.message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    display: block;
}

#tax-results {
    margin-top: 2rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.results-table th,
.results-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
}

.results-table tr:hover {
    background-color: var(--bg-color);
}

.results-table .total-row {
    font-weight: 700;
    background-color: #fef3c7;
    color: var(--text-color);
}

.results-table .final-row {
    font-weight: 700;
    font-size: 1.1rem;
    background-color: #dbeafe;
    color: var(--primary-dark);
}

.currency {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.profile-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .card {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

