:root {
    --primary-color: #A52A2A;
    --secondary-color: #8B4513;
    --accent-color: #CD853F;
    --light-color: #DEB887;
    --lightest-color: #F5DEB3;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--lightest-color);
    color: var(--text-dark);
    line-height: 1.6;
    padding-bottom: 80px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.header-content h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.header-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

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

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

.welcome-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.welcome-card h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Hero Actions */
.hero-actions {
    margin: 2rem 0;
    text-align: center;
}

.hero-actions h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.hero-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-action-btn:hover::before {
    left: 100%;
}

.hero-action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.hero-action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.hero-action-btn.secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-action-btn.secondary:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.hero-action-btn i {
    font-size: 2rem;
    min-width: 2rem;
    text-align: center;
}

.hero-action-btn.primary i {
    color: white;
}

.hero-action-btn.secondary i {
    color: var(--primary-color);
}

.action-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.hero-action-btn.primary .action-content p {
    color: rgba(255,255,255,0.9);
}

.hero-action-btn.secondary .action-content p {
    color: var(--text-light);
}

.user-type-selector {
    margin: 2rem 0;
}

.user-type-selector h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.user-type-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-type-btn {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    border: 2px solid var(--accent-color);
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.user-type-btn:hover {
    background: var(--accent-color);
    color: white;
}

.user-type-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.user-type-btn i {
    font-size: 1.5rem;
}

.quick-actions {
    margin-top: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    background: var(--light-color);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
}

.action-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 1.2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.primary-btn, .secondary-btn, .success-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.secondary-btn {
    background: var(--light-color);
    color: var(--text-dark);
}

.secondary-btn:hover {
    background: var(--accent-color);
    color: white;
}

.success-btn {
    background: #28a745;
    color: white;
}

.success-btn:hover {
    background: #218838;
}

.wizard-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.wizard-progress {
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: slideIn 0.3s ease-in;
}

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

.wizard-step h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

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

.calculator-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.calculator-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.calculator-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.result-display {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    display: none;
}

.result-display.show {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.result-display h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.document-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.document-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.document-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.contracts-container,
#reminders-list {
    display: grid;
    gap: 1rem;
}

.contract-item,
.reminder-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.contract-item h4,
.reminder-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contract-item p,
.reminder-item p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.contract-actions,
.reminder-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contract-actions button,
.reminder-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.edit-btn {
    background: var(--accent-color);
    color: white;
}

.edit-btn:hover {
    background: var(--secondary-color);
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.download-btn {
    background: #28a745;
    color: white;
}

.download-btn:hover {
    background: #218838;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal form {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.faq-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.faq-question {
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 0 1rem 0;
    color: var(--text-light);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.show {
    max-height: 200px;
    padding: 1rem 0;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
    min-width: 60px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-color);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--light-color);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.upcoming-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--accent-color);
}

.upcoming-item.overdue {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.upcoming-item.today {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.upcoming-date {
    font-weight: bold;
    color: var(--text-dark);
}

.upcoming-title {
    font-size: 0.9rem;
    color: var(--text-light);
}

.financial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.financial-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.financial-value {
    font-weight: bold;
    color: var(--primary-color);
}

/* Labor Costs Summary */
.costs-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-color);
}

.cost-item.total-cost {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
    border-left: 3px solid var(--accent-color);
}

.cost-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cost-item.total-cost .cost-label {
    color: white;
}

.cost-value {
    font-weight: bold;
    color: var(--primary-color);
}

.cost-item.total-cost .cost-value {
    color: white;
    font-size: 1.1rem;
}

/* Legal Information Card */
.legal-info-card {
    grid-column: 1 / -1; /* Ocupa toda a largura */
    max-height: 600px;
    overflow-y: auto;
}

.legal-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section {
    background: var(--lightest-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.legal-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legal-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    line-height: 1.4;
}

.legal-list li:last-child {
    border-bottom: none;
}

.legal-list li strong {
    color: var(--text-dark);
    font-weight: 600;
}

.legal-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

.legal-disclaimer p {
    margin: 0;
    font-size: 0.85rem;
    color: #856404;
    line-height: 1.4;
}

.legal-disclaimer strong {
    color: #856404;
}

/* Legal References */
.legal-references {
    margin-top: 1rem;
}

.legal-details {
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.legal-reference h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.reference-item {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent-color);
}

.reference-item strong {
    color: var(--primary-color);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.reference-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.reference-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.reference-item ul li {
    padding: 0.25rem 0;
    font-size: 0.85rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--lightest-color);
}

.reference-item ul li:last-child {
    border-bottom: none;
}

/* Search and Filters */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.filters-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--lightest-color);
    border-radius: var(--border-radius);
    flex-wrap: wrap;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

#clear-filters {
    align-self: flex-end;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Contract Status */
.contract-status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.contract-status.active {
    background: #d4edda;
    color: #155724;
}

.contract-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Contract Actions Enhanced */
.contract-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contract-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.contract-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Empty State Enhanced */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--light-color);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.empty-state p {
    margin-bottom: 1rem;
}

.empty-state .action-btn {
    margin-top: 1rem;
}

/* Input with Button */
.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-button input {
    padding-right: 3rem;
}

.use-contract-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.use-contract-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.05);
}

.use-contract-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Contract Selection Modal */
.contract-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.contract-selection-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.contract-selection-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contract-selection-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.close-selection {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-selection:hover {
    color: var(--text-dark);
}

.contract-selection-list {
    padding: 1rem;
}

.contract-selection-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contract-selection-item:hover {
    border-color: var(--primary-color);
    background: var(--lightest-color);
}

.contract-selection-item.selected {
    border-color: var(--primary-color);
    background: var(--lightest-color);
}

.contract-selection-name {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.contract-selection-details {
    font-size: 0.8rem;
    color: var(--text-light);
}

.contract-selection-salary {
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

/* Tabs */
.documents-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    color: var(--text-dark);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Backup Section */
.backup-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.backup-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.backup-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.backup-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Reports Section */
.reports-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.report-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.report-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* System Stats */
#system-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .documents-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .action-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-action-btn {
        padding: 1rem;
    }
    
    .hero-action-btn i {
        font-size: 1.5rem;
    }
    
    .action-content h4 {
        font-size: 1rem;
    }
    
    .action-content p {
        font-size: 0.8rem;
    }
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .user-type-buttons {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wizard-navigation {
        flex-direction: column;
    }
    
    .calculators-grid,
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .contract-actions,
    .reminder-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.5rem;
    }
    
    .welcome-card,
    .wizard-container,
    .calculator-card,
    .document-card {
        padding: 1rem;
    }
    
    .nav-item span {
        font-size: 0.6rem;
    }
    
    .nav-item i {
        font-size: 1rem;
    }
}
