/* Estilos gerais do plugin */
.gcl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gcl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.gcl-title {
    font-size: 28px;
    font-weight: bold;
    color: #1d2327;
    margin: 0;
}

.gcl-actions {
    display: flex;
    gap: 10px;
}

.gcl-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.gcl-btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.gcl-btn-primary {
    background-color: #0073aa;
    color: white;
}

.gcl-btn-primary:hover {
    background-color: #005a87;
    color: white;
}

.gcl-btn-secondary {
    background-color: #f6f7f7;
    color: #50575e;
    border: 1px solid #c3c4c7;
}

.gcl-btn-secondary:hover {
    background-color: #f0f0f1;
    color: #50575e;
}

.gcl-btn-success {
    background-color: #00a32a;
    color: white;
}

.gcl-btn-success:hover {
    background-color: #008a20;
    color: white;
}

.gcl-btn-warning {
    background-color: #dba617;
    color: white;
}

.gcl-btn-warning:hover {
    background-color: #c29d0b;
    color: white;
}

.gcl-btn-danger {
    background-color: #d63638;
    color: white;
}

.gcl-btn-danger:hover {
    background-color: #b32d2e;
    color: white;
}

/* Estilos para modais */
.gcl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gcl-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.gcl-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.gcl-modal-overlay.active .gcl-modal {
    transform: scale(1);
}

.gcl-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gcl-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
}

.gcl-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.gcl-modal-close:hover {
    background-color: #f0f0f1;
    color: #333;
}

.gcl-modal-body {
    padding: 20px 25px;
}

.gcl-modal-footer {
    padding: 15px 25px 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Modal de confirmação */
.gcl-modal-confirm .gcl-modal-body {
    text-align: center;
    padding: 30px 25px;
}

.gcl-modal-confirm .gcl-modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.gcl-modal-confirm.warning .gcl-modal-icon {
    color: #dba617;
}

.gcl-modal-confirm.danger .gcl-modal-icon {
    color: #d63638;
}

.gcl-modal-confirm.info .gcl-modal-icon {
    color: #0073aa;
}

.gcl-modal-confirm .gcl-modal-message {
    font-size: 16px;
    color: #1d2327;
    margin-bottom: 10px;
    font-weight: 500;
}

.gcl-modal-confirm .gcl-modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 0;
}

/* Modal de progresso */
.gcl-modal-progress .gcl-modal-body {
    text-align: center;
    padding: 40px 25px;
}

.gcl-progress-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gcl-progress-message {
    font-size: 16px;
    color: #1d2327;
    margin-bottom: 10px;
    font-weight: 500;
}

.gcl-progress-description {
    font-size: 14px;
    color: #666;
}

/* Modal de sucesso */
.gcl-modal-success .gcl-modal-body {
    text-align: center;
    padding: 30px 25px;
}

.gcl-modal-success .gcl-modal-icon {
    font-size: 48px;
    color: #00a32a;
    margin-bottom: 20px;
    display: block;
}

.gcl-modal-success .gcl-modal-message {
    font-size: 16px;
    color: #1d2327;
    margin-bottom: 10px;
    font-weight: 500;
}

.gcl-modal-success .gcl-modal-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Responsividade para modais */
@media (max-width: 768px) {
    .gcl-modal {
        width: 95%;
        margin: 20px;
    }
    
    .gcl-modal-header,
    .gcl-modal-body,
    .gcl-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .gcl-modal-footer {
        flex-direction: column;
    }
    
    .gcl-modal-footer .gcl-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .gcl-modal-footer .gcl-btn:last-child {
        margin-bottom: 0;
    }
}

/* Estilos existentes mantidos */
.gcl-search-bar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gcl-search-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.gcl-search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.gcl-filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

.gcl-contracts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gcl-contracts-table th,
.gcl-contracts-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.gcl-contracts-table th {
    background-color: #f6f7f7;
    font-weight: 600;
    color: #1d2327;
}

.gcl-contracts-table tr:hover {
    background-color: #f9f9f9;
}

.gcl-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.gcl-status-rascunho {
    background-color: #fef2f2;
    color: #dc2626;
}

.gcl-status-finalizado {
    background-color: #f0fdf4;
    color: #16a34a;
}

.gcl-actions-cell {
    min-width: 200px;
}

.gcl-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 5px;
}

.gcl-form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gcl-form-section {
    margin-bottom: 30px;
}

.gcl-form-section h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
    color: #1d2327;
    font-size: 18px;
}

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

.gcl-form-group {
    margin-bottom: 20px;
}

.gcl-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #1d2327;
}

.gcl-form-group input,
.gcl-form-group select,
.gcl-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.gcl-form-group input:focus,
.gcl-form-group select:focus,
.gcl-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.gcl-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.gcl-notice {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.gcl-notice-success {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.gcl-notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gcl-notice-info {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gcl-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.gcl-empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

.gcl-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.gcl-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.gcl-pagination button:hover {
    background: #f8f9fa;
}

.gcl-pagination button.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.gcl-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.gcl-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@media (max-width: 768px) {
    .gcl-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .gcl-search-form {
        flex-direction: column;
    }
    
    .gcl-search-input {
        min-width: auto;
    }
    
    .gcl-contracts-table {
        font-size: 12px;
    }
    
    .gcl-contracts-table th,
    .gcl-contracts-table td {
        padding: 10px 8px;
    }
    
    .gcl-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .gcl-form-grid {
        grid-template-columns: 1fr;
    }
    
    .gcl-form-actions {
        flex-direction: column;
    }
}