@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0056b3;
    /* Royal Blue */
    --primary-light: #e7f1ff;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #444;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

.btn-calculate {
    grid-column: 1 / -1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-calculate:hover {
    background: #004494;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 86, 179, 0.2);
}

/* Result Styles */
.result-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.result-section.active {
    display: block;
}

.total-card {
    background: var(--primary);
    color: white;
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.total-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.total-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 5px 0;
}

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

@media (max-width: 768px) {
    .result-tables {
        grid-template-columns: 1fr;
    }
}

.table-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-header {
    padding: 15px;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
}

.header-proventos {
    background: #f0fff4;
    color: var(--success);
}

.header-descontos {
    background: #fff5f5;
    color: var(--danger);
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 12px 15px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f1f1;
}

.val-col {
    text-align: right;
    font-weight: 600;
}

.footer-row {
    background: #f8f9fa;
    font-weight: 700;
}

.actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-action {
    padding: 12px 25px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text-main);
}

.btn-action:hover {
    background: #f1f1f1;
}

.btn-print {
    background: var(--secondary);
    color: white;
    border: none;
}

.btn-print:hover {
    background: #5a6268;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social and Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.social-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Print Overrides */
@media print {
    body {
        padding: 0;
        background: white;
    }

    .card:not(.result-section),
    footer,
    .actions,
    .ads-block {
        display: none !important;
    }

    .result-section {
        display: block !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}