/* Proposals Component Styles */
.proposals-container {
    padding: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-left h2 {
    margin: 0 0 0.25rem 0;
    color: #1a1a2e;
    font-size: 1.5rem;
}

.subtitle {
    margin: 0;
    color: #666;
    font-size: 0.85rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.15rem;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
}

/* Layout em Lista para Propostas - Estrutura de Tabela */
.proposals-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.proposal-card {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: background-color 0.1s;
    display: grid;
    grid-template-columns: 100px 1fr 180px 140px 180px;
    align-items: center;
    border: 1px solid #eef0f5;
    min-height: 60px;
    padding: 0.75rem 0;
}

.proposal-card:hover {
    background-color: #f8fbff;
    border-color: var(--primary-blue);
}

.proposal-header {
    background: transparent;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eef0f5;
    height: 100%;
}

.proposal-number {
    text-align: center;
}

.proposal-number .label {
    font-size: 0.55rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.proposal-number .number {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.status-badge {
    margin-top: 4px;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.proposal-body {
    padding: 0 1rem;
    display: contents;
}

.proposal-title {
    padding: 0 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: #1a1a2e;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proposal-info {
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: #555;
    white-space: nowrap;
}

.info-item .icon {
    font-size: 0.8rem;
    width: 16px;
    display: inline-block;
    text-align: center;
}

.proposal-value {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.value-label {
    display: none;
}

.value-amount {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
}

.proposal-actions {
    padding: 0 1rem;
    display: flex;
    gap: 0.3rem;
    justify-content: flex-start;
}

.btn-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    color: #666;
}

.btn-action:hover:not(:disabled) {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.btn-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-action .icon {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
}

.empty-state p {
    margin: 0;
    color: #666;
}

.modal-large {
    max-width: 900px;
}

.modal-xlarge {
    max-width: 1200px;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin: 0 0 1rem 0;
    color: #1a1a2e;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* New Form Styles */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-section-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #eef0f5;
    overflow: hidden;
}

.form-section-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #eef0f5;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.card-body {
    padding: 1.5rem;
}

.import-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: #f1f3f5;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #333;
}

.ai-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ai-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.ai-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1.1rem;
}

.ai-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.ai-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-upload-wrapper {
    flex: 1;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.file-upload-wrapper:hover {
    border-color: var(--primary-blue);
    background: #f8fbff;
}

.rich-editor {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 1rem;
    min-height: 150px;
    margin-bottom: 1rem;
    font-family: inherit;
    line-height: 1.6;
}

.schedule-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.schedule-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #eef0f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-number {
    font-weight: 600;
    color: var(--primary-blue);
}

.btn-remove-item {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-remove-item:hover {
    background: #fecaca;
}

.total-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.total-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    opacity: 0.9;
}

.total-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.proposal-view {
    padding: 2rem;
}

.view-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #667eea;
}

.view-section {
    margin-bottom: 2rem;
}

.view-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.items-table th,
.items-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.items-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #1a1a2e;
}

.items-table tr:hover {
    background: #f8f9fa;
}